From 0069adf74d333acec97b33f56668ef7a91f67c6b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 28 Sep 2026 04:49:52 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- ...outer.AnalyticsClient.GetUserActivity.g.cs | 10 +- ...nthropicMessagesClient.CreateMessages.g.cs | 10 +- .../OpenRouter.ApiKeysClient.CreateKeys.g.cs | 10 +- .../OpenRouter.ApiKeysClient.DeleteKeys.g.cs | 12 +- ...penRouter.ApiKeysClient.GetCurrentKey.g.cs | 10 +- .../OpenRouter.ApiKeysClient.GetKey.g.cs | 12 +- .../OpenRouter.ApiKeysClient.List.g.cs | 10 +- .../OpenRouter.ApiKeysClient.UpdateKeys.g.cs | 12 +- .../OpenRouter.AutoSDKHttpResponse.g.cs | 4 +- ...Router.BenchmarksClient.GetBenchmarks.g.cs | 10 +- ....BetaAnalyticsClient.GetAnalyticsMeta.g.cs | 10 +- ...er.BetaAnalyticsClient.QueryAnalytics.g.cs | 10 +- ...r.BetaResponsesClient.CreateResponses.g.cs | 10 +- .../OpenRouter.ByokClient.CreateBYOKKey.g.cs | 10 +- .../OpenRouter.ByokClient.DeleteBYOKKey.g.cs | 12 +- .../OpenRouter.ByokClient.GetBYOKKey.g.cs | 12 +- .../OpenRouter.ByokClient.ListBYOKKeys.g.cs | 10 +- .../OpenRouter.ByokClient.UpdateBYOKKey.g.cs | 12 +- ....ChatClient.SendChatCompletionRequest.g.cs | 10 +- ...icationsClient.GetTaskClassifications.g.cs | 10 +- .../OpenRouter.CreditsClient.GetCredits.g.cs | 10 +- ...nRouter.DatasetsClient.GetAppRankings.g.cs | 10 +- ...outer.DatasetsClient.GetRankingsDaily.g.cs | 10 +- ...ter.EmbeddingsClient.CreateEmbeddings.g.cs | 10 +- ...EmbeddingsClient.ListEmbeddingsModels.g.cs | 10 +- ...nRouter.EndpointsClient.ListEndpoints.g.cs | 14 +- ...uter.EndpointsClient.ListEndpointsZdr.g.cs | 10 +- .../OpenRouter.FilesClient.DeleteFile.g.cs | 12 +- ...outer.FilesClient.DownloadFileContent.g.cs | 24 +- ...penRouter.FilesClient.GetFileMetadata.g.cs | 12 +- .../OpenRouter.FilesClient.ListFiles.g.cs | 10 +- .../OpenRouter.FilesClient.UploadFile.g.cs | 30 +- ...outer.GenerationsClient.GetGeneration.g.cs | 12 +- ...nerationsClient.ListGenerationContent.g.cs | 12 +- ...ationsClient.SubmitGenerationFeedback.g.cs | 10 +- ...railsClient.BulkAssignKeysToGuardrail.g.cs | 12 +- ...lsClient.BulkAssignMembersToGuardrail.g.cs | 12 +- ...sClient.BulkUnassignKeysFromGuardrail.g.cs | 12 +- ...ient.BulkUnassignMembersFromGuardrail.g.cs | 12 +- ...uter.GuardrailsClient.CreateGuardrail.g.cs | 10 +- ...uter.GuardrailsClient.DeleteGuardrail.g.cs | 12 +- ...nRouter.GuardrailsClient.GetGuardrail.g.cs | 12 +- ...ilsClient.ListGuardrailKeyAssignments.g.cs | 12 +- ...Client.ListGuardrailMemberAssignments.g.cs | 12 +- ...outer.GuardrailsClient.ListGuardrails.g.cs | 10 +- ...r.GuardrailsClient.ListKeyAssignments.g.cs | 10 +- ...uardrailsClient.ListMemberAssignments.g.cs | 10 +- ...uter.GuardrailsClient.UpdateGuardrail.g.cs | 12 +- .../OpenRouter.ImagesClient.CreateImages.g.cs | 10 +- ....ImagesClient.ListImageModelEndpoints.g.cs | 14 +- ...enRouter.ImagesClient.ListImageModels.g.cs | 10 +- ...verters.AdditionalToolsItemToolsItems.g.cs | 56 +- ...nverters.AgentMessageItemContentItems.g.cs | 6 +- ...emaClassifierFiltersFiltersItemsValue.g.cs | 6 +- ...erFiltersFiltersItemsValueOneOf2Items.g.cs | 4 +- ...pplicationJsonSchemaFiltersItemsValue.g.cs | 6 +- ...sonSchemaFiltersItemsValueOneOf2Items.g.cs | 4 +- ...ers.AnthropicBashCodeExecutionContent.g.cs | 4 +- ...Router.JsonConverters.AnthropicCaller.g.cs | 6 +- ...verters.AnthropicCodeExecutionContent.g.cs | 6 +- ...ers.AnthropicDocumentBlockParamSource.g.cs | 10 +- ...DocumentBlockParamSourceOneOf2Content.g.cs | 4 +- ...ckParamSourceOneOf2ContentOneOf1Items.g.cs | 4 +- ...nverters.AnthropicDocumentBlockSource.g.cs | 4 +- ...erters.AnthropicImageBlockParamSource.g.cs | 4 +- ...AnthropicTextBlockParamCitationsItems.g.cs | 10 +- ....JsonConverters.AnthropicTextCitation.g.cs | 10 +- ...thropicTextEditorCodeExecutionContent.g.cs | 8 +- ...Converters.AnthropicToolSearchContent.g.cs | 4 +- ...sonConverters.AnthropicUsageIteration.g.cs | 8 +- ...onConverters.AnthropicWebFetchContent.g.cs | 4 +- ...sonConverters.ApplyPatchCallOperation.g.cs | 6 +- .../OpenRouter.JsonConverters.BaseInputs.g.cs | 4 +- ....JsonConverters.BaseInputsOneOf1Items.g.cs | 20 +- ...rs.BaseInputsOneOf1ItemsOneOf0Content.g.cs | 4 +- ...tsOneOf1ItemsOneOf0ContentOneOf0Items.g.cs | 8 +- ...ters.BaseInputsOneOf1ItemsOneOf0Phase.g.cs | 4 +- ...rters.BaseInputsOneOf1ItemsOneOf0Role.g.cs | 8 +- ...nConverters.BashServerToolEnvironment.g.cs | 4 +- ...r.JsonConverters.CapabilityDescriptor.g.cs | 6 +- ...outer.JsonConverters.ChatContentItems.g.cs | 12 +- ...outer.JsonConverters.ChatFunctionTool.g.cs | 24 +- ...penRouter.JsonConverters.ChatMessages.g.cs | 10 +- ...sDiscriminatorMappingAssistantContent.g.cs | 4 +- ...sDiscriminatorMappingDeveloperContent.g.cs | 4 +- ...sonConverters.ChatRequestPluginsItems.g.cs | 20 +- ...nConverters.ChatRequestResponseFormat.g.cs | 10 +- ...Router.JsonConverters.ChatRequestStop.g.cs | 4 +- ...onConverters.ChatSystemMessageContent.g.cs | 4 +- ...nRouter.JsonConverters.ChatToolChoice.g.cs | 10 +- ...JsonConverters.ChatToolMessageContent.g.cs | 4 +- ...JsonConverters.ChatUserMessageContent.g.cs | 4 +- ...rs.CodeInterpreterServerToolContainer.g.cs | 4 +- ...eObservabilityDestinationResponseData.g.cs | 34 +- ...erters.CustomToolCallOutputItemOutput.g.cs | 4 +- ...omToolCallOutputItemOutputOneOf1Items.g.cs | 6 +- ...outer.JsonConverters.CustomToolFormat.g.cs | 4 +- ...sonConverters.EasyInputMessageContent.g.cs | 4 +- ...rs.EasyInputMessageContentOneOf0Items.g.cs | 10 +- ....JsonConverters.EasyInputMessagePhase.g.cs | 4 +- ...r.JsonConverters.EasyInputMessageRole.g.cs | 8 +- ...BodyContentApplicationJsonSchemaInput.g.cs | 10 +- ...sonSchemaInputOneOf4ItemsContentItems.g.cs | 10 +- ...licationJsonSchemaProviderIgnoreItems.g.cs | 4 +- ...pplicationJsonSchemaProviderOnlyItems.g.cs | 4 +- ...plicationJsonSchemaProviderOrderItems.g.cs | 4 +- ...tentApplicationJsonSchemaProviderSort.g.cs | 4 +- ...plicationJsonSchemaDataItemsEmbedding.g.cs | 4 +- ...onverters.FileSearchServerToolFilters.g.cs | 4 +- ...ileSearchServerToolFiltersOneOf0Value.g.cs | 8 +- ...rverToolFiltersOneOf0ValueOneOf3Items.g.cs | 4 +- .../OpenRouter.JsonConverters.Formats.g.cs | 6 +- ...nverters.FunctionCallOutputItemOutput.g.cs | 4 +- ...nctionCallOutputItemOutputOneOf1Items.g.cs | 6 +- ...Converters.GenerationContentDataInput.g.cs | 4 +- ...tObservabilityDestinationResponseData.g.cs | 34 +- ...OpenRouter.JsonConverters.ImageConfig.g.cs | 6 +- ...erationProviderPreferencesIgnoreItems.g.cs | 4 +- ...enerationProviderPreferencesOnlyItems.g.cs | 4 +- ...nerationProviderPreferencesOrderItems.g.cs | 4 +- ...mageGenerationProviderPreferencesSort.g.cs | 4 +- ...nverters.InputMessageItemContentItems.g.cs | 10 +- ...r.JsonConverters.InputMessageItemRole.g.cs | 6 +- ...nRouter.JsonConverters.InputReference.g.cs | 6 +- .../OpenRouter.JsonConverters.Inputs.g.cs | 4 +- ...uter.JsonConverters.InputsOneOf1Items.g.cs | 98 +-- ...erters.InputsOneOf1ItemsOneOf7Content.g.cs | 4 +- ...tsOneOf1ItemsOneOf7ContentOneOf0Items.g.cs | 4 +- ...nConverters.McpServerToolAllowedTools.g.cs | 4 +- ...nverters.McpServerToolRequireApproval.g.cs | 6 +- ...onverters.MessagesMessageParamContent.g.cs | 4 +- ...essagesMessageParamContentOneOf1Items.g.cs | 24 +- ...eParamContentOneOf1ItemsOneOf4Content.g.cs | 4 +- ...ntOneOf1ItemsOneOf4ContentOneOf1Items.g.cs | 10 +- ...eParamContentOneOf1ItemsOneOf8Content.g.cs | 4 +- ...gesRequestContextManagementEditsItems.g.cs | 6 +- ...gementEditsItemsOneOf0ClearToolInputs.g.cs | 4 +- ...textManagementEditsItemsOneOf0Trigger.g.cs | 4 +- ...ContextManagementEditsItemsOneOf1Keep.g.cs | 6 +- ...onverters.MessagesRequestPluginsItems.g.cs | 20 +- ....JsonConverters.MessagesRequestSystem.g.cs | 4 +- ...sonConverters.MessagesRequestThinking.g.cs | 6 +- ...nConverters.MessagesRequestToolChoice.g.cs | 8 +- ...nConverters.MessagesRequestToolsItems.g.cs | 26 +- ...sonConverters.NamespaceToolToolsItems.g.cs | 4 +- ...sonConverters.ORAnthropicContentBlock.g.cs | 28 +- ...onConverters.ObservabilityDestination.g.cs | 34 +- ...abilityFilterRuleGroupRulesItemsValue.g.cs | 4 +- ...nConverters.OpenAIResponsesAnnotation.g.cs | 6 +- ...nConverters.OpenAIResponsesToolChoice.g.cs | 16 +- ...nAiResponseCustomToolCallOutputOutput.g.cs | 4 +- ...CustomToolCallOutputOutputOneOf1Items.g.cs | 6 +- ...iResponseFunctionToolCallOutputOutput.g.cs | 4 +- ...nctionToolCallOutputOutputOneOf1Items.g.cs | 6 +- ...iResponseInputMessageItemContentItems.g.cs | 8 +- ...rs.OpenAiResponseInputMessageItemRole.g.cs | 6 +- ...s.OpenAiResponsesToolChoiceOneOf4Type.g.cs | 4 +- ...verters.OpenResponsesResultToolsItems.g.cs | 30 +- ...atorMappingWebSearchToolResultContent.g.cs | 4 +- ...nConverters.OrAnthropicNullableCaller.g.cs | 6 +- ...utCodeInterpreterCallItemOutputsItems.g.cs | 4 +- ...nverters.OutputFunctionCallItemStatus.g.cs | 6 +- ...OpenRouter.JsonConverters.OutputItems.g.cs | 60 +- ...nConverters.OutputMessageContentItems.g.cs | 4 +- ...verters.OutputMessageItemContentItems.g.cs | 4 +- ...JsonConverters.OutputMessageItemPhase.g.cs | 4 +- ...sonConverters.OutputMessageItemStatus.g.cs | 6 +- ...ter.JsonConverters.OutputMessagePhase.g.cs | 4 +- ...er.JsonConverters.OutputMessageStatus.g.cs | 6 +- ...nConverters.OutputReasoningItemStatus.g.cs | 6 +- ...ShellCallOutputItemOutputItemsOutcome.g.cs | 4 +- ...verters.OutputWebSearchCallItemAction.g.cs | 6 +- ...Router.JsonConverters.PDFParserEngine.g.cs | 4 +- ...uter.JsonConverters.PredictionContent.g.cs | 4 +- ...er.JsonConverters.PreferredMaxLatency.g.cs | 4 +- ...JsonConverters.PreferredMinThroughput.g.cs | 4 +- ...erters.ProviderPreferencesIgnoreItems.g.cs | 4 +- ...nverters.ProviderPreferencesOnlyItems.g.cs | 4 +- ...verters.ProviderPreferencesOrderItems.g.cs | 4 +- ...sonConverters.ProviderPreferencesSort.g.cs | 4 +- ...r.JsonConverters.ReasoningDetailUnion.g.cs | 8 +- ...er.JsonConverters.ReasoningItemStatus.g.cs | 6 +- ...ntApplicationJsonSchemaDocumentsItems.g.cs | 4 +- ...licationJsonSchemaProviderIgnoreItems.g.cs | 4 +- ...pplicationJsonSchemaProviderOnlyItems.g.cs | 4 +- ...plicationJsonSchemaProviderOrderItems.g.cs | 4 +- ...tentApplicationJsonSchemaProviderSort.g.cs | 4 +- ...nverters.ResponsesRequestPluginsItems.g.cs | 20 +- ...atorMappingFusionToolsItemsParameters.g.cs | 10 +- ...FusionToolsItemsParametersOneOf3Items.g.cs | 6 +- ...ppingFusionToolsItemsParametersOneOf4.g.cs | 6 +- ...Converters.ResponsesRequestToolsItems.g.cs | 54 +- ...Converters.ShellServerToolEnvironment.g.cs | 4 +- ...nverters.StopServerToolsWhenCondition.g.cs | 10 +- ...verters.StoredPromptTemplateVariables.g.cs | 8 +- ....JsonConverters.ToolChoiceAllowedMode.g.cs | 4 +- ...rs.UnifiedBenchmarksResponseDataItems.g.cs | 4 +- ...eObservabilityDestinationResponseData.g.cs | 34 +- ....Models.AdditionalToolsItemToolsItems.g.cs | 448 +++++----- ...r.Models.AgentMessageItemContentItems.g.cs | 48 +- ...emaClassifierFiltersFiltersItemsValue.g.cs | 48 +- ...erFiltersFiltersItemsValueOneOf2Items.g.cs | 32 +- ...pplicationJsonSchemaFiltersItemsValue.g.cs | 48 +- ...sonSchemaFiltersItemsValueOneOf2Items.g.cs | 32 +- ...els.AnthropicBashCodeExecutionContent.g.cs | 32 +- .../OpenRouter.Models.AnthropicCaller.g.cs | 48 +- ....Models.AnthropicCodeExecutionContent.g.cs | 48 +- ...els.AnthropicDocumentBlockParamSource.g.cs | 80 +- ...DocumentBlockParamSourceOneOf2Content.g.cs | 32 +- ...ckParamSourceOneOf2ContentOneOf1Items.g.cs | 32 +- ...r.Models.AnthropicDocumentBlockSource.g.cs | 32 +- ...Models.AnthropicImageBlockParamSource.g.cs | 32 +- ...AnthropicTextBlockParamCitationsItems.g.cs | 80 +- ...enRouter.Models.AnthropicTextCitation.g.cs | 80 +- ...thropicTextEditorCodeExecutionContent.g.cs | 64 +- ...ter.Models.AnthropicToolSearchContent.g.cs | 32 +- ...Router.Models.AnthropicUsageIteration.g.cs | 64 +- ...outer.Models.AnthropicWebFetchContent.g.cs | 32 +- ...Router.Models.ApplyPatchCallOperation.g.cs | 48 +- .../OpenRouter.Models.BaseInputs.g.cs | 32 +- ...enRouter.Models.BaseInputsOneOf1Items.g.cs | 160 ++-- ...ls.BaseInputsOneOf1ItemsOneOf0Content.g.cs | 32 +- ...tsOneOf1ItemsOneOf0ContentOneOf0Items.g.cs | 64 +- ...dels.BaseInputsOneOf1ItemsOneOf0Phase.g.cs | 32 +- ...odels.BaseInputsOneOf1ItemsOneOf0Role.g.cs | 64 +- ...uter.Models.BashServerToolEnvironment.g.cs | 32 +- ...penRouter.Models.CapabilityDescriptor.g.cs | 48 +- .../OpenRouter.Models.ChatContentItems.g.cs | 96 +-- .../OpenRouter.Models.ChatFunctionTool.g.cs | 192 ++--- .../OpenRouter.Models.ChatMessages.g.cs | 80 +- ...sDiscriminatorMappingAssistantContent.g.cs | 32 +- ...sDiscriminatorMappingDeveloperContent.g.cs | 32 +- ...Router.Models.ChatRequestPluginsItems.g.cs | 160 ++-- ...uter.Models.ChatRequestResponseFormat.g.cs | 80 +- .../OpenRouter.Models.ChatRequestStop.g.cs | 32 +- ...outer.Models.ChatSystemMessageContent.g.cs | 32 +- .../OpenRouter.Models.ChatToolChoice.g.cs | 80 +- ...nRouter.Models.ChatToolMessageContent.g.cs | 32 +- ...nRouter.Models.ChatUserMessageContent.g.cs | 32 +- ...ls.CodeInterpreterServerToolContainer.g.cs | 32 +- ...eObservabilityDestinationResponseData.g.cs | 272 +++--- ...Models.CustomToolCallOutputItemOutput.g.cs | 32 +- ...omToolCallOutputItemOutputOneOf1Items.g.cs | 48 +- .../OpenRouter.Models.CustomToolFormat.g.cs | 32 +- ...Router.Models.EasyInputMessageContent.g.cs | 32 +- ...ls.EasyInputMessageContentOneOf0Items.g.cs | 80 +- ...enRouter.Models.EasyInputMessagePhase.g.cs | 32 +- ...penRouter.Models.EasyInputMessageRole.g.cs | 64 +- ...BodyContentApplicationJsonSchemaInput.g.cs | 80 +- ...sonSchemaInputOneOf4ItemsContentItems.g.cs | 80 +- ...licationJsonSchemaProviderIgnoreItems.g.cs | 32 +- ...pplicationJsonSchemaProviderOnlyItems.g.cs | 32 +- ...plicationJsonSchemaProviderOrderItems.g.cs | 32 +- ...tentApplicationJsonSchemaProviderSort.g.cs | 32 +- ...plicationJsonSchemaDataItemsEmbedding.g.cs | 32 +- ...er.Models.FileSearchServerToolFilters.g.cs | 32 +- ...ileSearchServerToolFiltersOneOf0Value.g.cs | 64 +- ...rverToolFiltersOneOf0ValueOneOf3Items.g.cs | 32 +- .../Generated/OpenRouter.Models.Formats.g.cs | 48 +- ...r.Models.FunctionCallOutputItemOutput.g.cs | 32 +- ...nctionCallOutputItemOutputOneOf1Items.g.cs | 48 +- ...ter.Models.GenerationContentDataInput.g.cs | 32 +- ...tObservabilityDestinationResponseData.g.cs | 272 +++--- .../OpenRouter.Models.ImageConfig.g.cs | 48 +- ...erationProviderPreferencesIgnoreItems.g.cs | 32 +- ...enerationProviderPreferencesOnlyItems.g.cs | 32 +- ...nerationProviderPreferencesOrderItems.g.cs | 32 +- ...mageGenerationProviderPreferencesSort.g.cs | 32 +- ...r.Models.InputMessageItemContentItems.g.cs | 80 +- ...penRouter.Models.InputMessageItemRole.g.cs | 48 +- .../OpenRouter.Models.InputReference.g.cs | 48 +- .../Generated/OpenRouter.Models.Inputs.g.cs | 32 +- .../OpenRouter.Models.InputsOneOf1Items.g.cs | 784 +++++++++--------- ...Models.InputsOneOf1ItemsOneOf7Content.g.cs | 32 +- ...tsOneOf1ItemsOneOf7ContentOneOf0Items.g.cs | 32 +- ...uter.Models.McpServerToolAllowedTools.g.cs | 32 +- ...r.Models.McpServerToolRequireApproval.g.cs | 48 +- ...er.Models.MessagesMessageParamContent.g.cs | 32 +- ...essagesMessageParamContentOneOf1Items.g.cs | 192 ++--- ...eParamContentOneOf1ItemsOneOf4Content.g.cs | 32 +- ...ntOneOf1ItemsOneOf4ContentOneOf1Items.g.cs | 80 +- ...eParamContentOneOf1ItemsOneOf8Content.g.cs | 32 +- ...gesRequestContextManagementEditsItems.g.cs | 48 +- ...gementEditsItemsOneOf0ClearToolInputs.g.cs | 32 +- ...textManagementEditsItemsOneOf0Trigger.g.cs | 32 +- ...ContextManagementEditsItemsOneOf1Keep.g.cs | 48 +- ...er.Models.MessagesRequestPluginsItems.g.cs | 160 ++-- ...enRouter.Models.MessagesRequestSystem.g.cs | 32 +- ...Router.Models.MessagesRequestThinking.g.cs | 48 +- ...uter.Models.MessagesRequestToolChoice.g.cs | 64 +- ...uter.Models.MessagesRequestToolsItems.g.cs | 208 ++--- ...Router.Models.NamespaceToolToolsItems.g.cs | 32 +- ...Router.Models.ORAnthropicContentBlock.g.cs | 224 ++--- ...outer.Models.ObservabilityDestination.g.cs | 272 +++--- ...abilityFilterRuleGroupRulesItemsValue.g.cs | 32 +- ...uter.Models.OpenAIResponsesAnnotation.g.cs | 48 +- ...uter.Models.OpenAIResponsesToolChoice.g.cs | 128 +-- ...nAiResponseCustomToolCallOutputOutput.g.cs | 32 +- ...CustomToolCallOutputOutputOneOf1Items.g.cs | 48 +- ...iResponseFunctionToolCallOutputOutput.g.cs | 32 +- ...nctionToolCallOutputOutputOneOf1Items.g.cs | 48 +- ...iResponseInputMessageItemContentItems.g.cs | 64 +- ...ls.OpenAiResponseInputMessageItemRole.g.cs | 48 +- ...s.OpenAiResponsesToolChoiceOneOf4Type.g.cs | 32 +- ....Models.OpenResponsesResultToolsItems.g.cs | 240 +++--- ...atorMappingWebSearchToolResultContent.g.cs | 32 +- ...uter.Models.OrAnthropicNullableCaller.g.cs | 48 +- ...utCodeInterpreterCallItemOutputsItems.g.cs | 32 +- ...r.Models.OutputFunctionCallItemStatus.g.cs | 48 +- .../OpenRouter.Models.OutputItems.g.cs | 480 +++++------ ...uter.Models.OutputMessageContentItems.g.cs | 32 +- ....Models.OutputMessageItemContentItems.g.cs | 32 +- ...nRouter.Models.OutputMessageItemPhase.g.cs | 32 +- ...Router.Models.OutputMessageItemStatus.g.cs | 48 +- .../OpenRouter.Models.OutputMessagePhase.g.cs | 32 +- ...OpenRouter.Models.OutputMessageStatus.g.cs | 48 +- ...uter.Models.OutputReasoningItemStatus.g.cs | 48 +- ...ShellCallOutputItemOutputItemsOutcome.g.cs | 32 +- ....Models.OutputWebSearchCallItemAction.g.cs | 48 +- .../OpenRouter.Models.PDFParserEngine.g.cs | 32 +- .../OpenRouter.Models.PredictionContent.g.cs | 32 +- ...OpenRouter.Models.PreferredMaxLatency.g.cs | 32 +- ...nRouter.Models.PreferredMinThroughput.g.cs | 32 +- ...Models.ProviderPreferencesIgnoreItems.g.cs | 32 +- ...r.Models.ProviderPreferencesOnlyItems.g.cs | 32 +- ....Models.ProviderPreferencesOrderItems.g.cs | 32 +- ...Router.Models.ProviderPreferencesSort.g.cs | 32 +- ...penRouter.Models.ReasoningDetailUnion.g.cs | 64 +- ...OpenRouter.Models.ReasoningItemStatus.g.cs | 48 +- ...ntApplicationJsonSchemaDocumentsItems.g.cs | 32 +- ...licationJsonSchemaProviderIgnoreItems.g.cs | 32 +- ...pplicationJsonSchemaProviderOnlyItems.g.cs | 32 +- ...plicationJsonSchemaProviderOrderItems.g.cs | 32 +- ...tentApplicationJsonSchemaProviderSort.g.cs | 32 +- ...r.Models.ResponsesRequestPluginsItems.g.cs | 160 ++-- ...atorMappingFusionToolsItemsParameters.g.cs | 80 +- ...FusionToolsItemsParametersOneOf3Items.g.cs | 48 +- ...ppingFusionToolsItemsParametersOneOf4.g.cs | 48 +- ...ter.Models.ResponsesRequestToolsItems.g.cs | 432 +++++----- ...ter.Models.ShellServerToolEnvironment.g.cs | 32 +- ...r.Models.StopServerToolsWhenCondition.g.cs | 80 +- ....Models.StoredPromptTemplateVariables.g.cs | 64 +- ...enRouter.Models.ToolChoiceAllowedMode.g.cs | 32 +- ...ls.UnifiedBenchmarksResponseDataItems.g.cs | 32 +- ...eObservabilityDestinationResponseData.g.cs | 272 +++--- .../OpenRouter.ModelsClient.GetModel.g.cs | 14 +- .../OpenRouter.ModelsClient.GetModels.g.cs | 10 +- ...enRouter.ModelsClient.ListModelsCount.g.cs | 10 +- ...penRouter.ModelsClient.ListModelsUser.g.cs | 10 +- ...Router.OAuthClient.CreateAuthKeysCode.g.cs | 10 +- ...OAuthClient.ExchangeAuthCodeForAPIKey.g.cs | 10 +- ...Client.CreateObservabilityDestination.g.cs | 10 +- ...Client.DeleteObservabilityDestination.g.cs | 12 +- ...ityClient.GetObservabilityDestination.g.cs | 12 +- ...yClient.ListObservabilityDestinations.g.cs | 10 +- ...Client.UpdateObservabilityDestination.g.cs | 12 +- ...izationClient.ListOrganizationMembers.g.cs | 10 +- ...tsClient.CreatePresetsChatCompletions.g.cs | 12 +- ...r.PresetsClient.CreatePresetsMessages.g.cs | 12 +- ....PresetsClient.CreatePresetsResponses.g.cs | 12 +- .../OpenRouter.PresetsClient.GetPreset.g.cs | 12 +- ...Router.PresetsClient.GetPresetVersion.g.cs | 14 +- ...uter.PresetsClient.ListPresetVersions.g.cs | 12 +- .../OpenRouter.PresetsClient.ListPresets.g.cs | 10 +- ...nRouter.ProvidersClient.ListProviders.g.cs | 10 +- .../OpenRouter.RerankClient.CreateRerank.g.cs | 10 +- ...r.SttClient.CreateAudioTranscriptions.g.cs | 10 +- ...penRouter.TtsClient.CreateAudioSpeech.g.cs | 20 +- ...er.VideoGenerationClient.CreateVideos.g.cs | 10 +- ...outer.VideoGenerationClient.GetVideos.g.cs | 12 +- ...deoGenerationClient.ListVideosContent.g.cs | 24 +- ...ideoGenerationClient.ListVideosModels.g.cs | 10 +- ...kspacesClient.BulkAddWorkspaceMembers.g.cs | 12 +- ...acesClient.BulkRemoveWorkspaceMembers.g.cs | 12 +- ...uter.WorkspacesClient.CreateWorkspace.g.cs | 10 +- ...uter.WorkspacesClient.DeleteWorkspace.g.cs | 12 +- ...orkspacesClient.DeleteWorkspaceBudget.g.cs | 14 +- ...nRouter.WorkspacesClient.GetWorkspace.g.cs | 12 +- ...WorkspacesClient.ListWorkspaceBudgets.g.cs | 12 +- ...WorkspacesClient.ListWorkspaceMembers.g.cs | 12 +- ...outer.WorkspacesClient.ListWorkspaces.g.cs | 10 +- ...uter.WorkspacesClient.UpdateWorkspace.g.cs | 12 +- ...orkspacesClient.UpsertWorkspaceBudget.g.cs | 14 +- 383 files changed, 6521 insertions(+), 6521 deletions(-) diff --git a/src/libs/OpenRouter/Generated/OpenRouter.AnalyticsClient.GetUserActivity.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.AnalyticsClient.GetUserActivity.g.cs index 6f56dc20..00e38a3d 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.AnalyticsClient.GetUserActivity.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.AnalyticsClient.GetUserActivity.g.cs @@ -194,7 +194,7 @@ partial void ProcessGetUserActivityResponseContent( pathTemplate: "\"/activity\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -228,7 +228,7 @@ partial void ProcessGetUserActivityResponseContent( pathTemplate: "\"/activity\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -269,7 +269,7 @@ partial void ProcessGetUserActivityResponseContent( pathTemplate: "\"/activity\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -317,7 +317,7 @@ partial void ProcessGetUserActivityResponseContent( pathTemplate: "\"/activity\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -339,7 +339,7 @@ partial void ProcessGetUserActivityResponseContent( pathTemplate: "\"/activity\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.AnthropicMessagesClient.CreateMessages.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.AnthropicMessagesClient.CreateMessages.g.cs index 3b1aee1a..d7dab057 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.AnthropicMessagesClient.CreateMessages.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.AnthropicMessagesClient.CreateMessages.g.cs @@ -201,7 +201,7 @@ partial void ProcessCreateMessagesResponseContent( pathTemplate: "\"/messages\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -235,7 +235,7 @@ partial void ProcessCreateMessagesResponseContent( pathTemplate: "\"/messages\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -276,7 +276,7 @@ partial void ProcessCreateMessagesResponseContent( pathTemplate: "\"/messages\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -324,7 +324,7 @@ partial void ProcessCreateMessagesResponseContent( pathTemplate: "\"/messages\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -346,7 +346,7 @@ partial void ProcessCreateMessagesResponseContent( pathTemplate: "\"/messages\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.ApiKeysClient.CreateKeys.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.ApiKeysClient.CreateKeys.g.cs index a98c93f7..2a96ff02 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.ApiKeysClient.CreateKeys.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.ApiKeysClient.CreateKeys.g.cs @@ -182,7 +182,7 @@ partial void ProcessCreateKeysResponseContent( pathTemplate: "\"/keys\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -216,7 +216,7 @@ partial void ProcessCreateKeysResponseContent( pathTemplate: "\"/keys\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -257,7 +257,7 @@ partial void ProcessCreateKeysResponseContent( pathTemplate: "\"/keys\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -305,7 +305,7 @@ partial void ProcessCreateKeysResponseContent( pathTemplate: "\"/keys\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -327,7 +327,7 @@ partial void ProcessCreateKeysResponseContent( pathTemplate: "\"/keys\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.ApiKeysClient.DeleteKeys.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.ApiKeysClient.DeleteKeys.g.cs index c67789c7..5aed881a 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.ApiKeysClient.DeleteKeys.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.ApiKeysClient.DeleteKeys.g.cs @@ -147,7 +147,7 @@ partial void ProcessDeleteKeysResponseContent( PrepareDeleteKeysRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - hash: hash!); + hash: hash); global::OpenRouter.AutoSDKHttpRequestOptions.StampAuthorizationOverride(__httpRequest); @@ -171,7 +171,7 @@ partial void ProcessDeleteKeysResponseContent( pathTemplate: "$\"/keys/{hash}\"", httpMethod: "DELETE", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -205,7 +205,7 @@ partial void ProcessDeleteKeysResponseContent( pathTemplate: "$\"/keys/{hash}\"", httpMethod: "DELETE", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -246,7 +246,7 @@ partial void ProcessDeleteKeysResponseContent( pathTemplate: "$\"/keys/{hash}\"", httpMethod: "DELETE", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -294,7 +294,7 @@ partial void ProcessDeleteKeysResponseContent( pathTemplate: "$\"/keys/{hash}\"", httpMethod: "DELETE", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -316,7 +316,7 @@ partial void ProcessDeleteKeysResponseContent( pathTemplate: "$\"/keys/{hash}\"", httpMethod: "DELETE", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.ApiKeysClient.GetCurrentKey.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.ApiKeysClient.GetCurrentKey.g.cs index a0b1abfb..b52f3bda 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.ApiKeysClient.GetCurrentKey.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.ApiKeysClient.GetCurrentKey.g.cs @@ -162,7 +162,7 @@ partial void ProcessGetCurrentKeyResponseContent( pathTemplate: "\"/key\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -196,7 +196,7 @@ partial void ProcessGetCurrentKeyResponseContent( pathTemplate: "\"/key\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -237,7 +237,7 @@ partial void ProcessGetCurrentKeyResponseContent( pathTemplate: "\"/key\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -285,7 +285,7 @@ partial void ProcessGetCurrentKeyResponseContent( pathTemplate: "\"/key\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -307,7 +307,7 @@ partial void ProcessGetCurrentKeyResponseContent( pathTemplate: "\"/key\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.ApiKeysClient.GetKey.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.ApiKeysClient.GetKey.g.cs index 94d8b60f..76d2b8e9 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.ApiKeysClient.GetKey.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.ApiKeysClient.GetKey.g.cs @@ -147,7 +147,7 @@ partial void ProcessGetKeyResponseContent( PrepareGetKeyRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - hash: hash!); + hash: hash); global::OpenRouter.AutoSDKHttpRequestOptions.StampAuthorizationOverride(__httpRequest); @@ -171,7 +171,7 @@ partial void ProcessGetKeyResponseContent( pathTemplate: "$\"/keys/{hash}\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -205,7 +205,7 @@ partial void ProcessGetKeyResponseContent( pathTemplate: "$\"/keys/{hash}\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -246,7 +246,7 @@ partial void ProcessGetKeyResponseContent( pathTemplate: "$\"/keys/{hash}\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -294,7 +294,7 @@ partial void ProcessGetKeyResponseContent( pathTemplate: "$\"/keys/{hash}\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -316,7 +316,7 @@ partial void ProcessGetKeyResponseContent( pathTemplate: "$\"/keys/{hash}\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.ApiKeysClient.List.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.ApiKeysClient.List.g.cs index df7bf319..12b720d8 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.ApiKeysClient.List.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.ApiKeysClient.List.g.cs @@ -194,7 +194,7 @@ partial void ProcessListResponseContent( pathTemplate: "\"/keys\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -228,7 +228,7 @@ partial void ProcessListResponseContent( pathTemplate: "\"/keys\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -269,7 +269,7 @@ partial void ProcessListResponseContent( pathTemplate: "\"/keys\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -317,7 +317,7 @@ partial void ProcessListResponseContent( pathTemplate: "\"/keys\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -339,7 +339,7 @@ partial void ProcessListResponseContent( pathTemplate: "\"/keys\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.ApiKeysClient.UpdateKeys.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.ApiKeysClient.UpdateKeys.g.cs index e0ee722b..4133a550 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.ApiKeysClient.UpdateKeys.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.ApiKeysClient.UpdateKeys.g.cs @@ -166,7 +166,7 @@ partial void ProcessUpdateKeysResponseContent( PrepareUpdateKeysRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - hash: hash!, + hash: hash, request: request); global::OpenRouter.AutoSDKHttpRequestOptions.StampAuthorizationOverride(__httpRequest); @@ -191,7 +191,7 @@ partial void ProcessUpdateKeysResponseContent( pathTemplate: "$\"/keys/{hash}\"", httpMethod: "PATCH", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -225,7 +225,7 @@ partial void ProcessUpdateKeysResponseContent( pathTemplate: "$\"/keys/{hash}\"", httpMethod: "PATCH", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -266,7 +266,7 @@ partial void ProcessUpdateKeysResponseContent( pathTemplate: "$\"/keys/{hash}\"", httpMethod: "PATCH", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -314,7 +314,7 @@ partial void ProcessUpdateKeysResponseContent( pathTemplate: "$\"/keys/{hash}\"", httpMethod: "PATCH", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -336,7 +336,7 @@ partial void ProcessUpdateKeysResponseContent( pathTemplate: "$\"/keys/{hash}\"", httpMethod: "PATCH", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.AutoSDKHttpResponse.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.AutoSDKHttpResponse.g.cs index 6b56cc5e..3ddb3790 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.AutoSDKHttpResponse.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.AutoSDKHttpResponse.g.cs @@ -164,9 +164,9 @@ public static class AutoSDKConditionalRequests { send = send ?? throw new global::System.ArgumentNullException(nameof(send)); requestOptions = CloneRequestOptions(requestOptions); - if (!string.IsNullOrWhiteSpace(entityTag)) + if (entityTag is { } nonEmptyEntityTag && !string.IsNullOrWhiteSpace(nonEmptyEntityTag)) { - requestOptions.Headers["If-None-Match"] = entityTag!; + requestOptions.Headers["If-None-Match"] = nonEmptyEntityTag; } try diff --git a/src/libs/OpenRouter/Generated/OpenRouter.BenchmarksClient.GetBenchmarks.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.BenchmarksClient.GetBenchmarks.g.cs index 3b6d7833..7facfab4 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.BenchmarksClient.GetBenchmarks.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.BenchmarksClient.GetBenchmarks.g.cs @@ -226,7 +226,7 @@ partial void ProcessGetBenchmarksResponseContent( pathTemplate: "\"/benchmarks\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -260,7 +260,7 @@ partial void ProcessGetBenchmarksResponseContent( pathTemplate: "\"/benchmarks\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -301,7 +301,7 @@ partial void ProcessGetBenchmarksResponseContent( pathTemplate: "\"/benchmarks\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -349,7 +349,7 @@ partial void ProcessGetBenchmarksResponseContent( pathTemplate: "\"/benchmarks\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -371,7 +371,7 @@ partial void ProcessGetBenchmarksResponseContent( pathTemplate: "\"/benchmarks\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.BetaAnalyticsClient.GetAnalyticsMeta.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.BetaAnalyticsClient.GetAnalyticsMeta.g.cs index 125b3f8c..65868368 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.BetaAnalyticsClient.GetAnalyticsMeta.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.BetaAnalyticsClient.GetAnalyticsMeta.g.cs @@ -162,7 +162,7 @@ partial void ProcessGetAnalyticsMetaResponseContent( pathTemplate: "\"/analytics/meta\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -196,7 +196,7 @@ partial void ProcessGetAnalyticsMetaResponseContent( pathTemplate: "\"/analytics/meta\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -237,7 +237,7 @@ partial void ProcessGetAnalyticsMetaResponseContent( pathTemplate: "\"/analytics/meta\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -285,7 +285,7 @@ partial void ProcessGetAnalyticsMetaResponseContent( pathTemplate: "\"/analytics/meta\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -307,7 +307,7 @@ partial void ProcessGetAnalyticsMetaResponseContent( pathTemplate: "\"/analytics/meta\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.BetaAnalyticsClient.QueryAnalytics.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.BetaAnalyticsClient.QueryAnalytics.g.cs index 2942e9c7..2a731f43 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.BetaAnalyticsClient.QueryAnalytics.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.BetaAnalyticsClient.QueryAnalytics.g.cs @@ -182,7 +182,7 @@ partial void ProcessQueryAnalyticsResponseContent( pathTemplate: "\"/analytics/query\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -216,7 +216,7 @@ partial void ProcessQueryAnalyticsResponseContent( pathTemplate: "\"/analytics/query\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -257,7 +257,7 @@ partial void ProcessQueryAnalyticsResponseContent( pathTemplate: "\"/analytics/query\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -305,7 +305,7 @@ partial void ProcessQueryAnalyticsResponseContent( pathTemplate: "\"/analytics/query\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -327,7 +327,7 @@ partial void ProcessQueryAnalyticsResponseContent( pathTemplate: "\"/analytics/query\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.BetaResponsesClient.CreateResponses.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.BetaResponsesClient.CreateResponses.g.cs index e37dd26e..eaf83151 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.BetaResponsesClient.CreateResponses.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.BetaResponsesClient.CreateResponses.g.cs @@ -201,7 +201,7 @@ partial void ProcessCreateResponsesResponseContent( pathTemplate: "\"/responses\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -235,7 +235,7 @@ partial void ProcessCreateResponsesResponseContent( pathTemplate: "\"/responses\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -276,7 +276,7 @@ partial void ProcessCreateResponsesResponseContent( pathTemplate: "\"/responses\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -324,7 +324,7 @@ partial void ProcessCreateResponsesResponseContent( pathTemplate: "\"/responses\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -346,7 +346,7 @@ partial void ProcessCreateResponsesResponseContent( pathTemplate: "\"/responses\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.ByokClient.CreateBYOKKey.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.ByokClient.CreateBYOKKey.g.cs index ce194aa8..8310def4 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.ByokClient.CreateBYOKKey.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.ByokClient.CreateBYOKKey.g.cs @@ -182,7 +182,7 @@ partial void ProcessCreateBYOKKeyResponseContent( pathTemplate: "\"/byok\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -216,7 +216,7 @@ partial void ProcessCreateBYOKKeyResponseContent( pathTemplate: "\"/byok\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -257,7 +257,7 @@ partial void ProcessCreateBYOKKeyResponseContent( pathTemplate: "\"/byok\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -305,7 +305,7 @@ partial void ProcessCreateBYOKKeyResponseContent( pathTemplate: "\"/byok\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -327,7 +327,7 @@ partial void ProcessCreateBYOKKeyResponseContent( pathTemplate: "\"/byok\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.ByokClient.DeleteBYOKKey.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.ByokClient.DeleteBYOKKey.g.cs index e5f757f3..500c9d02 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.ByokClient.DeleteBYOKKey.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.ByokClient.DeleteBYOKKey.g.cs @@ -147,7 +147,7 @@ partial void ProcessDeleteBYOKKeyResponseContent( PrepareDeleteBYOKKeyRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - id: id!); + id: id); global::OpenRouter.AutoSDKHttpRequestOptions.StampAuthorizationOverride(__httpRequest); @@ -171,7 +171,7 @@ partial void ProcessDeleteBYOKKeyResponseContent( pathTemplate: "$\"/byok/{id}\"", httpMethod: "DELETE", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -205,7 +205,7 @@ partial void ProcessDeleteBYOKKeyResponseContent( pathTemplate: "$\"/byok/{id}\"", httpMethod: "DELETE", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -246,7 +246,7 @@ partial void ProcessDeleteBYOKKeyResponseContent( pathTemplate: "$\"/byok/{id}\"", httpMethod: "DELETE", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -294,7 +294,7 @@ partial void ProcessDeleteBYOKKeyResponseContent( pathTemplate: "$\"/byok/{id}\"", httpMethod: "DELETE", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -316,7 +316,7 @@ partial void ProcessDeleteBYOKKeyResponseContent( pathTemplate: "$\"/byok/{id}\"", httpMethod: "DELETE", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.ByokClient.GetBYOKKey.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.ByokClient.GetBYOKKey.g.cs index ca7bcbb5..7f92e0d3 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.ByokClient.GetBYOKKey.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.ByokClient.GetBYOKKey.g.cs @@ -147,7 +147,7 @@ partial void ProcessGetBYOKKeyResponseContent( PrepareGetBYOKKeyRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - id: id!); + id: id); global::OpenRouter.AutoSDKHttpRequestOptions.StampAuthorizationOverride(__httpRequest); @@ -171,7 +171,7 @@ partial void ProcessGetBYOKKeyResponseContent( pathTemplate: "$\"/byok/{id}\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -205,7 +205,7 @@ partial void ProcessGetBYOKKeyResponseContent( pathTemplate: "$\"/byok/{id}\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -246,7 +246,7 @@ partial void ProcessGetBYOKKeyResponseContent( pathTemplate: "$\"/byok/{id}\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -294,7 +294,7 @@ partial void ProcessGetBYOKKeyResponseContent( pathTemplate: "$\"/byok/{id}\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -316,7 +316,7 @@ partial void ProcessGetBYOKKeyResponseContent( pathTemplate: "$\"/byok/{id}\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.ByokClient.ListBYOKKeys.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.ByokClient.ListBYOKKeys.g.cs index 9b05337d..96aa663a 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.ByokClient.ListBYOKKeys.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.ByokClient.ListBYOKKeys.g.cs @@ -216,7 +216,7 @@ partial void ProcessListBYOKKeysResponseContent( pathTemplate: "\"/byok\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -250,7 +250,7 @@ partial void ProcessListBYOKKeysResponseContent( pathTemplate: "\"/byok\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -291,7 +291,7 @@ partial void ProcessListBYOKKeysResponseContent( pathTemplate: "\"/byok\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -339,7 +339,7 @@ partial void ProcessListBYOKKeysResponseContent( pathTemplate: "\"/byok\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -361,7 +361,7 @@ partial void ProcessListBYOKKeysResponseContent( pathTemplate: "\"/byok\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.ByokClient.UpdateBYOKKey.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.ByokClient.UpdateBYOKKey.g.cs index aa22fd50..3b13e0eb 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.ByokClient.UpdateBYOKKey.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.ByokClient.UpdateBYOKKey.g.cs @@ -166,7 +166,7 @@ partial void ProcessUpdateBYOKKeyResponseContent( PrepareUpdateBYOKKeyRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - id: id!, + id: id, request: request); global::OpenRouter.AutoSDKHttpRequestOptions.StampAuthorizationOverride(__httpRequest); @@ -191,7 +191,7 @@ partial void ProcessUpdateBYOKKeyResponseContent( pathTemplate: "$\"/byok/{id}\"", httpMethod: "PATCH", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -225,7 +225,7 @@ partial void ProcessUpdateBYOKKeyResponseContent( pathTemplate: "$\"/byok/{id}\"", httpMethod: "PATCH", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -266,7 +266,7 @@ partial void ProcessUpdateBYOKKeyResponseContent( pathTemplate: "$\"/byok/{id}\"", httpMethod: "PATCH", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -314,7 +314,7 @@ partial void ProcessUpdateBYOKKeyResponseContent( pathTemplate: "$\"/byok/{id}\"", httpMethod: "PATCH", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -336,7 +336,7 @@ partial void ProcessUpdateBYOKKeyResponseContent( pathTemplate: "$\"/byok/{id}\"", httpMethod: "PATCH", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.ChatClient.SendChatCompletionRequest.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.ChatClient.SendChatCompletionRequest.g.cs index 263078d9..59d86974 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.ChatClient.SendChatCompletionRequest.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.ChatClient.SendChatCompletionRequest.g.cs @@ -201,7 +201,7 @@ partial void ProcessSendChatCompletionRequestResponseContent( pathTemplate: "\"/chat/completions\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -235,7 +235,7 @@ partial void ProcessSendChatCompletionRequestResponseContent( pathTemplate: "\"/chat/completions\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -276,7 +276,7 @@ partial void ProcessSendChatCompletionRequestResponseContent( pathTemplate: "\"/chat/completions\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -324,7 +324,7 @@ partial void ProcessSendChatCompletionRequestResponseContent( pathTemplate: "\"/chat/completions\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -346,7 +346,7 @@ partial void ProcessSendChatCompletionRequestResponseContent( pathTemplate: "\"/chat/completions\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.ClassificationsClient.GetTaskClassifications.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.ClassificationsClient.GetTaskClassifications.g.cs index 80ae03d1..f6a908ce 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.ClassificationsClient.GetTaskClassifications.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.ClassificationsClient.GetTaskClassifications.g.cs @@ -206,7 +206,7 @@ partial void ProcessGetTaskClassificationsResponseContent( pathTemplate: "\"/classifications/task\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -240,7 +240,7 @@ partial void ProcessGetTaskClassificationsResponseContent( pathTemplate: "\"/classifications/task\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -281,7 +281,7 @@ partial void ProcessGetTaskClassificationsResponseContent( pathTemplate: "\"/classifications/task\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -329,7 +329,7 @@ partial void ProcessGetTaskClassificationsResponseContent( pathTemplate: "\"/classifications/task\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -351,7 +351,7 @@ partial void ProcessGetTaskClassificationsResponseContent( pathTemplate: "\"/classifications/task\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.CreditsClient.GetCredits.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.CreditsClient.GetCredits.g.cs index caba2207..e03cf6ff 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.CreditsClient.GetCredits.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.CreditsClient.GetCredits.g.cs @@ -162,7 +162,7 @@ partial void ProcessGetCreditsResponseContent( pathTemplate: "\"/credits\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -196,7 +196,7 @@ partial void ProcessGetCreditsResponseContent( pathTemplate: "\"/credits\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -237,7 +237,7 @@ partial void ProcessGetCreditsResponseContent( pathTemplate: "\"/credits\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -285,7 +285,7 @@ partial void ProcessGetCreditsResponseContent( pathTemplate: "\"/credits\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -307,7 +307,7 @@ partial void ProcessGetCreditsResponseContent( pathTemplate: "\"/credits\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.DatasetsClient.GetAppRankings.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.DatasetsClient.GetAppRankings.g.cs index d586ffeb..7cbf2e4e 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.DatasetsClient.GetAppRankings.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.DatasetsClient.GetAppRankings.g.cs @@ -290,7 +290,7 @@ partial void ProcessGetAppRankingsResponseContent( pathTemplate: "\"/datasets/app-rankings\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -324,7 +324,7 @@ partial void ProcessGetAppRankingsResponseContent( pathTemplate: "\"/datasets/app-rankings\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -365,7 +365,7 @@ partial void ProcessGetAppRankingsResponseContent( pathTemplate: "\"/datasets/app-rankings\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -413,7 +413,7 @@ partial void ProcessGetAppRankingsResponseContent( pathTemplate: "\"/datasets/app-rankings\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -435,7 +435,7 @@ partial void ProcessGetAppRankingsResponseContent( pathTemplate: "\"/datasets/app-rankings\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.DatasetsClient.GetRankingsDaily.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.DatasetsClient.GetRankingsDaily.g.cs index 2b901172..d9215c83 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.DatasetsClient.GetRankingsDaily.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.DatasetsClient.GetRankingsDaily.g.cs @@ -294,7 +294,7 @@ partial void ProcessGetRankingsDailyResponseContent( pathTemplate: "\"/datasets/rankings-daily\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -328,7 +328,7 @@ partial void ProcessGetRankingsDailyResponseContent( pathTemplate: "\"/datasets/rankings-daily\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -369,7 +369,7 @@ partial void ProcessGetRankingsDailyResponseContent( pathTemplate: "\"/datasets/rankings-daily\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -417,7 +417,7 @@ partial void ProcessGetRankingsDailyResponseContent( pathTemplate: "\"/datasets/rankings-daily\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -439,7 +439,7 @@ partial void ProcessGetRankingsDailyResponseContent( pathTemplate: "\"/datasets/rankings-daily\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.EmbeddingsClient.CreateEmbeddings.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.EmbeddingsClient.CreateEmbeddings.g.cs index 4649f459..61bc2c00 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.EmbeddingsClient.CreateEmbeddings.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.EmbeddingsClient.CreateEmbeddings.g.cs @@ -182,7 +182,7 @@ partial void ProcessCreateEmbeddingsResponseContent( pathTemplate: "\"/embeddings\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -216,7 +216,7 @@ partial void ProcessCreateEmbeddingsResponseContent( pathTemplate: "\"/embeddings\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -257,7 +257,7 @@ partial void ProcessCreateEmbeddingsResponseContent( pathTemplate: "\"/embeddings\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -305,7 +305,7 @@ partial void ProcessCreateEmbeddingsResponseContent( pathTemplate: "\"/embeddings\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -327,7 +327,7 @@ partial void ProcessCreateEmbeddingsResponseContent( pathTemplate: "\"/embeddings\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.EmbeddingsClient.ListEmbeddingsModels.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.EmbeddingsClient.ListEmbeddingsModels.g.cs index ef5ab419..55a93dcc 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.EmbeddingsClient.ListEmbeddingsModels.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.EmbeddingsClient.ListEmbeddingsModels.g.cs @@ -192,7 +192,7 @@ partial void ProcessListEmbeddingsModelsResponseContent( pathTemplate: "\"/embeddings/models\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -226,7 +226,7 @@ partial void ProcessListEmbeddingsModelsResponseContent( pathTemplate: "\"/embeddings/models\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -267,7 +267,7 @@ partial void ProcessListEmbeddingsModelsResponseContent( pathTemplate: "\"/embeddings/models\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -315,7 +315,7 @@ partial void ProcessListEmbeddingsModelsResponseContent( pathTemplate: "\"/embeddings/models\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -337,7 +337,7 @@ partial void ProcessListEmbeddingsModelsResponseContent( pathTemplate: "\"/embeddings/models\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.EndpointsClient.ListEndpoints.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.EndpointsClient.ListEndpoints.g.cs index 51e5eddc..a8900953 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.EndpointsClient.ListEndpoints.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.EndpointsClient.ListEndpoints.g.cs @@ -153,8 +153,8 @@ partial void ProcessListEndpointsResponseContent( PrepareListEndpointsRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - author: author!, - slug: slug!); + author: author, + slug: slug); global::OpenRouter.AutoSDKHttpRequestOptions.StampAuthorizationOverride(__httpRequest); @@ -178,7 +178,7 @@ partial void ProcessListEndpointsResponseContent( pathTemplate: "$\"/models/{author}/{slug}/endpoints\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -212,7 +212,7 @@ partial void ProcessListEndpointsResponseContent( pathTemplate: "$\"/models/{author}/{slug}/endpoints\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -253,7 +253,7 @@ partial void ProcessListEndpointsResponseContent( pathTemplate: "$\"/models/{author}/{slug}/endpoints\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -301,7 +301,7 @@ partial void ProcessListEndpointsResponseContent( pathTemplate: "$\"/models/{author}/{slug}/endpoints\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -323,7 +323,7 @@ partial void ProcessListEndpointsResponseContent( pathTemplate: "$\"/models/{author}/{slug}/endpoints\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.EndpointsClient.ListEndpointsZdr.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.EndpointsClient.ListEndpointsZdr.g.cs index 49c594b7..2f17b262 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.EndpointsClient.ListEndpointsZdr.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.EndpointsClient.ListEndpointsZdr.g.cs @@ -160,7 +160,7 @@ partial void ProcessListEndpointsZdrResponseContent( pathTemplate: "\"/endpoints/zdr\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -194,7 +194,7 @@ partial void ProcessListEndpointsZdrResponseContent( pathTemplate: "\"/endpoints/zdr\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -235,7 +235,7 @@ partial void ProcessListEndpointsZdrResponseContent( pathTemplate: "\"/endpoints/zdr\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -283,7 +283,7 @@ partial void ProcessListEndpointsZdrResponseContent( pathTemplate: "\"/endpoints/zdr\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -305,7 +305,7 @@ partial void ProcessListEndpointsZdrResponseContent( pathTemplate: "\"/endpoints/zdr\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.FilesClient.DeleteFile.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.FilesClient.DeleteFile.g.cs index fe836a80..f9bcfdd8 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.FilesClient.DeleteFile.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.FilesClient.DeleteFile.g.cs @@ -158,7 +158,7 @@ partial void ProcessDeleteFileResponseContent( PrepareDeleteFileRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - fileId: fileId!, + fileId: fileId, workspaceId: workspaceId); global::OpenRouter.AutoSDKHttpRequestOptions.StampAuthorizationOverride(__httpRequest); @@ -183,7 +183,7 @@ partial void ProcessDeleteFileResponseContent( pathTemplate: "$\"/files/{fileId}\"", httpMethod: "DELETE", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -217,7 +217,7 @@ partial void ProcessDeleteFileResponseContent( pathTemplate: "$\"/files/{fileId}\"", httpMethod: "DELETE", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -258,7 +258,7 @@ partial void ProcessDeleteFileResponseContent( pathTemplate: "$\"/files/{fileId}\"", httpMethod: "DELETE", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -306,7 +306,7 @@ partial void ProcessDeleteFileResponseContent( pathTemplate: "$\"/files/{fileId}\"", httpMethod: "DELETE", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -328,7 +328,7 @@ partial void ProcessDeleteFileResponseContent( pathTemplate: "$\"/files/{fileId}\"", httpMethod: "DELETE", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.FilesClient.DownloadFileContent.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.FilesClient.DownloadFileContent.g.cs index 8de0cb82..54a9122f 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.FilesClient.DownloadFileContent.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.FilesClient.DownloadFileContent.g.cs @@ -158,7 +158,7 @@ partial void ProcessDownloadFileContentResponseContent( PrepareDownloadFileContentRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - fileId: fileId!, + fileId: fileId, workspaceId: workspaceId); global::OpenRouter.AutoSDKHttpRequestOptions.StampAuthorizationOverride(__httpRequest); @@ -183,7 +183,7 @@ partial void ProcessDownloadFileContentResponseContent( pathTemplate: "$\"/files/{fileId}/content\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -217,7 +217,7 @@ partial void ProcessDownloadFileContentResponseContent( pathTemplate: "$\"/files/{fileId}/content\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -258,7 +258,7 @@ partial void ProcessDownloadFileContentResponseContent( pathTemplate: "$\"/files/{fileId}/content\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -306,7 +306,7 @@ partial void ProcessDownloadFileContentResponseContent( pathTemplate: "$\"/files/{fileId}/content\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -328,7 +328,7 @@ partial void ProcessDownloadFileContentResponseContent( pathTemplate: "$\"/files/{fileId}/content\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -667,7 +667,7 @@ partial void ProcessDownloadFileContentResponseContent( PrepareDownloadFileContentRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - fileId: fileId!, + fileId: fileId, workspaceId: workspaceId); global::OpenRouter.AutoSDKHttpRequestOptions.StampAuthorizationOverride(__httpRequest); @@ -692,7 +692,7 @@ partial void ProcessDownloadFileContentResponseContent( pathTemplate: "$\"/files/{fileId}/content\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -726,7 +726,7 @@ partial void ProcessDownloadFileContentResponseContent( pathTemplate: "$\"/files/{fileId}/content\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -767,7 +767,7 @@ partial void ProcessDownloadFileContentResponseContent( pathTemplate: "$\"/files/{fileId}/content\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -815,7 +815,7 @@ partial void ProcessDownloadFileContentResponseContent( pathTemplate: "$\"/files/{fileId}/content\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -837,7 +837,7 @@ partial void ProcessDownloadFileContentResponseContent( pathTemplate: "$\"/files/{fileId}/content\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.FilesClient.GetFileMetadata.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.FilesClient.GetFileMetadata.g.cs index 881b68db..2b93315b 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.FilesClient.GetFileMetadata.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.FilesClient.GetFileMetadata.g.cs @@ -158,7 +158,7 @@ partial void ProcessGetFileMetadataResponseContent( PrepareGetFileMetadataRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - fileId: fileId!, + fileId: fileId, workspaceId: workspaceId); global::OpenRouter.AutoSDKHttpRequestOptions.StampAuthorizationOverride(__httpRequest); @@ -183,7 +183,7 @@ partial void ProcessGetFileMetadataResponseContent( pathTemplate: "$\"/files/{fileId}\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -217,7 +217,7 @@ partial void ProcessGetFileMetadataResponseContent( pathTemplate: "$\"/files/{fileId}\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -258,7 +258,7 @@ partial void ProcessGetFileMetadataResponseContent( pathTemplate: "$\"/files/{fileId}\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -306,7 +306,7 @@ partial void ProcessGetFileMetadataResponseContent( pathTemplate: "$\"/files/{fileId}\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -328,7 +328,7 @@ partial void ProcessGetFileMetadataResponseContent( pathTemplate: "$\"/files/{fileId}\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.FilesClient.ListFiles.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.FilesClient.ListFiles.g.cs index 8cd18c66..50c6d134 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.FilesClient.ListFiles.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.FilesClient.ListFiles.g.cs @@ -194,7 +194,7 @@ partial void ProcessListFilesResponseContent( pathTemplate: "\"/files\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -228,7 +228,7 @@ partial void ProcessListFilesResponseContent( pathTemplate: "\"/files\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -269,7 +269,7 @@ partial void ProcessListFilesResponseContent( pathTemplate: "\"/files\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -317,7 +317,7 @@ partial void ProcessListFilesResponseContent( pathTemplate: "\"/files\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -339,7 +339,7 @@ partial void ProcessListFilesResponseContent( pathTemplate: "\"/files\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.FilesClient.UploadFile.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.FilesClient.UploadFile.g.cs index fe05e62c..93be2239 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.FilesClient.UploadFile.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.FilesClient.UploadFile.g.cs @@ -230,7 +230,7 @@ request.Filename is null pathTemplate: "\"/files\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -264,7 +264,7 @@ request.Filename is null pathTemplate: "\"/files\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -305,7 +305,7 @@ request.Filename is null pathTemplate: "\"/files\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -353,7 +353,7 @@ request.Filename is null pathTemplate: "\"/files\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -375,7 +375,7 @@ request.Filename is null pathTemplate: "\"/files\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -904,7 +904,7 @@ request.Filename is null pathTemplate: "\"/files\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -938,7 +938,7 @@ request.Filename is null pathTemplate: "\"/files\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -979,7 +979,7 @@ request.Filename is null pathTemplate: "\"/files\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -1027,7 +1027,7 @@ request.Filename is null pathTemplate: "\"/files\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -1049,7 +1049,7 @@ request.Filename is null pathTemplate: "\"/files\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -1540,7 +1540,7 @@ request.Filename is null pathTemplate: "\"/files\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -1574,7 +1574,7 @@ request.Filename is null pathTemplate: "\"/files\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -1615,7 +1615,7 @@ request.Filename is null pathTemplate: "\"/files\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -1663,7 +1663,7 @@ request.Filename is null pathTemplate: "\"/files\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -1685,7 +1685,7 @@ request.Filename is null pathTemplate: "\"/files\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.GenerationsClient.GetGeneration.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.GenerationsClient.GetGeneration.g.cs index 4cad3da0..e196525e 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.GenerationsClient.GetGeneration.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.GenerationsClient.GetGeneration.g.cs @@ -148,7 +148,7 @@ partial void ProcessGetGenerationResponseContent( PrepareGetGenerationRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - id: id!); + id: id); global::OpenRouter.AutoSDKHttpRequestOptions.StampAuthorizationOverride(__httpRequest); @@ -172,7 +172,7 @@ partial void ProcessGetGenerationResponseContent( pathTemplate: "\"/generation\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -206,7 +206,7 @@ partial void ProcessGetGenerationResponseContent( pathTemplate: "\"/generation\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -247,7 +247,7 @@ partial void ProcessGetGenerationResponseContent( pathTemplate: "\"/generation\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -295,7 +295,7 @@ partial void ProcessGetGenerationResponseContent( pathTemplate: "\"/generation\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -317,7 +317,7 @@ partial void ProcessGetGenerationResponseContent( pathTemplate: "\"/generation\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.GenerationsClient.ListGenerationContent.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.GenerationsClient.ListGenerationContent.g.cs index f679b8bb..33c94d5e 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.GenerationsClient.ListGenerationContent.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.GenerationsClient.ListGenerationContent.g.cs @@ -148,7 +148,7 @@ partial void ProcessListGenerationContentResponseContent( PrepareListGenerationContentRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - id: id!); + id: id); global::OpenRouter.AutoSDKHttpRequestOptions.StampAuthorizationOverride(__httpRequest); @@ -172,7 +172,7 @@ partial void ProcessListGenerationContentResponseContent( pathTemplate: "\"/generation/content\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -206,7 +206,7 @@ partial void ProcessListGenerationContentResponseContent( pathTemplate: "\"/generation/content\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -247,7 +247,7 @@ partial void ProcessListGenerationContentResponseContent( pathTemplate: "\"/generation/content\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -295,7 +295,7 @@ partial void ProcessListGenerationContentResponseContent( pathTemplate: "\"/generation/content\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -317,7 +317,7 @@ partial void ProcessListGenerationContentResponseContent( pathTemplate: "\"/generation/content\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.GenerationsClient.SubmitGenerationFeedback.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.GenerationsClient.SubmitGenerationFeedback.g.cs index 5ba74800..91903837 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.GenerationsClient.SubmitGenerationFeedback.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.GenerationsClient.SubmitGenerationFeedback.g.cs @@ -182,7 +182,7 @@ partial void ProcessSubmitGenerationFeedbackResponseContent( pathTemplate: "\"/generation/feedback\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -216,7 +216,7 @@ partial void ProcessSubmitGenerationFeedbackResponseContent( pathTemplate: "\"/generation/feedback\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -257,7 +257,7 @@ partial void ProcessSubmitGenerationFeedbackResponseContent( pathTemplate: "\"/generation/feedback\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -305,7 +305,7 @@ partial void ProcessSubmitGenerationFeedbackResponseContent( pathTemplate: "\"/generation/feedback\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -327,7 +327,7 @@ partial void ProcessSubmitGenerationFeedbackResponseContent( pathTemplate: "\"/generation/feedback\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.GuardrailsClient.BulkAssignKeysToGuardrail.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.GuardrailsClient.BulkAssignKeysToGuardrail.g.cs index b6eb0a4b..3735b070 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.GuardrailsClient.BulkAssignKeysToGuardrail.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.GuardrailsClient.BulkAssignKeysToGuardrail.g.cs @@ -166,7 +166,7 @@ partial void ProcessBulkAssignKeysToGuardrailResponseContent( PrepareBulkAssignKeysToGuardrailRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - id: id!, + id: id, request: request); global::OpenRouter.AutoSDKHttpRequestOptions.StampAuthorizationOverride(__httpRequest); @@ -191,7 +191,7 @@ partial void ProcessBulkAssignKeysToGuardrailResponseContent( pathTemplate: "$\"/guardrails/{id}/assignments/keys\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -225,7 +225,7 @@ partial void ProcessBulkAssignKeysToGuardrailResponseContent( pathTemplate: "$\"/guardrails/{id}/assignments/keys\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -266,7 +266,7 @@ partial void ProcessBulkAssignKeysToGuardrailResponseContent( pathTemplate: "$\"/guardrails/{id}/assignments/keys\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -314,7 +314,7 @@ partial void ProcessBulkAssignKeysToGuardrailResponseContent( pathTemplate: "$\"/guardrails/{id}/assignments/keys\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -336,7 +336,7 @@ partial void ProcessBulkAssignKeysToGuardrailResponseContent( pathTemplate: "$\"/guardrails/{id}/assignments/keys\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.GuardrailsClient.BulkAssignMembersToGuardrail.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.GuardrailsClient.BulkAssignMembersToGuardrail.g.cs index b773c22b..76b3570d 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.GuardrailsClient.BulkAssignMembersToGuardrail.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.GuardrailsClient.BulkAssignMembersToGuardrail.g.cs @@ -166,7 +166,7 @@ partial void ProcessBulkAssignMembersToGuardrailResponseContent( PrepareBulkAssignMembersToGuardrailRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - id: id!, + id: id, request: request); global::OpenRouter.AutoSDKHttpRequestOptions.StampAuthorizationOverride(__httpRequest); @@ -191,7 +191,7 @@ partial void ProcessBulkAssignMembersToGuardrailResponseContent( pathTemplate: "$\"/guardrails/{id}/assignments/members\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -225,7 +225,7 @@ partial void ProcessBulkAssignMembersToGuardrailResponseContent( pathTemplate: "$\"/guardrails/{id}/assignments/members\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -266,7 +266,7 @@ partial void ProcessBulkAssignMembersToGuardrailResponseContent( pathTemplate: "$\"/guardrails/{id}/assignments/members\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -314,7 +314,7 @@ partial void ProcessBulkAssignMembersToGuardrailResponseContent( pathTemplate: "$\"/guardrails/{id}/assignments/members\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -336,7 +336,7 @@ partial void ProcessBulkAssignMembersToGuardrailResponseContent( pathTemplate: "$\"/guardrails/{id}/assignments/members\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.GuardrailsClient.BulkUnassignKeysFromGuardrail.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.GuardrailsClient.BulkUnassignKeysFromGuardrail.g.cs index 424bf6ff..9a0584b2 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.GuardrailsClient.BulkUnassignKeysFromGuardrail.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.GuardrailsClient.BulkUnassignKeysFromGuardrail.g.cs @@ -166,7 +166,7 @@ partial void ProcessBulkUnassignKeysFromGuardrailResponseContent( PrepareBulkUnassignKeysFromGuardrailRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - id: id!, + id: id, request: request); global::OpenRouter.AutoSDKHttpRequestOptions.StampAuthorizationOverride(__httpRequest); @@ -191,7 +191,7 @@ partial void ProcessBulkUnassignKeysFromGuardrailResponseContent( pathTemplate: "$\"/guardrails/{id}/assignments/keys/remove\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -225,7 +225,7 @@ partial void ProcessBulkUnassignKeysFromGuardrailResponseContent( pathTemplate: "$\"/guardrails/{id}/assignments/keys/remove\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -266,7 +266,7 @@ partial void ProcessBulkUnassignKeysFromGuardrailResponseContent( pathTemplate: "$\"/guardrails/{id}/assignments/keys/remove\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -314,7 +314,7 @@ partial void ProcessBulkUnassignKeysFromGuardrailResponseContent( pathTemplate: "$\"/guardrails/{id}/assignments/keys/remove\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -336,7 +336,7 @@ partial void ProcessBulkUnassignKeysFromGuardrailResponseContent( pathTemplate: "$\"/guardrails/{id}/assignments/keys/remove\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.GuardrailsClient.BulkUnassignMembersFromGuardrail.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.GuardrailsClient.BulkUnassignMembersFromGuardrail.g.cs index 3312ac36..725edf21 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.GuardrailsClient.BulkUnassignMembersFromGuardrail.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.GuardrailsClient.BulkUnassignMembersFromGuardrail.g.cs @@ -166,7 +166,7 @@ partial void ProcessBulkUnassignMembersFromGuardrailResponseContent( PrepareBulkUnassignMembersFromGuardrailRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - id: id!, + id: id, request: request); global::OpenRouter.AutoSDKHttpRequestOptions.StampAuthorizationOverride(__httpRequest); @@ -191,7 +191,7 @@ partial void ProcessBulkUnassignMembersFromGuardrailResponseContent( pathTemplate: "$\"/guardrails/{id}/assignments/members/remove\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -225,7 +225,7 @@ partial void ProcessBulkUnassignMembersFromGuardrailResponseContent( pathTemplate: "$\"/guardrails/{id}/assignments/members/remove\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -266,7 +266,7 @@ partial void ProcessBulkUnassignMembersFromGuardrailResponseContent( pathTemplate: "$\"/guardrails/{id}/assignments/members/remove\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -314,7 +314,7 @@ partial void ProcessBulkUnassignMembersFromGuardrailResponseContent( pathTemplate: "$\"/guardrails/{id}/assignments/members/remove\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -336,7 +336,7 @@ partial void ProcessBulkUnassignMembersFromGuardrailResponseContent( pathTemplate: "$\"/guardrails/{id}/assignments/members/remove\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.GuardrailsClient.CreateGuardrail.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.GuardrailsClient.CreateGuardrail.g.cs index b00ded47..e3707d09 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.GuardrailsClient.CreateGuardrail.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.GuardrailsClient.CreateGuardrail.g.cs @@ -184,7 +184,7 @@ partial void ProcessCreateGuardrailResponseContent( pathTemplate: "\"/guardrails\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -218,7 +218,7 @@ partial void ProcessCreateGuardrailResponseContent( pathTemplate: "\"/guardrails\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -259,7 +259,7 @@ partial void ProcessCreateGuardrailResponseContent( pathTemplate: "\"/guardrails\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -307,7 +307,7 @@ partial void ProcessCreateGuardrailResponseContent( pathTemplate: "\"/guardrails\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -329,7 +329,7 @@ partial void ProcessCreateGuardrailResponseContent( pathTemplate: "\"/guardrails\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.GuardrailsClient.DeleteGuardrail.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.GuardrailsClient.DeleteGuardrail.g.cs index 53377bdb..7b9c705a 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.GuardrailsClient.DeleteGuardrail.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.GuardrailsClient.DeleteGuardrail.g.cs @@ -147,7 +147,7 @@ partial void ProcessDeleteGuardrailResponseContent( PrepareDeleteGuardrailRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - id: id!); + id: id); global::OpenRouter.AutoSDKHttpRequestOptions.StampAuthorizationOverride(__httpRequest); @@ -171,7 +171,7 @@ partial void ProcessDeleteGuardrailResponseContent( pathTemplate: "$\"/guardrails/{id}\"", httpMethod: "DELETE", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -205,7 +205,7 @@ partial void ProcessDeleteGuardrailResponseContent( pathTemplate: "$\"/guardrails/{id}\"", httpMethod: "DELETE", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -246,7 +246,7 @@ partial void ProcessDeleteGuardrailResponseContent( pathTemplate: "$\"/guardrails/{id}\"", httpMethod: "DELETE", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -294,7 +294,7 @@ partial void ProcessDeleteGuardrailResponseContent( pathTemplate: "$\"/guardrails/{id}\"", httpMethod: "DELETE", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -316,7 +316,7 @@ partial void ProcessDeleteGuardrailResponseContent( pathTemplate: "$\"/guardrails/{id}\"", httpMethod: "DELETE", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.GuardrailsClient.GetGuardrail.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.GuardrailsClient.GetGuardrail.g.cs index 31bfdd6c..fa2dac48 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.GuardrailsClient.GetGuardrail.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.GuardrailsClient.GetGuardrail.g.cs @@ -147,7 +147,7 @@ partial void ProcessGetGuardrailResponseContent( PrepareGetGuardrailRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - id: id!); + id: id); global::OpenRouter.AutoSDKHttpRequestOptions.StampAuthorizationOverride(__httpRequest); @@ -171,7 +171,7 @@ partial void ProcessGetGuardrailResponseContent( pathTemplate: "$\"/guardrails/{id}\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -205,7 +205,7 @@ partial void ProcessGetGuardrailResponseContent( pathTemplate: "$\"/guardrails/{id}\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -246,7 +246,7 @@ partial void ProcessGetGuardrailResponseContent( pathTemplate: "$\"/guardrails/{id}\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -294,7 +294,7 @@ partial void ProcessGetGuardrailResponseContent( pathTemplate: "$\"/guardrails/{id}\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -316,7 +316,7 @@ partial void ProcessGetGuardrailResponseContent( pathTemplate: "$\"/guardrails/{id}\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.GuardrailsClient.ListGuardrailKeyAssignments.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.GuardrailsClient.ListGuardrailKeyAssignments.g.cs index 064a2874..b44cfbbf 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.GuardrailsClient.ListGuardrailKeyAssignments.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.GuardrailsClient.ListGuardrailKeyAssignments.g.cs @@ -175,7 +175,7 @@ partial void ProcessListGuardrailKeyAssignmentsResponseContent( PrepareListGuardrailKeyAssignmentsRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - id: id!, + id: id, offset: offset, limit: limit); @@ -201,7 +201,7 @@ partial void ProcessListGuardrailKeyAssignmentsResponseContent( pathTemplate: "$\"/guardrails/{id}/assignments/keys\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -235,7 +235,7 @@ partial void ProcessListGuardrailKeyAssignmentsResponseContent( pathTemplate: "$\"/guardrails/{id}/assignments/keys\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -276,7 +276,7 @@ partial void ProcessListGuardrailKeyAssignmentsResponseContent( pathTemplate: "$\"/guardrails/{id}/assignments/keys\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -324,7 +324,7 @@ partial void ProcessListGuardrailKeyAssignmentsResponseContent( pathTemplate: "$\"/guardrails/{id}/assignments/keys\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -346,7 +346,7 @@ partial void ProcessListGuardrailKeyAssignmentsResponseContent( pathTemplate: "$\"/guardrails/{id}/assignments/keys\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.GuardrailsClient.ListGuardrailMemberAssignments.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.GuardrailsClient.ListGuardrailMemberAssignments.g.cs index 3c7a3657..692dbd29 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.GuardrailsClient.ListGuardrailMemberAssignments.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.GuardrailsClient.ListGuardrailMemberAssignments.g.cs @@ -175,7 +175,7 @@ partial void ProcessListGuardrailMemberAssignmentsResponseContent( PrepareListGuardrailMemberAssignmentsRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - id: id!, + id: id, offset: offset, limit: limit); @@ -201,7 +201,7 @@ partial void ProcessListGuardrailMemberAssignmentsResponseContent( pathTemplate: "$\"/guardrails/{id}/assignments/members\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -235,7 +235,7 @@ partial void ProcessListGuardrailMemberAssignmentsResponseContent( pathTemplate: "$\"/guardrails/{id}/assignments/members\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -276,7 +276,7 @@ partial void ProcessListGuardrailMemberAssignmentsResponseContent( pathTemplate: "$\"/guardrails/{id}/assignments/members\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -324,7 +324,7 @@ partial void ProcessListGuardrailMemberAssignmentsResponseContent( pathTemplate: "$\"/guardrails/{id}/assignments/members\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -346,7 +346,7 @@ partial void ProcessListGuardrailMemberAssignmentsResponseContent( pathTemplate: "$\"/guardrails/{id}/assignments/members\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.GuardrailsClient.ListGuardrails.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.GuardrailsClient.ListGuardrails.g.cs index ae8a3db4..b131eafb 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.GuardrailsClient.ListGuardrails.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.GuardrailsClient.ListGuardrails.g.cs @@ -202,7 +202,7 @@ partial void ProcessListGuardrailsResponseContent( pathTemplate: "\"/guardrails\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -236,7 +236,7 @@ partial void ProcessListGuardrailsResponseContent( pathTemplate: "\"/guardrails\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -277,7 +277,7 @@ partial void ProcessListGuardrailsResponseContent( pathTemplate: "\"/guardrails\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -325,7 +325,7 @@ partial void ProcessListGuardrailsResponseContent( pathTemplate: "\"/guardrails\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -347,7 +347,7 @@ partial void ProcessListGuardrailsResponseContent( pathTemplate: "\"/guardrails\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.GuardrailsClient.ListKeyAssignments.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.GuardrailsClient.ListKeyAssignments.g.cs index 5b397a93..4ba4fb18 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.GuardrailsClient.ListKeyAssignments.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.GuardrailsClient.ListKeyAssignments.g.cs @@ -192,7 +192,7 @@ partial void ProcessListKeyAssignmentsResponseContent( pathTemplate: "\"/guardrails/assignments/keys\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -226,7 +226,7 @@ partial void ProcessListKeyAssignmentsResponseContent( pathTemplate: "\"/guardrails/assignments/keys\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -267,7 +267,7 @@ partial void ProcessListKeyAssignmentsResponseContent( pathTemplate: "\"/guardrails/assignments/keys\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -315,7 +315,7 @@ partial void ProcessListKeyAssignmentsResponseContent( pathTemplate: "\"/guardrails/assignments/keys\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -337,7 +337,7 @@ partial void ProcessListKeyAssignmentsResponseContent( pathTemplate: "\"/guardrails/assignments/keys\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.GuardrailsClient.ListMemberAssignments.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.GuardrailsClient.ListMemberAssignments.g.cs index b7450486..11468f91 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.GuardrailsClient.ListMemberAssignments.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.GuardrailsClient.ListMemberAssignments.g.cs @@ -192,7 +192,7 @@ partial void ProcessListMemberAssignmentsResponseContent( pathTemplate: "\"/guardrails/assignments/members\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -226,7 +226,7 @@ partial void ProcessListMemberAssignmentsResponseContent( pathTemplate: "\"/guardrails/assignments/members\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -267,7 +267,7 @@ partial void ProcessListMemberAssignmentsResponseContent( pathTemplate: "\"/guardrails/assignments/members\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -315,7 +315,7 @@ partial void ProcessListMemberAssignmentsResponseContent( pathTemplate: "\"/guardrails/assignments/members\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -337,7 +337,7 @@ partial void ProcessListMemberAssignmentsResponseContent( pathTemplate: "\"/guardrails/assignments/members\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.GuardrailsClient.UpdateGuardrail.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.GuardrailsClient.UpdateGuardrail.g.cs index dd3be607..91a1ee6e 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.GuardrailsClient.UpdateGuardrail.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.GuardrailsClient.UpdateGuardrail.g.cs @@ -168,7 +168,7 @@ partial void ProcessUpdateGuardrailResponseContent( PrepareUpdateGuardrailRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - id: id!, + id: id, request: request); global::OpenRouter.AutoSDKHttpRequestOptions.StampAuthorizationOverride(__httpRequest); @@ -193,7 +193,7 @@ partial void ProcessUpdateGuardrailResponseContent( pathTemplate: "$\"/guardrails/{id}\"", httpMethod: "PATCH", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -227,7 +227,7 @@ partial void ProcessUpdateGuardrailResponseContent( pathTemplate: "$\"/guardrails/{id}\"", httpMethod: "PATCH", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -268,7 +268,7 @@ partial void ProcessUpdateGuardrailResponseContent( pathTemplate: "$\"/guardrails/{id}\"", httpMethod: "PATCH", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -316,7 +316,7 @@ partial void ProcessUpdateGuardrailResponseContent( pathTemplate: "$\"/guardrails/{id}\"", httpMethod: "PATCH", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -338,7 +338,7 @@ partial void ProcessUpdateGuardrailResponseContent( pathTemplate: "$\"/guardrails/{id}\"", httpMethod: "PATCH", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.ImagesClient.CreateImages.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.ImagesClient.CreateImages.g.cs index 1d9412da..6b459207 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.ImagesClient.CreateImages.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.ImagesClient.CreateImages.g.cs @@ -182,7 +182,7 @@ partial void ProcessCreateImagesResponseContent( pathTemplate: "\"/images\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -216,7 +216,7 @@ partial void ProcessCreateImagesResponseContent( pathTemplate: "\"/images\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -257,7 +257,7 @@ partial void ProcessCreateImagesResponseContent( pathTemplate: "\"/images\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -305,7 +305,7 @@ partial void ProcessCreateImagesResponseContent( pathTemplate: "\"/images\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -327,7 +327,7 @@ partial void ProcessCreateImagesResponseContent( pathTemplate: "\"/images\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.ImagesClient.ListImageModelEndpoints.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.ImagesClient.ListImageModelEndpoints.g.cs index 7f95e04d..1638e13a 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.ImagesClient.ListImageModelEndpoints.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.ImagesClient.ListImageModelEndpoints.g.cs @@ -155,8 +155,8 @@ partial void ProcessListImageModelEndpointsResponseContent( PrepareListImageModelEndpointsRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - author: author!, - slug: slug!); + author: author, + slug: slug); global::OpenRouter.AutoSDKHttpRequestOptions.StampAuthorizationOverride(__httpRequest); @@ -180,7 +180,7 @@ partial void ProcessListImageModelEndpointsResponseContent( pathTemplate: "$\"/images/models/{author}/{slug}/endpoints\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -214,7 +214,7 @@ partial void ProcessListImageModelEndpointsResponseContent( pathTemplate: "$\"/images/models/{author}/{slug}/endpoints\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -255,7 +255,7 @@ partial void ProcessListImageModelEndpointsResponseContent( pathTemplate: "$\"/images/models/{author}/{slug}/endpoints\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -303,7 +303,7 @@ partial void ProcessListImageModelEndpointsResponseContent( pathTemplate: "$\"/images/models/{author}/{slug}/endpoints\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -325,7 +325,7 @@ partial void ProcessListImageModelEndpointsResponseContent( pathTemplate: "$\"/images/models/{author}/{slug}/endpoints\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.ImagesClient.ListImageModels.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.ImagesClient.ListImageModels.g.cs index 766796b8..2d857d65 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.ImagesClient.ListImageModels.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.ImagesClient.ListImageModels.g.cs @@ -162,7 +162,7 @@ partial void ProcessListImageModelsResponseContent( pathTemplate: "\"/images/models\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -196,7 +196,7 @@ partial void ProcessListImageModelsResponseContent( pathTemplate: "\"/images/models\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -237,7 +237,7 @@ partial void ProcessListImageModelsResponseContent( pathTemplate: "\"/images/models\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -285,7 +285,7 @@ partial void ProcessListImageModelsResponseContent( pathTemplate: "\"/images/models\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -307,7 +307,7 @@ partial void ProcessListImageModelsResponseContent( pathTemplate: "\"/images/models\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AdditionalToolsItemToolsItems.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AdditionalToolsItemToolsItems.g.cs index b7b48a13..3980f3c8 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AdditionalToolsItemToolsItems.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AdditionalToolsItemToolsItems.g.cs @@ -1261,169 +1261,169 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.AdditionalToolsItemToolsItems0), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.AdditionalToolsItemToolsItems0).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AdditionalToolsItemToolsItems0!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickAdditionalToolsItemToolsItems0(), typeInfo); } else if (value.IsPreviewWebSearchServerTool) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.PreviewWebSearchServerTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.PreviewWebSearchServerTool).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.PreviewWebSearchServerTool!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickPreviewWebSearchServerTool(), typeInfo); } else if (value.IsPreview20250311WebSearchServerTool) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.Preview20250311WebSearchServerTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.Preview20250311WebSearchServerTool).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Preview20250311WebSearchServerTool!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickPreview20250311WebSearchServerTool(), typeInfo); } else if (value.IsLegacyWebSearchServerTool) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.LegacyWebSearchServerTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.LegacyWebSearchServerTool).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.LegacyWebSearchServerTool!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickLegacyWebSearchServerTool(), typeInfo); } else if (value.IsWebSearchServerTool) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.WebSearchServerTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.WebSearchServerTool).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.WebSearchServerTool!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickWebSearchServerTool(), typeInfo); } else if (value.IsFileSearchServerTool) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.FileSearchServerTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.FileSearchServerTool).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileSearchServerTool!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickFileSearchServerTool(), typeInfo); } else if (value.IsComputerUseServerTool) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ComputerUseServerTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ComputerUseServerTool).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ComputerUseServerTool!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickComputerUseServerTool(), typeInfo); } else if (value.IsCodeInterpreterServerTool) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.CodeInterpreterServerTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.CodeInterpreterServerTool).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.CodeInterpreterServerTool!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickCodeInterpreterServerTool(), typeInfo); } else if (value.IsMcpServerTool) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.McpServerTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.McpServerTool).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.McpServerTool!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickMcpServerTool(), typeInfo); } else if (value.IsImageGenerationServerTool) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ImageGenerationServerTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ImageGenerationServerTool).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageGenerationServerTool!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickImageGenerationServerTool(), typeInfo); } else if (value.IsCodexLocalShellTool) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.CodexLocalShellTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.CodexLocalShellTool).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.CodexLocalShellTool!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickCodexLocalShellTool(), typeInfo); } else if (value.IsShellServerTool) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ShellServerTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ShellServerTool).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ShellServerTool!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickShellServerTool(), typeInfo); } else if (value.IsApplyPatchServerTool) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ApplyPatchServerTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ApplyPatchServerTool).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ApplyPatchServerTool!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickApplyPatchServerTool(), typeInfo); } else if (value.IsCustomTool) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.CustomTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.CustomTool).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.CustomTool!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickCustomTool(), typeInfo); } else if (value.IsNamespaceTool) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.NamespaceTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.NamespaceTool).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.NamespaceTool!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickNamespaceTool(), typeInfo); } else if (value.IsAdvisorServerToolOpenRouter) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.AdvisorServerToolOpenRouter), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.AdvisorServerToolOpenRouter).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AdvisorServerToolOpenRouter!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickAdvisorServerToolOpenRouter(), typeInfo); } else if (value.IsSubagentServerToolOpenRouter) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.SubagentServerToolOpenRouter), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.SubagentServerToolOpenRouter).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.SubagentServerToolOpenRouter!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickSubagentServerToolOpenRouter(), typeInfo); } else if (value.IsDatetimeServerTool) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.DatetimeServerTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.DatetimeServerTool).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.DatetimeServerTool!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickDatetimeServerTool(), typeInfo); } else if (value.IsFilesServerTool) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.FilesServerTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.FilesServerTool).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.FilesServerTool!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickFilesServerTool(), typeInfo); } else if (value.IsFusionServerToolOpenRouter) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.FusionServerToolOpenRouter), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.FusionServerToolOpenRouter).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.FusionServerToolOpenRouter!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickFusionServerToolOpenRouter(), typeInfo); } else if (value.IsImageGenerationServerToolOpenRouter) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ImageGenerationServerToolOpenRouter), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ImageGenerationServerToolOpenRouter).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageGenerationServerToolOpenRouter!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickImageGenerationServerToolOpenRouter(), typeInfo); } else if (value.IsSearchModelsServerToolOpenRouter) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.SearchModelsServerToolOpenRouter), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.SearchModelsServerToolOpenRouter).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.SearchModelsServerToolOpenRouter!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickSearchModelsServerToolOpenRouter(), typeInfo); } else if (value.IsWebFetchServerTool) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.WebFetchServerTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.WebFetchServerTool).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.WebFetchServerTool!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickWebFetchServerTool(), typeInfo); } else if (value.IsWebSearchServerToolOpenRouter) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.WebSearchServerToolOpenRouter), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.WebSearchServerToolOpenRouter).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.WebSearchServerToolOpenRouter!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickWebSearchServerToolOpenRouter(), typeInfo); } else if (value.IsApplyPatchServerToolOpenRouter) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ApplyPatchServerToolOpenRouter), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ApplyPatchServerToolOpenRouter).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ApplyPatchServerToolOpenRouter!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickApplyPatchServerToolOpenRouter(), typeInfo); } else if (value.IsBashServerTool) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.BashServerTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.BashServerTool).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.BashServerTool!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickBashServerTool(), typeInfo); } else if (value.IsShellServerToolOpenRouter) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ShellServerToolOpenRouter), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ShellServerToolOpenRouter).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ShellServerToolOpenRouter!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickShellServerToolOpenRouter(), typeInfo); } else if (value.IsAdditionalToolsItemToolsItems27) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.AdditionalToolsItemToolsItems27), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.AdditionalToolsItemToolsItems27).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AdditionalToolsItemToolsItems27!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickAdditionalToolsItemToolsItems27(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AgentMessageItemContentItems.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AgentMessageItemContentItems.g.cs index cdf0a522..27737e70 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AgentMessageItemContentItems.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AgentMessageItemContentItems.g.cs @@ -178,19 +178,19 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.InputText), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.InputText).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.InputText!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickInputText(), typeInfo); } else if (value.IsAgentMessageItemContentItems1) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.AgentMessageItemContentItems1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.AgentMessageItemContentItems1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AgentMessageItemContentItems1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickAgentMessageItemContentItems1(), typeInfo); } else if (value.IsAgentMessageItemContentItems2) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.AgentMessageItemContentItems2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.AgentMessageItemContentItems2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AgentMessageItemContentItems2!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickAgentMessageItemContentItems2(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValue.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValue.g.cs index 4cd7024a..be3decac 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValue.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValue.g.cs @@ -198,19 +198,19 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueVariant1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueVariant1(), typeInfo); } else if (value.IsAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueVariant2) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(double), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(double).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueVariant2!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueVariant2(), typeInfo); } else if (value.IsAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValue2) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::System.Collections.Generic.IList), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo?> ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::System.Collections.Generic.IList).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValue2!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValue2(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueOneOf2Items.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueOneOf2Items.g.cs index 28a8e255..39e017af 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueOneOf2Items.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueOneOf2Items.g.cs @@ -149,13 +149,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueOneOf2ItemsVariant1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueOneOf2ItemsVariant1(), typeInfo); } else if (value.IsAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueOneOf2ItemsVariant2) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(double), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(double).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueOneOf2ItemsVariant2!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueOneOf2ItemsVariant2(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValue.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValue.g.cs index 71460f4d..4548ecfb 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValue.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValue.g.cs @@ -198,19 +198,19 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueVariant1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueVariant1(), typeInfo); } else if (value.IsAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueVariant2) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(double), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(double).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueVariant2!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueVariant2(), typeInfo); } else if (value.IsAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValue2) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::System.Collections.Generic.IList), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo?> ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::System.Collections.Generic.IList).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValue2!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValue2(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueOneOf2Items.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueOneOf2Items.g.cs index 75affb08..7a0e7feb 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueOneOf2Items.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueOneOf2Items.g.cs @@ -149,13 +149,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueOneOf2ItemsVariant1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueOneOf2ItemsVariant1(), typeInfo); } else if (value.IsAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueOneOf2ItemsVariant2) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(double), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(double).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueOneOf2ItemsVariant2!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueOneOf2ItemsVariant2(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AnthropicBashCodeExecutionContent.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AnthropicBashCodeExecutionContent.g.cs index 7150c3ab..c0706721 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AnthropicBashCodeExecutionContent.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AnthropicBashCodeExecutionContent.g.cs @@ -59,13 +59,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.AnthropicBashCodeExecutionContentVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.AnthropicBashCodeExecutionContentVariant1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.BashCodeExecutionResult!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickBashCodeExecutionResult(), typeInfo); } else if (value.IsBashCodeExecutionToolResultError) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.AnthropicBashCodeExecutionContentVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.AnthropicBashCodeExecutionContentVariant2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.BashCodeExecutionToolResultError!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickBashCodeExecutionToolResultError(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AnthropicCaller.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AnthropicCaller.g.cs index 93353b58..196839aa 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AnthropicCaller.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AnthropicCaller.g.cs @@ -68,19 +68,19 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.AnthropicCallerVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.AnthropicCallerVariant1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.CodeExecution20250825!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickCodeExecution20250825(), typeInfo); } else if (value.IsCodeExecution20260120) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.AnthropicCallerVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.AnthropicCallerVariant2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.CodeExecution20260120!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickCodeExecution20260120(), typeInfo); } else if (value.IsDirect) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.AnthropicCallerVariant3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.AnthropicCallerVariant3).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Direct!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickDirect(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AnthropicCodeExecutionContent.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AnthropicCodeExecutionContent.g.cs index 6f673496..679a941a 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AnthropicCodeExecutionContent.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AnthropicCodeExecutionContent.g.cs @@ -68,19 +68,19 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.AnthropicCodeExecutionContentVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.AnthropicCodeExecutionContentVariant1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.CodeExecutionResult!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickCodeExecutionResult(), typeInfo); } else if (value.IsCodeExecutionToolResultError) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.AnthropicCodeExecutionContentVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.AnthropicCodeExecutionContentVariant2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.CodeExecutionToolResultError!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickCodeExecutionToolResultError(), typeInfo); } else if (value.IsEncryptedCodeExecutionResult) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.AnthropicCodeExecutionContentVariant3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.AnthropicCodeExecutionContentVariant3).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.EncryptedCodeExecutionResult!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickEncryptedCodeExecutionResult(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AnthropicDocumentBlockParamSource.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AnthropicDocumentBlockParamSource.g.cs index 58c9f256..1531d2c2 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AnthropicDocumentBlockParamSource.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AnthropicDocumentBlockParamSource.g.cs @@ -249,31 +249,31 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.AnthropicBase64PdfSource), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.AnthropicBase64PdfSource).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AnthropicBase64PdfSource!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickAnthropicBase64PdfSource(), typeInfo); } else if (value.IsAnthropicPlainTextSource) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.AnthropicPlainTextSource), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.AnthropicPlainTextSource).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AnthropicPlainTextSource!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickAnthropicPlainTextSource(), typeInfo); } else if (value.IsAnthropicDocumentBlockParamSource2) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.AnthropicDocumentBlockParamSource2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.AnthropicDocumentBlockParamSource2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AnthropicDocumentBlockParamSource2!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickAnthropicDocumentBlockParamSource2(), typeInfo); } else if (value.IsAnthropicUrlPdfSource) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.AnthropicUrlPdfSource), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.AnthropicUrlPdfSource).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AnthropicUrlPdfSource!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickAnthropicUrlPdfSource(), typeInfo); } else if (value.IsAnthropicFileDocumentSource) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.AnthropicFileDocumentSource), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.AnthropicFileDocumentSource).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AnthropicFileDocumentSource!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickAnthropicFileDocumentSource(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AnthropicDocumentBlockParamSourceOneOf2Content.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AnthropicDocumentBlockParamSourceOneOf2Content.g.cs index 8bad96c2..7bbe94a7 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AnthropicDocumentBlockParamSourceOneOf2Content.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AnthropicDocumentBlockParamSourceOneOf2Content.g.cs @@ -149,13 +149,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AnthropicDocumentBlockParamSourceOneOf2ContentVariant1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickAnthropicDocumentBlockParamSourceOneOf2ContentVariant1(), typeInfo); } else if (value.IsAnthropicDocumentBlockParamSourceOneOf2Content1) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::System.Collections.Generic.IList), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo?> ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::System.Collections.Generic.IList).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AnthropicDocumentBlockParamSourceOneOf2Content1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickAnthropicDocumentBlockParamSourceOneOf2Content1(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AnthropicDocumentBlockParamSourceOneOf2ContentOneOf1Items.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AnthropicDocumentBlockParamSourceOneOf2ContentOneOf1Items.g.cs index 3f537f2f..1917cc0b 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AnthropicDocumentBlockParamSourceOneOf2ContentOneOf1Items.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AnthropicDocumentBlockParamSourceOneOf2ContentOneOf1Items.g.cs @@ -59,13 +59,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.AnthropicDocumentBlockParamSourceOneOf2ContentOneOf1ItemsVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.AnthropicDocumentBlockParamSourceOneOf2ContentOneOf1ItemsVariant1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Image!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickImage(), typeInfo); } else if (value.IsText) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.AnthropicDocumentBlockParamSourceOneOf2ContentOneOf1ItemsVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.AnthropicDocumentBlockParamSourceOneOf2ContentOneOf1ItemsVariant2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickText(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AnthropicDocumentBlockSource.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AnthropicDocumentBlockSource.g.cs index 3376b5d1..0bdf6b37 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AnthropicDocumentBlockSource.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AnthropicDocumentBlockSource.g.cs @@ -132,13 +132,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.AnthropicBase64PdfSource), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.AnthropicBase64PdfSource).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AnthropicBase64PdfSource!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickAnthropicBase64PdfSource(), typeInfo); } else if (value.IsAnthropicPlainTextSource) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.AnthropicPlainTextSource), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.AnthropicPlainTextSource).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AnthropicPlainTextSource!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickAnthropicPlainTextSource(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AnthropicImageBlockParamSource.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AnthropicImageBlockParamSource.g.cs index afd540c3..c10a01dc 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AnthropicImageBlockParamSource.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AnthropicImageBlockParamSource.g.cs @@ -59,13 +59,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.AnthropicImageBlockParamSourceVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.AnthropicImageBlockParamSourceVariant1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Base64!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickBase64(), typeInfo); } else if (value.IsUrl) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.AnthropicImageBlockParamSourceVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.AnthropicImageBlockParamSourceVariant2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Url!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickUrl(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AnthropicTextBlockParamCitationsItems.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AnthropicTextBlockParamCitationsItems.g.cs index 82153568..749a540f 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AnthropicTextBlockParamCitationsItems.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AnthropicTextBlockParamCitationsItems.g.cs @@ -86,31 +86,31 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.AnthropicTextBlockParamCitationsItemsVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.AnthropicTextBlockParamCitationsItemsVariant1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.CharLocation!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickCharLocation(), typeInfo); } else if (value.IsContentBlockLocation) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.AnthropicTextBlockParamCitationsItemsVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.AnthropicTextBlockParamCitationsItemsVariant2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ContentBlockLocation!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickContentBlockLocation(), typeInfo); } else if (value.IsPageLocation) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.AnthropicTextBlockParamCitationsItemsVariant3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.AnthropicTextBlockParamCitationsItemsVariant3).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.PageLocation!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickPageLocation(), typeInfo); } else if (value.IsSearchResultLocation) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.AnthropicTextBlockParamCitationsItemsVariant4), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.AnthropicTextBlockParamCitationsItemsVariant4).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.SearchResultLocation!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickSearchResultLocation(), typeInfo); } else if (value.IsWebSearchResultLocation) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.AnthropicTextBlockParamCitationsItemsVariant5), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.AnthropicTextBlockParamCitationsItemsVariant5).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.WebSearchResultLocation!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickWebSearchResultLocation(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AnthropicTextCitation.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AnthropicTextCitation.g.cs index 9baf6173..e89f8241 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AnthropicTextCitation.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AnthropicTextCitation.g.cs @@ -86,31 +86,31 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.AnthropicTextCitationVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.AnthropicTextCitationVariant1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.CharLocation!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickCharLocation(), typeInfo); } else if (value.IsContentBlockLocation) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.AnthropicTextCitationVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.AnthropicTextCitationVariant2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ContentBlockLocation!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickContentBlockLocation(), typeInfo); } else if (value.IsPageLocation) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.AnthropicTextCitationVariant3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.AnthropicTextCitationVariant3).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.PageLocation!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickPageLocation(), typeInfo); } else if (value.IsSearchResultLocation) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.AnthropicTextCitationVariant4), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.AnthropicTextCitationVariant4).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.SearchResultLocation!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickSearchResultLocation(), typeInfo); } else if (value.IsWebSearchResultLocation) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.AnthropicTextCitationVariant5), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.AnthropicTextCitationVariant5).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.WebSearchResultLocation!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickWebSearchResultLocation(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AnthropicTextEditorCodeExecutionContent.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AnthropicTextEditorCodeExecutionContent.g.cs index 1d8b4dd8..baa3c265 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AnthropicTextEditorCodeExecutionContent.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AnthropicTextEditorCodeExecutionContent.g.cs @@ -77,25 +77,25 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.AnthropicTextEditorCodeExecutionContentVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.AnthropicTextEditorCodeExecutionContentVariant1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.TextEditorCodeExecutionCreateResult!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickTextEditorCodeExecutionCreateResult(), typeInfo); } else if (value.IsTextEditorCodeExecutionStrReplaceResult) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.AnthropicTextEditorCodeExecutionContentVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.AnthropicTextEditorCodeExecutionContentVariant2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.TextEditorCodeExecutionStrReplaceResult!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickTextEditorCodeExecutionStrReplaceResult(), typeInfo); } else if (value.IsTextEditorCodeExecutionToolResultError) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.AnthropicTextEditorCodeExecutionContentVariant3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.AnthropicTextEditorCodeExecutionContentVariant3).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.TextEditorCodeExecutionToolResultError!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickTextEditorCodeExecutionToolResultError(), typeInfo); } else if (value.IsTextEditorCodeExecutionViewResult) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.AnthropicTextEditorCodeExecutionContentVariant4), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.AnthropicTextEditorCodeExecutionContentVariant4).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.TextEditorCodeExecutionViewResult!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickTextEditorCodeExecutionViewResult(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AnthropicToolSearchContent.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AnthropicToolSearchContent.g.cs index fa4a186f..715d13d4 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AnthropicToolSearchContent.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AnthropicToolSearchContent.g.cs @@ -59,13 +59,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.AnthropicToolSearchContentVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.AnthropicToolSearchContentVariant1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ToolSearchToolResultError!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickToolSearchToolResultError(), typeInfo); } else if (value.IsToolSearchToolSearchResult) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.AnthropicToolSearchContentVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.AnthropicToolSearchContentVariant2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ToolSearchToolSearchResult!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickToolSearchToolSearchResult(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AnthropicUsageIteration.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AnthropicUsageIteration.g.cs index d41e30f2..862c2f33 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AnthropicUsageIteration.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AnthropicUsageIteration.g.cs @@ -241,25 +241,25 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.AnthropicCompactionUsageIteration), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.AnthropicCompactionUsageIteration).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AnthropicCompactionUsageIteration!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickAnthropicCompactionUsageIteration(), typeInfo); } else if (value.IsAnthropicMessageUsageIteration) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.AnthropicMessageUsageIteration), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.AnthropicMessageUsageIteration).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AnthropicMessageUsageIteration!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickAnthropicMessageUsageIteration(), typeInfo); } else if (value.IsAnthropicAdvisorMessageUsageIteration) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.AnthropicAdvisorMessageUsageIteration), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.AnthropicAdvisorMessageUsageIteration).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AnthropicAdvisorMessageUsageIteration!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickAnthropicAdvisorMessageUsageIteration(), typeInfo); } else if (value.IsAnthropicUnknownUsageIteration) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.AnthropicUnknownUsageIteration), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.AnthropicUnknownUsageIteration).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AnthropicUnknownUsageIteration!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickAnthropicUnknownUsageIteration(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AnthropicWebFetchContent.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AnthropicWebFetchContent.g.cs index 9a1265e4..e9fc980c 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AnthropicWebFetchContent.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.AnthropicWebFetchContent.g.cs @@ -59,13 +59,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.AnthropicWebFetchContentVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.AnthropicWebFetchContentVariant1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.WebFetchResult!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickWebFetchResult(), typeInfo); } else if (value.IsWebFetchToolResultError) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.AnthropicWebFetchContentVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.AnthropicWebFetchContentVariant2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.WebFetchToolResultError!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickWebFetchToolResultError(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ApplyPatchCallOperation.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ApplyPatchCallOperation.g.cs index 3a380a68..db409747 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ApplyPatchCallOperation.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ApplyPatchCallOperation.g.cs @@ -68,19 +68,19 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ApplyPatchCallOperationVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ApplyPatchCallOperationVariant1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.CreateFile!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickCreateFile(), typeInfo); } else if (value.IsDeleteFile) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ApplyPatchCallOperationVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ApplyPatchCallOperationVariant2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.DeleteFile!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickDeleteFile(), typeInfo); } else if (value.IsUpdateFile) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ApplyPatchCallOperationVariant3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ApplyPatchCallOperationVariant3).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.UpdateFile!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickUpdateFile(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.BaseInputs.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.BaseInputs.g.cs index 677f9658..5e50e384 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.BaseInputs.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.BaseInputs.g.cs @@ -149,13 +149,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.BaseInputsVariant1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickBaseInputsVariant1(), typeInfo); } else if (value.IsBaseInputs1) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::System.Collections.Generic.IList), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo?> ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::System.Collections.Generic.IList).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.BaseInputs1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickBaseInputs1(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.BaseInputsOneOf1Items.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.BaseInputsOneOf1Items.g.cs index 803cc2d5..49c86fdb 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.BaseInputsOneOf1Items.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.BaseInputsOneOf1Items.g.cs @@ -472,61 +472,61 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.BaseInputsOneOf1Items0), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.BaseInputsOneOf1Items0).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.BaseInputsOneOf1Items0!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickBaseInputsOneOf1Items0(), typeInfo); } else if (value.IsOpenAIResponseInputMessageItem) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OpenAIResponseInputMessageItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OpenAIResponseInputMessageItem).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OpenAIResponseInputMessageItem!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOpenAIResponseInputMessageItem(), typeInfo); } else if (value.IsOpenAIResponseFunctionToolCallOutput) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OpenAIResponseFunctionToolCallOutput), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OpenAIResponseFunctionToolCallOutput).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OpenAIResponseFunctionToolCallOutput!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOpenAIResponseFunctionToolCallOutput(), typeInfo); } else if (value.IsOpenAIResponseFunctionToolCall) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OpenAIResponseFunctionToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OpenAIResponseFunctionToolCall).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OpenAIResponseFunctionToolCall!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOpenAIResponseFunctionToolCall(), typeInfo); } else if (value.IsOutputItemImageGenerationCall) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputItemImageGenerationCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputItemImageGenerationCall).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OutputItemImageGenerationCall!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOutputItemImageGenerationCall(), typeInfo); } else if (value.IsOutputMessage) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputMessage).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OutputMessage!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOutputMessage(), typeInfo); } else if (value.IsOpenAIResponseCustomToolCall) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OpenAIResponseCustomToolCall), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OpenAIResponseCustomToolCall).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OpenAIResponseCustomToolCall!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOpenAIResponseCustomToolCall(), typeInfo); } else if (value.IsOpenAIResponseCustomToolCallOutput) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OpenAIResponseCustomToolCallOutput), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OpenAIResponseCustomToolCallOutput).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OpenAIResponseCustomToolCallOutput!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOpenAIResponseCustomToolCallOutput(), typeInfo); } else if (value.IsApplyPatchCallItem) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ApplyPatchCallItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ApplyPatchCallItem).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ApplyPatchCallItem!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickApplyPatchCallItem(), typeInfo); } else if (value.IsApplyPatchCallOutputItem) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ApplyPatchCallOutputItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ApplyPatchCallOutputItem).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ApplyPatchCallOutputItem!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickApplyPatchCallOutputItem(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.BaseInputsOneOf1ItemsOneOf0Content.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.BaseInputsOneOf1ItemsOneOf0Content.g.cs index 68bb946b..ca0d55f8 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.BaseInputsOneOf1ItemsOneOf0Content.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.BaseInputsOneOf1ItemsOneOf0Content.g.cs @@ -149,13 +149,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::System.Collections.Generic.IList), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo?> ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::System.Collections.Generic.IList).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.BaseInputsOneOf1ItemsOneOf0Content0!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickBaseInputsOneOf1ItemsOneOf0Content0(), typeInfo); } else if (value.IsBaseInputsOneOf1ItemsOneOf0ContentVariant2) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.BaseInputsOneOf1ItemsOneOf0ContentVariant2!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickBaseInputsOneOf1ItemsOneOf0ContentVariant2(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.BaseInputsOneOf1ItemsOneOf0ContentOneOf0Items.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.BaseInputsOneOf1ItemsOneOf0ContentOneOf0Items.g.cs index 05a59717..a1d05d24 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.BaseInputsOneOf1ItemsOneOf0ContentOneOf0Items.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.BaseInputsOneOf1ItemsOneOf0ContentOneOf0Items.g.cs @@ -77,25 +77,25 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.BaseInputsOneOf1ItemsOneOf0ContentOneOf0ItemsVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.BaseInputsOneOf1ItemsOneOf0ContentOneOf0ItemsVariant1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.InputAudio!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickInputAudio(), typeInfo); } else if (value.IsInputFile) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.BaseInputsOneOf1ItemsOneOf0ContentOneOf0ItemsVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.BaseInputsOneOf1ItemsOneOf0ContentOneOf0ItemsVariant2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.InputFile!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickInputFile(), typeInfo); } else if (value.IsInputImage) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.BaseInputsOneOf1ItemsOneOf0ContentOneOf0ItemsVariant3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.BaseInputsOneOf1ItemsOneOf0ContentOneOf0ItemsVariant3).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.InputImage!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickInputImage(), typeInfo); } else if (value.IsInputText) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.BaseInputsOneOf1ItemsOneOf0ContentOneOf0ItemsVariant4), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.BaseInputsOneOf1ItemsOneOf0ContentOneOf0ItemsVariant4).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.InputText!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickInputText(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.BaseInputsOneOf1ItemsOneOf0Phase.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.BaseInputsOneOf1ItemsOneOf0Phase.g.cs index 7414706e..c9dd83c1 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.BaseInputsOneOf1ItemsOneOf0Phase.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.BaseInputsOneOf1ItemsOneOf0Phase.g.cs @@ -149,13 +149,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.BaseInputsOneOf1ItemsOneOf0Phase0), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.BaseInputsOneOf1ItemsOneOf0Phase0).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.BaseInputsOneOf1ItemsOneOf0Phase0!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickBaseInputsOneOf1ItemsOneOf0Phase0(), typeInfo); } else if (value.IsBaseInputsOneOf1ItemsOneOf0Phase1) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.BaseInputsOneOf1ItemsOneOf0Phase1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.BaseInputsOneOf1ItemsOneOf0Phase1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.BaseInputsOneOf1ItemsOneOf0Phase1!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickBaseInputsOneOf1ItemsOneOf0Phase1(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.BaseInputsOneOf1ItemsOneOf0Role.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.BaseInputsOneOf1ItemsOneOf0Role.g.cs index 435085a5..585b1a5b 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.BaseInputsOneOf1ItemsOneOf0Role.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.BaseInputsOneOf1ItemsOneOf0Role.g.cs @@ -247,25 +247,25 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.BaseInputsOneOf1ItemsOneOf0Role0), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.BaseInputsOneOf1ItemsOneOf0Role0).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.BaseInputsOneOf1ItemsOneOf0Role0!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickBaseInputsOneOf1ItemsOneOf0Role0(), typeInfo); } else if (value.IsBaseInputsOneOf1ItemsOneOf0Role1) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.BaseInputsOneOf1ItemsOneOf0Role1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.BaseInputsOneOf1ItemsOneOf0Role1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.BaseInputsOneOf1ItemsOneOf0Role1!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickBaseInputsOneOf1ItemsOneOf0Role1(), typeInfo); } else if (value.IsBaseInputsOneOf1ItemsOneOf0Role2) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.BaseInputsOneOf1ItemsOneOf0Role2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.BaseInputsOneOf1ItemsOneOf0Role2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.BaseInputsOneOf1ItemsOneOf0Role2!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickBaseInputsOneOf1ItemsOneOf0Role2(), typeInfo); } else if (value.IsBaseInputsOneOf1ItemsOneOf0Role3) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.BaseInputsOneOf1ItemsOneOf0Role3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.BaseInputsOneOf1ItemsOneOf0Role3).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.BaseInputsOneOf1ItemsOneOf0Role3!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickBaseInputsOneOf1ItemsOneOf0Role3(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.BashServerToolEnvironment.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.BashServerToolEnvironment.g.cs index 6e2cedfd..24af6858 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.BashServerToolEnvironment.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.BashServerToolEnvironment.g.cs @@ -59,13 +59,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.BashServerToolEnvironmentVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.BashServerToolEnvironmentVariant1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ContainerAuto!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickContainerAuto(), typeInfo); } else if (value.IsContainerReference) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.BashServerToolEnvironmentVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.BashServerToolEnvironmentVariant2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ContainerReference!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickContainerReference(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.CapabilityDescriptor.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.CapabilityDescriptor.g.cs index 50719fd0..4859e054 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.CapabilityDescriptor.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.CapabilityDescriptor.g.cs @@ -68,19 +68,19 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.CapabilityDescriptorVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.CapabilityDescriptorVariant1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Boolean!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickBoolean(), typeInfo); } else if (value.IsEnum) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.CapabilityDescriptorVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.CapabilityDescriptorVariant2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Enum!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickEnum(), typeInfo); } else if (value.IsRange) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.CapabilityDescriptorVariant3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.CapabilityDescriptorVariant3).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Range!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickRange(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ChatContentItems.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ChatContentItems.g.cs index 33140bea..70dbf331 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ChatContentItems.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ChatContentItems.g.cs @@ -95,37 +95,37 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ChatContentItemsVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ChatContentItemsVariant1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.File!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickFile(), typeInfo); } else if (value.IsImageUrl) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ChatContentItemsVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ChatContentItemsVariant2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageUrl!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickImageUrl(), typeInfo); } else if (value.IsInputAudio) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ChatContentItemsVariant3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ChatContentItemsVariant3).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.InputAudio!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickInputAudio(), typeInfo); } else if (value.IsInputVideo) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ChatContentItemsVariant4), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ChatContentItemsVariant4).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.InputVideo!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickInputVideo(), typeInfo); } else if (value.IsText) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ChatContentItemsVariant5), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ChatContentItemsVariant5).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickText(), typeInfo); } else if (value.IsVideoUrl) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ChatContentItemsVariant6), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ChatContentItemsVariant6).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.VideoUrl!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickVideoUrl(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ChatFunctionTool.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ChatFunctionTool.g.cs index 241bb930..08bd4c1b 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ChatFunctionTool.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ChatFunctionTool.g.cs @@ -599,73 +599,73 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ChatFunctionTool0), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ChatFunctionTool0).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ChatFunctionTool0!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickChatFunctionTool0(), typeInfo); } else if (value.IsAdvisorServerToolOpenRouter) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.AdvisorServerToolOpenRouter), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.AdvisorServerToolOpenRouter).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AdvisorServerToolOpenRouter!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickAdvisorServerToolOpenRouter(), typeInfo); } else if (value.IsBashServerTool) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.BashServerTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.BashServerTool).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.BashServerTool!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickBashServerTool(), typeInfo); } else if (value.IsDatetimeServerTool) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.DatetimeServerTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.DatetimeServerTool).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.DatetimeServerTool!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickDatetimeServerTool(), typeInfo); } else if (value.IsFilesServerTool) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.FilesServerTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.FilesServerTool).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.FilesServerTool!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickFilesServerTool(), typeInfo); } else if (value.IsFusionServerToolOpenRouter) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.FusionServerToolOpenRouter), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.FusionServerToolOpenRouter).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.FusionServerToolOpenRouter!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickFusionServerToolOpenRouter(), typeInfo); } else if (value.IsImageGenerationServerToolOpenRouter) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ImageGenerationServerToolOpenRouter), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ImageGenerationServerToolOpenRouter).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageGenerationServerToolOpenRouter!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickImageGenerationServerToolOpenRouter(), typeInfo); } else if (value.IsChatSearchModelsServerTool) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ChatSearchModelsServerTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ChatSearchModelsServerTool).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ChatSearchModelsServerTool!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickChatSearchModelsServerTool(), typeInfo); } else if (value.IsSubagentServerToolOpenRouter) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.SubagentServerToolOpenRouter), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.SubagentServerToolOpenRouter).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.SubagentServerToolOpenRouter!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickSubagentServerToolOpenRouter(), typeInfo); } else if (value.IsWebFetchServerTool) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.WebFetchServerTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.WebFetchServerTool).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.WebFetchServerTool!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickWebFetchServerTool(), typeInfo); } else if (value.IsOpenRouterWebSearchServerTool) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OpenRouterWebSearchServerTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OpenRouterWebSearchServerTool).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OpenRouterWebSearchServerTool!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOpenRouterWebSearchServerTool(), typeInfo); } else if (value.IsChatWebSearchShorthand) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ChatWebSearchShorthand), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ChatWebSearchShorthand).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ChatWebSearchShorthand!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickChatWebSearchShorthand(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ChatMessages.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ChatMessages.g.cs index 5626916c..8301e891 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ChatMessages.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ChatMessages.g.cs @@ -86,31 +86,31 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ChatMessagesVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ChatMessagesVariant1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Assistant!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickAssistant(), typeInfo); } else if (value.IsDeveloper) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ChatMessagesVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ChatMessagesVariant2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Developer!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickDeveloper(), typeInfo); } else if (value.IsSystem) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ChatMessagesVariant3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ChatMessagesVariant3).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.System!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickSystem(), typeInfo); } else if (value.IsTool) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ChatMessagesVariant4), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ChatMessagesVariant4).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Tool!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickTool(), typeInfo); } else if (value.IsUser) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ChatMessagesVariant5), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ChatMessagesVariant5).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.User!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickUser(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ChatMessagesDiscriminatorMappingAssistantContent.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ChatMessagesDiscriminatorMappingAssistantContent.g.cs index 890a25a0..3e1c6b82 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ChatMessagesDiscriminatorMappingAssistantContent.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ChatMessagesDiscriminatorMappingAssistantContent.g.cs @@ -149,13 +149,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ChatMessagesDiscriminatorMappingAssistantContentVariant1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickChatMessagesDiscriminatorMappingAssistantContentVariant1(), typeInfo); } else if (value.IsChatMessagesDiscriminatorMappingAssistantContent1) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::System.Collections.Generic.IList), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo?> ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::System.Collections.Generic.IList).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ChatMessagesDiscriminatorMappingAssistantContent1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickChatMessagesDiscriminatorMappingAssistantContent1(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ChatMessagesDiscriminatorMappingDeveloperContent.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ChatMessagesDiscriminatorMappingDeveloperContent.g.cs index 224cdd52..c15a6792 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ChatMessagesDiscriminatorMappingDeveloperContent.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ChatMessagesDiscriminatorMappingDeveloperContent.g.cs @@ -149,13 +149,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ChatMessagesDiscriminatorMappingDeveloperContentVariant1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickChatMessagesDiscriminatorMappingDeveloperContentVariant1(), typeInfo); } else if (value.IsChatMessagesDiscriminatorMappingDeveloperContent1) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::System.Collections.Generic.IList), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo?> ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::System.Collections.Generic.IList).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ChatMessagesDiscriminatorMappingDeveloperContent1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickChatMessagesDiscriminatorMappingDeveloperContent1(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ChatRequestPluginsItems.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ChatRequestPluginsItems.g.cs index 4acbdd34..5a3c4572 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ChatRequestPluginsItems.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ChatRequestPluginsItems.g.cs @@ -131,61 +131,61 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ChatRequestPluginsItemsVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ChatRequestPluginsItemsVariant1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AutoBetaRouter!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickAutoBetaRouter(), typeInfo); } else if (value.IsAutoRouter) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ChatRequestPluginsItemsVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ChatRequestPluginsItemsVariant2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AutoRouter!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickAutoRouter(), typeInfo); } else if (value.IsContextCompression) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ChatRequestPluginsItemsVariant3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ChatRequestPluginsItemsVariant3).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ContextCompression!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickContextCompression(), typeInfo); } else if (value.IsFileParser) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ChatRequestPluginsItemsVariant4), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ChatRequestPluginsItemsVariant4).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileParser!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickFileParser(), typeInfo); } else if (value.IsFusion) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ChatRequestPluginsItemsVariant5), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ChatRequestPluginsItemsVariant5).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Fusion!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickFusion(), typeInfo); } else if (value.IsModeration) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ChatRequestPluginsItemsVariant6), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ChatRequestPluginsItemsVariant6).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Moderation!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickModeration(), typeInfo); } else if (value.IsParetoRouter) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ChatRequestPluginsItemsVariant7), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ChatRequestPluginsItemsVariant7).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ParetoRouter!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickParetoRouter(), typeInfo); } else if (value.IsResponseHealing) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ChatRequestPluginsItemsVariant8), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ChatRequestPluginsItemsVariant8).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ResponseHealing!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickResponseHealing(), typeInfo); } else if (value.IsWeb) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ChatRequestPluginsItemsVariant9), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ChatRequestPluginsItemsVariant9).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Web!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickWeb(), typeInfo); } else if (value.IsWebFetch) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ChatRequestPluginsItemsVariant10), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ChatRequestPluginsItemsVariant10).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.WebFetch!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickWebFetch(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ChatRequestResponseFormat.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ChatRequestResponseFormat.g.cs index 32c80a38..ee4a8350 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ChatRequestResponseFormat.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ChatRequestResponseFormat.g.cs @@ -86,31 +86,31 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ChatRequestResponseFormatVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ChatRequestResponseFormatVariant1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Grammar!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickGrammar(), typeInfo); } else if (value.IsJsonObject) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ChatRequestResponseFormatVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ChatRequestResponseFormatVariant2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.JsonObject!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickJsonObject(), typeInfo); } else if (value.IsJsonSchema) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ChatRequestResponseFormatVariant3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ChatRequestResponseFormatVariant3).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.JsonSchema!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickJsonSchema(), typeInfo); } else if (value.IsPython) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ChatRequestResponseFormatVariant4), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ChatRequestResponseFormatVariant4).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Python!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickPython(), typeInfo); } else if (value.IsText) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ChatRequestResponseFormatVariant5), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ChatRequestResponseFormatVariant5).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickText(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ChatRequestStop.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ChatRequestStop.g.cs index b21a8fdb..b7cbe82b 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ChatRequestStop.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ChatRequestStop.g.cs @@ -149,13 +149,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ChatRequestStopVariant1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickChatRequestStopVariant1(), typeInfo); } else if (value.IsChatRequestStopVariant2) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::System.Collections.Generic.IList), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo?> ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::System.Collections.Generic.IList).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ChatRequestStopVariant2!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickChatRequestStopVariant2(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ChatSystemMessageContent.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ChatSystemMessageContent.g.cs index d049f2df..49c75d3a 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ChatSystemMessageContent.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ChatSystemMessageContent.g.cs @@ -149,13 +149,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ChatSystemMessageContentVariant1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickChatSystemMessageContentVariant1(), typeInfo); } else if (value.IsChatSystemMessageContent1) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::System.Collections.Generic.IList), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo?> ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::System.Collections.Generic.IList).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ChatSystemMessageContent1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickChatSystemMessageContent1(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ChatToolChoice.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ChatToolChoice.g.cs index cfd2481c..4007e0bc 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ChatToolChoice.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ChatToolChoice.g.cs @@ -248,31 +248,31 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ChatToolChoice0), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ChatToolChoice0).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ChatToolChoice0!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickChatToolChoice0(), typeInfo); } else if (value.IsChatToolChoice1) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ChatToolChoice1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ChatToolChoice1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ChatToolChoice1!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickChatToolChoice1(), typeInfo); } else if (value.IsChatToolChoice2) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ChatToolChoice2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ChatToolChoice2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ChatToolChoice2!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickChatToolChoice2(), typeInfo); } else if (value.IsChatNamedToolChoice) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ChatNamedToolChoice), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ChatNamedToolChoice).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ChatNamedToolChoice!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickChatNamedToolChoice(), typeInfo); } else if (value.IsChatServerToolChoice) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ChatServerToolChoice), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ChatServerToolChoice).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ChatServerToolChoice!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickChatServerToolChoice(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ChatToolMessageContent.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ChatToolMessageContent.g.cs index 1dd2adba..cc07fe45 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ChatToolMessageContent.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ChatToolMessageContent.g.cs @@ -149,13 +149,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ChatToolMessageContentVariant1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickChatToolMessageContentVariant1(), typeInfo); } else if (value.IsChatToolMessageContent1) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::System.Collections.Generic.IList), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo?> ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::System.Collections.Generic.IList).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ChatToolMessageContent1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickChatToolMessageContent1(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ChatUserMessageContent.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ChatUserMessageContent.g.cs index 2ccec7ec..bfdb9ebf 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ChatUserMessageContent.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ChatUserMessageContent.g.cs @@ -149,13 +149,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ChatUserMessageContentVariant1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickChatUserMessageContentVariant1(), typeInfo); } else if (value.IsChatUserMessageContent1) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::System.Collections.Generic.IList), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo?> ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::System.Collections.Generic.IList).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ChatUserMessageContent1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickChatUserMessageContent1(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.CodeInterpreterServerToolContainer.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.CodeInterpreterServerToolContainer.g.cs index e2db3c05..08d7a111 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.CodeInterpreterServerToolContainer.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.CodeInterpreterServerToolContainer.g.cs @@ -129,13 +129,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.CodeInterpreterServerToolContainerVariant1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickCodeInterpreterServerToolContainerVariant1(), typeInfo); } else if (value.IsCodeInterpreterServerToolContainer1) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.CodeInterpreterServerToolContainer1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.CodeInterpreterServerToolContainer1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.CodeInterpreterServerToolContainer1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickCodeInterpreterServerToolContainer1(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.CreateObservabilityDestinationResponseData.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.CreateObservabilityDestinationResponseData.g.cs index 5686b85b..862e31f7 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.CreateObservabilityDestinationResponseData.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.CreateObservabilityDestinationResponseData.g.cs @@ -194,103 +194,103 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Arize!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickArize(), typeInfo); } else if (value.IsBraintrust) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Braintrust!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickBraintrust(), typeInfo); } else if (value.IsClickhouse) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant3).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Clickhouse!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickClickhouse(), typeInfo); } else if (value.IsDatadog) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant4), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant4).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Datadog!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickDatadog(), typeInfo); } else if (value.IsGrafana) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant5), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant5).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Grafana!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickGrafana(), typeInfo); } else if (value.IsLangfuse) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant6), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant6).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Langfuse!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickLangfuse(), typeInfo); } else if (value.IsLangsmith) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant7), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant7).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Langsmith!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickLangsmith(), typeInfo); } else if (value.IsNewrelic) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant8), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant8).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Newrelic!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickNewrelic(), typeInfo); } else if (value.IsOpik) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant9), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant9).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Opik!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOpik(), typeInfo); } else if (value.IsOtelCollector) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant10), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant10).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OtelCollector!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOtelCollector(), typeInfo); } else if (value.IsPosthog) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant11), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant11).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Posthog!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickPosthog(), typeInfo); } else if (value.IsRamp) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant12), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant12).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Ramp!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickRamp(), typeInfo); } else if (value.IsS3) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant13), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant13).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.S3!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickS3(), typeInfo); } else if (value.IsSentry) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant14), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant14).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Sentry!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickSentry(), typeInfo); } else if (value.IsSnowflake) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant15), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant15).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Snowflake!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickSnowflake(), typeInfo); } else if (value.IsWeave) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant16), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant16).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Weave!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickWeave(), typeInfo); } else if (value.IsWebhook) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant17), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.CreateObservabilityDestinationResponseDataVariant17).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Webhook!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickWebhook(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.CustomToolCallOutputItemOutput.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.CustomToolCallOutputItemOutput.g.cs index 6dd14241..fd49981d 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.CustomToolCallOutputItemOutput.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.CustomToolCallOutputItemOutput.g.cs @@ -149,13 +149,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.CustomToolCallOutputItemOutputVariant1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickCustomToolCallOutputItemOutputVariant1(), typeInfo); } else if (value.IsCustomToolCallOutputItemOutput1) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::System.Collections.Generic.IList), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo?> ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::System.Collections.Generic.IList).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.CustomToolCallOutputItemOutput1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickCustomToolCallOutputItemOutput1(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.CustomToolCallOutputItemOutputOneOf1Items.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.CustomToolCallOutputItemOutputOneOf1Items.g.cs index d041704c..83cac1e0 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.CustomToolCallOutputItemOutputOneOf1Items.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.CustomToolCallOutputItemOutputOneOf1Items.g.cs @@ -68,19 +68,19 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.CustomToolCallOutputItemOutputOneOf1ItemsVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.CustomToolCallOutputItemOutputOneOf1ItemsVariant1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.InputFile!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickInputFile(), typeInfo); } else if (value.IsInputImage) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.CustomToolCallOutputItemOutputOneOf1ItemsVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.CustomToolCallOutputItemOutputOneOf1ItemsVariant2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.InputImage!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickInputImage(), typeInfo); } else if (value.IsInputText) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.CustomToolCallOutputItemOutputOneOf1ItemsVariant3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.CustomToolCallOutputItemOutputOneOf1ItemsVariant3).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.InputText!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickInputText(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.CustomToolFormat.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.CustomToolFormat.g.cs index 3820fa46..a219f63b 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.CustomToolFormat.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.CustomToolFormat.g.cs @@ -130,13 +130,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.CustomToolFormat0), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.CustomToolFormat0).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.CustomToolFormat0!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickCustomToolFormat0(), typeInfo); } else if (value.IsCustomToolFormat1) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.CustomToolFormat1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.CustomToolFormat1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.CustomToolFormat1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickCustomToolFormat1(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.EasyInputMessageContent.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.EasyInputMessageContent.g.cs index 54d01af3..29245ab7 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.EasyInputMessageContent.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.EasyInputMessageContent.g.cs @@ -149,13 +149,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::System.Collections.Generic.IList), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo?> ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::System.Collections.Generic.IList).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.EasyInputMessageContent0!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickEasyInputMessageContent0(), typeInfo); } else if (value.IsEasyInputMessageContentVariant2) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.EasyInputMessageContentVariant2!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickEasyInputMessageContentVariant2(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.EasyInputMessageContentOneOf0Items.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.EasyInputMessageContentOneOf0Items.g.cs index 91d9d35c..a09b0df3 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.EasyInputMessageContentOneOf0Items.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.EasyInputMessageContentOneOf0Items.g.cs @@ -259,31 +259,31 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.InputText), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.InputText).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.InputText!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickInputText(), typeInfo); } else if (value.IsEasyInputMessageContentOneOf0Items1) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.EasyInputMessageContentOneOf0Items1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.EasyInputMessageContentOneOf0Items1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.EasyInputMessageContentOneOf0Items1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickEasyInputMessageContentOneOf0Items1(), typeInfo); } else if (value.IsInputFile) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.InputFile), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.InputFile).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.InputFile!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickInputFile(), typeInfo); } else if (value.IsInputAudio) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.InputAudio), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.InputAudio).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.InputAudio!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickInputAudio(), typeInfo); } else if (value.IsInputVideo) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.InputVideo), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.InputVideo).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.InputVideo!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickInputVideo(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.EasyInputMessagePhase.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.EasyInputMessagePhase.g.cs index 1a74c997..4fc86bdc 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.EasyInputMessagePhase.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.EasyInputMessagePhase.g.cs @@ -149,13 +149,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.EasyInputMessagePhase0), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.EasyInputMessagePhase0).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.EasyInputMessagePhase0!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickEasyInputMessagePhase0(), typeInfo); } else if (value.IsEasyInputMessagePhase1) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.EasyInputMessagePhase1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.EasyInputMessagePhase1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.EasyInputMessagePhase1!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickEasyInputMessagePhase1(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.EasyInputMessageRole.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.EasyInputMessageRole.g.cs index 12d8f8d6..7246625f 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.EasyInputMessageRole.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.EasyInputMessageRole.g.cs @@ -247,25 +247,25 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.EasyInputMessageRole0), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.EasyInputMessageRole0).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.EasyInputMessageRole0!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickEasyInputMessageRole0(), typeInfo); } else if (value.IsEasyInputMessageRole1) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.EasyInputMessageRole1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.EasyInputMessageRole1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.EasyInputMessageRole1!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickEasyInputMessageRole1(), typeInfo); } else if (value.IsEasyInputMessageRole2) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.EasyInputMessageRole2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.EasyInputMessageRole2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.EasyInputMessageRole2!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickEasyInputMessageRole2(), typeInfo); } else if (value.IsEasyInputMessageRole3) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.EasyInputMessageRole3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.EasyInputMessageRole3).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.EasyInputMessageRole3!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickEasyInputMessageRole3(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.EmbeddingsPostRequestBodyContentApplicationJsonSchemaInput.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.EmbeddingsPostRequestBodyContentApplicationJsonSchemaInput.g.cs index 8213497b..7461f424 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.EmbeddingsPostRequestBodyContentApplicationJsonSchemaInput.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.EmbeddingsPostRequestBodyContentApplicationJsonSchemaInput.g.cs @@ -296,31 +296,31 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickEmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant1(), typeInfo); } else if (value.IsEmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant2) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::System.Collections.Generic.IList), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo?> ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::System.Collections.Generic.IList).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant2!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickEmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant2(), typeInfo); } else if (value.IsEmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant3) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::System.Collections.Generic.IList), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo?> ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::System.Collections.Generic.IList).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant3!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickEmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant3(), typeInfo); } else if (value.IsEmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant4) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::System.Collections.Generic.IList>), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo>?> ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::System.Collections.Generic.IList>).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant4!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickEmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant4(), typeInfo); } else if (value.IsEmbeddingsPostRequestBodyContentApplicationJsonSchemaInput4) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::System.Collections.Generic.IList), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo?> ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::System.Collections.Generic.IList).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.EmbeddingsPostRequestBodyContentApplicationJsonSchemaInput4!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickEmbeddingsPostRequestBodyContentApplicationJsonSchemaInput4(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItems.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItems.g.cs index 59ea6687..fcd4fce7 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItems.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItems.g.cs @@ -261,31 +261,31 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItems0), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItems0).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItems0!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickEmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItems0(), typeInfo); } else if (value.IsEmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItems1) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItems1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItems1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItems1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickEmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItems1(), typeInfo); } else if (value.IsContentPartInputAudio) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ContentPartInputAudio), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ContentPartInputAudio).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ContentPartInputAudio!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickContentPartInputAudio(), typeInfo); } else if (value.IsContentPartInputVideo) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ContentPartInputVideo), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ContentPartInputVideo).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ContentPartInputVideo!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickContentPartInputVideo(), typeInfo); } else if (value.IsContentPartInputFile) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ContentPartInputFile), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ContentPartInputFile).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ContentPartInputFile!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickContentPartInputFile(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItems.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItems.g.cs index f04b59fd..fd8f27b3 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItems.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItems.g.cs @@ -149,13 +149,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ProviderName), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ProviderName).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ProviderName!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickProviderName(), typeInfo); } else if (value.IsEmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItemsVariant2) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItemsVariant2!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickEmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItemsVariant2(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderOnlyItems.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderOnlyItems.g.cs index c62950b7..457375a3 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderOnlyItems.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderOnlyItems.g.cs @@ -149,13 +149,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ProviderName), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ProviderName).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ProviderName!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickProviderName(), typeInfo); } else if (value.IsEmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderOnlyItemsVariant2) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderOnlyItemsVariant2!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickEmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderOnlyItemsVariant2(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderOrderItems.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderOrderItems.g.cs index ed001aa9..f16dc241 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderOrderItems.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderOrderItems.g.cs @@ -149,13 +149,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ProviderName), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ProviderName).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ProviderName!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickProviderName(), typeInfo); } else if (value.IsEmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderOrderItemsVariant2) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderOrderItemsVariant2!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickEmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderOrderItemsVariant2(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderSort.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderSort.g.cs index b49423e0..88cd1732 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderSort.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderSort.g.cs @@ -128,13 +128,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ProviderSort), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ProviderSort).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ProviderSort!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickProviderSort(), typeInfo); } else if (value.IsProviderSortConfig) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ProviderSortConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ProviderSortConfig).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ProviderSortConfig!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickProviderSortConfig(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.EmbeddingsPostResponsesContentApplicationJsonSchemaDataItemsEmbedding.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.EmbeddingsPostResponsesContentApplicationJsonSchemaDataItemsEmbedding.g.cs index 7386ddfc..a9095948 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.EmbeddingsPostResponsesContentApplicationJsonSchemaDataItemsEmbedding.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.EmbeddingsPostResponsesContentApplicationJsonSchemaDataItemsEmbedding.g.cs @@ -149,13 +149,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::System.Collections.Generic.IList), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo?> ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::System.Collections.Generic.IList).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.EmbeddingsPostResponsesContentApplicationJsonSchemaDataItemsEmbeddingVariant1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickEmbeddingsPostResponsesContentApplicationJsonSchemaDataItemsEmbeddingVariant1(), typeInfo); } else if (value.IsEmbeddingsPostResponsesContentApplicationJsonSchemaDataItemsEmbeddingVariant2) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.EmbeddingsPostResponsesContentApplicationJsonSchemaDataItemsEmbeddingVariant2!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickEmbeddingsPostResponsesContentApplicationJsonSchemaDataItemsEmbeddingVariant2(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.FileSearchServerToolFilters.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.FileSearchServerToolFilters.g.cs index ea68d174..dbed4fa9 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.FileSearchServerToolFilters.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.FileSearchServerToolFilters.g.cs @@ -131,13 +131,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.FileSearchServerToolFilters0), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.FileSearchServerToolFilters0).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileSearchServerToolFilters0!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickFileSearchServerToolFilters0(), typeInfo); } else if (value.IsCompoundFilter) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.CompoundFilter), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.CompoundFilter).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.CompoundFilter!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickCompoundFilter(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.FileSearchServerToolFiltersOneOf0Value.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.FileSearchServerToolFiltersOneOf0Value.g.cs index 974d84e1..e76959da 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.FileSearchServerToolFiltersOneOf0Value.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.FileSearchServerToolFiltersOneOf0Value.g.cs @@ -247,25 +247,25 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileSearchServerToolFiltersOneOf0ValueVariant1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickFileSearchServerToolFiltersOneOf0ValueVariant1(), typeInfo); } else if (value.IsFileSearchServerToolFiltersOneOf0ValueVariant2) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(double), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(double).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileSearchServerToolFiltersOneOf0ValueVariant2!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickFileSearchServerToolFiltersOneOf0ValueVariant2(), typeInfo); } else if (value.IsFileSearchServerToolFiltersOneOf0ValueVariant3) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(bool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(bool).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileSearchServerToolFiltersOneOf0ValueVariant3!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickFileSearchServerToolFiltersOneOf0ValueVariant3(), typeInfo); } else if (value.IsFileSearchServerToolFiltersOneOf0Value3) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::System.Collections.Generic.IList), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo?> ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::System.Collections.Generic.IList).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileSearchServerToolFiltersOneOf0Value3!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickFileSearchServerToolFiltersOneOf0Value3(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.FileSearchServerToolFiltersOneOf0ValueOneOf3Items.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.FileSearchServerToolFiltersOneOf0ValueOneOf3Items.g.cs index 4019f59a..81251d40 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.FileSearchServerToolFiltersOneOf0ValueOneOf3Items.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.FileSearchServerToolFiltersOneOf0ValueOneOf3Items.g.cs @@ -149,13 +149,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileSearchServerToolFiltersOneOf0ValueOneOf3ItemsVariant1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickFileSearchServerToolFiltersOneOf0ValueOneOf3ItemsVariant1(), typeInfo); } else if (value.IsFileSearchServerToolFiltersOneOf0ValueOneOf3ItemsVariant2) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(double), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(double).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileSearchServerToolFiltersOneOf0ValueOneOf3ItemsVariant2!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickFileSearchServerToolFiltersOneOf0ValueOneOf3ItemsVariant2(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.Formats.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.Formats.g.cs index 0133ad9b..25f3f450 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.Formats.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.Formats.g.cs @@ -170,19 +170,19 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.FormatTextConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.FormatTextConfig).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.FormatTextConfig!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickFormatTextConfig(), typeInfo); } else if (value.IsFormatJsonObjectConfig) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.FormatJsonObjectConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.FormatJsonObjectConfig).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.FormatJsonObjectConfig!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickFormatJsonObjectConfig(), typeInfo); } else if (value.IsFormatJsonSchemaConfig) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.FormatJsonSchemaConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.FormatJsonSchemaConfig).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.FormatJsonSchemaConfig!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickFormatJsonSchemaConfig(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.FunctionCallOutputItemOutput.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.FunctionCallOutputItemOutput.g.cs index 448d69f9..e181af10 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.FunctionCallOutputItemOutput.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.FunctionCallOutputItemOutput.g.cs @@ -149,13 +149,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.FunctionCallOutputItemOutputVariant1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickFunctionCallOutputItemOutputVariant1(), typeInfo); } else if (value.IsFunctionCallOutputItemOutput1) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::System.Collections.Generic.IList), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo?> ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::System.Collections.Generic.IList).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.FunctionCallOutputItemOutput1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickFunctionCallOutputItemOutput1(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.FunctionCallOutputItemOutputOneOf1Items.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.FunctionCallOutputItemOutputOneOf1Items.g.cs index 47cce692..2b404ae1 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.FunctionCallOutputItemOutputOneOf1Items.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.FunctionCallOutputItemOutputOneOf1Items.g.cs @@ -68,19 +68,19 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.FunctionCallOutputItemOutputOneOf1ItemsVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.FunctionCallOutputItemOutputOneOf1ItemsVariant1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.InputFile!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickInputFile(), typeInfo); } else if (value.IsInputImage) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.FunctionCallOutputItemOutputOneOf1ItemsVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.FunctionCallOutputItemOutputOneOf1ItemsVariant2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.InputImage!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickInputImage(), typeInfo); } else if (value.IsInputText) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.FunctionCallOutputItemOutputOneOf1ItemsVariant3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.FunctionCallOutputItemOutputOneOf1ItemsVariant3).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.InputText!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickInputText(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.GenerationContentDataInput.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.GenerationContentDataInput.g.cs index 5dd775a3..5712c0ac 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.GenerationContentDataInput.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.GenerationContentDataInput.g.cs @@ -128,13 +128,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.GenerationContentDataInput0), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.GenerationContentDataInput0).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.GenerationContentDataInput0!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickGenerationContentDataInput0(), typeInfo); } else if (value.IsGenerationContentDataInput1) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.GenerationContentDataInput1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.GenerationContentDataInput1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.GenerationContentDataInput1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickGenerationContentDataInput1(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.GetObservabilityDestinationResponseData.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.GetObservabilityDestinationResponseData.g.cs index d34982d3..980ae9bf 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.GetObservabilityDestinationResponseData.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.GetObservabilityDestinationResponseData.g.cs @@ -194,103 +194,103 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Arize!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickArize(), typeInfo); } else if (value.IsBraintrust) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Braintrust!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickBraintrust(), typeInfo); } else if (value.IsClickhouse) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant3).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Clickhouse!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickClickhouse(), typeInfo); } else if (value.IsDatadog) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant4), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant4).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Datadog!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickDatadog(), typeInfo); } else if (value.IsGrafana) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant5), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant5).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Grafana!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickGrafana(), typeInfo); } else if (value.IsLangfuse) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant6), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant6).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Langfuse!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickLangfuse(), typeInfo); } else if (value.IsLangsmith) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant7), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant7).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Langsmith!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickLangsmith(), typeInfo); } else if (value.IsNewrelic) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant8), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant8).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Newrelic!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickNewrelic(), typeInfo); } else if (value.IsOpik) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant9), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant9).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Opik!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOpik(), typeInfo); } else if (value.IsOtelCollector) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant10), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant10).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OtelCollector!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOtelCollector(), typeInfo); } else if (value.IsPosthog) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant11), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant11).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Posthog!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickPosthog(), typeInfo); } else if (value.IsRamp) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant12), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant12).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Ramp!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickRamp(), typeInfo); } else if (value.IsS3) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant13), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant13).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.S3!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickS3(), typeInfo); } else if (value.IsSentry) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant14), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant14).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Sentry!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickSentry(), typeInfo); } else if (value.IsSnowflake) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant15), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant15).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Snowflake!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickSnowflake(), typeInfo); } else if (value.IsWeave) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant16), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant16).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Weave!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickWeave(), typeInfo); } else if (value.IsWebhook) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant17), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.GetObservabilityDestinationResponseDataVariant17).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Webhook!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickWebhook(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ImageConfig.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ImageConfig.g.cs index 009bcec7..89ef137c 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ImageConfig.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ImageConfig.g.cs @@ -198,19 +198,19 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageConfigVariant1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickImageConfigVariant1(), typeInfo); } else if (value.IsImageConfigVariant2) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(double), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(double).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageConfigVariant2!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickImageConfigVariant2(), typeInfo); } else if (value.IsImageConfigVariant3) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::System.Collections.Generic.IList), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo?> ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::System.Collections.Generic.IList).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageConfigVariant3!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickImageConfigVariant3(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ImageGenerationProviderPreferencesIgnoreItems.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ImageGenerationProviderPreferencesIgnoreItems.g.cs index 7a590f45..2c80ca75 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ImageGenerationProviderPreferencesIgnoreItems.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ImageGenerationProviderPreferencesIgnoreItems.g.cs @@ -149,13 +149,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ProviderName), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ProviderName).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ProviderName!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickProviderName(), typeInfo); } else if (value.IsImageGenerationProviderPreferencesIgnoreItemsVariant2) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageGenerationProviderPreferencesIgnoreItemsVariant2!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickImageGenerationProviderPreferencesIgnoreItemsVariant2(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ImageGenerationProviderPreferencesOnlyItems.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ImageGenerationProviderPreferencesOnlyItems.g.cs index 491ccc39..4458bb8e 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ImageGenerationProviderPreferencesOnlyItems.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ImageGenerationProviderPreferencesOnlyItems.g.cs @@ -149,13 +149,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ProviderName), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ProviderName).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ProviderName!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickProviderName(), typeInfo); } else if (value.IsImageGenerationProviderPreferencesOnlyItemsVariant2) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageGenerationProviderPreferencesOnlyItemsVariant2!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickImageGenerationProviderPreferencesOnlyItemsVariant2(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ImageGenerationProviderPreferencesOrderItems.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ImageGenerationProviderPreferencesOrderItems.g.cs index 828126af..399beb32 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ImageGenerationProviderPreferencesOrderItems.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ImageGenerationProviderPreferencesOrderItems.g.cs @@ -149,13 +149,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ProviderName), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ProviderName).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ProviderName!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickProviderName(), typeInfo); } else if (value.IsImageGenerationProviderPreferencesOrderItemsVariant2) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageGenerationProviderPreferencesOrderItemsVariant2!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickImageGenerationProviderPreferencesOrderItemsVariant2(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ImageGenerationProviderPreferencesSort.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ImageGenerationProviderPreferencesSort.g.cs index 462731c4..c2dabd95 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ImageGenerationProviderPreferencesSort.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ImageGenerationProviderPreferencesSort.g.cs @@ -128,13 +128,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ProviderSort), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ProviderSort).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ProviderSort!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickProviderSort(), typeInfo); } else if (value.IsProviderSortConfig) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ProviderSortConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ProviderSortConfig).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ProviderSortConfig!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickProviderSortConfig(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.InputMessageItemContentItems.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.InputMessageItemContentItems.g.cs index e30c1df1..f99dd891 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.InputMessageItemContentItems.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.InputMessageItemContentItems.g.cs @@ -259,31 +259,31 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.InputText), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.InputText).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.InputText!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickInputText(), typeInfo); } else if (value.IsInputMessageItemContentItems1) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.InputMessageItemContentItems1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.InputMessageItemContentItems1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.InputMessageItemContentItems1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickInputMessageItemContentItems1(), typeInfo); } else if (value.IsInputFile) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.InputFile), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.InputFile).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.InputFile!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickInputFile(), typeInfo); } else if (value.IsInputAudio) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.InputAudio), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.InputAudio).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.InputAudio!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickInputAudio(), typeInfo); } else if (value.IsInputVideo) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.InputVideo), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.InputVideo).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.InputVideo!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickInputVideo(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.InputMessageItemRole.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.InputMessageItemRole.g.cs index 8f092f68..22053df4 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.InputMessageItemRole.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.InputMessageItemRole.g.cs @@ -198,19 +198,19 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.InputMessageItemRole0), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.InputMessageItemRole0).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.InputMessageItemRole0!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickInputMessageItemRole0(), typeInfo); } else if (value.IsInputMessageItemRole1) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.InputMessageItemRole1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.InputMessageItemRole1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.InputMessageItemRole1!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickInputMessageItemRole1(), typeInfo); } else if (value.IsInputMessageItemRole2) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.InputMessageItemRole2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.InputMessageItemRole2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.InputMessageItemRole2!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickInputMessageItemRole2(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.InputReference.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.InputReference.g.cs index 42b19a82..335f26e4 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.InputReference.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.InputReference.g.cs @@ -68,19 +68,19 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.InputReferenceVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.InputReferenceVariant1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AudioUrl!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickAudioUrl(), typeInfo); } else if (value.IsImageUrl) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.InputReferenceVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.InputReferenceVariant2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageUrl!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickImageUrl(), typeInfo); } else if (value.IsVideoUrl) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.InputReferenceVariant3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.InputReferenceVariant3).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.VideoUrl!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickVideoUrl(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.Inputs.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.Inputs.g.cs index 00c60e34..bbf8adc4 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.Inputs.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.Inputs.g.cs @@ -149,13 +149,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.InputsVariant1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickInputsVariant1(), typeInfo); } else if (value.IsInputs1) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::System.Collections.Generic.IList), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo?> ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::System.Collections.Generic.IList).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Inputs1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickInputs1(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.InputsOneOf1Items.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.InputsOneOf1Items.g.cs index 356df14f..1534f566 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.InputsOneOf1Items.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.InputsOneOf1Items.g.cs @@ -2139,295 +2139,295 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ReasoningItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ReasoningItem).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ReasoningItem!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickReasoningItem(), typeInfo); } else if (value.IsEasyInputMessage) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.EasyInputMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.EasyInputMessage).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.EasyInputMessage!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickEasyInputMessage(), typeInfo); } else if (value.IsInputMessageItem) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.InputMessageItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.InputMessageItem).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.InputMessageItem!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickInputMessageItem(), typeInfo); } else if (value.IsFunctionCallItem) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.FunctionCallItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.FunctionCallItem).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.FunctionCallItem!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickFunctionCallItem(), typeInfo); } else if (value.IsFunctionCallOutputItem) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.FunctionCallOutputItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.FunctionCallOutputItem).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.FunctionCallOutputItem!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickFunctionCallOutputItem(), typeInfo); } else if (value.IsApplyPatchCallItem) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ApplyPatchCallItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ApplyPatchCallItem).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ApplyPatchCallItem!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickApplyPatchCallItem(), typeInfo); } else if (value.IsApplyPatchCallOutputItem) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ApplyPatchCallOutputItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ApplyPatchCallOutputItem).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ApplyPatchCallOutputItem!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickApplyPatchCallOutputItem(), typeInfo); } else if (value.IsInputsOneOf1Items7) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.InputsOneOf1Items7), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.InputsOneOf1Items7).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.InputsOneOf1Items7!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickInputsOneOf1Items7(), typeInfo); } else if (value.IsInputsOneOf1Items8) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.InputsOneOf1Items8), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.InputsOneOf1Items8).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.InputsOneOf1Items8!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickInputsOneOf1Items8(), typeInfo); } else if (value.IsOutputFunctionCallItem) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputFunctionCallItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputFunctionCallItem).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OutputFunctionCallItem!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOutputFunctionCallItem(), typeInfo); } else if (value.IsOutputCustomToolCallItem) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputCustomToolCallItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputCustomToolCallItem).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OutputCustomToolCallItem!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOutputCustomToolCallItem(), typeInfo); } else if (value.IsOutputWebSearchCallItem) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputWebSearchCallItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputWebSearchCallItem).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OutputWebSearchCallItem!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOutputWebSearchCallItem(), typeInfo); } else if (value.IsOutputFileSearchCallItem) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputFileSearchCallItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputFileSearchCallItem).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OutputFileSearchCallItem!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOutputFileSearchCallItem(), typeInfo); } else if (value.IsOutputImageGenerationCallItem) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputImageGenerationCallItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputImageGenerationCallItem).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OutputImageGenerationCallItem!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOutputImageGenerationCallItem(), typeInfo); } else if (value.IsOutputCodeInterpreterCallItem) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputCodeInterpreterCallItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputCodeInterpreterCallItem).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OutputCodeInterpreterCallItem!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOutputCodeInterpreterCallItem(), typeInfo); } else if (value.IsOutputComputerCallItem) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputComputerCallItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputComputerCallItem).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OutputComputerCallItem!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOutputComputerCallItem(), typeInfo); } else if (value.IsOutputDatetimeItem) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputDatetimeItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputDatetimeItem).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OutputDatetimeItem!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOutputDatetimeItem(), typeInfo); } else if (value.IsOutputWebSearchServerToolItem) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputWebSearchServerToolItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputWebSearchServerToolItem).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OutputWebSearchServerToolItem!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOutputWebSearchServerToolItem(), typeInfo); } else if (value.IsOutputCodeInterpreterServerToolItem) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputCodeInterpreterServerToolItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputCodeInterpreterServerToolItem).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OutputCodeInterpreterServerToolItem!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOutputCodeInterpreterServerToolItem(), typeInfo); } else if (value.IsOutputFileSearchServerToolItem) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputFileSearchServerToolItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputFileSearchServerToolItem).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OutputFileSearchServerToolItem!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOutputFileSearchServerToolItem(), typeInfo); } else if (value.IsOutputImageGenerationServerToolItem) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputImageGenerationServerToolItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputImageGenerationServerToolItem).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OutputImageGenerationServerToolItem!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOutputImageGenerationServerToolItem(), typeInfo); } else if (value.IsOutputBrowserUseServerToolItem) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputBrowserUseServerToolItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputBrowserUseServerToolItem).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OutputBrowserUseServerToolItem!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOutputBrowserUseServerToolItem(), typeInfo); } else if (value.IsOutputBashServerToolItem) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputBashServerToolItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputBashServerToolItem).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OutputBashServerToolItem!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOutputBashServerToolItem(), typeInfo); } else if (value.IsOutputTextEditorServerToolItem) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputTextEditorServerToolItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputTextEditorServerToolItem).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OutputTextEditorServerToolItem!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOutputTextEditorServerToolItem(), typeInfo); } else if (value.IsOutputApplyPatchServerToolItem) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputApplyPatchServerToolItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputApplyPatchServerToolItem).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OutputApplyPatchServerToolItem!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOutputApplyPatchServerToolItem(), typeInfo); } else if (value.IsOutputWebFetchServerToolItem) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputWebFetchServerToolItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputWebFetchServerToolItem).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OutputWebFetchServerToolItem!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOutputWebFetchServerToolItem(), typeInfo); } else if (value.IsOutputToolSearchServerToolItem) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputToolSearchServerToolItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputToolSearchServerToolItem).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OutputToolSearchServerToolItem!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOutputToolSearchServerToolItem(), typeInfo); } else if (value.IsOutputMemoryServerToolItem) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputMemoryServerToolItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputMemoryServerToolItem).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OutputMemoryServerToolItem!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOutputMemoryServerToolItem(), typeInfo); } else if (value.IsOutputMcpServerToolItem) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputMcpServerToolItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputMcpServerToolItem).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OutputMcpServerToolItem!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOutputMcpServerToolItem(), typeInfo); } else if (value.IsOutputSearchModelsServerToolItem) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputSearchModelsServerToolItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputSearchModelsServerToolItem).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OutputSearchModelsServerToolItem!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOutputSearchModelsServerToolItem(), typeInfo); } else if (value.IsOutputFusionServerToolItem) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputFusionServerToolItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputFusionServerToolItem).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OutputFusionServerToolItem!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOutputFusionServerToolItem(), typeInfo); } else if (value.IsOutputAdvisorServerToolItem) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputAdvisorServerToolItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputAdvisorServerToolItem).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OutputAdvisorServerToolItem!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOutputAdvisorServerToolItem(), typeInfo); } else if (value.IsOutputSubagentServerToolItem) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputSubagentServerToolItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputSubagentServerToolItem).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OutputSubagentServerToolItem!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOutputSubagentServerToolItem(), typeInfo); } else if (value.IsOutputFilesServerToolItem) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputFilesServerToolItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputFilesServerToolItem).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OutputFilesServerToolItem!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOutputFilesServerToolItem(), typeInfo); } else if (value.IsLocalShellCallItem) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.LocalShellCallItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.LocalShellCallItem).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.LocalShellCallItem!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickLocalShellCallItem(), typeInfo); } else if (value.IsLocalShellCallOutputItem) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.LocalShellCallOutputItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.LocalShellCallOutputItem).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.LocalShellCallOutputItem!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickLocalShellCallOutputItem(), typeInfo); } else if (value.IsShellCallItem) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ShellCallItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ShellCallItem).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ShellCallItem!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickShellCallItem(), typeInfo); } else if (value.IsShellCallOutputItem) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ShellCallOutputItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ShellCallOutputItem).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ShellCallOutputItem!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickShellCallOutputItem(), typeInfo); } else if (value.IsMcpListToolsItem) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.McpListToolsItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.McpListToolsItem).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.McpListToolsItem!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickMcpListToolsItem(), typeInfo); } else if (value.IsMcpApprovalRequestItem) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.McpApprovalRequestItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.McpApprovalRequestItem).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.McpApprovalRequestItem!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickMcpApprovalRequestItem(), typeInfo); } else if (value.IsMcpApprovalResponseItem) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.McpApprovalResponseItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.McpApprovalResponseItem).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.McpApprovalResponseItem!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickMcpApprovalResponseItem(), typeInfo); } else if (value.IsMcpCallItem) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.McpCallItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.McpCallItem).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.McpCallItem!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickMcpCallItem(), typeInfo); } else if (value.IsCustomToolCallItem) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.CustomToolCallItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.CustomToolCallItem).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.CustomToolCallItem!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickCustomToolCallItem(), typeInfo); } else if (value.IsCustomToolCallOutputItem) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.CustomToolCallOutputItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.CustomToolCallOutputItem).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.CustomToolCallOutputItem!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickCustomToolCallOutputItem(), typeInfo); } else if (value.IsCompactionItem) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.CompactionItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.CompactionItem).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.CompactionItem!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickCompactionItem(), typeInfo); } else if (value.IsContextCompactionItem) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ContextCompactionItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ContextCompactionItem).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ContextCompactionItem!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickContextCompactionItem(), typeInfo); } else if (value.IsItemReferenceItem) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ItemReferenceItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ItemReferenceItem).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ItemReferenceItem!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickItemReferenceItem(), typeInfo); } else if (value.IsAdditionalToolsItem) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.AdditionalToolsItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.AdditionalToolsItem).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AdditionalToolsItem!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickAdditionalToolsItem(), typeInfo); } else if (value.IsAgentMessageItem) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.AgentMessageItem), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.AgentMessageItem).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AgentMessageItem!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickAgentMessageItem(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.InputsOneOf1ItemsOneOf7Content.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.InputsOneOf1ItemsOneOf7Content.g.cs index c3afbbe3..3abd8e90 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.InputsOneOf1ItemsOneOf7Content.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.InputsOneOf1ItemsOneOf7Content.g.cs @@ -149,13 +149,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::System.Collections.Generic.IList), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo?> ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::System.Collections.Generic.IList).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.InputsOneOf1ItemsOneOf7Content0!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickInputsOneOf1ItemsOneOf7Content0(), typeInfo); } else if (value.IsInputsOneOf1ItemsOneOf7ContentVariant2) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.InputsOneOf1ItemsOneOf7ContentVariant2!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickInputsOneOf1ItemsOneOf7ContentVariant2(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.InputsOneOf1ItemsOneOf7ContentOneOf0Items.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.InputsOneOf1ItemsOneOf7ContentOneOf0Items.g.cs index 2fac78ff..eea90b7f 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.InputsOneOf1ItemsOneOf7ContentOneOf0Items.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.InputsOneOf1ItemsOneOf7ContentOneOf0Items.g.cs @@ -132,13 +132,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ResponseOutputText), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ResponseOutputText).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ResponseOutputText!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickResponseOutputText(), typeInfo); } else if (value.IsOpenAIResponsesRefusalContent) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OpenAIResponsesRefusalContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OpenAIResponsesRefusalContent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OpenAIResponsesRefusalContent!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOpenAIResponsesRefusalContent(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.McpServerToolAllowedTools.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.McpServerToolAllowedTools.g.cs index 824cc99d..8b1c4c42 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.McpServerToolAllowedTools.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.McpServerToolAllowedTools.g.cs @@ -128,13 +128,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::System.Collections.Generic.IList), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo?> ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::System.Collections.Generic.IList).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.McpServerToolAllowedToolsVariant1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickMcpServerToolAllowedToolsVariant1(), typeInfo); } else if (value.IsMcpServerToolAllowedTools1) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.McpServerToolAllowedTools1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.McpServerToolAllowedTools1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.McpServerToolAllowedTools1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickMcpServerToolAllowedTools1(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.McpServerToolRequireApproval.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.McpServerToolRequireApproval.g.cs index fdcc6abf..7ac4d7e9 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.McpServerToolRequireApproval.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.McpServerToolRequireApproval.g.cs @@ -174,19 +174,19 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.McpServerToolRequireApproval0), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.McpServerToolRequireApproval0).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.McpServerToolRequireApproval0!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickMcpServerToolRequireApproval0(), typeInfo); } else if (value.IsMcpServerToolRequireApproval1) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.McpServerToolRequireApproval1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.McpServerToolRequireApproval1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.McpServerToolRequireApproval1!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickMcpServerToolRequireApproval1(), typeInfo); } else if (value.IsMcpServerToolRequireApproval2) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.McpServerToolRequireApproval2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.McpServerToolRequireApproval2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.McpServerToolRequireApproval2!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickMcpServerToolRequireApproval2(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.MessagesMessageParamContent.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.MessagesMessageParamContent.g.cs index 280cf377..628913a6 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.MessagesMessageParamContent.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.MessagesMessageParamContent.g.cs @@ -149,13 +149,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessagesMessageParamContentVariant1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickMessagesMessageParamContentVariant1(), typeInfo); } else if (value.IsMessagesMessageParamContent1) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::System.Collections.Generic.IList), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo?> ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::System.Collections.Generic.IList).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessagesMessageParamContent1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickMessagesMessageParamContent1(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.MessagesMessageParamContentOneOf1Items.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.MessagesMessageParamContentOneOf1Items.g.cs index 9e0ac31a..21c38e1a 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.MessagesMessageParamContentOneOf1Items.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.MessagesMessageParamContentOneOf1Items.g.cs @@ -571,73 +571,73 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.AnthropicTextBlockParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.AnthropicTextBlockParam).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AnthropicTextBlockParam!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickAnthropicTextBlockParam(), typeInfo); } else if (value.IsAnthropicImageBlockParam) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.AnthropicImageBlockParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.AnthropicImageBlockParam).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AnthropicImageBlockParam!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickAnthropicImageBlockParam(), typeInfo); } else if (value.IsAnthropicDocumentBlockParam) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.AnthropicDocumentBlockParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.AnthropicDocumentBlockParam).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AnthropicDocumentBlockParam!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickAnthropicDocumentBlockParam(), typeInfo); } else if (value.IsMessagesMessageParamContentOneOf1Items3) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.MessagesMessageParamContentOneOf1Items3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.MessagesMessageParamContentOneOf1Items3).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessagesMessageParamContentOneOf1Items3!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickMessagesMessageParamContentOneOf1Items3(), typeInfo); } else if (value.IsMessagesMessageParamContentOneOf1Items4) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.MessagesMessageParamContentOneOf1Items4), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.MessagesMessageParamContentOneOf1Items4).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessagesMessageParamContentOneOf1Items4!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickMessagesMessageParamContentOneOf1Items4(), typeInfo); } else if (value.IsMessagesMessageParamContentOneOf1Items5) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.MessagesMessageParamContentOneOf1Items5), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.MessagesMessageParamContentOneOf1Items5).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessagesMessageParamContentOneOf1Items5!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickMessagesMessageParamContentOneOf1Items5(), typeInfo); } else if (value.IsMessagesMessageParamContentOneOf1Items6) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.MessagesMessageParamContentOneOf1Items6), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.MessagesMessageParamContentOneOf1Items6).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessagesMessageParamContentOneOf1Items6!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickMessagesMessageParamContentOneOf1Items6(), typeInfo); } else if (value.IsMessagesMessageParamContentOneOf1Items7) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.MessagesMessageParamContentOneOf1Items7), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.MessagesMessageParamContentOneOf1Items7).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessagesMessageParamContentOneOf1Items7!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickMessagesMessageParamContentOneOf1Items7(), typeInfo); } else if (value.IsMessagesMessageParamContentOneOf1Items8) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.MessagesMessageParamContentOneOf1Items8), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.MessagesMessageParamContentOneOf1Items8).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessagesMessageParamContentOneOf1Items8!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickMessagesMessageParamContentOneOf1Items8(), typeInfo); } else if (value.IsAnthropicSearchResultBlockParam) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.AnthropicSearchResultBlockParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.AnthropicSearchResultBlockParam).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AnthropicSearchResultBlockParam!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickAnthropicSearchResultBlockParam(), typeInfo); } else if (value.IsMessagesMessageParamContentOneOf1Items10) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.MessagesMessageParamContentOneOf1Items10), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.MessagesMessageParamContentOneOf1Items10).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessagesMessageParamContentOneOf1Items10!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickMessagesMessageParamContentOneOf1Items10(), typeInfo); } else if (value.IsMessagesAdvisorToolResultBlock) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.MessagesAdvisorToolResultBlock), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.MessagesAdvisorToolResultBlock).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessagesAdvisorToolResultBlock!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickMessagesAdvisorToolResultBlock(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.MessagesMessageParamContentOneOf1ItemsOneOf4Content.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.MessagesMessageParamContentOneOf1ItemsOneOf4Content.g.cs index 6942a59f..5801f825 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.MessagesMessageParamContentOneOf1ItemsOneOf4Content.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.MessagesMessageParamContentOneOf1ItemsOneOf4Content.g.cs @@ -149,13 +149,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessagesMessageParamContentOneOf1ItemsOneOf4ContentVariant1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickMessagesMessageParamContentOneOf1ItemsOneOf4ContentVariant1(), typeInfo); } else if (value.IsMessagesMessageParamContentOneOf1ItemsOneOf4Content1) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::System.Collections.Generic.IList), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo?> ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::System.Collections.Generic.IList).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessagesMessageParamContentOneOf1ItemsOneOf4Content1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickMessagesMessageParamContentOneOf1ItemsOneOf4Content1(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.MessagesMessageParamContentOneOf1ItemsOneOf4ContentOneOf1Items.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.MessagesMessageParamContentOneOf1ItemsOneOf4ContentOneOf1Items.g.cs index 4b47c747..3543c99b 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.MessagesMessageParamContentOneOf1ItemsOneOf4ContentOneOf1Items.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.MessagesMessageParamContentOneOf1ItemsOneOf4ContentOneOf1Items.g.cs @@ -274,31 +274,31 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.AnthropicTextBlockParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.AnthropicTextBlockParam).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AnthropicTextBlockParam!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickAnthropicTextBlockParam(), typeInfo); } else if (value.IsAnthropicImageBlockParam) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.AnthropicImageBlockParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.AnthropicImageBlockParam).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AnthropicImageBlockParam!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickAnthropicImageBlockParam(), typeInfo); } else if (value.IsMessagesMessageParamContentOneOf1ItemsOneOf4ContentOneOf1Items2) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf4ContentOneOf1Items2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf4ContentOneOf1Items2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessagesMessageParamContentOneOf1ItemsOneOf4ContentOneOf1Items2!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickMessagesMessageParamContentOneOf1ItemsOneOf4ContentOneOf1Items2(), typeInfo); } else if (value.IsAnthropicSearchResultBlockParam) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.AnthropicSearchResultBlockParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.AnthropicSearchResultBlockParam).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AnthropicSearchResultBlockParam!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickAnthropicSearchResultBlockParam(), typeInfo); } else if (value.IsAnthropicDocumentBlockParam) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.AnthropicDocumentBlockParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.AnthropicDocumentBlockParam).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AnthropicDocumentBlockParam!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickAnthropicDocumentBlockParam(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.MessagesMessageParamContentOneOf1ItemsOneOf8Content.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.MessagesMessageParamContentOneOf1ItemsOneOf8Content.g.cs index cb3d8147..b506841e 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.MessagesMessageParamContentOneOf1ItemsOneOf8Content.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.MessagesMessageParamContentOneOf1ItemsOneOf8Content.g.cs @@ -128,13 +128,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::System.Collections.Generic.IList), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo?> ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::System.Collections.Generic.IList).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessagesMessageParamContentOneOf1ItemsOneOf8Content0!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickMessagesMessageParamContentOneOf1ItemsOneOf8Content0(), typeInfo); } else if (value.IsMessagesMessageParamContentOneOf1ItemsOneOf8Content1) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf8Content1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf8Content1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessagesMessageParamContentOneOf1ItemsOneOf8Content1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickMessagesMessageParamContentOneOf1ItemsOneOf8Content1(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.MessagesRequestContextManagementEditsItems.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.MessagesRequestContextManagementEditsItems.g.cs index 90d9db23..17b5866e 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.MessagesRequestContextManagementEditsItems.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.MessagesRequestContextManagementEditsItems.g.cs @@ -186,19 +186,19 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.MessagesRequestContextManagementEditsItems0), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.MessagesRequestContextManagementEditsItems0).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessagesRequestContextManagementEditsItems0!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickMessagesRequestContextManagementEditsItems0(), typeInfo); } else if (value.IsMessagesRequestContextManagementEditsItems1) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.MessagesRequestContextManagementEditsItems1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.MessagesRequestContextManagementEditsItems1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessagesRequestContextManagementEditsItems1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickMessagesRequestContextManagementEditsItems1(), typeInfo); } else if (value.IsMessagesRequestContextManagementEditsItems2) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.MessagesRequestContextManagementEditsItems2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.MessagesRequestContextManagementEditsItems2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessagesRequestContextManagementEditsItems2!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickMessagesRequestContextManagementEditsItems2(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.MessagesRequestContextManagementEditsItemsOneOf0ClearToolInputs.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.MessagesRequestContextManagementEditsItemsOneOf0ClearToolInputs.g.cs index ab283c31..4de2e6ce 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.MessagesRequestContextManagementEditsItemsOneOf0ClearToolInputs.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.MessagesRequestContextManagementEditsItemsOneOf0ClearToolInputs.g.cs @@ -149,13 +149,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(bool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(bool).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessagesRequestContextManagementEditsItemsOneOf0ClearToolInputsVariant1!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickMessagesRequestContextManagementEditsItemsOneOf0ClearToolInputsVariant1(), typeInfo); } else if (value.IsMessagesRequestContextManagementEditsItemsOneOf0ClearToolInputsVariant2) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::System.Collections.Generic.IList), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo?> ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::System.Collections.Generic.IList).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessagesRequestContextManagementEditsItemsOneOf0ClearToolInputsVariant2!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickMessagesRequestContextManagementEditsItemsOneOf0ClearToolInputsVariant2(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.MessagesRequestContextManagementEditsItemsOneOf0Trigger.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.MessagesRequestContextManagementEditsItemsOneOf0Trigger.g.cs index 81417dca..2f2847d7 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.MessagesRequestContextManagementEditsItemsOneOf0Trigger.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.MessagesRequestContextManagementEditsItemsOneOf0Trigger.g.cs @@ -59,13 +59,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf0TriggerVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf0TriggerVariant1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.InputTokens!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickInputTokens(), typeInfo); } else if (value.IsToolUses) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf0TriggerVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf0TriggerVariant2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ToolUses!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickToolUses(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.MessagesRequestContextManagementEditsItemsOneOf1Keep.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.MessagesRequestContextManagementEditsItemsOneOf1Keep.g.cs index 00244260..30d3b978 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.MessagesRequestContextManagementEditsItemsOneOf1Keep.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.MessagesRequestContextManagementEditsItemsOneOf1Keep.g.cs @@ -166,19 +166,19 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.AnthropicThinkingTurns), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.AnthropicThinkingTurns).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AnthropicThinkingTurns!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickAnthropicThinkingTurns(), typeInfo); } else if (value.IsMessagesRequestContextManagementEditsItemsOneOf1Keep1) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf1Keep1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf1Keep1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessagesRequestContextManagementEditsItemsOneOf1Keep1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickMessagesRequestContextManagementEditsItemsOneOf1Keep1(), typeInfo); } else if (value.IsMessagesRequestContextManagementEditsItemsOneOf1Keep2) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf1Keep2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf1Keep2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessagesRequestContextManagementEditsItemsOneOf1Keep2!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickMessagesRequestContextManagementEditsItemsOneOf1Keep2(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.MessagesRequestPluginsItems.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.MessagesRequestPluginsItems.g.cs index 3eb3cdcb..d24197d6 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.MessagesRequestPluginsItems.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.MessagesRequestPluginsItems.g.cs @@ -131,61 +131,61 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AutoBetaRouter!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickAutoBetaRouter(), typeInfo); } else if (value.IsAutoRouter) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AutoRouter!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickAutoRouter(), typeInfo); } else if (value.IsContextCompression) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant3).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ContextCompression!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickContextCompression(), typeInfo); } else if (value.IsFileParser) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant4), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant4).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileParser!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickFileParser(), typeInfo); } else if (value.IsFusion) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant5), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant5).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Fusion!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickFusion(), typeInfo); } else if (value.IsModeration) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant6), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant6).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Moderation!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickModeration(), typeInfo); } else if (value.IsParetoRouter) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant7), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant7).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ParetoRouter!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickParetoRouter(), typeInfo); } else if (value.IsResponseHealing) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant8), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant8).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ResponseHealing!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickResponseHealing(), typeInfo); } else if (value.IsWeb) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant9), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant9).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Web!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickWeb(), typeInfo); } else if (value.IsWebFetch) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant10), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.MessagesRequestPluginsItemsVariant10).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.WebFetch!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickWebFetch(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.MessagesRequestSystem.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.MessagesRequestSystem.g.cs index 649aee04..887eb2d7 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.MessagesRequestSystem.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.MessagesRequestSystem.g.cs @@ -149,13 +149,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessagesRequestSystemVariant1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickMessagesRequestSystemVariant1(), typeInfo); } else if (value.IsMessagesRequestSystem1) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::System.Collections.Generic.IList), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo?> ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::System.Collections.Generic.IList).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessagesRequestSystem1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickMessagesRequestSystem1(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.MessagesRequestThinking.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.MessagesRequestThinking.g.cs index 3e24bee8..f0a0e026 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.MessagesRequestThinking.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.MessagesRequestThinking.g.cs @@ -169,19 +169,19 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.MessagesRequestThinking0), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.MessagesRequestThinking0).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessagesRequestThinking0!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickMessagesRequestThinking0(), typeInfo); } else if (value.IsMessagesRequestThinking1) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.MessagesRequestThinking1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.MessagesRequestThinking1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessagesRequestThinking1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickMessagesRequestThinking1(), typeInfo); } else if (value.IsMessagesRequestThinking2) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.MessagesRequestThinking2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.MessagesRequestThinking2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessagesRequestThinking2!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickMessagesRequestThinking2(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.MessagesRequestToolChoice.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.MessagesRequestToolChoice.g.cs index 8b9bbf4f..c58f68c7 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.MessagesRequestToolChoice.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.MessagesRequestToolChoice.g.cs @@ -208,25 +208,25 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.MessagesRequestToolChoice0), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.MessagesRequestToolChoice0).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessagesRequestToolChoice0!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickMessagesRequestToolChoice0(), typeInfo); } else if (value.IsMessagesRequestToolChoice1) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.MessagesRequestToolChoice1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.MessagesRequestToolChoice1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessagesRequestToolChoice1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickMessagesRequestToolChoice1(), typeInfo); } else if (value.IsMessagesRequestToolChoice2) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.MessagesRequestToolChoice2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.MessagesRequestToolChoice2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessagesRequestToolChoice2!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickMessagesRequestToolChoice2(), typeInfo); } else if (value.IsMessagesRequestToolChoice3) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.MessagesRequestToolChoice3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.MessagesRequestToolChoice3).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessagesRequestToolChoice3!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickMessagesRequestToolChoice3(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.MessagesRequestToolsItems.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.MessagesRequestToolsItems.g.cs index 2c243999..74178f27 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.MessagesRequestToolsItems.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.MessagesRequestToolsItems.g.cs @@ -631,79 +631,79 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.MessagesRequestToolsItems0), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.MessagesRequestToolsItems0).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessagesRequestToolsItems0!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickMessagesRequestToolsItems0(), typeInfo); } else if (value.IsMessagesRequestToolsItems1) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.MessagesRequestToolsItems1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.MessagesRequestToolsItems1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessagesRequestToolsItems1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickMessagesRequestToolsItems1(), typeInfo); } else if (value.IsMessagesRequestToolsItems2) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.MessagesRequestToolsItems2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.MessagesRequestToolsItems2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessagesRequestToolsItems2!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickMessagesRequestToolsItems2(), typeInfo); } else if (value.IsMessagesRequestToolsItems3) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.MessagesRequestToolsItems3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.MessagesRequestToolsItems3).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessagesRequestToolsItems3!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickMessagesRequestToolsItems3(), typeInfo); } else if (value.IsMessagesRequestToolsItems4) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.MessagesRequestToolsItems4), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.MessagesRequestToolsItems4).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessagesRequestToolsItems4!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickMessagesRequestToolsItems4(), typeInfo); } else if (value.IsMessagesRequestToolsItems5) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.MessagesRequestToolsItems5), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.MessagesRequestToolsItems5).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessagesRequestToolsItems5!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickMessagesRequestToolsItems5(), typeInfo); } else if (value.IsBashServerTool) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.BashServerTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.BashServerTool).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.BashServerTool!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickBashServerTool(), typeInfo); } else if (value.IsDatetimeServerTool) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.DatetimeServerTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.DatetimeServerTool).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.DatetimeServerTool!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickDatetimeServerTool(), typeInfo); } else if (value.IsImageGenerationServerToolOpenRouter) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ImageGenerationServerToolOpenRouter), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ImageGenerationServerToolOpenRouter).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageGenerationServerToolOpenRouter!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickImageGenerationServerToolOpenRouter(), typeInfo); } else if (value.IsMessagesSearchModelsServerTool) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.MessagesSearchModelsServerTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.MessagesSearchModelsServerTool).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessagesSearchModelsServerTool!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickMessagesSearchModelsServerTool(), typeInfo); } else if (value.IsWebFetchServerTool) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.WebFetchServerTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.WebFetchServerTool).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.WebFetchServerTool!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickWebFetchServerTool(), typeInfo); } else if (value.IsOpenRouterWebSearchServerTool) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OpenRouterWebSearchServerTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OpenRouterWebSearchServerTool).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OpenRouterWebSearchServerTool!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOpenRouterWebSearchServerTool(), typeInfo); } else if (value.IsMessagesRequestToolsItems12) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.MessagesRequestToolsItems12), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.MessagesRequestToolsItems12).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessagesRequestToolsItems12!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickMessagesRequestToolsItems12(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.NamespaceToolToolsItems.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.NamespaceToolToolsItems.g.cs index 423d86e7..169cb7ff 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.NamespaceToolToolsItems.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.NamespaceToolToolsItems.g.cs @@ -138,13 +138,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.NamespaceFunctionTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.NamespaceFunctionTool).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.NamespaceFunctionTool!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickNamespaceFunctionTool(), typeInfo); } else if (value.IsCustomTool) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.CustomTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.CustomTool).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.CustomTool!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickCustomTool(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ORAnthropicContentBlock.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ORAnthropicContentBlock.g.cs index 55592d2f..708a713e 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ORAnthropicContentBlock.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ORAnthropicContentBlock.g.cs @@ -167,85 +167,85 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ORAnthropicContentBlockVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ORAnthropicContentBlockVariant1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AdvisorToolResult!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickAdvisorToolResult(), typeInfo); } else if (value.IsBashCodeExecutionToolResult) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ORAnthropicContentBlockVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ORAnthropicContentBlockVariant2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.BashCodeExecutionToolResult!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickBashCodeExecutionToolResult(), typeInfo); } else if (value.IsCodeExecutionToolResult) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ORAnthropicContentBlockVariant3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ORAnthropicContentBlockVariant3).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.CodeExecutionToolResult!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickCodeExecutionToolResult(), typeInfo); } else if (value.IsCompaction) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ORAnthropicContentBlockVariant4), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ORAnthropicContentBlockVariant4).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Compaction!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickCompaction(), typeInfo); } else if (value.IsContainerUpload) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ORAnthropicContentBlockVariant5), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ORAnthropicContentBlockVariant5).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ContainerUpload!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickContainerUpload(), typeInfo); } else if (value.IsRedactedThinking) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ORAnthropicContentBlockVariant6), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ORAnthropicContentBlockVariant6).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.RedactedThinking!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickRedactedThinking(), typeInfo); } else if (value.IsServerToolUse) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ORAnthropicContentBlockVariant7), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ORAnthropicContentBlockVariant7).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ServerToolUse!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickServerToolUse(), typeInfo); } else if (value.IsText) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ORAnthropicContentBlockVariant8), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ORAnthropicContentBlockVariant8).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickText(), typeInfo); } else if (value.IsTextEditorCodeExecutionToolResult) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ORAnthropicContentBlockVariant9), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ORAnthropicContentBlockVariant9).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.TextEditorCodeExecutionToolResult!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickTextEditorCodeExecutionToolResult(), typeInfo); } else if (value.IsThinking) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ORAnthropicContentBlockVariant10), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ORAnthropicContentBlockVariant10).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Thinking!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickThinking(), typeInfo); } else if (value.IsToolSearchToolResult) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ORAnthropicContentBlockVariant11), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ORAnthropicContentBlockVariant11).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ToolSearchToolResult!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickToolSearchToolResult(), typeInfo); } else if (value.IsToolUse) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ORAnthropicContentBlockVariant12), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ORAnthropicContentBlockVariant12).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ToolUse!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickToolUse(), typeInfo); } else if (value.IsWebFetchToolResult) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ORAnthropicContentBlockVariant13), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ORAnthropicContentBlockVariant13).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.WebFetchToolResult!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickWebFetchToolResult(), typeInfo); } else if (value.IsWebSearchToolResult) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ORAnthropicContentBlockVariant14), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ORAnthropicContentBlockVariant14).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.WebSearchToolResult!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickWebSearchToolResult(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ObservabilityDestination.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ObservabilityDestination.g.cs index fd9a4de3..57ea9bd2 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ObservabilityDestination.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ObservabilityDestination.g.cs @@ -194,103 +194,103 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ObservabilityDestinationVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ObservabilityDestinationVariant1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Arize!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickArize(), typeInfo); } else if (value.IsBraintrust) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ObservabilityDestinationVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ObservabilityDestinationVariant2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Braintrust!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickBraintrust(), typeInfo); } else if (value.IsClickhouse) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ObservabilityDestinationVariant3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ObservabilityDestinationVariant3).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Clickhouse!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickClickhouse(), typeInfo); } else if (value.IsDatadog) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ObservabilityDestinationVariant4), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ObservabilityDestinationVariant4).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Datadog!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickDatadog(), typeInfo); } else if (value.IsGrafana) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ObservabilityDestinationVariant5), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ObservabilityDestinationVariant5).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Grafana!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickGrafana(), typeInfo); } else if (value.IsLangfuse) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ObservabilityDestinationVariant6), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ObservabilityDestinationVariant6).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Langfuse!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickLangfuse(), typeInfo); } else if (value.IsLangsmith) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ObservabilityDestinationVariant7), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ObservabilityDestinationVariant7).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Langsmith!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickLangsmith(), typeInfo); } else if (value.IsNewrelic) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ObservabilityDestinationVariant8), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ObservabilityDestinationVariant8).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Newrelic!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickNewrelic(), typeInfo); } else if (value.IsOpik) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ObservabilityDestinationVariant9), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ObservabilityDestinationVariant9).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Opik!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOpik(), typeInfo); } else if (value.IsOtelCollector) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ObservabilityDestinationVariant10), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ObservabilityDestinationVariant10).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OtelCollector!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOtelCollector(), typeInfo); } else if (value.IsPosthog) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ObservabilityDestinationVariant11), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ObservabilityDestinationVariant11).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Posthog!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickPosthog(), typeInfo); } else if (value.IsRamp) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ObservabilityDestinationVariant12), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ObservabilityDestinationVariant12).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Ramp!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickRamp(), typeInfo); } else if (value.IsS3) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ObservabilityDestinationVariant13), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ObservabilityDestinationVariant13).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.S3!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickS3(), typeInfo); } else if (value.IsSentry) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ObservabilityDestinationVariant14), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ObservabilityDestinationVariant14).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Sentry!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickSentry(), typeInfo); } else if (value.IsSnowflake) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ObservabilityDestinationVariant15), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ObservabilityDestinationVariant15).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Snowflake!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickSnowflake(), typeInfo); } else if (value.IsWeave) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ObservabilityDestinationVariant16), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ObservabilityDestinationVariant16).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Weave!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickWeave(), typeInfo); } else if (value.IsWebhook) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ObservabilityDestinationVariant17), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ObservabilityDestinationVariant17).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Webhook!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickWebhook(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ObservabilityFilterRuleGroupRulesItemsValue.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ObservabilityFilterRuleGroupRulesItemsValue.g.cs index c4ac4cda..848ff7bc 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ObservabilityFilterRuleGroupRulesItemsValue.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ObservabilityFilterRuleGroupRulesItemsValue.g.cs @@ -149,13 +149,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ObservabilityFilterRuleGroupRulesItemsValueVariant1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickObservabilityFilterRuleGroupRulesItemsValueVariant1(), typeInfo); } else if (value.IsObservabilityFilterRuleGroupRulesItemsValueVariant2) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(double), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(double).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ObservabilityFilterRuleGroupRulesItemsValueVariant2!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickObservabilityFilterRuleGroupRulesItemsValueVariant2(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OpenAIResponsesAnnotation.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OpenAIResponsesAnnotation.g.cs index 501dfe34..886f5e4f 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OpenAIResponsesAnnotation.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OpenAIResponsesAnnotation.g.cs @@ -176,19 +176,19 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.FileCitation), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.FileCitation).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileCitation!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickFileCitation(), typeInfo); } else if (value.IsURLCitation) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.URLCitation), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.URLCitation).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.URLCitation!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickURLCitation(), typeInfo); } else if (value.IsFilePath) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.FilePath), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.FilePath).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.FilePath!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickFilePath(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OpenAIResponsesToolChoice.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OpenAIResponsesToolChoice.g.cs index 14ecd31a..f8bed23c 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OpenAIResponsesToolChoice.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OpenAIResponsesToolChoice.g.cs @@ -356,49 +356,49 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OpenAiResponsesToolChoice0), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OpenAiResponsesToolChoice0).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OpenAiResponsesToolChoice0!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOpenAiResponsesToolChoice0(), typeInfo); } else if (value.IsOpenAiResponsesToolChoice1) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OpenAiResponsesToolChoice1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OpenAiResponsesToolChoice1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OpenAiResponsesToolChoice1!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOpenAiResponsesToolChoice1(), typeInfo); } else if (value.IsOpenAiResponsesToolChoice2) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OpenAiResponsesToolChoice2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OpenAiResponsesToolChoice2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OpenAiResponsesToolChoice2!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOpenAiResponsesToolChoice2(), typeInfo); } else if (value.IsOpenAiResponsesToolChoice3) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OpenAiResponsesToolChoice3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OpenAiResponsesToolChoice3).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OpenAiResponsesToolChoice3!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOpenAiResponsesToolChoice3(), typeInfo); } else if (value.IsOpenAiResponsesToolChoice4) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OpenAiResponsesToolChoice4), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OpenAiResponsesToolChoice4).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OpenAiResponsesToolChoice4!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOpenAiResponsesToolChoice4(), typeInfo); } else if (value.IsToolChoiceAllowed) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ToolChoiceAllowed), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ToolChoiceAllowed).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ToolChoiceAllowed!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickToolChoiceAllowed(), typeInfo); } else if (value.IsOpenAiResponsesToolChoice6) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OpenAiResponsesToolChoice6), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OpenAiResponsesToolChoice6).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OpenAiResponsesToolChoice6!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOpenAiResponsesToolChoice6(), typeInfo); } else if (value.IsOpenAiResponsesToolChoice7) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OpenAiResponsesToolChoice7), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OpenAiResponsesToolChoice7).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OpenAiResponsesToolChoice7!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOpenAiResponsesToolChoice7(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OpenAiResponseCustomToolCallOutputOutput.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OpenAiResponseCustomToolCallOutputOutput.g.cs index d6f9c104..ebe99cf9 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OpenAiResponseCustomToolCallOutputOutput.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OpenAiResponseCustomToolCallOutputOutput.g.cs @@ -149,13 +149,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OpenAiResponseCustomToolCallOutputOutputVariant1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOpenAiResponseCustomToolCallOutputOutputVariant1(), typeInfo); } else if (value.IsOpenAiResponseCustomToolCallOutputOutput1) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::System.Collections.Generic.IList), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo?> ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::System.Collections.Generic.IList).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OpenAiResponseCustomToolCallOutputOutput1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOpenAiResponseCustomToolCallOutputOutput1(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OpenAiResponseCustomToolCallOutputOutputOneOf1Items.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OpenAiResponseCustomToolCallOutputOutputOneOf1Items.g.cs index 54a91925..bcdce840 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OpenAiResponseCustomToolCallOutputOutputOneOf1Items.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OpenAiResponseCustomToolCallOutputOutputOneOf1Items.g.cs @@ -68,19 +68,19 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OpenAiResponseCustomToolCallOutputOutputOneOf1ItemsVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OpenAiResponseCustomToolCallOutputOutputOneOf1ItemsVariant1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.InputFile!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickInputFile(), typeInfo); } else if (value.IsInputImage) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OpenAiResponseCustomToolCallOutputOutputOneOf1ItemsVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OpenAiResponseCustomToolCallOutputOutputOneOf1ItemsVariant2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.InputImage!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickInputImage(), typeInfo); } else if (value.IsInputText) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OpenAiResponseCustomToolCallOutputOutputOneOf1ItemsVariant3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OpenAiResponseCustomToolCallOutputOutputOneOf1ItemsVariant3).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.InputText!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickInputText(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OpenAiResponseFunctionToolCallOutputOutput.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OpenAiResponseFunctionToolCallOutputOutput.g.cs index d48717a7..66acf266 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OpenAiResponseFunctionToolCallOutputOutput.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OpenAiResponseFunctionToolCallOutputOutput.g.cs @@ -149,13 +149,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OpenAiResponseFunctionToolCallOutputOutputVariant1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOpenAiResponseFunctionToolCallOutputOutputVariant1(), typeInfo); } else if (value.IsOpenAiResponseFunctionToolCallOutputOutput1) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::System.Collections.Generic.IList), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo?> ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::System.Collections.Generic.IList).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OpenAiResponseFunctionToolCallOutputOutput1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOpenAiResponseFunctionToolCallOutputOutput1(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OpenAiResponseFunctionToolCallOutputOutputOneOf1Items.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OpenAiResponseFunctionToolCallOutputOutputOneOf1Items.g.cs index 4e54f1d6..65674017 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OpenAiResponseFunctionToolCallOutputOutputOneOf1Items.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OpenAiResponseFunctionToolCallOutputOutputOneOf1Items.g.cs @@ -68,19 +68,19 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OpenAiResponseFunctionToolCallOutputOutputOneOf1ItemsVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OpenAiResponseFunctionToolCallOutputOutputOneOf1ItemsVariant1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.InputFile!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickInputFile(), typeInfo); } else if (value.IsInputImage) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OpenAiResponseFunctionToolCallOutputOutputOneOf1ItemsVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OpenAiResponseFunctionToolCallOutputOutputOneOf1ItemsVariant2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.InputImage!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickInputImage(), typeInfo); } else if (value.IsInputText) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OpenAiResponseFunctionToolCallOutputOutputOneOf1ItemsVariant3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OpenAiResponseFunctionToolCallOutputOutputOneOf1ItemsVariant3).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.InputText!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickInputText(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OpenAiResponseInputMessageItemContentItems.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OpenAiResponseInputMessageItemContentItems.g.cs index 9060fc0d..4afa96ea 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OpenAiResponseInputMessageItemContentItems.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OpenAiResponseInputMessageItemContentItems.g.cs @@ -77,25 +77,25 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OpenAiResponseInputMessageItemContentItemsVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OpenAiResponseInputMessageItemContentItemsVariant1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.InputAudio!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickInputAudio(), typeInfo); } else if (value.IsInputFile) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OpenAiResponseInputMessageItemContentItemsVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OpenAiResponseInputMessageItemContentItemsVariant2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.InputFile!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickInputFile(), typeInfo); } else if (value.IsInputImage) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OpenAiResponseInputMessageItemContentItemsVariant3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OpenAiResponseInputMessageItemContentItemsVariant3).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.InputImage!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickInputImage(), typeInfo); } else if (value.IsInputText) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OpenAiResponseInputMessageItemContentItemsVariant4), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OpenAiResponseInputMessageItemContentItemsVariant4).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.InputText!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickInputText(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OpenAiResponseInputMessageItemRole.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OpenAiResponseInputMessageItemRole.g.cs index 98341e1d..5d388652 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OpenAiResponseInputMessageItemRole.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OpenAiResponseInputMessageItemRole.g.cs @@ -198,19 +198,19 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OpenAiResponseInputMessageItemRole0), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OpenAiResponseInputMessageItemRole0).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OpenAiResponseInputMessageItemRole0!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOpenAiResponseInputMessageItemRole0(), typeInfo); } else if (value.IsOpenAiResponseInputMessageItemRole1) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OpenAiResponseInputMessageItemRole1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OpenAiResponseInputMessageItemRole1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OpenAiResponseInputMessageItemRole1!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOpenAiResponseInputMessageItemRole1(), typeInfo); } else if (value.IsOpenAiResponseInputMessageItemRole2) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OpenAiResponseInputMessageItemRole2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OpenAiResponseInputMessageItemRole2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OpenAiResponseInputMessageItemRole2!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOpenAiResponseInputMessageItemRole2(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OpenAiResponsesToolChoiceOneOf4Type.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OpenAiResponsesToolChoiceOneOf4Type.g.cs index 04e85042..b17ac931 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OpenAiResponsesToolChoiceOneOf4Type.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OpenAiResponsesToolChoiceOneOf4Type.g.cs @@ -149,13 +149,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OpenAiResponsesToolChoiceOneOf4Type0), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OpenAiResponsesToolChoiceOneOf4Type0).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OpenAiResponsesToolChoiceOneOf4Type0!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOpenAiResponsesToolChoiceOneOf4Type0(), typeInfo); } else if (value.IsOpenAiResponsesToolChoiceOneOf4Type1) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OpenAiResponsesToolChoiceOneOf4Type1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OpenAiResponsesToolChoiceOneOf4Type1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OpenAiResponsesToolChoiceOneOf4Type1!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOpenAiResponsesToolChoiceOneOf4Type1(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OpenResponsesResultToolsItems.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OpenResponsesResultToolsItems.g.cs index 8e26565f..2701ffbf 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OpenResponsesResultToolsItems.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OpenResponsesResultToolsItems.g.cs @@ -707,91 +707,91 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OpenResponsesResultToolsItems0), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OpenResponsesResultToolsItems0).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OpenResponsesResultToolsItems0!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOpenResponsesResultToolsItems0(), typeInfo); } else if (value.IsPreviewWebSearchServerTool) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.PreviewWebSearchServerTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.PreviewWebSearchServerTool).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.PreviewWebSearchServerTool!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickPreviewWebSearchServerTool(), typeInfo); } else if (value.IsPreview20250311WebSearchServerTool) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.Preview20250311WebSearchServerTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.Preview20250311WebSearchServerTool).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Preview20250311WebSearchServerTool!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickPreview20250311WebSearchServerTool(), typeInfo); } else if (value.IsLegacyWebSearchServerTool) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.LegacyWebSearchServerTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.LegacyWebSearchServerTool).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.LegacyWebSearchServerTool!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickLegacyWebSearchServerTool(), typeInfo); } else if (value.IsWebSearchServerTool) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.WebSearchServerTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.WebSearchServerTool).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.WebSearchServerTool!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickWebSearchServerTool(), typeInfo); } else if (value.IsFileSearchServerTool) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.FileSearchServerTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.FileSearchServerTool).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileSearchServerTool!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickFileSearchServerTool(), typeInfo); } else if (value.IsComputerUseServerTool) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ComputerUseServerTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ComputerUseServerTool).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ComputerUseServerTool!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickComputerUseServerTool(), typeInfo); } else if (value.IsCodeInterpreterServerTool) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.CodeInterpreterServerTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.CodeInterpreterServerTool).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.CodeInterpreterServerTool!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickCodeInterpreterServerTool(), typeInfo); } else if (value.IsMcpServerTool) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.McpServerTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.McpServerTool).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.McpServerTool!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickMcpServerTool(), typeInfo); } else if (value.IsImageGenerationServerTool) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ImageGenerationServerTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ImageGenerationServerTool).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageGenerationServerTool!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickImageGenerationServerTool(), typeInfo); } else if (value.IsCodexLocalShellTool) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.CodexLocalShellTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.CodexLocalShellTool).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.CodexLocalShellTool!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickCodexLocalShellTool(), typeInfo); } else if (value.IsShellServerTool) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ShellServerTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ShellServerTool).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ShellServerTool!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickShellServerTool(), typeInfo); } else if (value.IsApplyPatchServerTool) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ApplyPatchServerTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ApplyPatchServerTool).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ApplyPatchServerTool!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickApplyPatchServerTool(), typeInfo); } else if (value.IsCustomTool) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.CustomTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.CustomTool).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.CustomTool!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickCustomTool(), typeInfo); } else if (value.IsNamespaceTool) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.NamespaceTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.NamespaceTool).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.NamespaceTool!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickNamespaceTool(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OrAnthropicContentBlockDiscriminatorMappingWebSearchToolResultContent.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OrAnthropicContentBlockDiscriminatorMappingWebSearchToolResultContent.g.cs index 77977fa7..4d61d778 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OrAnthropicContentBlockDiscriminatorMappingWebSearchToolResultContent.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OrAnthropicContentBlockDiscriminatorMappingWebSearchToolResultContent.g.cs @@ -128,13 +128,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::System.Collections.Generic.IList), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo?> ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::System.Collections.Generic.IList).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OrAnthropicContentBlockDiscriminatorMappingWebSearchToolResultContent0!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOrAnthropicContentBlockDiscriminatorMappingWebSearchToolResultContent0(), typeInfo); } else if (value.IsAnthropicWebSearchToolResultError) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.AnthropicWebSearchToolResultError), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.AnthropicWebSearchToolResultError).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AnthropicWebSearchToolResultError!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickAnthropicWebSearchToolResultError(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OrAnthropicNullableCaller.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OrAnthropicNullableCaller.g.cs index e8353c45..479b5cfa 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OrAnthropicNullableCaller.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OrAnthropicNullableCaller.g.cs @@ -68,19 +68,19 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OrAnthropicNullableCallerVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OrAnthropicNullableCallerVariant1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.CodeExecution20250825!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickCodeExecution20250825(), typeInfo); } else if (value.IsCodeExecution20260120) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OrAnthropicNullableCallerVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OrAnthropicNullableCallerVariant2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.CodeExecution20260120!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickCodeExecution20260120(), typeInfo); } else if (value.IsDirect) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OrAnthropicNullableCallerVariant3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OrAnthropicNullableCallerVariant3).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Direct!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickDirect(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OutputCodeInterpreterCallItemOutputsItems.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OutputCodeInterpreterCallItemOutputsItems.g.cs index 3f8e760f..08bd2d5c 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OutputCodeInterpreterCallItemOutputsItems.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OutputCodeInterpreterCallItemOutputsItems.g.cs @@ -130,13 +130,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputCodeInterpreterCallItemOutputsItems0), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputCodeInterpreterCallItemOutputsItems0).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OutputCodeInterpreterCallItemOutputsItems0!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOutputCodeInterpreterCallItemOutputsItems0(), typeInfo); } else if (value.IsOutputCodeInterpreterCallItemOutputsItems1) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputCodeInterpreterCallItemOutputsItems1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputCodeInterpreterCallItemOutputsItems1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OutputCodeInterpreterCallItemOutputsItems1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOutputCodeInterpreterCallItemOutputsItems1(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OutputFunctionCallItemStatus.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OutputFunctionCallItemStatus.g.cs index 13d26d28..17e1204d 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OutputFunctionCallItemStatus.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OutputFunctionCallItemStatus.g.cs @@ -198,19 +198,19 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputFunctionCallItemStatus0), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputFunctionCallItemStatus0).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OutputFunctionCallItemStatus0!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOutputFunctionCallItemStatus0(), typeInfo); } else if (value.IsOutputFunctionCallItemStatus1) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputFunctionCallItemStatus1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputFunctionCallItemStatus1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OutputFunctionCallItemStatus1!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOutputFunctionCallItemStatus1(), typeInfo); } else if (value.IsOutputFunctionCallItemStatus2) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputFunctionCallItemStatus2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputFunctionCallItemStatus2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OutputFunctionCallItemStatus2!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOutputFunctionCallItemStatus2(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OutputItems.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OutputItems.g.cs index 4db0f211..5ded2cb6 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OutputItems.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OutputItems.g.cs @@ -311,181 +311,181 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputItemsVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputItemsVariant1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ApplyPatchCall!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickApplyPatchCall(), typeInfo); } else if (value.IsCodeInterpreterCall) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputItemsVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputItemsVariant2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.CodeInterpreterCall!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickCodeInterpreterCall(), typeInfo); } else if (value.IsComputerCall) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputItemsVariant3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputItemsVariant3).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ComputerCall!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickComputerCall(), typeInfo); } else if (value.IsCustomToolCall) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputItemsVariant4), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputItemsVariant4).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.CustomToolCall!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickCustomToolCall(), typeInfo); } else if (value.IsFileSearchCall) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputItemsVariant5), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputItemsVariant5).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileSearchCall!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickFileSearchCall(), typeInfo); } else if (value.IsFunctionCall) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputItemsVariant6), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputItemsVariant6).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.FunctionCall!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickFunctionCall(), typeInfo); } else if (value.IsImageGenerationCall) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputItemsVariant7), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputItemsVariant7).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageGenerationCall!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickImageGenerationCall(), typeInfo); } else if (value.IsMessage) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputItemsVariant8), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputItemsVariant8).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Message!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickMessage(), typeInfo); } else if (value.IsOpenrouterAdvisor) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputItemsVariant9), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputItemsVariant9).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OpenrouterAdvisor!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOpenrouterAdvisor(), typeInfo); } else if (value.IsOpenrouterApplyPatch) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputItemsVariant10), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputItemsVariant10).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OpenrouterApplyPatch!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOpenrouterApplyPatch(), typeInfo); } else if (value.IsOpenrouterBash) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputItemsVariant11), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputItemsVariant11).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OpenrouterBash!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOpenrouterBash(), typeInfo); } else if (value.IsOpenrouterBrowserUse) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputItemsVariant12), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputItemsVariant12).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OpenrouterBrowserUse!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOpenrouterBrowserUse(), typeInfo); } else if (value.IsOpenrouterCodeInterpreter) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputItemsVariant13), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputItemsVariant13).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OpenrouterCodeInterpreter!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOpenrouterCodeInterpreter(), typeInfo); } else if (value.IsOpenrouterDatetime) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputItemsVariant14), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputItemsVariant14).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OpenrouterDatetime!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOpenrouterDatetime(), typeInfo); } else if (value.IsOpenrouterExperimentalSearchModels) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputItemsVariant15), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputItemsVariant15).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OpenrouterExperimentalSearchModels!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOpenrouterExperimentalSearchModels(), typeInfo); } else if (value.IsOpenrouterFileSearch) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputItemsVariant16), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputItemsVariant16).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OpenrouterFileSearch!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOpenrouterFileSearch(), typeInfo); } else if (value.IsOpenrouterFiles) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputItemsVariant17), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputItemsVariant17).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OpenrouterFiles!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOpenrouterFiles(), typeInfo); } else if (value.IsOpenrouterFusion) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputItemsVariant18), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputItemsVariant18).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OpenrouterFusion!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOpenrouterFusion(), typeInfo); } else if (value.IsOpenrouterImageGeneration) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputItemsVariant19), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputItemsVariant19).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OpenrouterImageGeneration!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOpenrouterImageGeneration(), typeInfo); } else if (value.IsOpenrouterMcp) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputItemsVariant20), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputItemsVariant20).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OpenrouterMcp!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOpenrouterMcp(), typeInfo); } else if (value.IsOpenrouterMemory) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputItemsVariant21), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputItemsVariant21).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OpenrouterMemory!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOpenrouterMemory(), typeInfo); } else if (value.IsOpenrouterSubagent) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputItemsVariant22), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputItemsVariant22).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OpenrouterSubagent!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOpenrouterSubagent(), typeInfo); } else if (value.IsOpenrouterTextEditor) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputItemsVariant23), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputItemsVariant23).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OpenrouterTextEditor!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOpenrouterTextEditor(), typeInfo); } else if (value.IsOpenrouterToolSearch) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputItemsVariant24), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputItemsVariant24).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OpenrouterToolSearch!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOpenrouterToolSearch(), typeInfo); } else if (value.IsOpenrouterWebFetch) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputItemsVariant25), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputItemsVariant25).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OpenrouterWebFetch!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOpenrouterWebFetch(), typeInfo); } else if (value.IsOpenrouterWebSearch) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputItemsVariant26), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputItemsVariant26).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OpenrouterWebSearch!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOpenrouterWebSearch(), typeInfo); } else if (value.IsReasoning) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputItemsVariant27), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputItemsVariant27).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Reasoning!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickReasoning(), typeInfo); } else if (value.IsShellCall) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputItemsVariant28), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputItemsVariant28).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ShellCall!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickShellCall(), typeInfo); } else if (value.IsShellCallOutput) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputItemsVariant29), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputItemsVariant29).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ShellCallOutput!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickShellCallOutput(), typeInfo); } else if (value.IsWebSearchCall) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputItemsVariant30), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputItemsVariant30).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.WebSearchCall!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickWebSearchCall(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OutputMessageContentItems.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OutputMessageContentItems.g.cs index a2bd7b70..dc915183 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OutputMessageContentItems.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OutputMessageContentItems.g.cs @@ -132,13 +132,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ResponseOutputText), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ResponseOutputText).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ResponseOutputText!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickResponseOutputText(), typeInfo); } else if (value.IsOpenAIResponsesRefusalContent) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OpenAIResponsesRefusalContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OpenAIResponsesRefusalContent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OpenAIResponsesRefusalContent!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOpenAIResponsesRefusalContent(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OutputMessageItemContentItems.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OutputMessageItemContentItems.g.cs index 6a47cb56..0048fa0a 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OutputMessageItemContentItems.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OutputMessageItemContentItems.g.cs @@ -132,13 +132,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ResponseOutputText), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ResponseOutputText).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ResponseOutputText!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickResponseOutputText(), typeInfo); } else if (value.IsOpenAIResponsesRefusalContent) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OpenAIResponsesRefusalContent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OpenAIResponsesRefusalContent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OpenAIResponsesRefusalContent!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOpenAIResponsesRefusalContent(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OutputMessageItemPhase.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OutputMessageItemPhase.g.cs index 98601d37..a084ad41 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OutputMessageItemPhase.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OutputMessageItemPhase.g.cs @@ -149,13 +149,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputMessageItemPhase0), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputMessageItemPhase0).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OutputMessageItemPhase0!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOutputMessageItemPhase0(), typeInfo); } else if (value.IsOutputMessageItemPhase1) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputMessageItemPhase1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputMessageItemPhase1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OutputMessageItemPhase1!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOutputMessageItemPhase1(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OutputMessageItemStatus.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OutputMessageItemStatus.g.cs index 68997e58..bf52e837 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OutputMessageItemStatus.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OutputMessageItemStatus.g.cs @@ -198,19 +198,19 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputMessageItemStatus0), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputMessageItemStatus0).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OutputMessageItemStatus0!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOutputMessageItemStatus0(), typeInfo); } else if (value.IsOutputMessageItemStatus1) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputMessageItemStatus1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputMessageItemStatus1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OutputMessageItemStatus1!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOutputMessageItemStatus1(), typeInfo); } else if (value.IsOutputMessageItemStatus2) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputMessageItemStatus2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputMessageItemStatus2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OutputMessageItemStatus2!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOutputMessageItemStatus2(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OutputMessagePhase.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OutputMessagePhase.g.cs index f46644bb..48a1e69a 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OutputMessagePhase.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OutputMessagePhase.g.cs @@ -149,13 +149,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputMessagePhase0), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputMessagePhase0).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OutputMessagePhase0!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOutputMessagePhase0(), typeInfo); } else if (value.IsOutputMessagePhase1) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputMessagePhase1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputMessagePhase1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OutputMessagePhase1!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOutputMessagePhase1(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OutputMessageStatus.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OutputMessageStatus.g.cs index 614c7e96..fb4969c5 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OutputMessageStatus.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OutputMessageStatus.g.cs @@ -198,19 +198,19 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputMessageStatus0), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputMessageStatus0).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OutputMessageStatus0!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOutputMessageStatus0(), typeInfo); } else if (value.IsOutputMessageStatus1) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputMessageStatus1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputMessageStatus1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OutputMessageStatus1!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOutputMessageStatus1(), typeInfo); } else if (value.IsOutputMessageStatus2) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputMessageStatus2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputMessageStatus2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OutputMessageStatus2!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOutputMessageStatus2(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OutputReasoningItemStatus.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OutputReasoningItemStatus.g.cs index d536f756..2e99510a 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OutputReasoningItemStatus.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OutputReasoningItemStatus.g.cs @@ -198,19 +198,19 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputReasoningItemStatus0), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputReasoningItemStatus0).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OutputReasoningItemStatus0!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOutputReasoningItemStatus0(), typeInfo); } else if (value.IsOutputReasoningItemStatus1) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputReasoningItemStatus1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputReasoningItemStatus1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OutputReasoningItemStatus1!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOutputReasoningItemStatus1(), typeInfo); } else if (value.IsOutputReasoningItemStatus2) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputReasoningItemStatus2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputReasoningItemStatus2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OutputReasoningItemStatus2!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOutputReasoningItemStatus2(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OutputShellCallOutputItemOutputItemsOutcome.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OutputShellCallOutputItemOutputItemsOutcome.g.cs index eab7d710..88a35249 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OutputShellCallOutputItemOutputItemsOutcome.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OutputShellCallOutputItemOutputItemsOutcome.g.cs @@ -129,13 +129,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputShellCallOutputItemOutputItemsOutcome0), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputShellCallOutputItemOutputItemsOutcome0).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OutputShellCallOutputItemOutputItemsOutcome0!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOutputShellCallOutputItemOutputItemsOutcome0(), typeInfo); } else if (value.IsOutputShellCallOutputItemOutputItemsOutcome1) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputShellCallOutputItemOutputItemsOutcome1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputShellCallOutputItemOutputItemsOutcome1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OutputShellCallOutputItemOutputItemsOutcome1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOutputShellCallOutputItemOutputItemsOutcome1(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OutputWebSearchCallItemAction.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OutputWebSearchCallItemAction.g.cs index a6a1885d..b4d803a9 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OutputWebSearchCallItemAction.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.OutputWebSearchCallItemAction.g.cs @@ -172,19 +172,19 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputWebSearchCallItemAction0), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputWebSearchCallItemAction0).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OutputWebSearchCallItemAction0!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOutputWebSearchCallItemAction0(), typeInfo); } else if (value.IsOutputWebSearchCallItemAction1) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputWebSearchCallItemAction1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputWebSearchCallItemAction1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OutputWebSearchCallItemAction1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOutputWebSearchCallItemAction1(), typeInfo); } else if (value.IsOutputWebSearchCallItemAction2) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.OutputWebSearchCallItemAction2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.OutputWebSearchCallItemAction2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OutputWebSearchCallItemAction2!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOutputWebSearchCallItemAction2(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.PDFParserEngine.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.PDFParserEngine.g.cs index cc60c1b0..a2a0dd42 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.PDFParserEngine.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.PDFParserEngine.g.cs @@ -149,13 +149,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.PdfParserEngine0), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.PdfParserEngine0).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.PdfParserEngine0!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickPdfParserEngine0(), typeInfo); } else if (value.IsPdfParserEngine1) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.PdfParserEngine1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.PdfParserEngine1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.PdfParserEngine1!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickPdfParserEngine1(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.PredictionContent.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.PredictionContent.g.cs index ca928f97..829cb3a4 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.PredictionContent.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.PredictionContent.g.cs @@ -149,13 +149,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.PredictionContentVariant1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickPredictionContentVariant1(), typeInfo); } else if (value.IsPredictionContent1) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::System.Collections.Generic.IList), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo?> ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::System.Collections.Generic.IList).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.PredictionContent1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickPredictionContent1(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.PreferredMaxLatency.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.PreferredMaxLatency.g.cs index 38511c08..b5547058 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.PreferredMaxLatency.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.PreferredMaxLatency.g.cs @@ -130,13 +130,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(double), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(double).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.PreferredMaxLatencyVariant1!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickPreferredMaxLatencyVariant1(), typeInfo); } else if (value.IsPercentileLatencyCutoffs) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.PercentileLatencyCutoffs), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.PercentileLatencyCutoffs).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.PercentileLatencyCutoffs!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickPercentileLatencyCutoffs(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.PreferredMinThroughput.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.PreferredMinThroughput.g.cs index 073eaef8..89f53c2e 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.PreferredMinThroughput.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.PreferredMinThroughput.g.cs @@ -130,13 +130,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(double), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(double).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.PreferredMinThroughputVariant1!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickPreferredMinThroughputVariant1(), typeInfo); } else if (value.IsPercentileThroughputCutoffs) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.PercentileThroughputCutoffs), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.PercentileThroughputCutoffs).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.PercentileThroughputCutoffs!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickPercentileThroughputCutoffs(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ProviderPreferencesIgnoreItems.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ProviderPreferencesIgnoreItems.g.cs index 496c19fd..3bc76395 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ProviderPreferencesIgnoreItems.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ProviderPreferencesIgnoreItems.g.cs @@ -149,13 +149,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ProviderName), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ProviderName).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ProviderName!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickProviderName(), typeInfo); } else if (value.IsProviderPreferencesIgnoreItemsVariant2) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ProviderPreferencesIgnoreItemsVariant2!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickProviderPreferencesIgnoreItemsVariant2(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ProviderPreferencesOnlyItems.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ProviderPreferencesOnlyItems.g.cs index c47a7ca3..bc2ea3c7 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ProviderPreferencesOnlyItems.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ProviderPreferencesOnlyItems.g.cs @@ -149,13 +149,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ProviderName), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ProviderName).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ProviderName!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickProviderName(), typeInfo); } else if (value.IsProviderPreferencesOnlyItemsVariant2) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ProviderPreferencesOnlyItemsVariant2!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickProviderPreferencesOnlyItemsVariant2(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ProviderPreferencesOrderItems.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ProviderPreferencesOrderItems.g.cs index caa40ed1..57c76c6b 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ProviderPreferencesOrderItems.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ProviderPreferencesOrderItems.g.cs @@ -149,13 +149,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ProviderName), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ProviderName).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ProviderName!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickProviderName(), typeInfo); } else if (value.IsProviderPreferencesOrderItemsVariant2) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ProviderPreferencesOrderItemsVariant2!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickProviderPreferencesOrderItemsVariant2(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ProviderPreferencesSort.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ProviderPreferencesSort.g.cs index b626411e..91812255 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ProviderPreferencesSort.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ProviderPreferencesSort.g.cs @@ -128,13 +128,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ProviderSort), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ProviderSort).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ProviderSort!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickProviderSort(), typeInfo); } else if (value.IsProviderSortConfig) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ProviderSortConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ProviderSortConfig).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ProviderSortConfig!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickProviderSortConfig(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ReasoningDetailUnion.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ReasoningDetailUnion.g.cs index 15e4d2d4..3bc98307 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ReasoningDetailUnion.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ReasoningDetailUnion.g.cs @@ -77,25 +77,25 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ReasoningDetailUnionVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ReasoningDetailUnionVariant1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ReasoningEncrypted!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickReasoningEncrypted(), typeInfo); } else if (value.IsReasoningServerToolCall) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ReasoningDetailUnionVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ReasoningDetailUnionVariant2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ReasoningServerToolCall!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickReasoningServerToolCall(), typeInfo); } else if (value.IsReasoningSummary) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ReasoningDetailUnionVariant3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ReasoningDetailUnionVariant3).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ReasoningSummary!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickReasoningSummary(), typeInfo); } else if (value.IsReasoningText) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ReasoningDetailUnionVariant4), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ReasoningDetailUnionVariant4).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ReasoningText!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickReasoningText(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ReasoningItemStatus.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ReasoningItemStatus.g.cs index 729fa33a..ba128aa9 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ReasoningItemStatus.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ReasoningItemStatus.g.cs @@ -198,19 +198,19 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ReasoningItemStatus0), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ReasoningItemStatus0).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ReasoningItemStatus0!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickReasoningItemStatus0(), typeInfo); } else if (value.IsReasoningItemStatus1) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ReasoningItemStatus1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ReasoningItemStatus1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ReasoningItemStatus1!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickReasoningItemStatus1(), typeInfo); } else if (value.IsReasoningItemStatus2) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ReasoningItemStatus2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ReasoningItemStatus2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ReasoningItemStatus2!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickReasoningItemStatus2(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.RerankPostRequestBodyContentApplicationJsonSchemaDocumentsItems.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.RerankPostRequestBodyContentApplicationJsonSchemaDocumentsItems.g.cs index 3621b7b7..900e1560 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.RerankPostRequestBodyContentApplicationJsonSchemaDocumentsItems.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.RerankPostRequestBodyContentApplicationJsonSchemaDocumentsItems.g.cs @@ -128,13 +128,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.RerankPostRequestBodyContentApplicationJsonSchemaDocumentsItemsVariant1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickRerankPostRequestBodyContentApplicationJsonSchemaDocumentsItemsVariant1(), typeInfo); } else if (value.IsRerankPostRequestBodyContentApplicationJsonSchemaDocumentsItems1) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.RerankPostRequestBodyContentApplicationJsonSchemaDocumentsItems1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.RerankPostRequestBodyContentApplicationJsonSchemaDocumentsItems1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.RerankPostRequestBodyContentApplicationJsonSchemaDocumentsItems1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickRerankPostRequestBodyContentApplicationJsonSchemaDocumentsItems1(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.RerankPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItems.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.RerankPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItems.g.cs index 9ffd51de..31f1c68d 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.RerankPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItems.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.RerankPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItems.g.cs @@ -149,13 +149,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ProviderName), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ProviderName).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ProviderName!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickProviderName(), typeInfo); } else if (value.IsRerankPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItemsVariant2) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.RerankPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItemsVariant2!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickRerankPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItemsVariant2(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.RerankPostRequestBodyContentApplicationJsonSchemaProviderOnlyItems.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.RerankPostRequestBodyContentApplicationJsonSchemaProviderOnlyItems.g.cs index 11f60115..b7c3ee15 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.RerankPostRequestBodyContentApplicationJsonSchemaProviderOnlyItems.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.RerankPostRequestBodyContentApplicationJsonSchemaProviderOnlyItems.g.cs @@ -149,13 +149,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ProviderName), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ProviderName).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ProviderName!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickProviderName(), typeInfo); } else if (value.IsRerankPostRequestBodyContentApplicationJsonSchemaProviderOnlyItemsVariant2) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.RerankPostRequestBodyContentApplicationJsonSchemaProviderOnlyItemsVariant2!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickRerankPostRequestBodyContentApplicationJsonSchemaProviderOnlyItemsVariant2(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.RerankPostRequestBodyContentApplicationJsonSchemaProviderOrderItems.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.RerankPostRequestBodyContentApplicationJsonSchemaProviderOrderItems.g.cs index ba23ed03..d0b9b36d 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.RerankPostRequestBodyContentApplicationJsonSchemaProviderOrderItems.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.RerankPostRequestBodyContentApplicationJsonSchemaProviderOrderItems.g.cs @@ -149,13 +149,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ProviderName), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ProviderName).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ProviderName!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickProviderName(), typeInfo); } else if (value.IsRerankPostRequestBodyContentApplicationJsonSchemaProviderOrderItemsVariant2) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.RerankPostRequestBodyContentApplicationJsonSchemaProviderOrderItemsVariant2!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickRerankPostRequestBodyContentApplicationJsonSchemaProviderOrderItemsVariant2(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.RerankPostRequestBodyContentApplicationJsonSchemaProviderSort.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.RerankPostRequestBodyContentApplicationJsonSchemaProviderSort.g.cs index 5f0528e9..7877fb78 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.RerankPostRequestBodyContentApplicationJsonSchemaProviderSort.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.RerankPostRequestBodyContentApplicationJsonSchemaProviderSort.g.cs @@ -128,13 +128,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ProviderSort), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ProviderSort).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ProviderSort!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickProviderSort(), typeInfo); } else if (value.IsProviderSortConfig) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ProviderSortConfig), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ProviderSortConfig).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ProviderSortConfig!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickProviderSortConfig(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ResponsesRequestPluginsItems.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ResponsesRequestPluginsItems.g.cs index ee816cc7..e04f2299 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ResponsesRequestPluginsItems.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ResponsesRequestPluginsItems.g.cs @@ -131,61 +131,61 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ResponsesRequestPluginsItemsVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ResponsesRequestPluginsItemsVariant1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AutoBetaRouter!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickAutoBetaRouter(), typeInfo); } else if (value.IsAutoRouter) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ResponsesRequestPluginsItemsVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ResponsesRequestPluginsItemsVariant2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AutoRouter!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickAutoRouter(), typeInfo); } else if (value.IsContextCompression) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ResponsesRequestPluginsItemsVariant3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ResponsesRequestPluginsItemsVariant3).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ContextCompression!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickContextCompression(), typeInfo); } else if (value.IsFileParser) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ResponsesRequestPluginsItemsVariant4), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ResponsesRequestPluginsItemsVariant4).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileParser!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickFileParser(), typeInfo); } else if (value.IsFusion) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ResponsesRequestPluginsItemsVariant5), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ResponsesRequestPluginsItemsVariant5).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Fusion!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickFusion(), typeInfo); } else if (value.IsModeration) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ResponsesRequestPluginsItemsVariant6), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ResponsesRequestPluginsItemsVariant6).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Moderation!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickModeration(), typeInfo); } else if (value.IsParetoRouter) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ResponsesRequestPluginsItemsVariant7), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ResponsesRequestPluginsItemsVariant7).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ParetoRouter!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickParetoRouter(), typeInfo); } else if (value.IsResponseHealing) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ResponsesRequestPluginsItemsVariant8), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ResponsesRequestPluginsItemsVariant8).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ResponseHealing!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickResponseHealing(), typeInfo); } else if (value.IsWeb) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ResponsesRequestPluginsItemsVariant9), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ResponsesRequestPluginsItemsVariant9).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Web!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickWeb(), typeInfo); } else if (value.IsWebFetch) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ResponsesRequestPluginsItemsVariant10), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ResponsesRequestPluginsItemsVariant10).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.WebFetch!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickWebFetch(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParameters.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParameters.g.cs index 8f5a2535..42a32735 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParameters.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParameters.g.cs @@ -296,31 +296,31 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant1(), typeInfo); } else if (value.IsResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant2) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(double), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(double).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant2!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant2(), typeInfo); } else if (value.IsResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant3) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(bool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(bool).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant3!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant3(), typeInfo); } else if (value.IsResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParameters3) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::System.Collections.Generic.IList), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo?> ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::System.Collections.Generic.IList).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParameters3!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParameters3(), typeInfo); } else if (value.IsResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParameters4) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParameters4), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParameters4).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParameters4!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParameters4(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3Items.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3Items.g.cs index 1d665b1a..62d9b72a 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3Items.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3Items.g.cs @@ -198,19 +198,19 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant1(), typeInfo); } else if (value.IsResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant2) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(double), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(double).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant2!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant2(), typeInfo); } else if (value.IsResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant3) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(bool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(bool).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant3!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant3(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4.g.cs index d48ee798..170b54b3 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4.g.cs @@ -198,19 +198,19 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant1(), typeInfo); } else if (value.IsResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant2) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(double), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(double).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant2!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant2(), typeInfo); } else if (value.IsResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant3) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(bool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(bool).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant3!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant3(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ResponsesRequestToolsItems.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ResponsesRequestToolsItems.g.cs index 4e343eaf..b3db11f5 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ResponsesRequestToolsItems.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ResponsesRequestToolsItems.g.cs @@ -1223,163 +1223,163 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ResponsesRequestToolsItems0), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ResponsesRequestToolsItems0).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ResponsesRequestToolsItems0!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickResponsesRequestToolsItems0(), typeInfo); } else if (value.IsPreviewWebSearchServerTool) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.PreviewWebSearchServerTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.PreviewWebSearchServerTool).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.PreviewWebSearchServerTool!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickPreviewWebSearchServerTool(), typeInfo); } else if (value.IsPreview20250311WebSearchServerTool) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.Preview20250311WebSearchServerTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.Preview20250311WebSearchServerTool).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Preview20250311WebSearchServerTool!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickPreview20250311WebSearchServerTool(), typeInfo); } else if (value.IsLegacyWebSearchServerTool) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.LegacyWebSearchServerTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.LegacyWebSearchServerTool).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.LegacyWebSearchServerTool!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickLegacyWebSearchServerTool(), typeInfo); } else if (value.IsWebSearchServerTool) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.WebSearchServerTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.WebSearchServerTool).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.WebSearchServerTool!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickWebSearchServerTool(), typeInfo); } else if (value.IsFileSearchServerTool) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.FileSearchServerTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.FileSearchServerTool).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileSearchServerTool!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickFileSearchServerTool(), typeInfo); } else if (value.IsComputerUseServerTool) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ComputerUseServerTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ComputerUseServerTool).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ComputerUseServerTool!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickComputerUseServerTool(), typeInfo); } else if (value.IsCodeInterpreterServerTool) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.CodeInterpreterServerTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.CodeInterpreterServerTool).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.CodeInterpreterServerTool!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickCodeInterpreterServerTool(), typeInfo); } else if (value.IsMcpServerTool) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.McpServerTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.McpServerTool).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.McpServerTool!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickMcpServerTool(), typeInfo); } else if (value.IsImageGenerationServerTool) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ImageGenerationServerTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ImageGenerationServerTool).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageGenerationServerTool!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickImageGenerationServerTool(), typeInfo); } else if (value.IsCodexLocalShellTool) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.CodexLocalShellTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.CodexLocalShellTool).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.CodexLocalShellTool!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickCodexLocalShellTool(), typeInfo); } else if (value.IsShellServerTool) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ShellServerTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ShellServerTool).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ShellServerTool!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickShellServerTool(), typeInfo); } else if (value.IsApplyPatchServerTool) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ApplyPatchServerTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ApplyPatchServerTool).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ApplyPatchServerTool!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickApplyPatchServerTool(), typeInfo); } else if (value.IsCustomTool) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.CustomTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.CustomTool).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.CustomTool!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickCustomTool(), typeInfo); } else if (value.IsNamespaceTool) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.NamespaceTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.NamespaceTool).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.NamespaceTool!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickNamespaceTool(), typeInfo); } else if (value.IsAdvisorServerToolOpenRouter) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.AdvisorServerToolOpenRouter), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.AdvisorServerToolOpenRouter).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AdvisorServerToolOpenRouter!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickAdvisorServerToolOpenRouter(), typeInfo); } else if (value.IsSubagentServerToolOpenRouter) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.SubagentServerToolOpenRouter), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.SubagentServerToolOpenRouter).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.SubagentServerToolOpenRouter!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickSubagentServerToolOpenRouter(), typeInfo); } else if (value.IsDatetimeServerTool) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.DatetimeServerTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.DatetimeServerTool).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.DatetimeServerTool!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickDatetimeServerTool(), typeInfo); } else if (value.IsFilesServerTool) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.FilesServerTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.FilesServerTool).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.FilesServerTool!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickFilesServerTool(), typeInfo); } else if (value.IsFusionServerToolOpenRouter) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.FusionServerToolOpenRouter), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.FusionServerToolOpenRouter).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.FusionServerToolOpenRouter!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickFusionServerToolOpenRouter(), typeInfo); } else if (value.IsImageGenerationServerToolOpenRouter) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ImageGenerationServerToolOpenRouter), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ImageGenerationServerToolOpenRouter).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageGenerationServerToolOpenRouter!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickImageGenerationServerToolOpenRouter(), typeInfo); } else if (value.IsSearchModelsServerToolOpenRouter) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.SearchModelsServerToolOpenRouter), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.SearchModelsServerToolOpenRouter).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.SearchModelsServerToolOpenRouter!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickSearchModelsServerToolOpenRouter(), typeInfo); } else if (value.IsWebFetchServerTool) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.WebFetchServerTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.WebFetchServerTool).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.WebFetchServerTool!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickWebFetchServerTool(), typeInfo); } else if (value.IsWebSearchServerToolOpenRouter) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.WebSearchServerToolOpenRouter), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.WebSearchServerToolOpenRouter).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.WebSearchServerToolOpenRouter!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickWebSearchServerToolOpenRouter(), typeInfo); } else if (value.IsApplyPatchServerToolOpenRouter) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ApplyPatchServerToolOpenRouter), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ApplyPatchServerToolOpenRouter).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ApplyPatchServerToolOpenRouter!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickApplyPatchServerToolOpenRouter(), typeInfo); } else if (value.IsBashServerTool) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.BashServerTool), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.BashServerTool).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.BashServerTool!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickBashServerTool(), typeInfo); } else if (value.IsShellServerToolOpenRouter) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ShellServerToolOpenRouter), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ShellServerToolOpenRouter).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ShellServerToolOpenRouter!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickShellServerToolOpenRouter(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ShellServerToolEnvironment.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ShellServerToolEnvironment.g.cs index c15f8bfa..cc81569d 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ShellServerToolEnvironment.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ShellServerToolEnvironment.g.cs @@ -59,13 +59,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ShellServerToolEnvironmentVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ShellServerToolEnvironmentVariant1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ContainerAuto!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickContainerAuto(), typeInfo); } else if (value.IsContainerReference) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ShellServerToolEnvironmentVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ShellServerToolEnvironmentVariant2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ContainerReference!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickContainerReference(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.StopServerToolsWhenCondition.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.StopServerToolsWhenCondition.g.cs index 7bb67bdb..a7c811c2 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.StopServerToolsWhenCondition.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.StopServerToolsWhenCondition.g.cs @@ -86,31 +86,31 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.StopServerToolsWhenConditionVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.StopServerToolsWhenConditionVariant1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.FinishReasonIs!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickFinishReasonIs(), typeInfo); } else if (value.IsHasToolCall) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.StopServerToolsWhenConditionVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.StopServerToolsWhenConditionVariant2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.HasToolCall!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickHasToolCall(), typeInfo); } else if (value.IsMaxCost) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.StopServerToolsWhenConditionVariant3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.StopServerToolsWhenConditionVariant3).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MaxCost!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickMaxCost(), typeInfo); } else if (value.IsMaxTokensUsed) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.StopServerToolsWhenConditionVariant4), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.StopServerToolsWhenConditionVariant4).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MaxTokensUsed!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickMaxTokensUsed(), typeInfo); } else if (value.IsStepCountIs) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.StopServerToolsWhenConditionVariant5), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.StopServerToolsWhenConditionVariant5).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.StepCountIs!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickStepCountIs(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.StoredPromptTemplateVariables.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.StoredPromptTemplateVariables.g.cs index 643a6862..e023e892 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.StoredPromptTemplateVariables.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.StoredPromptTemplateVariables.g.cs @@ -216,25 +216,25 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.StoredPromptTemplateVariablesVariant1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickStoredPromptTemplateVariablesVariant1(), typeInfo); } else if (value.IsInputText) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.InputText), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.InputText).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.InputText!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickInputText(), typeInfo); } else if (value.IsInputImage) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.InputImage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.InputImage).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.InputImage!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickInputImage(), typeInfo); } else if (value.IsInputFile) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.InputFile), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.InputFile).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.InputFile!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickInputFile(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ToolChoiceAllowedMode.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ToolChoiceAllowedMode.g.cs index a352fa12..681edae7 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ToolChoiceAllowedMode.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.ToolChoiceAllowedMode.g.cs @@ -149,13 +149,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ToolChoiceAllowedMode0), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ToolChoiceAllowedMode0).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ToolChoiceAllowedMode0!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickToolChoiceAllowedMode0(), typeInfo); } else if (value.IsToolChoiceAllowedMode1) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.ToolChoiceAllowedMode1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.ToolChoiceAllowedMode1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ToolChoiceAllowedMode1!.Value, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickToolChoiceAllowedMode1(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.UnifiedBenchmarksResponseDataItems.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.UnifiedBenchmarksResponseDataItems.g.cs index d93c5bec..de46fc06 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.UnifiedBenchmarksResponseDataItems.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.UnifiedBenchmarksResponseDataItems.g.cs @@ -59,13 +59,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.UnifiedBenchmarksResponseDataItemsVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.UnifiedBenchmarksResponseDataItemsVariant1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ArtificialAnalysis!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickArtificialAnalysis(), typeInfo); } else if (value.IsDesignArena) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.UnifiedBenchmarksResponseDataItemsVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.UnifiedBenchmarksResponseDataItemsVariant2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.DesignArena!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickDesignArena(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.UpdateObservabilityDestinationResponseData.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.UpdateObservabilityDestinationResponseData.g.cs index f3e26389..037db257 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.UpdateObservabilityDestinationResponseData.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.JsonConverters.UpdateObservabilityDestinationResponseData.g.cs @@ -194,103 +194,103 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Arize!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickArize(), typeInfo); } else if (value.IsBraintrust) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Braintrust!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickBraintrust(), typeInfo); } else if (value.IsClickhouse) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant3).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Clickhouse!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickClickhouse(), typeInfo); } else if (value.IsDatadog) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant4), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant4).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Datadog!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickDatadog(), typeInfo); } else if (value.IsGrafana) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant5), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant5).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Grafana!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickGrafana(), typeInfo); } else if (value.IsLangfuse) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant6), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant6).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Langfuse!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickLangfuse(), typeInfo); } else if (value.IsLangsmith) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant7), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant7).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Langsmith!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickLangsmith(), typeInfo); } else if (value.IsNewrelic) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant8), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant8).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Newrelic!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickNewrelic(), typeInfo); } else if (value.IsOpik) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant9), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant9).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Opik!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOpik(), typeInfo); } else if (value.IsOtelCollector) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant10), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant10).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OtelCollector!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickOtelCollector(), typeInfo); } else if (value.IsPosthog) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant11), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant11).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Posthog!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickPosthog(), typeInfo); } else if (value.IsRamp) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant12), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant12).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Ramp!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickRamp(), typeInfo); } else if (value.IsS3) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant13), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant13).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.S3!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickS3(), typeInfo); } else if (value.IsSentry) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant14), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant14).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Sentry!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickSentry(), typeInfo); } else if (value.IsSnowflake) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant15), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant15).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Snowflake!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickSnowflake(), typeInfo); } else if (value.IsWeave) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant16), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant16).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Weave!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickWeave(), typeInfo); } else if (value.IsWebhook) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant17), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant17).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Webhook!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickWebhook(), typeInfo); } } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.AdditionalToolsItemToolsItems.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.AdditionalToolsItemToolsItems.g.cs index cbfb5ce6..38749cdc 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.AdditionalToolsItemToolsItems.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.AdditionalToolsItemToolsItems.g.cs @@ -42,8 +42,8 @@ public bool TryPickAdditionalToolsItemToolsItems0( /// /// /// - public global::OpenRouter.AdditionalToolsItemToolsItems0 PickAdditionalToolsItemToolsItems0() => IsAdditionalToolsItemToolsItems0 - ? AdditionalToolsItemToolsItems0! + public global::OpenRouter.AdditionalToolsItemToolsItems0 PickAdditionalToolsItemToolsItems0() => AdditionalToolsItemToolsItems0 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'AdditionalToolsItemToolsItems0' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickPreviewWebSearchServerTool( /// /// /// - public global::OpenRouter.PreviewWebSearchServerTool PickPreviewWebSearchServerTool() => IsPreviewWebSearchServerTool - ? PreviewWebSearchServerTool! + public global::OpenRouter.PreviewWebSearchServerTool PickPreviewWebSearchServerTool() => PreviewWebSearchServerTool is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'PreviewWebSearchServerTool' but the value was {ToString()}."); /// @@ -116,8 +116,8 @@ public bool TryPickPreview20250311WebSearchServerTool( /// /// /// - public global::OpenRouter.Preview20250311WebSearchServerTool PickPreview20250311WebSearchServerTool() => IsPreview20250311WebSearchServerTool - ? Preview20250311WebSearchServerTool! + public global::OpenRouter.Preview20250311WebSearchServerTool PickPreview20250311WebSearchServerTool() => Preview20250311WebSearchServerTool is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Preview20250311WebSearchServerTool' but the value was {ToString()}."); /// @@ -153,8 +153,8 @@ public bool TryPickLegacyWebSearchServerTool( /// /// /// - public global::OpenRouter.LegacyWebSearchServerTool PickLegacyWebSearchServerTool() => IsLegacyWebSearchServerTool - ? LegacyWebSearchServerTool! + public global::OpenRouter.LegacyWebSearchServerTool PickLegacyWebSearchServerTool() => LegacyWebSearchServerTool is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'LegacyWebSearchServerTool' but the value was {ToString()}."); /// @@ -190,8 +190,8 @@ public bool TryPickWebSearchServerTool( /// /// /// - public global::OpenRouter.WebSearchServerTool PickWebSearchServerTool() => IsWebSearchServerTool - ? WebSearchServerTool! + public global::OpenRouter.WebSearchServerTool PickWebSearchServerTool() => WebSearchServerTool is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'WebSearchServerTool' but the value was {ToString()}."); /// @@ -227,8 +227,8 @@ public bool TryPickFileSearchServerTool( /// /// /// - public global::OpenRouter.FileSearchServerTool PickFileSearchServerTool() => IsFileSearchServerTool - ? FileSearchServerTool! + public global::OpenRouter.FileSearchServerTool PickFileSearchServerTool() => FileSearchServerTool is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'FileSearchServerTool' but the value was {ToString()}."); /// @@ -264,8 +264,8 @@ public bool TryPickComputerUseServerTool( /// /// /// - public global::OpenRouter.ComputerUseServerTool PickComputerUseServerTool() => IsComputerUseServerTool - ? ComputerUseServerTool! + public global::OpenRouter.ComputerUseServerTool PickComputerUseServerTool() => ComputerUseServerTool is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ComputerUseServerTool' but the value was {ToString()}."); /// @@ -301,8 +301,8 @@ public bool TryPickCodeInterpreterServerTool( /// /// /// - public global::OpenRouter.CodeInterpreterServerTool PickCodeInterpreterServerTool() => IsCodeInterpreterServerTool - ? CodeInterpreterServerTool! + public global::OpenRouter.CodeInterpreterServerTool PickCodeInterpreterServerTool() => CodeInterpreterServerTool is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'CodeInterpreterServerTool' but the value was {ToString()}."); /// @@ -338,8 +338,8 @@ public bool TryPickMcpServerTool( /// /// /// - public global::OpenRouter.McpServerTool PickMcpServerTool() => IsMcpServerTool - ? McpServerTool! + public global::OpenRouter.McpServerTool PickMcpServerTool() => McpServerTool is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'McpServerTool' but the value was {ToString()}."); /// @@ -375,8 +375,8 @@ public bool TryPickImageGenerationServerTool( /// /// /// - public global::OpenRouter.ImageGenerationServerTool PickImageGenerationServerTool() => IsImageGenerationServerTool - ? ImageGenerationServerTool! + public global::OpenRouter.ImageGenerationServerTool PickImageGenerationServerTool() => ImageGenerationServerTool is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ImageGenerationServerTool' but the value was {ToString()}."); /// @@ -412,8 +412,8 @@ public bool TryPickCodexLocalShellTool( /// /// /// - public global::OpenRouter.CodexLocalShellTool PickCodexLocalShellTool() => IsCodexLocalShellTool - ? CodexLocalShellTool! + public global::OpenRouter.CodexLocalShellTool PickCodexLocalShellTool() => CodexLocalShellTool is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'CodexLocalShellTool' but the value was {ToString()}."); /// @@ -449,8 +449,8 @@ public bool TryPickShellServerTool( /// /// /// - public global::OpenRouter.ShellServerTool PickShellServerTool() => IsShellServerTool - ? ShellServerTool! + public global::OpenRouter.ShellServerTool PickShellServerTool() => ShellServerTool is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ShellServerTool' but the value was {ToString()}."); /// @@ -486,8 +486,8 @@ public bool TryPickApplyPatchServerTool( /// /// /// - public global::OpenRouter.ApplyPatchServerTool PickApplyPatchServerTool() => IsApplyPatchServerTool - ? ApplyPatchServerTool! + public global::OpenRouter.ApplyPatchServerTool PickApplyPatchServerTool() => ApplyPatchServerTool is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ApplyPatchServerTool' but the value was {ToString()}."); /// @@ -523,8 +523,8 @@ public bool TryPickCustomTool( /// /// /// - public global::OpenRouter.CustomTool PickCustomTool() => IsCustomTool - ? CustomTool! + public global::OpenRouter.CustomTool PickCustomTool() => CustomTool is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'CustomTool' but the value was {ToString()}."); /// @@ -560,8 +560,8 @@ public bool TryPickNamespaceTool( /// /// /// - public global::OpenRouter.NamespaceTool PickNamespaceTool() => IsNamespaceTool - ? NamespaceTool! + public global::OpenRouter.NamespaceTool PickNamespaceTool() => NamespaceTool is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'NamespaceTool' but the value was {ToString()}."); /// @@ -597,8 +597,8 @@ public bool TryPickAdvisorServerToolOpenRouter( /// /// /// - public global::OpenRouter.AdvisorServerToolOpenRouter PickAdvisorServerToolOpenRouter() => IsAdvisorServerToolOpenRouter - ? AdvisorServerToolOpenRouter! + public global::OpenRouter.AdvisorServerToolOpenRouter PickAdvisorServerToolOpenRouter() => AdvisorServerToolOpenRouter is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'AdvisorServerToolOpenRouter' but the value was {ToString()}."); /// @@ -634,8 +634,8 @@ public bool TryPickSubagentServerToolOpenRouter( /// /// /// - public global::OpenRouter.SubagentServerToolOpenRouter PickSubagentServerToolOpenRouter() => IsSubagentServerToolOpenRouter - ? SubagentServerToolOpenRouter! + public global::OpenRouter.SubagentServerToolOpenRouter PickSubagentServerToolOpenRouter() => SubagentServerToolOpenRouter is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'SubagentServerToolOpenRouter' but the value was {ToString()}."); /// @@ -671,8 +671,8 @@ public bool TryPickDatetimeServerTool( /// /// /// - public global::OpenRouter.DatetimeServerTool PickDatetimeServerTool() => IsDatetimeServerTool - ? DatetimeServerTool! + public global::OpenRouter.DatetimeServerTool PickDatetimeServerTool() => DatetimeServerTool is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'DatetimeServerTool' but the value was {ToString()}."); /// @@ -708,8 +708,8 @@ public bool TryPickFilesServerTool( /// /// /// - public global::OpenRouter.FilesServerTool PickFilesServerTool() => IsFilesServerTool - ? FilesServerTool! + public global::OpenRouter.FilesServerTool PickFilesServerTool() => FilesServerTool is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'FilesServerTool' but the value was {ToString()}."); /// @@ -745,8 +745,8 @@ public bool TryPickFusionServerToolOpenRouter( /// /// /// - public global::OpenRouter.FusionServerToolOpenRouter PickFusionServerToolOpenRouter() => IsFusionServerToolOpenRouter - ? FusionServerToolOpenRouter! + public global::OpenRouter.FusionServerToolOpenRouter PickFusionServerToolOpenRouter() => FusionServerToolOpenRouter is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'FusionServerToolOpenRouter' but the value was {ToString()}."); /// @@ -782,8 +782,8 @@ public bool TryPickImageGenerationServerToolOpenRouter( /// /// /// - public global::OpenRouter.ImageGenerationServerToolOpenRouter PickImageGenerationServerToolOpenRouter() => IsImageGenerationServerToolOpenRouter - ? ImageGenerationServerToolOpenRouter! + public global::OpenRouter.ImageGenerationServerToolOpenRouter PickImageGenerationServerToolOpenRouter() => ImageGenerationServerToolOpenRouter is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ImageGenerationServerToolOpenRouter' but the value was {ToString()}."); /// @@ -819,8 +819,8 @@ public bool TryPickSearchModelsServerToolOpenRouter( /// /// /// - public global::OpenRouter.SearchModelsServerToolOpenRouter PickSearchModelsServerToolOpenRouter() => IsSearchModelsServerToolOpenRouter - ? SearchModelsServerToolOpenRouter! + public global::OpenRouter.SearchModelsServerToolOpenRouter PickSearchModelsServerToolOpenRouter() => SearchModelsServerToolOpenRouter is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'SearchModelsServerToolOpenRouter' but the value was {ToString()}."); /// @@ -856,8 +856,8 @@ public bool TryPickWebFetchServerTool( /// /// /// - public global::OpenRouter.WebFetchServerTool PickWebFetchServerTool() => IsWebFetchServerTool - ? WebFetchServerTool! + public global::OpenRouter.WebFetchServerTool PickWebFetchServerTool() => WebFetchServerTool is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'WebFetchServerTool' but the value was {ToString()}."); /// @@ -893,8 +893,8 @@ public bool TryPickWebSearchServerToolOpenRouter( /// /// /// - public global::OpenRouter.WebSearchServerToolOpenRouter PickWebSearchServerToolOpenRouter() => IsWebSearchServerToolOpenRouter - ? WebSearchServerToolOpenRouter! + public global::OpenRouter.WebSearchServerToolOpenRouter PickWebSearchServerToolOpenRouter() => WebSearchServerToolOpenRouter is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'WebSearchServerToolOpenRouter' but the value was {ToString()}."); /// @@ -930,8 +930,8 @@ public bool TryPickApplyPatchServerToolOpenRouter( /// /// /// - public global::OpenRouter.ApplyPatchServerToolOpenRouter PickApplyPatchServerToolOpenRouter() => IsApplyPatchServerToolOpenRouter - ? ApplyPatchServerToolOpenRouter! + public global::OpenRouter.ApplyPatchServerToolOpenRouter PickApplyPatchServerToolOpenRouter() => ApplyPatchServerToolOpenRouter is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ApplyPatchServerToolOpenRouter' but the value was {ToString()}."); /// @@ -967,8 +967,8 @@ public bool TryPickBashServerTool( /// /// /// - public global::OpenRouter.BashServerTool PickBashServerTool() => IsBashServerTool - ? BashServerTool! + public global::OpenRouter.BashServerTool PickBashServerTool() => BashServerTool is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'BashServerTool' but the value was {ToString()}."); /// @@ -1004,8 +1004,8 @@ public bool TryPickShellServerToolOpenRouter( /// /// /// - public global::OpenRouter.ShellServerToolOpenRouter PickShellServerToolOpenRouter() => IsShellServerToolOpenRouter - ? ShellServerToolOpenRouter! + public global::OpenRouter.ShellServerToolOpenRouter PickShellServerToolOpenRouter() => ShellServerToolOpenRouter is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ShellServerToolOpenRouter' but the value was {ToString()}."); /// @@ -1041,8 +1041,8 @@ public bool TryPickAdditionalToolsItemToolsItems27( /// /// /// - public global::OpenRouter.AdditionalToolsItemToolsItems27 PickAdditionalToolsItemToolsItems27() => IsAdditionalToolsItemToolsItems27 - ? AdditionalToolsItemToolsItems27! + public global::OpenRouter.AdditionalToolsItemToolsItems27 PickAdditionalToolsItemToolsItems27() => AdditionalToolsItemToolsItems27 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'AdditionalToolsItemToolsItems27' but the value was {ToString()}."); /// /// @@ -1867,117 +1867,117 @@ public bool Validate() Validate(); } - if (IsAdditionalToolsItemToolsItems0 && additionalToolsItemToolsItems0 != null) + if (AdditionalToolsItemToolsItems0 is { } __value0 && additionalToolsItemToolsItems0 != null) { - return additionalToolsItemToolsItems0(AdditionalToolsItemToolsItems0!); + return additionalToolsItemToolsItems0(__value0); } - else if (IsPreviewWebSearchServerTool && previewWebSearchServerTool != null) + else if (PreviewWebSearchServerTool is { } __value1 && previewWebSearchServerTool != null) { - return previewWebSearchServerTool(PreviewWebSearchServerTool!); + return previewWebSearchServerTool(__value1); } - else if (IsPreview20250311WebSearchServerTool && preview20250311WebSearchServerTool != null) + else if (Preview20250311WebSearchServerTool is { } __value2 && preview20250311WebSearchServerTool != null) { - return preview20250311WebSearchServerTool(Preview20250311WebSearchServerTool!); + return preview20250311WebSearchServerTool(__value2); } - else if (IsLegacyWebSearchServerTool && legacyWebSearchServerTool != null) + else if (LegacyWebSearchServerTool is { } __value3 && legacyWebSearchServerTool != null) { - return legacyWebSearchServerTool(LegacyWebSearchServerTool!); + return legacyWebSearchServerTool(__value3); } - else if (IsWebSearchServerTool && webSearchServerTool != null) + else if (WebSearchServerTool is { } __value4 && webSearchServerTool != null) { - return webSearchServerTool(WebSearchServerTool!); + return webSearchServerTool(__value4); } - else if (IsFileSearchServerTool && fileSearchServerTool != null) + else if (FileSearchServerTool is { } __value5 && fileSearchServerTool != null) { - return fileSearchServerTool(FileSearchServerTool!); + return fileSearchServerTool(__value5); } - else if (IsComputerUseServerTool && computerUseServerTool != null) + else if (ComputerUseServerTool is { } __value6 && computerUseServerTool != null) { - return computerUseServerTool(ComputerUseServerTool!); + return computerUseServerTool(__value6); } - else if (IsCodeInterpreterServerTool && codeInterpreterServerTool != null) + else if (CodeInterpreterServerTool is { } __value7 && codeInterpreterServerTool != null) { - return codeInterpreterServerTool(CodeInterpreterServerTool!); + return codeInterpreterServerTool(__value7); } - else if (IsMcpServerTool && mcpServerTool != null) + else if (McpServerTool is { } __value8 && mcpServerTool != null) { - return mcpServerTool(McpServerTool!); + return mcpServerTool(__value8); } - else if (IsImageGenerationServerTool && imageGenerationServerTool != null) + else if (ImageGenerationServerTool is { } __value9 && imageGenerationServerTool != null) { - return imageGenerationServerTool(ImageGenerationServerTool!); + return imageGenerationServerTool(__value9); } - else if (IsCodexLocalShellTool && codexLocalShellTool != null) + else if (CodexLocalShellTool is { } __value10 && codexLocalShellTool != null) { - return codexLocalShellTool(CodexLocalShellTool!); + return codexLocalShellTool(__value10); } - else if (IsShellServerTool && shellServerTool != null) + else if (ShellServerTool is { } __value11 && shellServerTool != null) { - return shellServerTool(ShellServerTool!); + return shellServerTool(__value11); } - else if (IsApplyPatchServerTool && applyPatchServerTool != null) + else if (ApplyPatchServerTool is { } __value12 && applyPatchServerTool != null) { - return applyPatchServerTool(ApplyPatchServerTool!); + return applyPatchServerTool(__value12); } - else if (IsCustomTool && customTool != null) + else if (CustomTool is { } __value13 && customTool != null) { - return customTool(CustomTool!); + return customTool(__value13); } - else if (IsNamespaceTool && namespaceTool != null) + else if (NamespaceTool is { } __value14 && namespaceTool != null) { - return namespaceTool(NamespaceTool!); + return namespaceTool(__value14); } - else if (IsAdvisorServerToolOpenRouter && advisorServerToolOpenRouter != null) + else if (AdvisorServerToolOpenRouter is { } __value15 && advisorServerToolOpenRouter != null) { - return advisorServerToolOpenRouter(AdvisorServerToolOpenRouter!); + return advisorServerToolOpenRouter(__value15); } - else if (IsSubagentServerToolOpenRouter && subagentServerToolOpenRouter != null) + else if (SubagentServerToolOpenRouter is { } __value16 && subagentServerToolOpenRouter != null) { - return subagentServerToolOpenRouter(SubagentServerToolOpenRouter!); + return subagentServerToolOpenRouter(__value16); } - else if (IsDatetimeServerTool && datetimeServerTool != null) + else if (DatetimeServerTool is { } __value17 && datetimeServerTool != null) { - return datetimeServerTool(DatetimeServerTool!); + return datetimeServerTool(__value17); } - else if (IsFilesServerTool && filesServerTool != null) + else if (FilesServerTool is { } __value18 && filesServerTool != null) { - return filesServerTool(FilesServerTool!); + return filesServerTool(__value18); } - else if (IsFusionServerToolOpenRouter && fusionServerToolOpenRouter != null) + else if (FusionServerToolOpenRouter is { } __value19 && fusionServerToolOpenRouter != null) { - return fusionServerToolOpenRouter(FusionServerToolOpenRouter!); + return fusionServerToolOpenRouter(__value19); } - else if (IsImageGenerationServerToolOpenRouter && imageGenerationServerToolOpenRouter != null) + else if (ImageGenerationServerToolOpenRouter is { } __value20 && imageGenerationServerToolOpenRouter != null) { - return imageGenerationServerToolOpenRouter(ImageGenerationServerToolOpenRouter!); + return imageGenerationServerToolOpenRouter(__value20); } - else if (IsSearchModelsServerToolOpenRouter && searchModelsServerToolOpenRouter != null) + else if (SearchModelsServerToolOpenRouter is { } __value21 && searchModelsServerToolOpenRouter != null) { - return searchModelsServerToolOpenRouter(SearchModelsServerToolOpenRouter!); + return searchModelsServerToolOpenRouter(__value21); } - else if (IsWebFetchServerTool && webFetchServerTool != null) + else if (WebFetchServerTool is { } __value22 && webFetchServerTool != null) { - return webFetchServerTool(WebFetchServerTool!); + return webFetchServerTool(__value22); } - else if (IsWebSearchServerToolOpenRouter && webSearchServerToolOpenRouter != null) + else if (WebSearchServerToolOpenRouter is { } __value23 && webSearchServerToolOpenRouter != null) { - return webSearchServerToolOpenRouter(WebSearchServerToolOpenRouter!); + return webSearchServerToolOpenRouter(__value23); } - else if (IsApplyPatchServerToolOpenRouter && applyPatchServerToolOpenRouter != null) + else if (ApplyPatchServerToolOpenRouter is { } __value24 && applyPatchServerToolOpenRouter != null) { - return applyPatchServerToolOpenRouter(ApplyPatchServerToolOpenRouter!); + return applyPatchServerToolOpenRouter(__value24); } - else if (IsBashServerTool && bashServerTool != null) + else if (BashServerTool is { } __value25 && bashServerTool != null) { - return bashServerTool(BashServerTool!); + return bashServerTool(__value25); } - else if (IsShellServerToolOpenRouter && shellServerToolOpenRouter != null) + else if (ShellServerToolOpenRouter is { } __value26 && shellServerToolOpenRouter != null) { - return shellServerToolOpenRouter(ShellServerToolOpenRouter!); + return shellServerToolOpenRouter(__value26); } - else if (IsAdditionalToolsItemToolsItems27 && additionalToolsItemToolsItems27 != null) + else if (AdditionalToolsItemToolsItems27 is { } __value27 && additionalToolsItemToolsItems27 != null) { - return additionalToolsItemToolsItems27(AdditionalToolsItemToolsItems27!); + return additionalToolsItemToolsItems27(__value27); } return default(TResult); @@ -2049,117 +2049,117 @@ public void Match( Validate(); } - if (IsAdditionalToolsItemToolsItems0) + if (AdditionalToolsItemToolsItems0 is { } __value0) { - additionalToolsItemToolsItems0?.Invoke(AdditionalToolsItemToolsItems0!); + additionalToolsItemToolsItems0?.Invoke(__value0); } - else if (IsPreviewWebSearchServerTool) + else if (PreviewWebSearchServerTool is { } __value1) { - previewWebSearchServerTool?.Invoke(PreviewWebSearchServerTool!); + previewWebSearchServerTool?.Invoke(__value1); } - else if (IsPreview20250311WebSearchServerTool) + else if (Preview20250311WebSearchServerTool is { } __value2) { - preview20250311WebSearchServerTool?.Invoke(Preview20250311WebSearchServerTool!); + preview20250311WebSearchServerTool?.Invoke(__value2); } - else if (IsLegacyWebSearchServerTool) + else if (LegacyWebSearchServerTool is { } __value3) { - legacyWebSearchServerTool?.Invoke(LegacyWebSearchServerTool!); + legacyWebSearchServerTool?.Invoke(__value3); } - else if (IsWebSearchServerTool) + else if (WebSearchServerTool is { } __value4) { - webSearchServerTool?.Invoke(WebSearchServerTool!); + webSearchServerTool?.Invoke(__value4); } - else if (IsFileSearchServerTool) + else if (FileSearchServerTool is { } __value5) { - fileSearchServerTool?.Invoke(FileSearchServerTool!); + fileSearchServerTool?.Invoke(__value5); } - else if (IsComputerUseServerTool) + else if (ComputerUseServerTool is { } __value6) { - computerUseServerTool?.Invoke(ComputerUseServerTool!); + computerUseServerTool?.Invoke(__value6); } - else if (IsCodeInterpreterServerTool) + else if (CodeInterpreterServerTool is { } __value7) { - codeInterpreterServerTool?.Invoke(CodeInterpreterServerTool!); + codeInterpreterServerTool?.Invoke(__value7); } - else if (IsMcpServerTool) + else if (McpServerTool is { } __value8) { - mcpServerTool?.Invoke(McpServerTool!); + mcpServerTool?.Invoke(__value8); } - else if (IsImageGenerationServerTool) + else if (ImageGenerationServerTool is { } __value9) { - imageGenerationServerTool?.Invoke(ImageGenerationServerTool!); + imageGenerationServerTool?.Invoke(__value9); } - else if (IsCodexLocalShellTool) + else if (CodexLocalShellTool is { } __value10) { - codexLocalShellTool?.Invoke(CodexLocalShellTool!); + codexLocalShellTool?.Invoke(__value10); } - else if (IsShellServerTool) + else if (ShellServerTool is { } __value11) { - shellServerTool?.Invoke(ShellServerTool!); + shellServerTool?.Invoke(__value11); } - else if (IsApplyPatchServerTool) + else if (ApplyPatchServerTool is { } __value12) { - applyPatchServerTool?.Invoke(ApplyPatchServerTool!); + applyPatchServerTool?.Invoke(__value12); } - else if (IsCustomTool) + else if (CustomTool is { } __value13) { - customTool?.Invoke(CustomTool!); + customTool?.Invoke(__value13); } - else if (IsNamespaceTool) + else if (NamespaceTool is { } __value14) { - namespaceTool?.Invoke(NamespaceTool!); + namespaceTool?.Invoke(__value14); } - else if (IsAdvisorServerToolOpenRouter) + else if (AdvisorServerToolOpenRouter is { } __value15) { - advisorServerToolOpenRouter?.Invoke(AdvisorServerToolOpenRouter!); + advisorServerToolOpenRouter?.Invoke(__value15); } - else if (IsSubagentServerToolOpenRouter) + else if (SubagentServerToolOpenRouter is { } __value16) { - subagentServerToolOpenRouter?.Invoke(SubagentServerToolOpenRouter!); + subagentServerToolOpenRouter?.Invoke(__value16); } - else if (IsDatetimeServerTool) + else if (DatetimeServerTool is { } __value17) { - datetimeServerTool?.Invoke(DatetimeServerTool!); + datetimeServerTool?.Invoke(__value17); } - else if (IsFilesServerTool) + else if (FilesServerTool is { } __value18) { - filesServerTool?.Invoke(FilesServerTool!); + filesServerTool?.Invoke(__value18); } - else if (IsFusionServerToolOpenRouter) + else if (FusionServerToolOpenRouter is { } __value19) { - fusionServerToolOpenRouter?.Invoke(FusionServerToolOpenRouter!); + fusionServerToolOpenRouter?.Invoke(__value19); } - else if (IsImageGenerationServerToolOpenRouter) + else if (ImageGenerationServerToolOpenRouter is { } __value20) { - imageGenerationServerToolOpenRouter?.Invoke(ImageGenerationServerToolOpenRouter!); + imageGenerationServerToolOpenRouter?.Invoke(__value20); } - else if (IsSearchModelsServerToolOpenRouter) + else if (SearchModelsServerToolOpenRouter is { } __value21) { - searchModelsServerToolOpenRouter?.Invoke(SearchModelsServerToolOpenRouter!); + searchModelsServerToolOpenRouter?.Invoke(__value21); } - else if (IsWebFetchServerTool) + else if (WebFetchServerTool is { } __value22) { - webFetchServerTool?.Invoke(WebFetchServerTool!); + webFetchServerTool?.Invoke(__value22); } - else if (IsWebSearchServerToolOpenRouter) + else if (WebSearchServerToolOpenRouter is { } __value23) { - webSearchServerToolOpenRouter?.Invoke(WebSearchServerToolOpenRouter!); + webSearchServerToolOpenRouter?.Invoke(__value23); } - else if (IsApplyPatchServerToolOpenRouter) + else if (ApplyPatchServerToolOpenRouter is { } __value24) { - applyPatchServerToolOpenRouter?.Invoke(ApplyPatchServerToolOpenRouter!); + applyPatchServerToolOpenRouter?.Invoke(__value24); } - else if (IsBashServerTool) + else if (BashServerTool is { } __value25) { - bashServerTool?.Invoke(BashServerTool!); + bashServerTool?.Invoke(__value25); } - else if (IsShellServerToolOpenRouter) + else if (ShellServerToolOpenRouter is { } __value26) { - shellServerToolOpenRouter?.Invoke(ShellServerToolOpenRouter!); + shellServerToolOpenRouter?.Invoke(__value26); } - else if (IsAdditionalToolsItemToolsItems27) + else if (AdditionalToolsItemToolsItems27 is { } __value27) { - additionalToolsItemToolsItems27?.Invoke(AdditionalToolsItemToolsItems27!); + additionalToolsItemToolsItems27?.Invoke(__value27); } } @@ -2202,117 +2202,117 @@ public void Switch( Validate(); } - if (IsAdditionalToolsItemToolsItems0) + if (AdditionalToolsItemToolsItems0 is { } __value0) { - additionalToolsItemToolsItems0?.Invoke(AdditionalToolsItemToolsItems0!); + additionalToolsItemToolsItems0?.Invoke(__value0); } - else if (IsPreviewWebSearchServerTool) + else if (PreviewWebSearchServerTool is { } __value1) { - previewWebSearchServerTool?.Invoke(PreviewWebSearchServerTool!); + previewWebSearchServerTool?.Invoke(__value1); } - else if (IsPreview20250311WebSearchServerTool) + else if (Preview20250311WebSearchServerTool is { } __value2) { - preview20250311WebSearchServerTool?.Invoke(Preview20250311WebSearchServerTool!); + preview20250311WebSearchServerTool?.Invoke(__value2); } - else if (IsLegacyWebSearchServerTool) + else if (LegacyWebSearchServerTool is { } __value3) { - legacyWebSearchServerTool?.Invoke(LegacyWebSearchServerTool!); + legacyWebSearchServerTool?.Invoke(__value3); } - else if (IsWebSearchServerTool) + else if (WebSearchServerTool is { } __value4) { - webSearchServerTool?.Invoke(WebSearchServerTool!); + webSearchServerTool?.Invoke(__value4); } - else if (IsFileSearchServerTool) + else if (FileSearchServerTool is { } __value5) { - fileSearchServerTool?.Invoke(FileSearchServerTool!); + fileSearchServerTool?.Invoke(__value5); } - else if (IsComputerUseServerTool) + else if (ComputerUseServerTool is { } __value6) { - computerUseServerTool?.Invoke(ComputerUseServerTool!); + computerUseServerTool?.Invoke(__value6); } - else if (IsCodeInterpreterServerTool) + else if (CodeInterpreterServerTool is { } __value7) { - codeInterpreterServerTool?.Invoke(CodeInterpreterServerTool!); + codeInterpreterServerTool?.Invoke(__value7); } - else if (IsMcpServerTool) + else if (McpServerTool is { } __value8) { - mcpServerTool?.Invoke(McpServerTool!); + mcpServerTool?.Invoke(__value8); } - else if (IsImageGenerationServerTool) + else if (ImageGenerationServerTool is { } __value9) { - imageGenerationServerTool?.Invoke(ImageGenerationServerTool!); + imageGenerationServerTool?.Invoke(__value9); } - else if (IsCodexLocalShellTool) + else if (CodexLocalShellTool is { } __value10) { - codexLocalShellTool?.Invoke(CodexLocalShellTool!); + codexLocalShellTool?.Invoke(__value10); } - else if (IsShellServerTool) + else if (ShellServerTool is { } __value11) { - shellServerTool?.Invoke(ShellServerTool!); + shellServerTool?.Invoke(__value11); } - else if (IsApplyPatchServerTool) + else if (ApplyPatchServerTool is { } __value12) { - applyPatchServerTool?.Invoke(ApplyPatchServerTool!); + applyPatchServerTool?.Invoke(__value12); } - else if (IsCustomTool) + else if (CustomTool is { } __value13) { - customTool?.Invoke(CustomTool!); + customTool?.Invoke(__value13); } - else if (IsNamespaceTool) + else if (NamespaceTool is { } __value14) { - namespaceTool?.Invoke(NamespaceTool!); + namespaceTool?.Invoke(__value14); } - else if (IsAdvisorServerToolOpenRouter) + else if (AdvisorServerToolOpenRouter is { } __value15) { - advisorServerToolOpenRouter?.Invoke(AdvisorServerToolOpenRouter!); + advisorServerToolOpenRouter?.Invoke(__value15); } - else if (IsSubagentServerToolOpenRouter) + else if (SubagentServerToolOpenRouter is { } __value16) { - subagentServerToolOpenRouter?.Invoke(SubagentServerToolOpenRouter!); + subagentServerToolOpenRouter?.Invoke(__value16); } - else if (IsDatetimeServerTool) + else if (DatetimeServerTool is { } __value17) { - datetimeServerTool?.Invoke(DatetimeServerTool!); + datetimeServerTool?.Invoke(__value17); } - else if (IsFilesServerTool) + else if (FilesServerTool is { } __value18) { - filesServerTool?.Invoke(FilesServerTool!); + filesServerTool?.Invoke(__value18); } - else if (IsFusionServerToolOpenRouter) + else if (FusionServerToolOpenRouter is { } __value19) { - fusionServerToolOpenRouter?.Invoke(FusionServerToolOpenRouter!); + fusionServerToolOpenRouter?.Invoke(__value19); } - else if (IsImageGenerationServerToolOpenRouter) + else if (ImageGenerationServerToolOpenRouter is { } __value20) { - imageGenerationServerToolOpenRouter?.Invoke(ImageGenerationServerToolOpenRouter!); + imageGenerationServerToolOpenRouter?.Invoke(__value20); } - else if (IsSearchModelsServerToolOpenRouter) + else if (SearchModelsServerToolOpenRouter is { } __value21) { - searchModelsServerToolOpenRouter?.Invoke(SearchModelsServerToolOpenRouter!); + searchModelsServerToolOpenRouter?.Invoke(__value21); } - else if (IsWebFetchServerTool) + else if (WebFetchServerTool is { } __value22) { - webFetchServerTool?.Invoke(WebFetchServerTool!); + webFetchServerTool?.Invoke(__value22); } - else if (IsWebSearchServerToolOpenRouter) + else if (WebSearchServerToolOpenRouter is { } __value23) { - webSearchServerToolOpenRouter?.Invoke(WebSearchServerToolOpenRouter!); + webSearchServerToolOpenRouter?.Invoke(__value23); } - else if (IsApplyPatchServerToolOpenRouter) + else if (ApplyPatchServerToolOpenRouter is { } __value24) { - applyPatchServerToolOpenRouter?.Invoke(ApplyPatchServerToolOpenRouter!); + applyPatchServerToolOpenRouter?.Invoke(__value24); } - else if (IsBashServerTool) + else if (BashServerTool is { } __value25) { - bashServerTool?.Invoke(BashServerTool!); + bashServerTool?.Invoke(__value25); } - else if (IsShellServerToolOpenRouter) + else if (ShellServerToolOpenRouter is { } __value26) { - shellServerToolOpenRouter?.Invoke(ShellServerToolOpenRouter!); + shellServerToolOpenRouter?.Invoke(__value26); } - else if (IsAdditionalToolsItemToolsItems27) + else if (AdditionalToolsItemToolsItems27 is { } __value27) { - additionalToolsItemToolsItems27?.Invoke(AdditionalToolsItemToolsItems27!); + additionalToolsItemToolsItems27?.Invoke(__value27); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.AgentMessageItemContentItems.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.AgentMessageItemContentItems.g.cs index 795c3d0f..67121d76 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.AgentMessageItemContentItems.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.AgentMessageItemContentItems.g.cs @@ -42,8 +42,8 @@ public bool TryPickInputText( /// /// /// - public global::OpenRouter.InputText PickInputText() => IsInputText - ? InputText! + public global::OpenRouter.InputText PickInputText() => InputText is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'InputText' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickAgentMessageItemContentItems1( /// /// /// - public global::OpenRouter.AgentMessageItemContentItems1 PickAgentMessageItemContentItems1() => IsAgentMessageItemContentItems1 - ? AgentMessageItemContentItems1! + public global::OpenRouter.AgentMessageItemContentItems1 PickAgentMessageItemContentItems1() => AgentMessageItemContentItems1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'AgentMessageItemContentItems1' but the value was {ToString()}."); /// @@ -116,8 +116,8 @@ public bool TryPickAgentMessageItemContentItems2( /// /// /// - public global::OpenRouter.AgentMessageItemContentItems2 PickAgentMessageItemContentItems2() => IsAgentMessageItemContentItems2 - ? AgentMessageItemContentItems2! + public global::OpenRouter.AgentMessageItemContentItems2 PickAgentMessageItemContentItems2() => AgentMessageItemContentItems2 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'AgentMessageItemContentItems2' but the value was {ToString()}."); /// /// @@ -242,17 +242,17 @@ public bool Validate() Validate(); } - if (IsInputText && inputText != null) + if (InputText is { } __value0 && inputText != null) { - return inputText(InputText!); + return inputText(__value0); } - else if (IsAgentMessageItemContentItems1 && agentMessageItemContentItems1 != null) + else if (AgentMessageItemContentItems1 is { } __value1 && agentMessageItemContentItems1 != null) { - return agentMessageItemContentItems1(AgentMessageItemContentItems1!); + return agentMessageItemContentItems1(__value1); } - else if (IsAgentMessageItemContentItems2 && agentMessageItemContentItems2 != null) + else if (AgentMessageItemContentItems2 is { } __value2 && agentMessageItemContentItems2 != null) { - return agentMessageItemContentItems2(AgentMessageItemContentItems2!); + return agentMessageItemContentItems2(__value2); } return default(TResult); @@ -274,17 +274,17 @@ public void Match( Validate(); } - if (IsInputText) + if (InputText is { } __value0) { - inputText?.Invoke(InputText!); + inputText?.Invoke(__value0); } - else if (IsAgentMessageItemContentItems1) + else if (AgentMessageItemContentItems1 is { } __value1) { - agentMessageItemContentItems1?.Invoke(AgentMessageItemContentItems1!); + agentMessageItemContentItems1?.Invoke(__value1); } - else if (IsAgentMessageItemContentItems2) + else if (AgentMessageItemContentItems2 is { } __value2) { - agentMessageItemContentItems2?.Invoke(AgentMessageItemContentItems2!); + agentMessageItemContentItems2?.Invoke(__value2); } } @@ -302,17 +302,17 @@ public void Switch( Validate(); } - if (IsInputText) + if (InputText is { } __value0) { - inputText?.Invoke(InputText!); + inputText?.Invoke(__value0); } - else if (IsAgentMessageItemContentItems1) + else if (AgentMessageItemContentItems1 is { } __value1) { - agentMessageItemContentItems1?.Invoke(AgentMessageItemContentItems1!); + agentMessageItemContentItems1?.Invoke(__value1); } - else if (IsAgentMessageItemContentItems2) + else if (AgentMessageItemContentItems2 is { } __value2) { - agentMessageItemContentItems2?.Invoke(AgentMessageItemContentItems2!); + agentMessageItemContentItems2?.Invoke(__value2); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValue.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValue.g.cs index 68255302..ddceaa55 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValue.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValue.g.cs @@ -42,8 +42,8 @@ public bool TryPickAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClas /// /// /// - public string PickAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueVariant1() => IsAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueVariant1 - ? AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueVariant1! + public string PickAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueVariant1() => AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueVariant1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueVariant1' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClas /// /// /// - public double PickAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueVariant2() => IsAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueVariant2 - ? AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueVariant2!.Value + public double PickAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueVariant2() => AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueVariant2 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueVariant2' but the value was {ToString()}."); /// @@ -116,8 +116,8 @@ public bool TryPickAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClas /// /// /// - public global::System.Collections.Generic.IList PickAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValue2() => IsAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValue2 - ? AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValue2! + public global::System.Collections.Generic.IList PickAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValue2() => AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValue2 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValue2' but the value was {ToString()}."); /// /// @@ -219,17 +219,17 @@ public bool Validate() Validate(); } - if (IsAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueVariant1 && analyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueVariant1 != null) + if (AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueVariant1 is { } __value0 && analyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueVariant1 != null) { - return analyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueVariant1(AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueVariant1!); + return analyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueVariant1(__value0); } - else if (IsAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueVariant2 && analyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueVariant2 != null) + else if (AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueVariant2 is { } __value1 && analyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueVariant2 != null) { - return analyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueVariant2(AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueVariant2!); + return analyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueVariant2(__value1); } - else if (IsAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValue2 && analyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValue2 != null) + else if (AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValue2 is { } __value2 && analyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValue2 != null) { - return analyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValue2(AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValue2!); + return analyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValue2(__value2); } return default(TResult); @@ -251,17 +251,17 @@ public void Match( Validate(); } - if (IsAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueVariant1) + if (AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueVariant1 is { } __value0) { - analyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueVariant1?.Invoke(AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueVariant1!); + analyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueVariant1?.Invoke(__value0); } - else if (IsAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueVariant2) + else if (AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueVariant2 is { } __value1) { - analyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueVariant2?.Invoke(AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueVariant2!); + analyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueVariant2?.Invoke(__value1); } - else if (IsAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValue2) + else if (AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValue2 is { } __value2) { - analyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValue2?.Invoke(AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValue2!); + analyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValue2?.Invoke(__value2); } } @@ -279,17 +279,17 @@ public void Switch( Validate(); } - if (IsAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueVariant1) + if (AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueVariant1 is { } __value0) { - analyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueVariant1?.Invoke(AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueVariant1!); + analyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueVariant1?.Invoke(__value0); } - else if (IsAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueVariant2) + else if (AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueVariant2 is { } __value1) { - analyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueVariant2?.Invoke(AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueVariant2!); + analyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueVariant2?.Invoke(__value1); } - else if (IsAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValue2) + else if (AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValue2 is { } __value2) { - analyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValue2?.Invoke(AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValue2!); + analyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValue2?.Invoke(__value2); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueOneOf2Items.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueOneOf2Items.g.cs index 03505cdf..8b51ff7f 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueOneOf2Items.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueOneOf2Items.g.cs @@ -42,8 +42,8 @@ public bool TryPickAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClas /// /// /// - public string PickAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueOneOf2ItemsVariant1() => IsAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueOneOf2ItemsVariant1 - ? AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueOneOf2ItemsVariant1! + public string PickAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueOneOf2ItemsVariant1() => AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueOneOf2ItemsVariant1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueOneOf2ItemsVariant1' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClas /// /// /// - public double PickAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueOneOf2ItemsVariant2() => IsAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueOneOf2ItemsVariant2 - ? AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueOneOf2ItemsVariant2!.Value + public double PickAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueOneOf2ItemsVariant2() => AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueOneOf2ItemsVariant2 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueOneOf2ItemsVariant2' but the value was {ToString()}."); /// /// @@ -177,13 +177,13 @@ public bool Validate() Validate(); } - if (IsAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueOneOf2ItemsVariant1 && analyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueOneOf2ItemsVariant1 != null) + if (AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueOneOf2ItemsVariant1 is { } __value0 && analyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueOneOf2ItemsVariant1 != null) { - return analyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueOneOf2ItemsVariant1(AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueOneOf2ItemsVariant1!); + return analyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueOneOf2ItemsVariant1(__value0); } - else if (IsAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueOneOf2ItemsVariant2 && analyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueOneOf2ItemsVariant2 != null) + else if (AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueOneOf2ItemsVariant2 is { } __value1 && analyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueOneOf2ItemsVariant2 != null) { - return analyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueOneOf2ItemsVariant2(AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueOneOf2ItemsVariant2!); + return analyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueOneOf2ItemsVariant2(__value1); } return default(TResult); @@ -203,13 +203,13 @@ public void Match( Validate(); } - if (IsAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueOneOf2ItemsVariant1) + if (AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueOneOf2ItemsVariant1 is { } __value0) { - analyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueOneOf2ItemsVariant1?.Invoke(AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueOneOf2ItemsVariant1!); + analyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueOneOf2ItemsVariant1?.Invoke(__value0); } - else if (IsAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueOneOf2ItemsVariant2) + else if (AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueOneOf2ItemsVariant2 is { } __value1) { - analyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueOneOf2ItemsVariant2?.Invoke(AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueOneOf2ItemsVariant2!); + analyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueOneOf2ItemsVariant2?.Invoke(__value1); } } @@ -226,13 +226,13 @@ public void Switch( Validate(); } - if (IsAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueOneOf2ItemsVariant1) + if (AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueOneOf2ItemsVariant1 is { } __value0) { - analyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueOneOf2ItemsVariant1?.Invoke(AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueOneOf2ItemsVariant1!); + analyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueOneOf2ItemsVariant1?.Invoke(__value0); } - else if (IsAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueOneOf2ItemsVariant2) + else if (AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueOneOf2ItemsVariant2 is { } __value1) { - analyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueOneOf2ItemsVariant2?.Invoke(AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueOneOf2ItemsVariant2!); + analyticsQueryPostRequestBodyContentApplicationJsonSchemaClassifierFiltersFiltersItemsValueOneOf2ItemsVariant2?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValue.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValue.g.cs index 3b2c5ae4..6d2bf9d4 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValue.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValue.g.cs @@ -42,8 +42,8 @@ public bool TryPickAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFilt /// /// /// - public string PickAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueVariant1() => IsAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueVariant1 - ? AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueVariant1! + public string PickAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueVariant1() => AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueVariant1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueVariant1' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFilt /// /// /// - public double PickAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueVariant2() => IsAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueVariant2 - ? AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueVariant2!.Value + public double PickAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueVariant2() => AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueVariant2 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueVariant2' but the value was {ToString()}."); /// @@ -116,8 +116,8 @@ public bool TryPickAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFilt /// /// /// - public global::System.Collections.Generic.IList PickAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValue2() => IsAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValue2 - ? AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValue2! + public global::System.Collections.Generic.IList PickAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValue2() => AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValue2 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValue2' but the value was {ToString()}."); /// /// @@ -219,17 +219,17 @@ public bool Validate() Validate(); } - if (IsAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueVariant1 && analyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueVariant1 != null) + if (AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueVariant1 is { } __value0 && analyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueVariant1 != null) { - return analyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueVariant1(AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueVariant1!); + return analyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueVariant1(__value0); } - else if (IsAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueVariant2 && analyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueVariant2 != null) + else if (AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueVariant2 is { } __value1 && analyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueVariant2 != null) { - return analyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueVariant2(AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueVariant2!); + return analyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueVariant2(__value1); } - else if (IsAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValue2 && analyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValue2 != null) + else if (AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValue2 is { } __value2 && analyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValue2 != null) { - return analyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValue2(AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValue2!); + return analyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValue2(__value2); } return default(TResult); @@ -251,17 +251,17 @@ public void Match( Validate(); } - if (IsAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueVariant1) + if (AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueVariant1 is { } __value0) { - analyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueVariant1?.Invoke(AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueVariant1!); + analyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueVariant1?.Invoke(__value0); } - else if (IsAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueVariant2) + else if (AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueVariant2 is { } __value1) { - analyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueVariant2?.Invoke(AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueVariant2!); + analyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueVariant2?.Invoke(__value1); } - else if (IsAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValue2) + else if (AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValue2 is { } __value2) { - analyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValue2?.Invoke(AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValue2!); + analyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValue2?.Invoke(__value2); } } @@ -279,17 +279,17 @@ public void Switch( Validate(); } - if (IsAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueVariant1) + if (AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueVariant1 is { } __value0) { - analyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueVariant1?.Invoke(AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueVariant1!); + analyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueVariant1?.Invoke(__value0); } - else if (IsAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueVariant2) + else if (AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueVariant2 is { } __value1) { - analyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueVariant2?.Invoke(AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueVariant2!); + analyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueVariant2?.Invoke(__value1); } - else if (IsAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValue2) + else if (AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValue2 is { } __value2) { - analyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValue2?.Invoke(AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValue2!); + analyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValue2?.Invoke(__value2); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueOneOf2Items.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueOneOf2Items.g.cs index 863139a7..cb00d555 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueOneOf2Items.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueOneOf2Items.g.cs @@ -42,8 +42,8 @@ public bool TryPickAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFilt /// /// /// - public string PickAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueOneOf2ItemsVariant1() => IsAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueOneOf2ItemsVariant1 - ? AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueOneOf2ItemsVariant1! + public string PickAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueOneOf2ItemsVariant1() => AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueOneOf2ItemsVariant1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueOneOf2ItemsVariant1' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFilt /// /// /// - public double PickAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueOneOf2ItemsVariant2() => IsAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueOneOf2ItemsVariant2 - ? AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueOneOf2ItemsVariant2!.Value + public double PickAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueOneOf2ItemsVariant2() => AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueOneOf2ItemsVariant2 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueOneOf2ItemsVariant2' but the value was {ToString()}."); /// /// @@ -177,13 +177,13 @@ public bool Validate() Validate(); } - if (IsAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueOneOf2ItemsVariant1 && analyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueOneOf2ItemsVariant1 != null) + if (AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueOneOf2ItemsVariant1 is { } __value0 && analyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueOneOf2ItemsVariant1 != null) { - return analyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueOneOf2ItemsVariant1(AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueOneOf2ItemsVariant1!); + return analyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueOneOf2ItemsVariant1(__value0); } - else if (IsAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueOneOf2ItemsVariant2 && analyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueOneOf2ItemsVariant2 != null) + else if (AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueOneOf2ItemsVariant2 is { } __value1 && analyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueOneOf2ItemsVariant2 != null) { - return analyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueOneOf2ItemsVariant2(AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueOneOf2ItemsVariant2!); + return analyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueOneOf2ItemsVariant2(__value1); } return default(TResult); @@ -203,13 +203,13 @@ public void Match( Validate(); } - if (IsAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueOneOf2ItemsVariant1) + if (AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueOneOf2ItemsVariant1 is { } __value0) { - analyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueOneOf2ItemsVariant1?.Invoke(AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueOneOf2ItemsVariant1!); + analyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueOneOf2ItemsVariant1?.Invoke(__value0); } - else if (IsAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueOneOf2ItemsVariant2) + else if (AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueOneOf2ItemsVariant2 is { } __value1) { - analyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueOneOf2ItemsVariant2?.Invoke(AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueOneOf2ItemsVariant2!); + analyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueOneOf2ItemsVariant2?.Invoke(__value1); } } @@ -226,13 +226,13 @@ public void Switch( Validate(); } - if (IsAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueOneOf2ItemsVariant1) + if (AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueOneOf2ItemsVariant1 is { } __value0) { - analyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueOneOf2ItemsVariant1?.Invoke(AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueOneOf2ItemsVariant1!); + analyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueOneOf2ItemsVariant1?.Invoke(__value0); } - else if (IsAnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueOneOf2ItemsVariant2) + else if (AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueOneOf2ItemsVariant2 is { } __value1) { - analyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueOneOf2ItemsVariant2?.Invoke(AnalyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueOneOf2ItemsVariant2!); + analyticsQueryPostRequestBodyContentApplicationJsonSchemaFiltersItemsValueOneOf2ItemsVariant2?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.AnthropicBashCodeExecutionContent.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.AnthropicBashCodeExecutionContent.g.cs index f362b619..669a1477 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.AnthropicBashCodeExecutionContent.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.AnthropicBashCodeExecutionContent.g.cs @@ -47,8 +47,8 @@ public bool TryPickBashCodeExecutionResult( /// /// /// - public global::OpenRouter.AnthropicBashCodeExecutionContentVariant1 PickBashCodeExecutionResult() => IsBashCodeExecutionResult - ? BashCodeExecutionResult! + public global::OpenRouter.AnthropicBashCodeExecutionContentVariant1 PickBashCodeExecutionResult() => BashCodeExecutionResult is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'BashCodeExecutionResult' but the value was {ToString()}."); /// @@ -84,8 +84,8 @@ public bool TryPickBashCodeExecutionToolResultError( /// /// /// - public global::OpenRouter.AnthropicBashCodeExecutionContentVariant2 PickBashCodeExecutionToolResultError() => IsBashCodeExecutionToolResultError - ? BashCodeExecutionToolResultError! + public global::OpenRouter.AnthropicBashCodeExecutionContentVariant2 PickBashCodeExecutionToolResultError() => BashCodeExecutionToolResultError is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'BashCodeExecutionToolResultError' but the value was {ToString()}."); /// /// @@ -185,13 +185,13 @@ public bool Validate() Validate(); } - if (IsBashCodeExecutionResult && bashCodeExecutionResult != null) + if (BashCodeExecutionResult is { } __value0 && bashCodeExecutionResult != null) { - return bashCodeExecutionResult(BashCodeExecutionResult!); + return bashCodeExecutionResult(__value0); } - else if (IsBashCodeExecutionToolResultError && bashCodeExecutionToolResultError != null) + else if (BashCodeExecutionToolResultError is { } __value1 && bashCodeExecutionToolResultError != null) { - return bashCodeExecutionToolResultError(BashCodeExecutionToolResultError!); + return bashCodeExecutionToolResultError(__value1); } return default(TResult); @@ -211,13 +211,13 @@ public void Match( Validate(); } - if (IsBashCodeExecutionResult) + if (BashCodeExecutionResult is { } __value0) { - bashCodeExecutionResult?.Invoke(BashCodeExecutionResult!); + bashCodeExecutionResult?.Invoke(__value0); } - else if (IsBashCodeExecutionToolResultError) + else if (BashCodeExecutionToolResultError is { } __value1) { - bashCodeExecutionToolResultError?.Invoke(BashCodeExecutionToolResultError!); + bashCodeExecutionToolResultError?.Invoke(__value1); } } @@ -234,13 +234,13 @@ public void Switch( Validate(); } - if (IsBashCodeExecutionResult) + if (BashCodeExecutionResult is { } __value0) { - bashCodeExecutionResult?.Invoke(BashCodeExecutionResult!); + bashCodeExecutionResult?.Invoke(__value0); } - else if (IsBashCodeExecutionToolResultError) + else if (BashCodeExecutionToolResultError is { } __value1) { - bashCodeExecutionToolResultError?.Invoke(BashCodeExecutionToolResultError!); + bashCodeExecutionToolResultError?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.AnthropicCaller.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.AnthropicCaller.g.cs index 47fc0e8b..ad864fd1 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.AnthropicCaller.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.AnthropicCaller.g.cs @@ -47,8 +47,8 @@ public bool TryPickCodeExecution20250825( /// /// /// - public global::OpenRouter.AnthropicCallerVariant1 PickCodeExecution20250825() => IsCodeExecution20250825 - ? CodeExecution20250825! + public global::OpenRouter.AnthropicCallerVariant1 PickCodeExecution20250825() => CodeExecution20250825 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'CodeExecution20250825' but the value was {ToString()}."); /// @@ -84,8 +84,8 @@ public bool TryPickCodeExecution20260120( /// /// /// - public global::OpenRouter.AnthropicCallerVariant2 PickCodeExecution20260120() => IsCodeExecution20260120 - ? CodeExecution20260120! + public global::OpenRouter.AnthropicCallerVariant2 PickCodeExecution20260120() => CodeExecution20260120 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'CodeExecution20260120' but the value was {ToString()}."); /// @@ -121,8 +121,8 @@ public bool TryPickDirect( /// /// /// - public global::OpenRouter.AnthropicCallerVariant3 PickDirect() => IsDirect - ? Direct! + public global::OpenRouter.AnthropicCallerVariant3 PickDirect() => Direct is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Direct' but the value was {ToString()}."); /// /// @@ -250,17 +250,17 @@ public bool Validate() Validate(); } - if (IsCodeExecution20250825 && codeExecution20250825 != null) + if (CodeExecution20250825 is { } __value0 && codeExecution20250825 != null) { - return codeExecution20250825(CodeExecution20250825!); + return codeExecution20250825(__value0); } - else if (IsCodeExecution20260120 && codeExecution20260120 != null) + else if (CodeExecution20260120 is { } __value1 && codeExecution20260120 != null) { - return codeExecution20260120(CodeExecution20260120!); + return codeExecution20260120(__value1); } - else if (IsDirect && direct != null) + else if (Direct is { } __value2 && direct != null) { - return direct(Direct!); + return direct(__value2); } return default(TResult); @@ -282,17 +282,17 @@ public void Match( Validate(); } - if (IsCodeExecution20250825) + if (CodeExecution20250825 is { } __value0) { - codeExecution20250825?.Invoke(CodeExecution20250825!); + codeExecution20250825?.Invoke(__value0); } - else if (IsCodeExecution20260120) + else if (CodeExecution20260120 is { } __value1) { - codeExecution20260120?.Invoke(CodeExecution20260120!); + codeExecution20260120?.Invoke(__value1); } - else if (IsDirect) + else if (Direct is { } __value2) { - direct?.Invoke(Direct!); + direct?.Invoke(__value2); } } @@ -310,17 +310,17 @@ public void Switch( Validate(); } - if (IsCodeExecution20250825) + if (CodeExecution20250825 is { } __value0) { - codeExecution20250825?.Invoke(CodeExecution20250825!); + codeExecution20250825?.Invoke(__value0); } - else if (IsCodeExecution20260120) + else if (CodeExecution20260120 is { } __value1) { - codeExecution20260120?.Invoke(CodeExecution20260120!); + codeExecution20260120?.Invoke(__value1); } - else if (IsDirect) + else if (Direct is { } __value2) { - direct?.Invoke(Direct!); + direct?.Invoke(__value2); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.AnthropicCodeExecutionContent.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.AnthropicCodeExecutionContent.g.cs index b75b928e..24618b5f 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.AnthropicCodeExecutionContent.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.AnthropicCodeExecutionContent.g.cs @@ -47,8 +47,8 @@ public bool TryPickCodeExecutionResult( /// /// /// - public global::OpenRouter.AnthropicCodeExecutionContentVariant1 PickCodeExecutionResult() => IsCodeExecutionResult - ? CodeExecutionResult! + public global::OpenRouter.AnthropicCodeExecutionContentVariant1 PickCodeExecutionResult() => CodeExecutionResult is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'CodeExecutionResult' but the value was {ToString()}."); /// @@ -84,8 +84,8 @@ public bool TryPickCodeExecutionToolResultError( /// /// /// - public global::OpenRouter.AnthropicCodeExecutionContentVariant2 PickCodeExecutionToolResultError() => IsCodeExecutionToolResultError - ? CodeExecutionToolResultError! + public global::OpenRouter.AnthropicCodeExecutionContentVariant2 PickCodeExecutionToolResultError() => CodeExecutionToolResultError is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'CodeExecutionToolResultError' but the value was {ToString()}."); /// @@ -121,8 +121,8 @@ public bool TryPickEncryptedCodeExecutionResult( /// /// /// - public global::OpenRouter.AnthropicCodeExecutionContentVariant3 PickEncryptedCodeExecutionResult() => IsEncryptedCodeExecutionResult - ? EncryptedCodeExecutionResult! + public global::OpenRouter.AnthropicCodeExecutionContentVariant3 PickEncryptedCodeExecutionResult() => EncryptedCodeExecutionResult is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'EncryptedCodeExecutionResult' but the value was {ToString()}."); /// /// @@ -250,17 +250,17 @@ public bool Validate() Validate(); } - if (IsCodeExecutionResult && codeExecutionResult != null) + if (CodeExecutionResult is { } __value0 && codeExecutionResult != null) { - return codeExecutionResult(CodeExecutionResult!); + return codeExecutionResult(__value0); } - else if (IsCodeExecutionToolResultError && codeExecutionToolResultError != null) + else if (CodeExecutionToolResultError is { } __value1 && codeExecutionToolResultError != null) { - return codeExecutionToolResultError(CodeExecutionToolResultError!); + return codeExecutionToolResultError(__value1); } - else if (IsEncryptedCodeExecutionResult && encryptedCodeExecutionResult != null) + else if (EncryptedCodeExecutionResult is { } __value2 && encryptedCodeExecutionResult != null) { - return encryptedCodeExecutionResult(EncryptedCodeExecutionResult!); + return encryptedCodeExecutionResult(__value2); } return default(TResult); @@ -282,17 +282,17 @@ public void Match( Validate(); } - if (IsCodeExecutionResult) + if (CodeExecutionResult is { } __value0) { - codeExecutionResult?.Invoke(CodeExecutionResult!); + codeExecutionResult?.Invoke(__value0); } - else if (IsCodeExecutionToolResultError) + else if (CodeExecutionToolResultError is { } __value1) { - codeExecutionToolResultError?.Invoke(CodeExecutionToolResultError!); + codeExecutionToolResultError?.Invoke(__value1); } - else if (IsEncryptedCodeExecutionResult) + else if (EncryptedCodeExecutionResult is { } __value2) { - encryptedCodeExecutionResult?.Invoke(EncryptedCodeExecutionResult!); + encryptedCodeExecutionResult?.Invoke(__value2); } } @@ -310,17 +310,17 @@ public void Switch( Validate(); } - if (IsCodeExecutionResult) + if (CodeExecutionResult is { } __value0) { - codeExecutionResult?.Invoke(CodeExecutionResult!); + codeExecutionResult?.Invoke(__value0); } - else if (IsCodeExecutionToolResultError) + else if (CodeExecutionToolResultError is { } __value1) { - codeExecutionToolResultError?.Invoke(CodeExecutionToolResultError!); + codeExecutionToolResultError?.Invoke(__value1); } - else if (IsEncryptedCodeExecutionResult) + else if (EncryptedCodeExecutionResult is { } __value2) { - encryptedCodeExecutionResult?.Invoke(EncryptedCodeExecutionResult!); + encryptedCodeExecutionResult?.Invoke(__value2); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.AnthropicDocumentBlockParamSource.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.AnthropicDocumentBlockParamSource.g.cs index 92d4b7a5..d71b1c7b 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.AnthropicDocumentBlockParamSource.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.AnthropicDocumentBlockParamSource.g.cs @@ -42,8 +42,8 @@ public bool TryPickAnthropicBase64PdfSource( /// /// /// - public global::OpenRouter.AnthropicBase64PdfSource PickAnthropicBase64PdfSource() => IsAnthropicBase64PdfSource - ? AnthropicBase64PdfSource! + public global::OpenRouter.AnthropicBase64PdfSource PickAnthropicBase64PdfSource() => AnthropicBase64PdfSource is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'AnthropicBase64PdfSource' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickAnthropicPlainTextSource( /// /// /// - public global::OpenRouter.AnthropicPlainTextSource PickAnthropicPlainTextSource() => IsAnthropicPlainTextSource - ? AnthropicPlainTextSource! + public global::OpenRouter.AnthropicPlainTextSource PickAnthropicPlainTextSource() => AnthropicPlainTextSource is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'AnthropicPlainTextSource' but the value was {ToString()}."); /// @@ -116,8 +116,8 @@ public bool TryPickAnthropicDocumentBlockParamSource2( /// /// /// - public global::OpenRouter.AnthropicDocumentBlockParamSource2 PickAnthropicDocumentBlockParamSource2() => IsAnthropicDocumentBlockParamSource2 - ? AnthropicDocumentBlockParamSource2! + public global::OpenRouter.AnthropicDocumentBlockParamSource2 PickAnthropicDocumentBlockParamSource2() => AnthropicDocumentBlockParamSource2 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'AnthropicDocumentBlockParamSource2' but the value was {ToString()}."); /// @@ -153,8 +153,8 @@ public bool TryPickAnthropicUrlPdfSource( /// /// /// - public global::OpenRouter.AnthropicUrlPdfSource PickAnthropicUrlPdfSource() => IsAnthropicUrlPdfSource - ? AnthropicUrlPdfSource! + public global::OpenRouter.AnthropicUrlPdfSource PickAnthropicUrlPdfSource() => AnthropicUrlPdfSource is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'AnthropicUrlPdfSource' but the value was {ToString()}."); /// @@ -190,8 +190,8 @@ public bool TryPickAnthropicFileDocumentSource( /// /// /// - public global::OpenRouter.AnthropicFileDocumentSource PickAnthropicFileDocumentSource() => IsAnthropicFileDocumentSource - ? AnthropicFileDocumentSource! + public global::OpenRouter.AnthropicFileDocumentSource PickAnthropicFileDocumentSource() => AnthropicFileDocumentSource is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'AnthropicFileDocumentSource' but the value was {ToString()}."); /// /// @@ -372,25 +372,25 @@ public bool Validate() Validate(); } - if (IsAnthropicBase64PdfSource && anthropicBase64PdfSource != null) + if (AnthropicBase64PdfSource is { } __value0 && anthropicBase64PdfSource != null) { - return anthropicBase64PdfSource(AnthropicBase64PdfSource!); + return anthropicBase64PdfSource(__value0); } - else if (IsAnthropicPlainTextSource && anthropicPlainTextSource != null) + else if (AnthropicPlainTextSource is { } __value1 && anthropicPlainTextSource != null) { - return anthropicPlainTextSource(AnthropicPlainTextSource!); + return anthropicPlainTextSource(__value1); } - else if (IsAnthropicDocumentBlockParamSource2 && anthropicDocumentBlockParamSource2 != null) + else if (AnthropicDocumentBlockParamSource2 is { } __value2 && anthropicDocumentBlockParamSource2 != null) { - return anthropicDocumentBlockParamSource2(AnthropicDocumentBlockParamSource2!); + return anthropicDocumentBlockParamSource2(__value2); } - else if (IsAnthropicUrlPdfSource && anthropicUrlPdfSource != null) + else if (AnthropicUrlPdfSource is { } __value3 && anthropicUrlPdfSource != null) { - return anthropicUrlPdfSource(AnthropicUrlPdfSource!); + return anthropicUrlPdfSource(__value3); } - else if (IsAnthropicFileDocumentSource && anthropicFileDocumentSource != null) + else if (AnthropicFileDocumentSource is { } __value4 && anthropicFileDocumentSource != null) { - return anthropicFileDocumentSource(AnthropicFileDocumentSource!); + return anthropicFileDocumentSource(__value4); } return default(TResult); @@ -416,25 +416,25 @@ public void Match( Validate(); } - if (IsAnthropicBase64PdfSource) + if (AnthropicBase64PdfSource is { } __value0) { - anthropicBase64PdfSource?.Invoke(AnthropicBase64PdfSource!); + anthropicBase64PdfSource?.Invoke(__value0); } - else if (IsAnthropicPlainTextSource) + else if (AnthropicPlainTextSource is { } __value1) { - anthropicPlainTextSource?.Invoke(AnthropicPlainTextSource!); + anthropicPlainTextSource?.Invoke(__value1); } - else if (IsAnthropicDocumentBlockParamSource2) + else if (AnthropicDocumentBlockParamSource2 is { } __value2) { - anthropicDocumentBlockParamSource2?.Invoke(AnthropicDocumentBlockParamSource2!); + anthropicDocumentBlockParamSource2?.Invoke(__value2); } - else if (IsAnthropicUrlPdfSource) + else if (AnthropicUrlPdfSource is { } __value3) { - anthropicUrlPdfSource?.Invoke(AnthropicUrlPdfSource!); + anthropicUrlPdfSource?.Invoke(__value3); } - else if (IsAnthropicFileDocumentSource) + else if (AnthropicFileDocumentSource is { } __value4) { - anthropicFileDocumentSource?.Invoke(AnthropicFileDocumentSource!); + anthropicFileDocumentSource?.Invoke(__value4); } } @@ -454,25 +454,25 @@ public void Switch( Validate(); } - if (IsAnthropicBase64PdfSource) + if (AnthropicBase64PdfSource is { } __value0) { - anthropicBase64PdfSource?.Invoke(AnthropicBase64PdfSource!); + anthropicBase64PdfSource?.Invoke(__value0); } - else if (IsAnthropicPlainTextSource) + else if (AnthropicPlainTextSource is { } __value1) { - anthropicPlainTextSource?.Invoke(AnthropicPlainTextSource!); + anthropicPlainTextSource?.Invoke(__value1); } - else if (IsAnthropicDocumentBlockParamSource2) + else if (AnthropicDocumentBlockParamSource2 is { } __value2) { - anthropicDocumentBlockParamSource2?.Invoke(AnthropicDocumentBlockParamSource2!); + anthropicDocumentBlockParamSource2?.Invoke(__value2); } - else if (IsAnthropicUrlPdfSource) + else if (AnthropicUrlPdfSource is { } __value3) { - anthropicUrlPdfSource?.Invoke(AnthropicUrlPdfSource!); + anthropicUrlPdfSource?.Invoke(__value3); } - else if (IsAnthropicFileDocumentSource) + else if (AnthropicFileDocumentSource is { } __value4) { - anthropicFileDocumentSource?.Invoke(AnthropicFileDocumentSource!); + anthropicFileDocumentSource?.Invoke(__value4); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.AnthropicDocumentBlockParamSourceOneOf2Content.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.AnthropicDocumentBlockParamSourceOneOf2Content.g.cs index 02373f34..474aa227 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.AnthropicDocumentBlockParamSourceOneOf2Content.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.AnthropicDocumentBlockParamSourceOneOf2Content.g.cs @@ -42,8 +42,8 @@ public bool TryPickAnthropicDocumentBlockParamSourceOneOf2ContentVariant1( /// /// /// - public string PickAnthropicDocumentBlockParamSourceOneOf2ContentVariant1() => IsAnthropicDocumentBlockParamSourceOneOf2ContentVariant1 - ? AnthropicDocumentBlockParamSourceOneOf2ContentVariant1! + public string PickAnthropicDocumentBlockParamSourceOneOf2ContentVariant1() => AnthropicDocumentBlockParamSourceOneOf2ContentVariant1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'AnthropicDocumentBlockParamSourceOneOf2ContentVariant1' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickAnthropicDocumentBlockParamSourceOneOf2Content1( /// /// /// - public global::System.Collections.Generic.IList PickAnthropicDocumentBlockParamSourceOneOf2Content1() => IsAnthropicDocumentBlockParamSourceOneOf2Content1 - ? AnthropicDocumentBlockParamSourceOneOf2Content1! + public global::System.Collections.Generic.IList PickAnthropicDocumentBlockParamSourceOneOf2Content1() => AnthropicDocumentBlockParamSourceOneOf2Content1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'AnthropicDocumentBlockParamSourceOneOf2Content1' but the value was {ToString()}."); /// /// @@ -154,13 +154,13 @@ public bool Validate() Validate(); } - if (IsAnthropicDocumentBlockParamSourceOneOf2ContentVariant1 && anthropicDocumentBlockParamSourceOneOf2ContentVariant1 != null) + if (AnthropicDocumentBlockParamSourceOneOf2ContentVariant1 is { } __value0 && anthropicDocumentBlockParamSourceOneOf2ContentVariant1 != null) { - return anthropicDocumentBlockParamSourceOneOf2ContentVariant1(AnthropicDocumentBlockParamSourceOneOf2ContentVariant1!); + return anthropicDocumentBlockParamSourceOneOf2ContentVariant1(__value0); } - else if (IsAnthropicDocumentBlockParamSourceOneOf2Content1 && anthropicDocumentBlockParamSourceOneOf2Content1 != null) + else if (AnthropicDocumentBlockParamSourceOneOf2Content1 is { } __value1 && anthropicDocumentBlockParamSourceOneOf2Content1 != null) { - return anthropicDocumentBlockParamSourceOneOf2Content1(AnthropicDocumentBlockParamSourceOneOf2Content1!); + return anthropicDocumentBlockParamSourceOneOf2Content1(__value1); } return default(TResult); @@ -180,13 +180,13 @@ public void Match( Validate(); } - if (IsAnthropicDocumentBlockParamSourceOneOf2ContentVariant1) + if (AnthropicDocumentBlockParamSourceOneOf2ContentVariant1 is { } __value0) { - anthropicDocumentBlockParamSourceOneOf2ContentVariant1?.Invoke(AnthropicDocumentBlockParamSourceOneOf2ContentVariant1!); + anthropicDocumentBlockParamSourceOneOf2ContentVariant1?.Invoke(__value0); } - else if (IsAnthropicDocumentBlockParamSourceOneOf2Content1) + else if (AnthropicDocumentBlockParamSourceOneOf2Content1 is { } __value1) { - anthropicDocumentBlockParamSourceOneOf2Content1?.Invoke(AnthropicDocumentBlockParamSourceOneOf2Content1!); + anthropicDocumentBlockParamSourceOneOf2Content1?.Invoke(__value1); } } @@ -203,13 +203,13 @@ public void Switch( Validate(); } - if (IsAnthropicDocumentBlockParamSourceOneOf2ContentVariant1) + if (AnthropicDocumentBlockParamSourceOneOf2ContentVariant1 is { } __value0) { - anthropicDocumentBlockParamSourceOneOf2ContentVariant1?.Invoke(AnthropicDocumentBlockParamSourceOneOf2ContentVariant1!); + anthropicDocumentBlockParamSourceOneOf2ContentVariant1?.Invoke(__value0); } - else if (IsAnthropicDocumentBlockParamSourceOneOf2Content1) + else if (AnthropicDocumentBlockParamSourceOneOf2Content1 is { } __value1) { - anthropicDocumentBlockParamSourceOneOf2Content1?.Invoke(AnthropicDocumentBlockParamSourceOneOf2Content1!); + anthropicDocumentBlockParamSourceOneOf2Content1?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.AnthropicDocumentBlockParamSourceOneOf2ContentOneOf1Items.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.AnthropicDocumentBlockParamSourceOneOf2ContentOneOf1Items.g.cs index 5de41c9b..9e25866e 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.AnthropicDocumentBlockParamSourceOneOf2ContentOneOf1Items.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.AnthropicDocumentBlockParamSourceOneOf2ContentOneOf1Items.g.cs @@ -47,8 +47,8 @@ public bool TryPickImage( /// /// /// - public global::OpenRouter.AnthropicDocumentBlockParamSourceOneOf2ContentOneOf1ItemsVariant1 PickImage() => IsImage - ? Image! + public global::OpenRouter.AnthropicDocumentBlockParamSourceOneOf2ContentOneOf1ItemsVariant1 PickImage() => Image is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Image' but the value was {ToString()}."); /// @@ -84,8 +84,8 @@ public bool TryPickText( /// /// /// - public global::OpenRouter.AnthropicDocumentBlockParamSourceOneOf2ContentOneOf1ItemsVariant2 PickText() => IsText - ? Text! + public global::OpenRouter.AnthropicDocumentBlockParamSourceOneOf2ContentOneOf1ItemsVariant2 PickText() => Text is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Text' but the value was {ToString()}."); /// /// @@ -185,13 +185,13 @@ public bool Validate() Validate(); } - if (IsImage && image != null) + if (Image is { } __value0 && image != null) { - return image(Image!); + return image(__value0); } - else if (IsText && text != null) + else if (Text is { } __value1 && text != null) { - return text(Text!); + return text(__value1); } return default(TResult); @@ -211,13 +211,13 @@ public void Match( Validate(); } - if (IsImage) + if (Image is { } __value0) { - image?.Invoke(Image!); + image?.Invoke(__value0); } - else if (IsText) + else if (Text is { } __value1) { - text?.Invoke(Text!); + text?.Invoke(__value1); } } @@ -234,13 +234,13 @@ public void Switch( Validate(); } - if (IsImage) + if (Image is { } __value0) { - image?.Invoke(Image!); + image?.Invoke(__value0); } - else if (IsText) + else if (Text is { } __value1) { - text?.Invoke(Text!); + text?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.AnthropicDocumentBlockSource.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.AnthropicDocumentBlockSource.g.cs index 864cde68..e5031e59 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.AnthropicDocumentBlockSource.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.AnthropicDocumentBlockSource.g.cs @@ -42,8 +42,8 @@ public bool TryPickAnthropicBase64PdfSource( /// /// /// - public global::OpenRouter.AnthropicBase64PdfSource PickAnthropicBase64PdfSource() => IsAnthropicBase64PdfSource - ? AnthropicBase64PdfSource! + public global::OpenRouter.AnthropicBase64PdfSource PickAnthropicBase64PdfSource() => AnthropicBase64PdfSource is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'AnthropicBase64PdfSource' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickAnthropicPlainTextSource( /// /// /// - public global::OpenRouter.AnthropicPlainTextSource PickAnthropicPlainTextSource() => IsAnthropicPlainTextSource - ? AnthropicPlainTextSource! + public global::OpenRouter.AnthropicPlainTextSource PickAnthropicPlainTextSource() => AnthropicPlainTextSource is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'AnthropicPlainTextSource' but the value was {ToString()}."); /// /// @@ -177,13 +177,13 @@ public bool Validate() Validate(); } - if (IsAnthropicBase64PdfSource && anthropicBase64PdfSource != null) + if (AnthropicBase64PdfSource is { } __value0 && anthropicBase64PdfSource != null) { - return anthropicBase64PdfSource(AnthropicBase64PdfSource!); + return anthropicBase64PdfSource(__value0); } - else if (IsAnthropicPlainTextSource && anthropicPlainTextSource != null) + else if (AnthropicPlainTextSource is { } __value1 && anthropicPlainTextSource != null) { - return anthropicPlainTextSource(AnthropicPlainTextSource!); + return anthropicPlainTextSource(__value1); } return default(TResult); @@ -203,13 +203,13 @@ public void Match( Validate(); } - if (IsAnthropicBase64PdfSource) + if (AnthropicBase64PdfSource is { } __value0) { - anthropicBase64PdfSource?.Invoke(AnthropicBase64PdfSource!); + anthropicBase64PdfSource?.Invoke(__value0); } - else if (IsAnthropicPlainTextSource) + else if (AnthropicPlainTextSource is { } __value1) { - anthropicPlainTextSource?.Invoke(AnthropicPlainTextSource!); + anthropicPlainTextSource?.Invoke(__value1); } } @@ -226,13 +226,13 @@ public void Switch( Validate(); } - if (IsAnthropicBase64PdfSource) + if (AnthropicBase64PdfSource is { } __value0) { - anthropicBase64PdfSource?.Invoke(AnthropicBase64PdfSource!); + anthropicBase64PdfSource?.Invoke(__value0); } - else if (IsAnthropicPlainTextSource) + else if (AnthropicPlainTextSource is { } __value1) { - anthropicPlainTextSource?.Invoke(AnthropicPlainTextSource!); + anthropicPlainTextSource?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.AnthropicImageBlockParamSource.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.AnthropicImageBlockParamSource.g.cs index c9a8290b..8c6e859d 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.AnthropicImageBlockParamSource.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.AnthropicImageBlockParamSource.g.cs @@ -47,8 +47,8 @@ public bool TryPickBase64( /// /// /// - public global::OpenRouter.AnthropicImageBlockParamSourceVariant1 PickBase64() => IsBase64 - ? Base64! + public global::OpenRouter.AnthropicImageBlockParamSourceVariant1 PickBase64() => Base64 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Base64' but the value was {ToString()}."); /// @@ -84,8 +84,8 @@ public bool TryPickUrl( /// /// /// - public global::OpenRouter.AnthropicImageBlockParamSourceVariant2 PickUrl() => IsUrl - ? Url! + public global::OpenRouter.AnthropicImageBlockParamSourceVariant2 PickUrl() => Url is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Url' but the value was {ToString()}."); /// /// @@ -185,13 +185,13 @@ public bool Validate() Validate(); } - if (IsBase64 && base64 != null) + if (Base64 is { } __value0 && base64 != null) { - return base64(Base64!); + return base64(__value0); } - else if (IsUrl && url != null) + else if (Url is { } __value1 && url != null) { - return url(Url!); + return url(__value1); } return default(TResult); @@ -211,13 +211,13 @@ public void Match( Validate(); } - if (IsBase64) + if (Base64 is { } __value0) { - base64?.Invoke(Base64!); + base64?.Invoke(__value0); } - else if (IsUrl) + else if (Url is { } __value1) { - url?.Invoke(Url!); + url?.Invoke(__value1); } } @@ -234,13 +234,13 @@ public void Switch( Validate(); } - if (IsBase64) + if (Base64 is { } __value0) { - base64?.Invoke(Base64!); + base64?.Invoke(__value0); } - else if (IsUrl) + else if (Url is { } __value1) { - url?.Invoke(Url!); + url?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.AnthropicTextBlockParamCitationsItems.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.AnthropicTextBlockParamCitationsItems.g.cs index 4158a4c2..617ad8e5 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.AnthropicTextBlockParamCitationsItems.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.AnthropicTextBlockParamCitationsItems.g.cs @@ -47,8 +47,8 @@ public bool TryPickCharLocation( /// /// /// - public global::OpenRouter.AnthropicTextBlockParamCitationsItemsVariant1 PickCharLocation() => IsCharLocation - ? CharLocation! + public global::OpenRouter.AnthropicTextBlockParamCitationsItemsVariant1 PickCharLocation() => CharLocation is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'CharLocation' but the value was {ToString()}."); /// @@ -84,8 +84,8 @@ public bool TryPickContentBlockLocation( /// /// /// - public global::OpenRouter.AnthropicTextBlockParamCitationsItemsVariant2 PickContentBlockLocation() => IsContentBlockLocation - ? ContentBlockLocation! + public global::OpenRouter.AnthropicTextBlockParamCitationsItemsVariant2 PickContentBlockLocation() => ContentBlockLocation is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ContentBlockLocation' but the value was {ToString()}."); /// @@ -121,8 +121,8 @@ public bool TryPickPageLocation( /// /// /// - public global::OpenRouter.AnthropicTextBlockParamCitationsItemsVariant3 PickPageLocation() => IsPageLocation - ? PageLocation! + public global::OpenRouter.AnthropicTextBlockParamCitationsItemsVariant3 PickPageLocation() => PageLocation is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'PageLocation' but the value was {ToString()}."); /// @@ -158,8 +158,8 @@ public bool TryPickSearchResultLocation( /// /// /// - public global::OpenRouter.AnthropicTextBlockParamCitationsItemsVariant4 PickSearchResultLocation() => IsSearchResultLocation - ? SearchResultLocation! + public global::OpenRouter.AnthropicTextBlockParamCitationsItemsVariant4 PickSearchResultLocation() => SearchResultLocation is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'SearchResultLocation' but the value was {ToString()}."); /// @@ -195,8 +195,8 @@ public bool TryPickWebSearchResultLocation( /// /// /// - public global::OpenRouter.AnthropicTextBlockParamCitationsItemsVariant5 PickWebSearchResultLocation() => IsWebSearchResultLocation - ? WebSearchResultLocation! + public global::OpenRouter.AnthropicTextBlockParamCitationsItemsVariant5 PickWebSearchResultLocation() => WebSearchResultLocation is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'WebSearchResultLocation' but the value was {ToString()}."); /// /// @@ -380,25 +380,25 @@ public bool Validate() Validate(); } - if (IsCharLocation && charLocation != null) + if (CharLocation is { } __value0 && charLocation != null) { - return charLocation(CharLocation!); + return charLocation(__value0); } - else if (IsContentBlockLocation && contentBlockLocation != null) + else if (ContentBlockLocation is { } __value1 && contentBlockLocation != null) { - return contentBlockLocation(ContentBlockLocation!); + return contentBlockLocation(__value1); } - else if (IsPageLocation && pageLocation != null) + else if (PageLocation is { } __value2 && pageLocation != null) { - return pageLocation(PageLocation!); + return pageLocation(__value2); } - else if (IsSearchResultLocation && searchResultLocation != null) + else if (SearchResultLocation is { } __value3 && searchResultLocation != null) { - return searchResultLocation(SearchResultLocation!); + return searchResultLocation(__value3); } - else if (IsWebSearchResultLocation && webSearchResultLocation != null) + else if (WebSearchResultLocation is { } __value4 && webSearchResultLocation != null) { - return webSearchResultLocation(WebSearchResultLocation!); + return webSearchResultLocation(__value4); } return default(TResult); @@ -424,25 +424,25 @@ public void Match( Validate(); } - if (IsCharLocation) + if (CharLocation is { } __value0) { - charLocation?.Invoke(CharLocation!); + charLocation?.Invoke(__value0); } - else if (IsContentBlockLocation) + else if (ContentBlockLocation is { } __value1) { - contentBlockLocation?.Invoke(ContentBlockLocation!); + contentBlockLocation?.Invoke(__value1); } - else if (IsPageLocation) + else if (PageLocation is { } __value2) { - pageLocation?.Invoke(PageLocation!); + pageLocation?.Invoke(__value2); } - else if (IsSearchResultLocation) + else if (SearchResultLocation is { } __value3) { - searchResultLocation?.Invoke(SearchResultLocation!); + searchResultLocation?.Invoke(__value3); } - else if (IsWebSearchResultLocation) + else if (WebSearchResultLocation is { } __value4) { - webSearchResultLocation?.Invoke(WebSearchResultLocation!); + webSearchResultLocation?.Invoke(__value4); } } @@ -462,25 +462,25 @@ public void Switch( Validate(); } - if (IsCharLocation) + if (CharLocation is { } __value0) { - charLocation?.Invoke(CharLocation!); + charLocation?.Invoke(__value0); } - else if (IsContentBlockLocation) + else if (ContentBlockLocation is { } __value1) { - contentBlockLocation?.Invoke(ContentBlockLocation!); + contentBlockLocation?.Invoke(__value1); } - else if (IsPageLocation) + else if (PageLocation is { } __value2) { - pageLocation?.Invoke(PageLocation!); + pageLocation?.Invoke(__value2); } - else if (IsSearchResultLocation) + else if (SearchResultLocation is { } __value3) { - searchResultLocation?.Invoke(SearchResultLocation!); + searchResultLocation?.Invoke(__value3); } - else if (IsWebSearchResultLocation) + else if (WebSearchResultLocation is { } __value4) { - webSearchResultLocation?.Invoke(WebSearchResultLocation!); + webSearchResultLocation?.Invoke(__value4); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.AnthropicTextCitation.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.AnthropicTextCitation.g.cs index 09019467..085710b6 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.AnthropicTextCitation.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.AnthropicTextCitation.g.cs @@ -47,8 +47,8 @@ public bool TryPickCharLocation( /// /// /// - public global::OpenRouter.AnthropicTextCitationVariant1 PickCharLocation() => IsCharLocation - ? CharLocation! + public global::OpenRouter.AnthropicTextCitationVariant1 PickCharLocation() => CharLocation is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'CharLocation' but the value was {ToString()}."); /// @@ -84,8 +84,8 @@ public bool TryPickContentBlockLocation( /// /// /// - public global::OpenRouter.AnthropicTextCitationVariant2 PickContentBlockLocation() => IsContentBlockLocation - ? ContentBlockLocation! + public global::OpenRouter.AnthropicTextCitationVariant2 PickContentBlockLocation() => ContentBlockLocation is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ContentBlockLocation' but the value was {ToString()}."); /// @@ -121,8 +121,8 @@ public bool TryPickPageLocation( /// /// /// - public global::OpenRouter.AnthropicTextCitationVariant3 PickPageLocation() => IsPageLocation - ? PageLocation! + public global::OpenRouter.AnthropicTextCitationVariant3 PickPageLocation() => PageLocation is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'PageLocation' but the value was {ToString()}."); /// @@ -158,8 +158,8 @@ public bool TryPickSearchResultLocation( /// /// /// - public global::OpenRouter.AnthropicTextCitationVariant4 PickSearchResultLocation() => IsSearchResultLocation - ? SearchResultLocation! + public global::OpenRouter.AnthropicTextCitationVariant4 PickSearchResultLocation() => SearchResultLocation is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'SearchResultLocation' but the value was {ToString()}."); /// @@ -195,8 +195,8 @@ public bool TryPickWebSearchResultLocation( /// /// /// - public global::OpenRouter.AnthropicTextCitationVariant5 PickWebSearchResultLocation() => IsWebSearchResultLocation - ? WebSearchResultLocation! + public global::OpenRouter.AnthropicTextCitationVariant5 PickWebSearchResultLocation() => WebSearchResultLocation is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'WebSearchResultLocation' but the value was {ToString()}."); /// /// @@ -380,25 +380,25 @@ public bool Validate() Validate(); } - if (IsCharLocation && charLocation != null) + if (CharLocation is { } __value0 && charLocation != null) { - return charLocation(CharLocation!); + return charLocation(__value0); } - else if (IsContentBlockLocation && contentBlockLocation != null) + else if (ContentBlockLocation is { } __value1 && contentBlockLocation != null) { - return contentBlockLocation(ContentBlockLocation!); + return contentBlockLocation(__value1); } - else if (IsPageLocation && pageLocation != null) + else if (PageLocation is { } __value2 && pageLocation != null) { - return pageLocation(PageLocation!); + return pageLocation(__value2); } - else if (IsSearchResultLocation && searchResultLocation != null) + else if (SearchResultLocation is { } __value3 && searchResultLocation != null) { - return searchResultLocation(SearchResultLocation!); + return searchResultLocation(__value3); } - else if (IsWebSearchResultLocation && webSearchResultLocation != null) + else if (WebSearchResultLocation is { } __value4 && webSearchResultLocation != null) { - return webSearchResultLocation(WebSearchResultLocation!); + return webSearchResultLocation(__value4); } return default(TResult); @@ -424,25 +424,25 @@ public void Match( Validate(); } - if (IsCharLocation) + if (CharLocation is { } __value0) { - charLocation?.Invoke(CharLocation!); + charLocation?.Invoke(__value0); } - else if (IsContentBlockLocation) + else if (ContentBlockLocation is { } __value1) { - contentBlockLocation?.Invoke(ContentBlockLocation!); + contentBlockLocation?.Invoke(__value1); } - else if (IsPageLocation) + else if (PageLocation is { } __value2) { - pageLocation?.Invoke(PageLocation!); + pageLocation?.Invoke(__value2); } - else if (IsSearchResultLocation) + else if (SearchResultLocation is { } __value3) { - searchResultLocation?.Invoke(SearchResultLocation!); + searchResultLocation?.Invoke(__value3); } - else if (IsWebSearchResultLocation) + else if (WebSearchResultLocation is { } __value4) { - webSearchResultLocation?.Invoke(WebSearchResultLocation!); + webSearchResultLocation?.Invoke(__value4); } } @@ -462,25 +462,25 @@ public void Switch( Validate(); } - if (IsCharLocation) + if (CharLocation is { } __value0) { - charLocation?.Invoke(CharLocation!); + charLocation?.Invoke(__value0); } - else if (IsContentBlockLocation) + else if (ContentBlockLocation is { } __value1) { - contentBlockLocation?.Invoke(ContentBlockLocation!); + contentBlockLocation?.Invoke(__value1); } - else if (IsPageLocation) + else if (PageLocation is { } __value2) { - pageLocation?.Invoke(PageLocation!); + pageLocation?.Invoke(__value2); } - else if (IsSearchResultLocation) + else if (SearchResultLocation is { } __value3) { - searchResultLocation?.Invoke(SearchResultLocation!); + searchResultLocation?.Invoke(__value3); } - else if (IsWebSearchResultLocation) + else if (WebSearchResultLocation is { } __value4) { - webSearchResultLocation?.Invoke(WebSearchResultLocation!); + webSearchResultLocation?.Invoke(__value4); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.AnthropicTextEditorCodeExecutionContent.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.AnthropicTextEditorCodeExecutionContent.g.cs index 769995a4..2573936c 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.AnthropicTextEditorCodeExecutionContent.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.AnthropicTextEditorCodeExecutionContent.g.cs @@ -47,8 +47,8 @@ public bool TryPickTextEditorCodeExecutionCreateResult( /// /// /// - public global::OpenRouter.AnthropicTextEditorCodeExecutionContentVariant1 PickTextEditorCodeExecutionCreateResult() => IsTextEditorCodeExecutionCreateResult - ? TextEditorCodeExecutionCreateResult! + public global::OpenRouter.AnthropicTextEditorCodeExecutionContentVariant1 PickTextEditorCodeExecutionCreateResult() => TextEditorCodeExecutionCreateResult is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'TextEditorCodeExecutionCreateResult' but the value was {ToString()}."); /// @@ -84,8 +84,8 @@ public bool TryPickTextEditorCodeExecutionStrReplaceResult( /// /// /// - public global::OpenRouter.AnthropicTextEditorCodeExecutionContentVariant2 PickTextEditorCodeExecutionStrReplaceResult() => IsTextEditorCodeExecutionStrReplaceResult - ? TextEditorCodeExecutionStrReplaceResult! + public global::OpenRouter.AnthropicTextEditorCodeExecutionContentVariant2 PickTextEditorCodeExecutionStrReplaceResult() => TextEditorCodeExecutionStrReplaceResult is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'TextEditorCodeExecutionStrReplaceResult' but the value was {ToString()}."); /// @@ -121,8 +121,8 @@ public bool TryPickTextEditorCodeExecutionToolResultError( /// /// /// - public global::OpenRouter.AnthropicTextEditorCodeExecutionContentVariant3 PickTextEditorCodeExecutionToolResultError() => IsTextEditorCodeExecutionToolResultError - ? TextEditorCodeExecutionToolResultError! + public global::OpenRouter.AnthropicTextEditorCodeExecutionContentVariant3 PickTextEditorCodeExecutionToolResultError() => TextEditorCodeExecutionToolResultError is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'TextEditorCodeExecutionToolResultError' but the value was {ToString()}."); /// @@ -158,8 +158,8 @@ public bool TryPickTextEditorCodeExecutionViewResult( /// /// /// - public global::OpenRouter.AnthropicTextEditorCodeExecutionContentVariant4 PickTextEditorCodeExecutionViewResult() => IsTextEditorCodeExecutionViewResult - ? TextEditorCodeExecutionViewResult! + public global::OpenRouter.AnthropicTextEditorCodeExecutionContentVariant4 PickTextEditorCodeExecutionViewResult() => TextEditorCodeExecutionViewResult is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'TextEditorCodeExecutionViewResult' but the value was {ToString()}."); /// /// @@ -315,21 +315,21 @@ public bool Validate() Validate(); } - if (IsTextEditorCodeExecutionCreateResult && textEditorCodeExecutionCreateResult != null) + if (TextEditorCodeExecutionCreateResult is { } __value0 && textEditorCodeExecutionCreateResult != null) { - return textEditorCodeExecutionCreateResult(TextEditorCodeExecutionCreateResult!); + return textEditorCodeExecutionCreateResult(__value0); } - else if (IsTextEditorCodeExecutionStrReplaceResult && textEditorCodeExecutionStrReplaceResult != null) + else if (TextEditorCodeExecutionStrReplaceResult is { } __value1 && textEditorCodeExecutionStrReplaceResult != null) { - return textEditorCodeExecutionStrReplaceResult(TextEditorCodeExecutionStrReplaceResult!); + return textEditorCodeExecutionStrReplaceResult(__value1); } - else if (IsTextEditorCodeExecutionToolResultError && textEditorCodeExecutionToolResultError != null) + else if (TextEditorCodeExecutionToolResultError is { } __value2 && textEditorCodeExecutionToolResultError != null) { - return textEditorCodeExecutionToolResultError(TextEditorCodeExecutionToolResultError!); + return textEditorCodeExecutionToolResultError(__value2); } - else if (IsTextEditorCodeExecutionViewResult && textEditorCodeExecutionViewResult != null) + else if (TextEditorCodeExecutionViewResult is { } __value3 && textEditorCodeExecutionViewResult != null) { - return textEditorCodeExecutionViewResult(TextEditorCodeExecutionViewResult!); + return textEditorCodeExecutionViewResult(__value3); } return default(TResult); @@ -353,21 +353,21 @@ public void Match( Validate(); } - if (IsTextEditorCodeExecutionCreateResult) + if (TextEditorCodeExecutionCreateResult is { } __value0) { - textEditorCodeExecutionCreateResult?.Invoke(TextEditorCodeExecutionCreateResult!); + textEditorCodeExecutionCreateResult?.Invoke(__value0); } - else if (IsTextEditorCodeExecutionStrReplaceResult) + else if (TextEditorCodeExecutionStrReplaceResult is { } __value1) { - textEditorCodeExecutionStrReplaceResult?.Invoke(TextEditorCodeExecutionStrReplaceResult!); + textEditorCodeExecutionStrReplaceResult?.Invoke(__value1); } - else if (IsTextEditorCodeExecutionToolResultError) + else if (TextEditorCodeExecutionToolResultError is { } __value2) { - textEditorCodeExecutionToolResultError?.Invoke(TextEditorCodeExecutionToolResultError!); + textEditorCodeExecutionToolResultError?.Invoke(__value2); } - else if (IsTextEditorCodeExecutionViewResult) + else if (TextEditorCodeExecutionViewResult is { } __value3) { - textEditorCodeExecutionViewResult?.Invoke(TextEditorCodeExecutionViewResult!); + textEditorCodeExecutionViewResult?.Invoke(__value3); } } @@ -386,21 +386,21 @@ public void Switch( Validate(); } - if (IsTextEditorCodeExecutionCreateResult) + if (TextEditorCodeExecutionCreateResult is { } __value0) { - textEditorCodeExecutionCreateResult?.Invoke(TextEditorCodeExecutionCreateResult!); + textEditorCodeExecutionCreateResult?.Invoke(__value0); } - else if (IsTextEditorCodeExecutionStrReplaceResult) + else if (TextEditorCodeExecutionStrReplaceResult is { } __value1) { - textEditorCodeExecutionStrReplaceResult?.Invoke(TextEditorCodeExecutionStrReplaceResult!); + textEditorCodeExecutionStrReplaceResult?.Invoke(__value1); } - else if (IsTextEditorCodeExecutionToolResultError) + else if (TextEditorCodeExecutionToolResultError is { } __value2) { - textEditorCodeExecutionToolResultError?.Invoke(TextEditorCodeExecutionToolResultError!); + textEditorCodeExecutionToolResultError?.Invoke(__value2); } - else if (IsTextEditorCodeExecutionViewResult) + else if (TextEditorCodeExecutionViewResult is { } __value3) { - textEditorCodeExecutionViewResult?.Invoke(TextEditorCodeExecutionViewResult!); + textEditorCodeExecutionViewResult?.Invoke(__value3); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.AnthropicToolSearchContent.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.AnthropicToolSearchContent.g.cs index 92fdf1f4..19205884 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.AnthropicToolSearchContent.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.AnthropicToolSearchContent.g.cs @@ -47,8 +47,8 @@ public bool TryPickToolSearchToolResultError( /// /// /// - public global::OpenRouter.AnthropicToolSearchContentVariant1 PickToolSearchToolResultError() => IsToolSearchToolResultError - ? ToolSearchToolResultError! + public global::OpenRouter.AnthropicToolSearchContentVariant1 PickToolSearchToolResultError() => ToolSearchToolResultError is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ToolSearchToolResultError' but the value was {ToString()}."); /// @@ -84,8 +84,8 @@ public bool TryPickToolSearchToolSearchResult( /// /// /// - public global::OpenRouter.AnthropicToolSearchContentVariant2 PickToolSearchToolSearchResult() => IsToolSearchToolSearchResult - ? ToolSearchToolSearchResult! + public global::OpenRouter.AnthropicToolSearchContentVariant2 PickToolSearchToolSearchResult() => ToolSearchToolSearchResult is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ToolSearchToolSearchResult' but the value was {ToString()}."); /// /// @@ -185,13 +185,13 @@ public bool Validate() Validate(); } - if (IsToolSearchToolResultError && toolSearchToolResultError != null) + if (ToolSearchToolResultError is { } __value0 && toolSearchToolResultError != null) { - return toolSearchToolResultError(ToolSearchToolResultError!); + return toolSearchToolResultError(__value0); } - else if (IsToolSearchToolSearchResult && toolSearchToolSearchResult != null) + else if (ToolSearchToolSearchResult is { } __value1 && toolSearchToolSearchResult != null) { - return toolSearchToolSearchResult(ToolSearchToolSearchResult!); + return toolSearchToolSearchResult(__value1); } return default(TResult); @@ -211,13 +211,13 @@ public void Match( Validate(); } - if (IsToolSearchToolResultError) + if (ToolSearchToolResultError is { } __value0) { - toolSearchToolResultError?.Invoke(ToolSearchToolResultError!); + toolSearchToolResultError?.Invoke(__value0); } - else if (IsToolSearchToolSearchResult) + else if (ToolSearchToolSearchResult is { } __value1) { - toolSearchToolSearchResult?.Invoke(ToolSearchToolSearchResult!); + toolSearchToolSearchResult?.Invoke(__value1); } } @@ -234,13 +234,13 @@ public void Switch( Validate(); } - if (IsToolSearchToolResultError) + if (ToolSearchToolResultError is { } __value0) { - toolSearchToolResultError?.Invoke(ToolSearchToolResultError!); + toolSearchToolResultError?.Invoke(__value0); } - else if (IsToolSearchToolSearchResult) + else if (ToolSearchToolSearchResult is { } __value1) { - toolSearchToolSearchResult?.Invoke(ToolSearchToolSearchResult!); + toolSearchToolSearchResult?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.AnthropicUsageIteration.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.AnthropicUsageIteration.g.cs index f143ee19..0aaf863c 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.AnthropicUsageIteration.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.AnthropicUsageIteration.g.cs @@ -42,8 +42,8 @@ public bool TryPickAnthropicCompactionUsageIteration( /// /// /// - public global::OpenRouter.AnthropicCompactionUsageIteration PickAnthropicCompactionUsageIteration() => IsAnthropicCompactionUsageIteration - ? AnthropicCompactionUsageIteration! + public global::OpenRouter.AnthropicCompactionUsageIteration PickAnthropicCompactionUsageIteration() => AnthropicCompactionUsageIteration is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'AnthropicCompactionUsageIteration' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickAnthropicMessageUsageIteration( /// /// /// - public global::OpenRouter.AnthropicMessageUsageIteration PickAnthropicMessageUsageIteration() => IsAnthropicMessageUsageIteration - ? AnthropicMessageUsageIteration! + public global::OpenRouter.AnthropicMessageUsageIteration PickAnthropicMessageUsageIteration() => AnthropicMessageUsageIteration is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'AnthropicMessageUsageIteration' but the value was {ToString()}."); /// @@ -116,8 +116,8 @@ public bool TryPickAnthropicAdvisorMessageUsageIteration( /// /// /// - public global::OpenRouter.AnthropicAdvisorMessageUsageIteration PickAnthropicAdvisorMessageUsageIteration() => IsAnthropicAdvisorMessageUsageIteration - ? AnthropicAdvisorMessageUsageIteration! + public global::OpenRouter.AnthropicAdvisorMessageUsageIteration PickAnthropicAdvisorMessageUsageIteration() => AnthropicAdvisorMessageUsageIteration is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'AnthropicAdvisorMessageUsageIteration' but the value was {ToString()}."); /// @@ -153,8 +153,8 @@ public bool TryPickAnthropicUnknownUsageIteration( /// /// /// - public global::OpenRouter.AnthropicUnknownUsageIteration PickAnthropicUnknownUsageIteration() => IsAnthropicUnknownUsageIteration - ? AnthropicUnknownUsageIteration! + public global::OpenRouter.AnthropicUnknownUsageIteration PickAnthropicUnknownUsageIteration() => AnthropicUnknownUsageIteration is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'AnthropicUnknownUsageIteration' but the value was {ToString()}."); /// /// @@ -307,21 +307,21 @@ public bool Validate() Validate(); } - if (IsAnthropicCompactionUsageIteration && anthropicCompactionUsageIteration != null) + if (AnthropicCompactionUsageIteration is { } __value0 && anthropicCompactionUsageIteration != null) { - return anthropicCompactionUsageIteration(AnthropicCompactionUsageIteration!); + return anthropicCompactionUsageIteration(__value0); } - else if (IsAnthropicMessageUsageIteration && anthropicMessageUsageIteration != null) + else if (AnthropicMessageUsageIteration is { } __value1 && anthropicMessageUsageIteration != null) { - return anthropicMessageUsageIteration(AnthropicMessageUsageIteration!); + return anthropicMessageUsageIteration(__value1); } - else if (IsAnthropicAdvisorMessageUsageIteration && anthropicAdvisorMessageUsageIteration != null) + else if (AnthropicAdvisorMessageUsageIteration is { } __value2 && anthropicAdvisorMessageUsageIteration != null) { - return anthropicAdvisorMessageUsageIteration(AnthropicAdvisorMessageUsageIteration!); + return anthropicAdvisorMessageUsageIteration(__value2); } - else if (IsAnthropicUnknownUsageIteration && anthropicUnknownUsageIteration != null) + else if (AnthropicUnknownUsageIteration is { } __value3 && anthropicUnknownUsageIteration != null) { - return anthropicUnknownUsageIteration(AnthropicUnknownUsageIteration!); + return anthropicUnknownUsageIteration(__value3); } return default(TResult); @@ -345,21 +345,21 @@ public void Match( Validate(); } - if (IsAnthropicCompactionUsageIteration) + if (AnthropicCompactionUsageIteration is { } __value0) { - anthropicCompactionUsageIteration?.Invoke(AnthropicCompactionUsageIteration!); + anthropicCompactionUsageIteration?.Invoke(__value0); } - else if (IsAnthropicMessageUsageIteration) + else if (AnthropicMessageUsageIteration is { } __value1) { - anthropicMessageUsageIteration?.Invoke(AnthropicMessageUsageIteration!); + anthropicMessageUsageIteration?.Invoke(__value1); } - else if (IsAnthropicAdvisorMessageUsageIteration) + else if (AnthropicAdvisorMessageUsageIteration is { } __value2) { - anthropicAdvisorMessageUsageIteration?.Invoke(AnthropicAdvisorMessageUsageIteration!); + anthropicAdvisorMessageUsageIteration?.Invoke(__value2); } - else if (IsAnthropicUnknownUsageIteration) + else if (AnthropicUnknownUsageIteration is { } __value3) { - anthropicUnknownUsageIteration?.Invoke(AnthropicUnknownUsageIteration!); + anthropicUnknownUsageIteration?.Invoke(__value3); } } @@ -378,21 +378,21 @@ public void Switch( Validate(); } - if (IsAnthropicCompactionUsageIteration) + if (AnthropicCompactionUsageIteration is { } __value0) { - anthropicCompactionUsageIteration?.Invoke(AnthropicCompactionUsageIteration!); + anthropicCompactionUsageIteration?.Invoke(__value0); } - else if (IsAnthropicMessageUsageIteration) + else if (AnthropicMessageUsageIteration is { } __value1) { - anthropicMessageUsageIteration?.Invoke(AnthropicMessageUsageIteration!); + anthropicMessageUsageIteration?.Invoke(__value1); } - else if (IsAnthropicAdvisorMessageUsageIteration) + else if (AnthropicAdvisorMessageUsageIteration is { } __value2) { - anthropicAdvisorMessageUsageIteration?.Invoke(AnthropicAdvisorMessageUsageIteration!); + anthropicAdvisorMessageUsageIteration?.Invoke(__value2); } - else if (IsAnthropicUnknownUsageIteration) + else if (AnthropicUnknownUsageIteration is { } __value3) { - anthropicUnknownUsageIteration?.Invoke(AnthropicUnknownUsageIteration!); + anthropicUnknownUsageIteration?.Invoke(__value3); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.AnthropicWebFetchContent.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.AnthropicWebFetchContent.g.cs index 32aa4071..1ae4c05a 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.AnthropicWebFetchContent.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.AnthropicWebFetchContent.g.cs @@ -47,8 +47,8 @@ public bool TryPickWebFetchResult( /// /// /// - public global::OpenRouter.AnthropicWebFetchContentVariant1 PickWebFetchResult() => IsWebFetchResult - ? WebFetchResult! + public global::OpenRouter.AnthropicWebFetchContentVariant1 PickWebFetchResult() => WebFetchResult is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'WebFetchResult' but the value was {ToString()}."); /// @@ -84,8 +84,8 @@ public bool TryPickWebFetchToolResultError( /// /// /// - public global::OpenRouter.AnthropicWebFetchContentVariant2 PickWebFetchToolResultError() => IsWebFetchToolResultError - ? WebFetchToolResultError! + public global::OpenRouter.AnthropicWebFetchContentVariant2 PickWebFetchToolResultError() => WebFetchToolResultError is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'WebFetchToolResultError' but the value was {ToString()}."); /// /// @@ -185,13 +185,13 @@ public bool Validate() Validate(); } - if (IsWebFetchResult && webFetchResult != null) + if (WebFetchResult is { } __value0 && webFetchResult != null) { - return webFetchResult(WebFetchResult!); + return webFetchResult(__value0); } - else if (IsWebFetchToolResultError && webFetchToolResultError != null) + else if (WebFetchToolResultError is { } __value1 && webFetchToolResultError != null) { - return webFetchToolResultError(WebFetchToolResultError!); + return webFetchToolResultError(__value1); } return default(TResult); @@ -211,13 +211,13 @@ public void Match( Validate(); } - if (IsWebFetchResult) + if (WebFetchResult is { } __value0) { - webFetchResult?.Invoke(WebFetchResult!); + webFetchResult?.Invoke(__value0); } - else if (IsWebFetchToolResultError) + else if (WebFetchToolResultError is { } __value1) { - webFetchToolResultError?.Invoke(WebFetchToolResultError!); + webFetchToolResultError?.Invoke(__value1); } } @@ -234,13 +234,13 @@ public void Switch( Validate(); } - if (IsWebFetchResult) + if (WebFetchResult is { } __value0) { - webFetchResult?.Invoke(WebFetchResult!); + webFetchResult?.Invoke(__value0); } - else if (IsWebFetchToolResultError) + else if (WebFetchToolResultError is { } __value1) { - webFetchToolResultError?.Invoke(WebFetchToolResultError!); + webFetchToolResultError?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.ApplyPatchCallOperation.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.ApplyPatchCallOperation.g.cs index 38d0d355..8ea5543b 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.ApplyPatchCallOperation.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.ApplyPatchCallOperation.g.cs @@ -47,8 +47,8 @@ public bool TryPickCreateFile( /// /// /// - public global::OpenRouter.ApplyPatchCallOperationVariant1 PickCreateFile() => IsCreateFile - ? CreateFile! + public global::OpenRouter.ApplyPatchCallOperationVariant1 PickCreateFile() => CreateFile is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'CreateFile' but the value was {ToString()}."); /// @@ -84,8 +84,8 @@ public bool TryPickDeleteFile( /// /// /// - public global::OpenRouter.ApplyPatchCallOperationVariant2 PickDeleteFile() => IsDeleteFile - ? DeleteFile! + public global::OpenRouter.ApplyPatchCallOperationVariant2 PickDeleteFile() => DeleteFile is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'DeleteFile' but the value was {ToString()}."); /// @@ -121,8 +121,8 @@ public bool TryPickUpdateFile( /// /// /// - public global::OpenRouter.ApplyPatchCallOperationVariant3 PickUpdateFile() => IsUpdateFile - ? UpdateFile! + public global::OpenRouter.ApplyPatchCallOperationVariant3 PickUpdateFile() => UpdateFile is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'UpdateFile' but the value was {ToString()}."); /// /// @@ -250,17 +250,17 @@ public bool Validate() Validate(); } - if (IsCreateFile && createFile != null) + if (CreateFile is { } __value0 && createFile != null) { - return createFile(CreateFile!); + return createFile(__value0); } - else if (IsDeleteFile && deleteFile != null) + else if (DeleteFile is { } __value1 && deleteFile != null) { - return deleteFile(DeleteFile!); + return deleteFile(__value1); } - else if (IsUpdateFile && updateFile != null) + else if (UpdateFile is { } __value2 && updateFile != null) { - return updateFile(UpdateFile!); + return updateFile(__value2); } return default(TResult); @@ -282,17 +282,17 @@ public void Match( Validate(); } - if (IsCreateFile) + if (CreateFile is { } __value0) { - createFile?.Invoke(CreateFile!); + createFile?.Invoke(__value0); } - else if (IsDeleteFile) + else if (DeleteFile is { } __value1) { - deleteFile?.Invoke(DeleteFile!); + deleteFile?.Invoke(__value1); } - else if (IsUpdateFile) + else if (UpdateFile is { } __value2) { - updateFile?.Invoke(UpdateFile!); + updateFile?.Invoke(__value2); } } @@ -310,17 +310,17 @@ public void Switch( Validate(); } - if (IsCreateFile) + if (CreateFile is { } __value0) { - createFile?.Invoke(CreateFile!); + createFile?.Invoke(__value0); } - else if (IsDeleteFile) + else if (DeleteFile is { } __value1) { - deleteFile?.Invoke(DeleteFile!); + deleteFile?.Invoke(__value1); } - else if (IsUpdateFile) + else if (UpdateFile is { } __value2) { - updateFile?.Invoke(UpdateFile!); + updateFile?.Invoke(__value2); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.BaseInputs.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.BaseInputs.g.cs index 9d7f864f..9b97a056 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.BaseInputs.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.BaseInputs.g.cs @@ -42,8 +42,8 @@ public bool TryPickBaseInputsVariant1( /// /// /// - public string PickBaseInputsVariant1() => IsBaseInputsVariant1 - ? BaseInputsVariant1! + public string PickBaseInputsVariant1() => BaseInputsVariant1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'BaseInputsVariant1' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickBaseInputs1( /// /// /// - public global::System.Collections.Generic.IList PickBaseInputs1() => IsBaseInputs1 - ? BaseInputs1! + public global::System.Collections.Generic.IList PickBaseInputs1() => BaseInputs1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'BaseInputs1' but the value was {ToString()}."); /// /// @@ -154,13 +154,13 @@ public bool Validate() Validate(); } - if (IsBaseInputsVariant1 && baseInputsVariant1 != null) + if (BaseInputsVariant1 is { } __value0 && baseInputsVariant1 != null) { - return baseInputsVariant1(BaseInputsVariant1!); + return baseInputsVariant1(__value0); } - else if (IsBaseInputs1 && baseInputs1 != null) + else if (BaseInputs1 is { } __value1 && baseInputs1 != null) { - return baseInputs1(BaseInputs1!); + return baseInputs1(__value1); } return default(TResult); @@ -180,13 +180,13 @@ public void Match( Validate(); } - if (IsBaseInputsVariant1) + if (BaseInputsVariant1 is { } __value0) { - baseInputsVariant1?.Invoke(BaseInputsVariant1!); + baseInputsVariant1?.Invoke(__value0); } - else if (IsBaseInputs1) + else if (BaseInputs1 is { } __value1) { - baseInputs1?.Invoke(BaseInputs1!); + baseInputs1?.Invoke(__value1); } } @@ -203,13 +203,13 @@ public void Switch( Validate(); } - if (IsBaseInputsVariant1) + if (BaseInputsVariant1 is { } __value0) { - baseInputsVariant1?.Invoke(BaseInputsVariant1!); + baseInputsVariant1?.Invoke(__value0); } - else if (IsBaseInputs1) + else if (BaseInputs1 is { } __value1) { - baseInputs1?.Invoke(BaseInputs1!); + baseInputs1?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.BaseInputsOneOf1Items.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.BaseInputsOneOf1Items.g.cs index ff9f7091..3d99db51 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.BaseInputsOneOf1Items.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.BaseInputsOneOf1Items.g.cs @@ -42,8 +42,8 @@ public bool TryPickBaseInputsOneOf1Items0( /// /// /// - public global::OpenRouter.BaseInputsOneOf1Items0 PickBaseInputsOneOf1Items0() => IsBaseInputsOneOf1Items0 - ? BaseInputsOneOf1Items0! + public global::OpenRouter.BaseInputsOneOf1Items0 PickBaseInputsOneOf1Items0() => BaseInputsOneOf1Items0 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'BaseInputsOneOf1Items0' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickOpenAIResponseInputMessageItem( /// /// /// - public global::OpenRouter.OpenAIResponseInputMessageItem PickOpenAIResponseInputMessageItem() => IsOpenAIResponseInputMessageItem - ? OpenAIResponseInputMessageItem! + public global::OpenRouter.OpenAIResponseInputMessageItem PickOpenAIResponseInputMessageItem() => OpenAIResponseInputMessageItem is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OpenAIResponseInputMessageItem' but the value was {ToString()}."); /// @@ -116,8 +116,8 @@ public bool TryPickOpenAIResponseFunctionToolCallOutput( /// /// /// - public global::OpenRouter.OpenAIResponseFunctionToolCallOutput PickOpenAIResponseFunctionToolCallOutput() => IsOpenAIResponseFunctionToolCallOutput - ? OpenAIResponseFunctionToolCallOutput! + public global::OpenRouter.OpenAIResponseFunctionToolCallOutput PickOpenAIResponseFunctionToolCallOutput() => OpenAIResponseFunctionToolCallOutput is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OpenAIResponseFunctionToolCallOutput' but the value was {ToString()}."); /// @@ -153,8 +153,8 @@ public bool TryPickOpenAIResponseFunctionToolCall( /// /// /// - public global::OpenRouter.OpenAIResponseFunctionToolCall PickOpenAIResponseFunctionToolCall() => IsOpenAIResponseFunctionToolCall - ? OpenAIResponseFunctionToolCall! + public global::OpenRouter.OpenAIResponseFunctionToolCall PickOpenAIResponseFunctionToolCall() => OpenAIResponseFunctionToolCall is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OpenAIResponseFunctionToolCall' but the value was {ToString()}."); /// @@ -190,8 +190,8 @@ public bool TryPickOutputItemImageGenerationCall( /// /// /// - public global::OpenRouter.OutputItemImageGenerationCall PickOutputItemImageGenerationCall() => IsOutputItemImageGenerationCall - ? OutputItemImageGenerationCall! + public global::OpenRouter.OutputItemImageGenerationCall PickOutputItemImageGenerationCall() => OutputItemImageGenerationCall is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OutputItemImageGenerationCall' but the value was {ToString()}."); /// @@ -227,8 +227,8 @@ public bool TryPickOutputMessage( /// /// /// - public global::OpenRouter.OutputMessage PickOutputMessage() => IsOutputMessage - ? OutputMessage! + public global::OpenRouter.OutputMessage PickOutputMessage() => OutputMessage is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OutputMessage' but the value was {ToString()}."); /// @@ -264,8 +264,8 @@ public bool TryPickOpenAIResponseCustomToolCall( /// /// /// - public global::OpenRouter.OpenAIResponseCustomToolCall PickOpenAIResponseCustomToolCall() => IsOpenAIResponseCustomToolCall - ? OpenAIResponseCustomToolCall! + public global::OpenRouter.OpenAIResponseCustomToolCall PickOpenAIResponseCustomToolCall() => OpenAIResponseCustomToolCall is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OpenAIResponseCustomToolCall' but the value was {ToString()}."); /// @@ -301,8 +301,8 @@ public bool TryPickOpenAIResponseCustomToolCallOutput( /// /// /// - public global::OpenRouter.OpenAIResponseCustomToolCallOutput PickOpenAIResponseCustomToolCallOutput() => IsOpenAIResponseCustomToolCallOutput - ? OpenAIResponseCustomToolCallOutput! + public global::OpenRouter.OpenAIResponseCustomToolCallOutput PickOpenAIResponseCustomToolCallOutput() => OpenAIResponseCustomToolCallOutput is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OpenAIResponseCustomToolCallOutput' but the value was {ToString()}."); /// @@ -338,8 +338,8 @@ public bool TryPickApplyPatchCallItem( /// /// /// - public global::OpenRouter.ApplyPatchCallItem PickApplyPatchCallItem() => IsApplyPatchCallItem - ? ApplyPatchCallItem! + public global::OpenRouter.ApplyPatchCallItem PickApplyPatchCallItem() => ApplyPatchCallItem is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ApplyPatchCallItem' but the value was {ToString()}."); /// @@ -375,8 +375,8 @@ public bool TryPickApplyPatchCallOutputItem( /// /// /// - public global::OpenRouter.ApplyPatchCallOutputItem PickApplyPatchCallOutputItem() => IsApplyPatchCallOutputItem - ? ApplyPatchCallOutputItem! + public global::OpenRouter.ApplyPatchCallOutputItem PickApplyPatchCallOutputItem() => ApplyPatchCallOutputItem is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ApplyPatchCallOutputItem' but the value was {ToString()}."); /// /// @@ -697,45 +697,45 @@ public bool Validate() Validate(); } - if (IsBaseInputsOneOf1Items0 && baseInputsOneOf1Items0 != null) + if (BaseInputsOneOf1Items0 is { } __value0 && baseInputsOneOf1Items0 != null) { - return baseInputsOneOf1Items0(BaseInputsOneOf1Items0!); + return baseInputsOneOf1Items0(__value0); } - else if (IsOpenAIResponseInputMessageItem && openAIResponseInputMessageItem != null) + else if (OpenAIResponseInputMessageItem is { } __value1 && openAIResponseInputMessageItem != null) { - return openAIResponseInputMessageItem(OpenAIResponseInputMessageItem!); + return openAIResponseInputMessageItem(__value1); } - else if (IsOpenAIResponseFunctionToolCallOutput && openAIResponseFunctionToolCallOutput != null) + else if (OpenAIResponseFunctionToolCallOutput is { } __value2 && openAIResponseFunctionToolCallOutput != null) { - return openAIResponseFunctionToolCallOutput(OpenAIResponseFunctionToolCallOutput!); + return openAIResponseFunctionToolCallOutput(__value2); } - else if (IsOpenAIResponseFunctionToolCall && openAIResponseFunctionToolCall != null) + else if (OpenAIResponseFunctionToolCall is { } __value3 && openAIResponseFunctionToolCall != null) { - return openAIResponseFunctionToolCall(OpenAIResponseFunctionToolCall!); + return openAIResponseFunctionToolCall(__value3); } - else if (IsOutputItemImageGenerationCall && outputItemImageGenerationCall != null) + else if (OutputItemImageGenerationCall is { } __value4 && outputItemImageGenerationCall != null) { - return outputItemImageGenerationCall(OutputItemImageGenerationCall!); + return outputItemImageGenerationCall(__value4); } - else if (IsOutputMessage && outputMessage != null) + else if (OutputMessage is { } __value5 && outputMessage != null) { - return outputMessage(OutputMessage!); + return outputMessage(__value5); } - else if (IsOpenAIResponseCustomToolCall && openAIResponseCustomToolCall != null) + else if (OpenAIResponseCustomToolCall is { } __value6 && openAIResponseCustomToolCall != null) { - return openAIResponseCustomToolCall(OpenAIResponseCustomToolCall!); + return openAIResponseCustomToolCall(__value6); } - else if (IsOpenAIResponseCustomToolCallOutput && openAIResponseCustomToolCallOutput != null) + else if (OpenAIResponseCustomToolCallOutput is { } __value7 && openAIResponseCustomToolCallOutput != null) { - return openAIResponseCustomToolCallOutput(OpenAIResponseCustomToolCallOutput!); + return openAIResponseCustomToolCallOutput(__value7); } - else if (IsApplyPatchCallItem && applyPatchCallItem != null) + else if (ApplyPatchCallItem is { } __value8 && applyPatchCallItem != null) { - return applyPatchCallItem(ApplyPatchCallItem!); + return applyPatchCallItem(__value8); } - else if (IsApplyPatchCallOutputItem && applyPatchCallOutputItem != null) + else if (ApplyPatchCallOutputItem is { } __value9 && applyPatchCallOutputItem != null) { - return applyPatchCallOutputItem(ApplyPatchCallOutputItem!); + return applyPatchCallOutputItem(__value9); } return default(TResult); @@ -771,45 +771,45 @@ public void Match( Validate(); } - if (IsBaseInputsOneOf1Items0) + if (BaseInputsOneOf1Items0 is { } __value0) { - baseInputsOneOf1Items0?.Invoke(BaseInputsOneOf1Items0!); + baseInputsOneOf1Items0?.Invoke(__value0); } - else if (IsOpenAIResponseInputMessageItem) + else if (OpenAIResponseInputMessageItem is { } __value1) { - openAIResponseInputMessageItem?.Invoke(OpenAIResponseInputMessageItem!); + openAIResponseInputMessageItem?.Invoke(__value1); } - else if (IsOpenAIResponseFunctionToolCallOutput) + else if (OpenAIResponseFunctionToolCallOutput is { } __value2) { - openAIResponseFunctionToolCallOutput?.Invoke(OpenAIResponseFunctionToolCallOutput!); + openAIResponseFunctionToolCallOutput?.Invoke(__value2); } - else if (IsOpenAIResponseFunctionToolCall) + else if (OpenAIResponseFunctionToolCall is { } __value3) { - openAIResponseFunctionToolCall?.Invoke(OpenAIResponseFunctionToolCall!); + openAIResponseFunctionToolCall?.Invoke(__value3); } - else if (IsOutputItemImageGenerationCall) + else if (OutputItemImageGenerationCall is { } __value4) { - outputItemImageGenerationCall?.Invoke(OutputItemImageGenerationCall!); + outputItemImageGenerationCall?.Invoke(__value4); } - else if (IsOutputMessage) + else if (OutputMessage is { } __value5) { - outputMessage?.Invoke(OutputMessage!); + outputMessage?.Invoke(__value5); } - else if (IsOpenAIResponseCustomToolCall) + else if (OpenAIResponseCustomToolCall is { } __value6) { - openAIResponseCustomToolCall?.Invoke(OpenAIResponseCustomToolCall!); + openAIResponseCustomToolCall?.Invoke(__value6); } - else if (IsOpenAIResponseCustomToolCallOutput) + else if (OpenAIResponseCustomToolCallOutput is { } __value7) { - openAIResponseCustomToolCallOutput?.Invoke(OpenAIResponseCustomToolCallOutput!); + openAIResponseCustomToolCallOutput?.Invoke(__value7); } - else if (IsApplyPatchCallItem) + else if (ApplyPatchCallItem is { } __value8) { - applyPatchCallItem?.Invoke(ApplyPatchCallItem!); + applyPatchCallItem?.Invoke(__value8); } - else if (IsApplyPatchCallOutputItem) + else if (ApplyPatchCallOutputItem is { } __value9) { - applyPatchCallOutputItem?.Invoke(ApplyPatchCallOutputItem!); + applyPatchCallOutputItem?.Invoke(__value9); } } @@ -834,45 +834,45 @@ public void Switch( Validate(); } - if (IsBaseInputsOneOf1Items0) + if (BaseInputsOneOf1Items0 is { } __value0) { - baseInputsOneOf1Items0?.Invoke(BaseInputsOneOf1Items0!); + baseInputsOneOf1Items0?.Invoke(__value0); } - else if (IsOpenAIResponseInputMessageItem) + else if (OpenAIResponseInputMessageItem is { } __value1) { - openAIResponseInputMessageItem?.Invoke(OpenAIResponseInputMessageItem!); + openAIResponseInputMessageItem?.Invoke(__value1); } - else if (IsOpenAIResponseFunctionToolCallOutput) + else if (OpenAIResponseFunctionToolCallOutput is { } __value2) { - openAIResponseFunctionToolCallOutput?.Invoke(OpenAIResponseFunctionToolCallOutput!); + openAIResponseFunctionToolCallOutput?.Invoke(__value2); } - else if (IsOpenAIResponseFunctionToolCall) + else if (OpenAIResponseFunctionToolCall is { } __value3) { - openAIResponseFunctionToolCall?.Invoke(OpenAIResponseFunctionToolCall!); + openAIResponseFunctionToolCall?.Invoke(__value3); } - else if (IsOutputItemImageGenerationCall) + else if (OutputItemImageGenerationCall is { } __value4) { - outputItemImageGenerationCall?.Invoke(OutputItemImageGenerationCall!); + outputItemImageGenerationCall?.Invoke(__value4); } - else if (IsOutputMessage) + else if (OutputMessage is { } __value5) { - outputMessage?.Invoke(OutputMessage!); + outputMessage?.Invoke(__value5); } - else if (IsOpenAIResponseCustomToolCall) + else if (OpenAIResponseCustomToolCall is { } __value6) { - openAIResponseCustomToolCall?.Invoke(OpenAIResponseCustomToolCall!); + openAIResponseCustomToolCall?.Invoke(__value6); } - else if (IsOpenAIResponseCustomToolCallOutput) + else if (OpenAIResponseCustomToolCallOutput is { } __value7) { - openAIResponseCustomToolCallOutput?.Invoke(OpenAIResponseCustomToolCallOutput!); + openAIResponseCustomToolCallOutput?.Invoke(__value7); } - else if (IsApplyPatchCallItem) + else if (ApplyPatchCallItem is { } __value8) { - applyPatchCallItem?.Invoke(ApplyPatchCallItem!); + applyPatchCallItem?.Invoke(__value8); } - else if (IsApplyPatchCallOutputItem) + else if (ApplyPatchCallOutputItem is { } __value9) { - applyPatchCallOutputItem?.Invoke(ApplyPatchCallOutputItem!); + applyPatchCallOutputItem?.Invoke(__value9); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.BaseInputsOneOf1ItemsOneOf0Content.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.BaseInputsOneOf1ItemsOneOf0Content.g.cs index 52df0536..167c4fa4 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.BaseInputsOneOf1ItemsOneOf0Content.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.BaseInputsOneOf1ItemsOneOf0Content.g.cs @@ -42,8 +42,8 @@ public bool TryPickBaseInputsOneOf1ItemsOneOf0Content0( /// /// /// - public global::System.Collections.Generic.IList PickBaseInputsOneOf1ItemsOneOf0Content0() => IsBaseInputsOneOf1ItemsOneOf0Content0 - ? BaseInputsOneOf1ItemsOneOf0Content0! + public global::System.Collections.Generic.IList PickBaseInputsOneOf1ItemsOneOf0Content0() => BaseInputsOneOf1ItemsOneOf0Content0 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'BaseInputsOneOf1ItemsOneOf0Content0' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickBaseInputsOneOf1ItemsOneOf0ContentVariant2( /// /// /// - public string PickBaseInputsOneOf1ItemsOneOf0ContentVariant2() => IsBaseInputsOneOf1ItemsOneOf0ContentVariant2 - ? BaseInputsOneOf1ItemsOneOf0ContentVariant2! + public string PickBaseInputsOneOf1ItemsOneOf0ContentVariant2() => BaseInputsOneOf1ItemsOneOf0ContentVariant2 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'BaseInputsOneOf1ItemsOneOf0ContentVariant2' but the value was {ToString()}."); /// /// @@ -154,13 +154,13 @@ public bool Validate() Validate(); } - if (IsBaseInputsOneOf1ItemsOneOf0Content0 && baseInputsOneOf1ItemsOneOf0Content0 != null) + if (BaseInputsOneOf1ItemsOneOf0Content0 is { } __value0 && baseInputsOneOf1ItemsOneOf0Content0 != null) { - return baseInputsOneOf1ItemsOneOf0Content0(BaseInputsOneOf1ItemsOneOf0Content0!); + return baseInputsOneOf1ItemsOneOf0Content0(__value0); } - else if (IsBaseInputsOneOf1ItemsOneOf0ContentVariant2 && baseInputsOneOf1ItemsOneOf0ContentVariant2 != null) + else if (BaseInputsOneOf1ItemsOneOf0ContentVariant2 is { } __value1 && baseInputsOneOf1ItemsOneOf0ContentVariant2 != null) { - return baseInputsOneOf1ItemsOneOf0ContentVariant2(BaseInputsOneOf1ItemsOneOf0ContentVariant2!); + return baseInputsOneOf1ItemsOneOf0ContentVariant2(__value1); } return default(TResult); @@ -180,13 +180,13 @@ public void Match( Validate(); } - if (IsBaseInputsOneOf1ItemsOneOf0Content0) + if (BaseInputsOneOf1ItemsOneOf0Content0 is { } __value0) { - baseInputsOneOf1ItemsOneOf0Content0?.Invoke(BaseInputsOneOf1ItemsOneOf0Content0!); + baseInputsOneOf1ItemsOneOf0Content0?.Invoke(__value0); } - else if (IsBaseInputsOneOf1ItemsOneOf0ContentVariant2) + else if (BaseInputsOneOf1ItemsOneOf0ContentVariant2 is { } __value1) { - baseInputsOneOf1ItemsOneOf0ContentVariant2?.Invoke(BaseInputsOneOf1ItemsOneOf0ContentVariant2!); + baseInputsOneOf1ItemsOneOf0ContentVariant2?.Invoke(__value1); } } @@ -203,13 +203,13 @@ public void Switch( Validate(); } - if (IsBaseInputsOneOf1ItemsOneOf0Content0) + if (BaseInputsOneOf1ItemsOneOf0Content0 is { } __value0) { - baseInputsOneOf1ItemsOneOf0Content0?.Invoke(BaseInputsOneOf1ItemsOneOf0Content0!); + baseInputsOneOf1ItemsOneOf0Content0?.Invoke(__value0); } - else if (IsBaseInputsOneOf1ItemsOneOf0ContentVariant2) + else if (BaseInputsOneOf1ItemsOneOf0ContentVariant2 is { } __value1) { - baseInputsOneOf1ItemsOneOf0ContentVariant2?.Invoke(BaseInputsOneOf1ItemsOneOf0ContentVariant2!); + baseInputsOneOf1ItemsOneOf0ContentVariant2?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.BaseInputsOneOf1ItemsOneOf0ContentOneOf0Items.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.BaseInputsOneOf1ItemsOneOf0ContentOneOf0Items.g.cs index 0ec2d15c..280c6132 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.BaseInputsOneOf1ItemsOneOf0ContentOneOf0Items.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.BaseInputsOneOf1ItemsOneOf0ContentOneOf0Items.g.cs @@ -47,8 +47,8 @@ public bool TryPickInputAudio( /// /// /// - public global::OpenRouter.BaseInputsOneOf1ItemsOneOf0ContentOneOf0ItemsVariant1 PickInputAudio() => IsInputAudio - ? InputAudio! + public global::OpenRouter.BaseInputsOneOf1ItemsOneOf0ContentOneOf0ItemsVariant1 PickInputAudio() => InputAudio is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'InputAudio' but the value was {ToString()}."); /// @@ -84,8 +84,8 @@ public bool TryPickInputFile( /// /// /// - public global::OpenRouter.BaseInputsOneOf1ItemsOneOf0ContentOneOf0ItemsVariant2 PickInputFile() => IsInputFile - ? InputFile! + public global::OpenRouter.BaseInputsOneOf1ItemsOneOf0ContentOneOf0ItemsVariant2 PickInputFile() => InputFile is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'InputFile' but the value was {ToString()}."); /// @@ -121,8 +121,8 @@ public bool TryPickInputImage( /// /// /// - public global::OpenRouter.BaseInputsOneOf1ItemsOneOf0ContentOneOf0ItemsVariant3 PickInputImage() => IsInputImage - ? InputImage! + public global::OpenRouter.BaseInputsOneOf1ItemsOneOf0ContentOneOf0ItemsVariant3 PickInputImage() => InputImage is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'InputImage' but the value was {ToString()}."); /// @@ -158,8 +158,8 @@ public bool TryPickInputText( /// /// /// - public global::OpenRouter.BaseInputsOneOf1ItemsOneOf0ContentOneOf0ItemsVariant4 PickInputText() => IsInputText - ? InputText! + public global::OpenRouter.BaseInputsOneOf1ItemsOneOf0ContentOneOf0ItemsVariant4 PickInputText() => InputText is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'InputText' but the value was {ToString()}."); /// /// @@ -315,21 +315,21 @@ public bool Validate() Validate(); } - if (IsInputAudio && inputAudio != null) + if (InputAudio is { } __value0 && inputAudio != null) { - return inputAudio(InputAudio!); + return inputAudio(__value0); } - else if (IsInputFile && inputFile != null) + else if (InputFile is { } __value1 && inputFile != null) { - return inputFile(InputFile!); + return inputFile(__value1); } - else if (IsInputImage && inputImage != null) + else if (InputImage is { } __value2 && inputImage != null) { - return inputImage(InputImage!); + return inputImage(__value2); } - else if (IsInputText && inputText != null) + else if (InputText is { } __value3 && inputText != null) { - return inputText(InputText!); + return inputText(__value3); } return default(TResult); @@ -353,21 +353,21 @@ public void Match( Validate(); } - if (IsInputAudio) + if (InputAudio is { } __value0) { - inputAudio?.Invoke(InputAudio!); + inputAudio?.Invoke(__value0); } - else if (IsInputFile) + else if (InputFile is { } __value1) { - inputFile?.Invoke(InputFile!); + inputFile?.Invoke(__value1); } - else if (IsInputImage) + else if (InputImage is { } __value2) { - inputImage?.Invoke(InputImage!); + inputImage?.Invoke(__value2); } - else if (IsInputText) + else if (InputText is { } __value3) { - inputText?.Invoke(InputText!); + inputText?.Invoke(__value3); } } @@ -386,21 +386,21 @@ public void Switch( Validate(); } - if (IsInputAudio) + if (InputAudio is { } __value0) { - inputAudio?.Invoke(InputAudio!); + inputAudio?.Invoke(__value0); } - else if (IsInputFile) + else if (InputFile is { } __value1) { - inputFile?.Invoke(InputFile!); + inputFile?.Invoke(__value1); } - else if (IsInputImage) + else if (InputImage is { } __value2) { - inputImage?.Invoke(InputImage!); + inputImage?.Invoke(__value2); } - else if (IsInputText) + else if (InputText is { } __value3) { - inputText?.Invoke(InputText!); + inputText?.Invoke(__value3); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.BaseInputsOneOf1ItemsOneOf0Phase.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.BaseInputsOneOf1ItemsOneOf0Phase.g.cs index d88bf601..c7e757a8 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.BaseInputsOneOf1ItemsOneOf0Phase.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.BaseInputsOneOf1ItemsOneOf0Phase.g.cs @@ -42,8 +42,8 @@ public bool TryPickBaseInputsOneOf1ItemsOneOf0Phase0( /// /// /// - public global::OpenRouter.BaseInputsOneOf1ItemsOneOf0Phase0 PickBaseInputsOneOf1ItemsOneOf0Phase0() => IsBaseInputsOneOf1ItemsOneOf0Phase0 - ? BaseInputsOneOf1ItemsOneOf0Phase0!.Value + public global::OpenRouter.BaseInputsOneOf1ItemsOneOf0Phase0 PickBaseInputsOneOf1ItemsOneOf0Phase0() => BaseInputsOneOf1ItemsOneOf0Phase0 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'BaseInputsOneOf1ItemsOneOf0Phase0' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickBaseInputsOneOf1ItemsOneOf0Phase1( /// /// /// - public global::OpenRouter.BaseInputsOneOf1ItemsOneOf0Phase1 PickBaseInputsOneOf1ItemsOneOf0Phase1() => IsBaseInputsOneOf1ItemsOneOf0Phase1 - ? BaseInputsOneOf1ItemsOneOf0Phase1!.Value + public global::OpenRouter.BaseInputsOneOf1ItemsOneOf0Phase1 PickBaseInputsOneOf1ItemsOneOf0Phase1() => BaseInputsOneOf1ItemsOneOf0Phase1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'BaseInputsOneOf1ItemsOneOf0Phase1' but the value was {ToString()}."); /// /// @@ -177,13 +177,13 @@ public bool Validate() Validate(); } - if (IsBaseInputsOneOf1ItemsOneOf0Phase0 && baseInputsOneOf1ItemsOneOf0Phase0 != null) + if (BaseInputsOneOf1ItemsOneOf0Phase0 is { } __value0 && baseInputsOneOf1ItemsOneOf0Phase0 != null) { - return baseInputsOneOf1ItemsOneOf0Phase0(BaseInputsOneOf1ItemsOneOf0Phase0!); + return baseInputsOneOf1ItemsOneOf0Phase0(__value0); } - else if (IsBaseInputsOneOf1ItemsOneOf0Phase1 && baseInputsOneOf1ItemsOneOf0Phase1 != null) + else if (BaseInputsOneOf1ItemsOneOf0Phase1 is { } __value1 && baseInputsOneOf1ItemsOneOf0Phase1 != null) { - return baseInputsOneOf1ItemsOneOf0Phase1(BaseInputsOneOf1ItemsOneOf0Phase1!); + return baseInputsOneOf1ItemsOneOf0Phase1(__value1); } return default(TResult); @@ -203,13 +203,13 @@ public void Match( Validate(); } - if (IsBaseInputsOneOf1ItemsOneOf0Phase0) + if (BaseInputsOneOf1ItemsOneOf0Phase0 is { } __value0) { - baseInputsOneOf1ItemsOneOf0Phase0?.Invoke(BaseInputsOneOf1ItemsOneOf0Phase0!); + baseInputsOneOf1ItemsOneOf0Phase0?.Invoke(__value0); } - else if (IsBaseInputsOneOf1ItemsOneOf0Phase1) + else if (BaseInputsOneOf1ItemsOneOf0Phase1 is { } __value1) { - baseInputsOneOf1ItemsOneOf0Phase1?.Invoke(BaseInputsOneOf1ItemsOneOf0Phase1!); + baseInputsOneOf1ItemsOneOf0Phase1?.Invoke(__value1); } } @@ -226,13 +226,13 @@ public void Switch( Validate(); } - if (IsBaseInputsOneOf1ItemsOneOf0Phase0) + if (BaseInputsOneOf1ItemsOneOf0Phase0 is { } __value0) { - baseInputsOneOf1ItemsOneOf0Phase0?.Invoke(BaseInputsOneOf1ItemsOneOf0Phase0!); + baseInputsOneOf1ItemsOneOf0Phase0?.Invoke(__value0); } - else if (IsBaseInputsOneOf1ItemsOneOf0Phase1) + else if (BaseInputsOneOf1ItemsOneOf0Phase1 is { } __value1) { - baseInputsOneOf1ItemsOneOf0Phase1?.Invoke(BaseInputsOneOf1ItemsOneOf0Phase1!); + baseInputsOneOf1ItemsOneOf0Phase1?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.BaseInputsOneOf1ItemsOneOf0Role.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.BaseInputsOneOf1ItemsOneOf0Role.g.cs index cf71b4db..88049fbe 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.BaseInputsOneOf1ItemsOneOf0Role.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.BaseInputsOneOf1ItemsOneOf0Role.g.cs @@ -42,8 +42,8 @@ public bool TryPickBaseInputsOneOf1ItemsOneOf0Role0( /// /// /// - public global::OpenRouter.BaseInputsOneOf1ItemsOneOf0Role0 PickBaseInputsOneOf1ItemsOneOf0Role0() => IsBaseInputsOneOf1ItemsOneOf0Role0 - ? BaseInputsOneOf1ItemsOneOf0Role0!.Value + public global::OpenRouter.BaseInputsOneOf1ItemsOneOf0Role0 PickBaseInputsOneOf1ItemsOneOf0Role0() => BaseInputsOneOf1ItemsOneOf0Role0 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'BaseInputsOneOf1ItemsOneOf0Role0' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickBaseInputsOneOf1ItemsOneOf0Role1( /// /// /// - public global::OpenRouter.BaseInputsOneOf1ItemsOneOf0Role1 PickBaseInputsOneOf1ItemsOneOf0Role1() => IsBaseInputsOneOf1ItemsOneOf0Role1 - ? BaseInputsOneOf1ItemsOneOf0Role1!.Value + public global::OpenRouter.BaseInputsOneOf1ItemsOneOf0Role1 PickBaseInputsOneOf1ItemsOneOf0Role1() => BaseInputsOneOf1ItemsOneOf0Role1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'BaseInputsOneOf1ItemsOneOf0Role1' but the value was {ToString()}."); /// @@ -116,8 +116,8 @@ public bool TryPickBaseInputsOneOf1ItemsOneOf0Role2( /// /// /// - public global::OpenRouter.BaseInputsOneOf1ItemsOneOf0Role2 PickBaseInputsOneOf1ItemsOneOf0Role2() => IsBaseInputsOneOf1ItemsOneOf0Role2 - ? BaseInputsOneOf1ItemsOneOf0Role2!.Value + public global::OpenRouter.BaseInputsOneOf1ItemsOneOf0Role2 PickBaseInputsOneOf1ItemsOneOf0Role2() => BaseInputsOneOf1ItemsOneOf0Role2 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'BaseInputsOneOf1ItemsOneOf0Role2' but the value was {ToString()}."); /// @@ -153,8 +153,8 @@ public bool TryPickBaseInputsOneOf1ItemsOneOf0Role3( /// /// /// - public global::OpenRouter.BaseInputsOneOf1ItemsOneOf0Role3 PickBaseInputsOneOf1ItemsOneOf0Role3() => IsBaseInputsOneOf1ItemsOneOf0Role3 - ? BaseInputsOneOf1ItemsOneOf0Role3!.Value + public global::OpenRouter.BaseInputsOneOf1ItemsOneOf0Role3 PickBaseInputsOneOf1ItemsOneOf0Role3() => BaseInputsOneOf1ItemsOneOf0Role3 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'BaseInputsOneOf1ItemsOneOf0Role3' but the value was {ToString()}."); /// /// @@ -307,21 +307,21 @@ public bool Validate() Validate(); } - if (IsBaseInputsOneOf1ItemsOneOf0Role0 && baseInputsOneOf1ItemsOneOf0Role0 != null) + if (BaseInputsOneOf1ItemsOneOf0Role0 is { } __value0 && baseInputsOneOf1ItemsOneOf0Role0 != null) { - return baseInputsOneOf1ItemsOneOf0Role0(BaseInputsOneOf1ItemsOneOf0Role0!); + return baseInputsOneOf1ItemsOneOf0Role0(__value0); } - else if (IsBaseInputsOneOf1ItemsOneOf0Role1 && baseInputsOneOf1ItemsOneOf0Role1 != null) + else if (BaseInputsOneOf1ItemsOneOf0Role1 is { } __value1 && baseInputsOneOf1ItemsOneOf0Role1 != null) { - return baseInputsOneOf1ItemsOneOf0Role1(BaseInputsOneOf1ItemsOneOf0Role1!); + return baseInputsOneOf1ItemsOneOf0Role1(__value1); } - else if (IsBaseInputsOneOf1ItemsOneOf0Role2 && baseInputsOneOf1ItemsOneOf0Role2 != null) + else if (BaseInputsOneOf1ItemsOneOf0Role2 is { } __value2 && baseInputsOneOf1ItemsOneOf0Role2 != null) { - return baseInputsOneOf1ItemsOneOf0Role2(BaseInputsOneOf1ItemsOneOf0Role2!); + return baseInputsOneOf1ItemsOneOf0Role2(__value2); } - else if (IsBaseInputsOneOf1ItemsOneOf0Role3 && baseInputsOneOf1ItemsOneOf0Role3 != null) + else if (BaseInputsOneOf1ItemsOneOf0Role3 is { } __value3 && baseInputsOneOf1ItemsOneOf0Role3 != null) { - return baseInputsOneOf1ItemsOneOf0Role3(BaseInputsOneOf1ItemsOneOf0Role3!); + return baseInputsOneOf1ItemsOneOf0Role3(__value3); } return default(TResult); @@ -345,21 +345,21 @@ public void Match( Validate(); } - if (IsBaseInputsOneOf1ItemsOneOf0Role0) + if (BaseInputsOneOf1ItemsOneOf0Role0 is { } __value0) { - baseInputsOneOf1ItemsOneOf0Role0?.Invoke(BaseInputsOneOf1ItemsOneOf0Role0!); + baseInputsOneOf1ItemsOneOf0Role0?.Invoke(__value0); } - else if (IsBaseInputsOneOf1ItemsOneOf0Role1) + else if (BaseInputsOneOf1ItemsOneOf0Role1 is { } __value1) { - baseInputsOneOf1ItemsOneOf0Role1?.Invoke(BaseInputsOneOf1ItemsOneOf0Role1!); + baseInputsOneOf1ItemsOneOf0Role1?.Invoke(__value1); } - else if (IsBaseInputsOneOf1ItemsOneOf0Role2) + else if (BaseInputsOneOf1ItemsOneOf0Role2 is { } __value2) { - baseInputsOneOf1ItemsOneOf0Role2?.Invoke(BaseInputsOneOf1ItemsOneOf0Role2!); + baseInputsOneOf1ItemsOneOf0Role2?.Invoke(__value2); } - else if (IsBaseInputsOneOf1ItemsOneOf0Role3) + else if (BaseInputsOneOf1ItemsOneOf0Role3 is { } __value3) { - baseInputsOneOf1ItemsOneOf0Role3?.Invoke(BaseInputsOneOf1ItemsOneOf0Role3!); + baseInputsOneOf1ItemsOneOf0Role3?.Invoke(__value3); } } @@ -378,21 +378,21 @@ public void Switch( Validate(); } - if (IsBaseInputsOneOf1ItemsOneOf0Role0) + if (BaseInputsOneOf1ItemsOneOf0Role0 is { } __value0) { - baseInputsOneOf1ItemsOneOf0Role0?.Invoke(BaseInputsOneOf1ItemsOneOf0Role0!); + baseInputsOneOf1ItemsOneOf0Role0?.Invoke(__value0); } - else if (IsBaseInputsOneOf1ItemsOneOf0Role1) + else if (BaseInputsOneOf1ItemsOneOf0Role1 is { } __value1) { - baseInputsOneOf1ItemsOneOf0Role1?.Invoke(BaseInputsOneOf1ItemsOneOf0Role1!); + baseInputsOneOf1ItemsOneOf0Role1?.Invoke(__value1); } - else if (IsBaseInputsOneOf1ItemsOneOf0Role2) + else if (BaseInputsOneOf1ItemsOneOf0Role2 is { } __value2) { - baseInputsOneOf1ItemsOneOf0Role2?.Invoke(BaseInputsOneOf1ItemsOneOf0Role2!); + baseInputsOneOf1ItemsOneOf0Role2?.Invoke(__value2); } - else if (IsBaseInputsOneOf1ItemsOneOf0Role3) + else if (BaseInputsOneOf1ItemsOneOf0Role3 is { } __value3) { - baseInputsOneOf1ItemsOneOf0Role3?.Invoke(BaseInputsOneOf1ItemsOneOf0Role3!); + baseInputsOneOf1ItemsOneOf0Role3?.Invoke(__value3); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.BashServerToolEnvironment.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.BashServerToolEnvironment.g.cs index 1ae4e6d2..c48456b1 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.BashServerToolEnvironment.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.BashServerToolEnvironment.g.cs @@ -47,8 +47,8 @@ public bool TryPickContainerAuto( /// /// /// - public global::OpenRouter.BashServerToolEnvironmentVariant1 PickContainerAuto() => IsContainerAuto - ? ContainerAuto! + public global::OpenRouter.BashServerToolEnvironmentVariant1 PickContainerAuto() => ContainerAuto is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ContainerAuto' but the value was {ToString()}."); /// @@ -84,8 +84,8 @@ public bool TryPickContainerReference( /// /// /// - public global::OpenRouter.BashServerToolEnvironmentVariant2 PickContainerReference() => IsContainerReference - ? ContainerReference! + public global::OpenRouter.BashServerToolEnvironmentVariant2 PickContainerReference() => ContainerReference is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ContainerReference' but the value was {ToString()}."); /// /// @@ -185,13 +185,13 @@ public bool Validate() Validate(); } - if (IsContainerAuto && containerAuto != null) + if (ContainerAuto is { } __value0 && containerAuto != null) { - return containerAuto(ContainerAuto!); + return containerAuto(__value0); } - else if (IsContainerReference && containerReference != null) + else if (ContainerReference is { } __value1 && containerReference != null) { - return containerReference(ContainerReference!); + return containerReference(__value1); } return default(TResult); @@ -211,13 +211,13 @@ public void Match( Validate(); } - if (IsContainerAuto) + if (ContainerAuto is { } __value0) { - containerAuto?.Invoke(ContainerAuto!); + containerAuto?.Invoke(__value0); } - else if (IsContainerReference) + else if (ContainerReference is { } __value1) { - containerReference?.Invoke(ContainerReference!); + containerReference?.Invoke(__value1); } } @@ -234,13 +234,13 @@ public void Switch( Validate(); } - if (IsContainerAuto) + if (ContainerAuto is { } __value0) { - containerAuto?.Invoke(ContainerAuto!); + containerAuto?.Invoke(__value0); } - else if (IsContainerReference) + else if (ContainerReference is { } __value1) { - containerReference?.Invoke(ContainerReference!); + containerReference?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.CapabilityDescriptor.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.CapabilityDescriptor.g.cs index 8432dff3..c9ca13a4 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.CapabilityDescriptor.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.CapabilityDescriptor.g.cs @@ -47,8 +47,8 @@ public bool TryPickBoolean( /// /// /// - public global::OpenRouter.CapabilityDescriptorVariant1 PickBoolean() => IsBoolean - ? Boolean! + public global::OpenRouter.CapabilityDescriptorVariant1 PickBoolean() => Boolean is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Boolean' but the value was {ToString()}."); /// @@ -84,8 +84,8 @@ public bool TryPickEnum( /// /// /// - public global::OpenRouter.CapabilityDescriptorVariant2 PickEnum() => IsEnum - ? Enum! + public global::OpenRouter.CapabilityDescriptorVariant2 PickEnum() => Enum is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Enum' but the value was {ToString()}."); /// @@ -121,8 +121,8 @@ public bool TryPickRange( /// /// /// - public global::OpenRouter.CapabilityDescriptorVariant3 PickRange() => IsRange - ? Range! + public global::OpenRouter.CapabilityDescriptorVariant3 PickRange() => Range is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Range' but the value was {ToString()}."); /// /// @@ -250,17 +250,17 @@ public bool Validate() Validate(); } - if (IsBoolean && boolean != null) + if (Boolean is { } __value0 && boolean != null) { - return boolean(Boolean!); + return boolean(__value0); } - else if (IsEnum && @enum != null) + else if (Enum is { } __value1 && @enum != null) { - return @enum(Enum!); + return @enum(__value1); } - else if (IsRange && range != null) + else if (Range is { } __value2 && range != null) { - return range(Range!); + return range(__value2); } return default(TResult); @@ -282,17 +282,17 @@ public void Match( Validate(); } - if (IsBoolean) + if (Boolean is { } __value0) { - boolean?.Invoke(Boolean!); + boolean?.Invoke(__value0); } - else if (IsEnum) + else if (Enum is { } __value1) { - @enum?.Invoke(Enum!); + @enum?.Invoke(__value1); } - else if (IsRange) + else if (Range is { } __value2) { - range?.Invoke(Range!); + range?.Invoke(__value2); } } @@ -310,17 +310,17 @@ public void Switch( Validate(); } - if (IsBoolean) + if (Boolean is { } __value0) { - boolean?.Invoke(Boolean!); + boolean?.Invoke(__value0); } - else if (IsEnum) + else if (Enum is { } __value1) { - @enum?.Invoke(Enum!); + @enum?.Invoke(__value1); } - else if (IsRange) + else if (Range is { } __value2) { - range?.Invoke(Range!); + range?.Invoke(__value2); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.ChatContentItems.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.ChatContentItems.g.cs index 9c13415c..ce0c16aa 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.ChatContentItems.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.ChatContentItems.g.cs @@ -47,8 +47,8 @@ public bool TryPickFile( /// /// /// - public global::OpenRouter.ChatContentItemsVariant1 PickFile() => IsFile - ? File! + public global::OpenRouter.ChatContentItemsVariant1 PickFile() => File is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'File' but the value was {ToString()}."); /// @@ -84,8 +84,8 @@ public bool TryPickImageUrl( /// /// /// - public global::OpenRouter.ChatContentItemsVariant2 PickImageUrl() => IsImageUrl - ? ImageUrl! + public global::OpenRouter.ChatContentItemsVariant2 PickImageUrl() => ImageUrl is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ImageUrl' but the value was {ToString()}."); /// @@ -121,8 +121,8 @@ public bool TryPickInputAudio( /// /// /// - public global::OpenRouter.ChatContentItemsVariant3 PickInputAudio() => IsInputAudio - ? InputAudio! + public global::OpenRouter.ChatContentItemsVariant3 PickInputAudio() => InputAudio is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'InputAudio' but the value was {ToString()}."); /// @@ -158,8 +158,8 @@ public bool TryPickInputVideo( /// /// /// - public global::OpenRouter.ChatContentItemsVariant4 PickInputVideo() => IsInputVideo - ? InputVideo! + public global::OpenRouter.ChatContentItemsVariant4 PickInputVideo() => InputVideo is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'InputVideo' but the value was {ToString()}."); /// @@ -195,8 +195,8 @@ public bool TryPickText( /// /// /// - public global::OpenRouter.ChatContentItemsVariant5 PickText() => IsText - ? Text! + public global::OpenRouter.ChatContentItemsVariant5 PickText() => Text is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Text' but the value was {ToString()}."); /// @@ -232,8 +232,8 @@ public bool TryPickVideoUrl( /// /// /// - public global::OpenRouter.ChatContentItemsVariant6 PickVideoUrl() => IsVideoUrl - ? VideoUrl! + public global::OpenRouter.ChatContentItemsVariant6 PickVideoUrl() => VideoUrl is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'VideoUrl' but the value was {ToString()}."); /// /// @@ -445,29 +445,29 @@ public bool Validate() Validate(); } - if (IsFile && file != null) + if (File is { } __value0 && file != null) { - return file(File!); + return file(__value0); } - else if (IsImageUrl && imageUrl != null) + else if (ImageUrl is { } __value1 && imageUrl != null) { - return imageUrl(ImageUrl!); + return imageUrl(__value1); } - else if (IsInputAudio && inputAudio != null) + else if (InputAudio is { } __value2 && inputAudio != null) { - return inputAudio(InputAudio!); + return inputAudio(__value2); } - else if (IsInputVideo && inputVideo != null) + else if (InputVideo is { } __value3 && inputVideo != null) { - return inputVideo(InputVideo!); + return inputVideo(__value3); } - else if (IsText && text != null) + else if (Text is { } __value4 && text != null) { - return text(Text!); + return text(__value4); } - else if (IsVideoUrl && videoUrl != null) + else if (VideoUrl is { } __value5 && videoUrl != null) { - return videoUrl(VideoUrl!); + return videoUrl(__value5); } return default(TResult); @@ -495,29 +495,29 @@ public void Match( Validate(); } - if (IsFile) + if (File is { } __value0) { - file?.Invoke(File!); + file?.Invoke(__value0); } - else if (IsImageUrl) + else if (ImageUrl is { } __value1) { - imageUrl?.Invoke(ImageUrl!); + imageUrl?.Invoke(__value1); } - else if (IsInputAudio) + else if (InputAudio is { } __value2) { - inputAudio?.Invoke(InputAudio!); + inputAudio?.Invoke(__value2); } - else if (IsInputVideo) + else if (InputVideo is { } __value3) { - inputVideo?.Invoke(InputVideo!); + inputVideo?.Invoke(__value3); } - else if (IsText) + else if (Text is { } __value4) { - text?.Invoke(Text!); + text?.Invoke(__value4); } - else if (IsVideoUrl) + else if (VideoUrl is { } __value5) { - videoUrl?.Invoke(VideoUrl!); + videoUrl?.Invoke(__value5); } } @@ -538,29 +538,29 @@ public void Switch( Validate(); } - if (IsFile) + if (File is { } __value0) { - file?.Invoke(File!); + file?.Invoke(__value0); } - else if (IsImageUrl) + else if (ImageUrl is { } __value1) { - imageUrl?.Invoke(ImageUrl!); + imageUrl?.Invoke(__value1); } - else if (IsInputAudio) + else if (InputAudio is { } __value2) { - inputAudio?.Invoke(InputAudio!); + inputAudio?.Invoke(__value2); } - else if (IsInputVideo) + else if (InputVideo is { } __value3) { - inputVideo?.Invoke(InputVideo!); + inputVideo?.Invoke(__value3); } - else if (IsText) + else if (Text is { } __value4) { - text?.Invoke(Text!); + text?.Invoke(__value4); } - else if (IsVideoUrl) + else if (VideoUrl is { } __value5) { - videoUrl?.Invoke(VideoUrl!); + videoUrl?.Invoke(__value5); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.ChatFunctionTool.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.ChatFunctionTool.g.cs index 3d231307..51de88fa 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.ChatFunctionTool.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.ChatFunctionTool.g.cs @@ -42,8 +42,8 @@ public bool TryPickChatFunctionTool0( /// /// /// - public global::OpenRouter.ChatFunctionTool0 PickChatFunctionTool0() => IsChatFunctionTool0 - ? ChatFunctionTool0! + public global::OpenRouter.ChatFunctionTool0 PickChatFunctionTool0() => ChatFunctionTool0 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ChatFunctionTool0' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickAdvisorServerToolOpenRouter( /// /// /// - public global::OpenRouter.AdvisorServerToolOpenRouter PickAdvisorServerToolOpenRouter() => IsAdvisorServerToolOpenRouter - ? AdvisorServerToolOpenRouter! + public global::OpenRouter.AdvisorServerToolOpenRouter PickAdvisorServerToolOpenRouter() => AdvisorServerToolOpenRouter is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'AdvisorServerToolOpenRouter' but the value was {ToString()}."); /// @@ -116,8 +116,8 @@ public bool TryPickBashServerTool( /// /// /// - public global::OpenRouter.BashServerTool PickBashServerTool() => IsBashServerTool - ? BashServerTool! + public global::OpenRouter.BashServerTool PickBashServerTool() => BashServerTool is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'BashServerTool' but the value was {ToString()}."); /// @@ -153,8 +153,8 @@ public bool TryPickDatetimeServerTool( /// /// /// - public global::OpenRouter.DatetimeServerTool PickDatetimeServerTool() => IsDatetimeServerTool - ? DatetimeServerTool! + public global::OpenRouter.DatetimeServerTool PickDatetimeServerTool() => DatetimeServerTool is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'DatetimeServerTool' but the value was {ToString()}."); /// @@ -190,8 +190,8 @@ public bool TryPickFilesServerTool( /// /// /// - public global::OpenRouter.FilesServerTool PickFilesServerTool() => IsFilesServerTool - ? FilesServerTool! + public global::OpenRouter.FilesServerTool PickFilesServerTool() => FilesServerTool is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'FilesServerTool' but the value was {ToString()}."); /// @@ -227,8 +227,8 @@ public bool TryPickFusionServerToolOpenRouter( /// /// /// - public global::OpenRouter.FusionServerToolOpenRouter PickFusionServerToolOpenRouter() => IsFusionServerToolOpenRouter - ? FusionServerToolOpenRouter! + public global::OpenRouter.FusionServerToolOpenRouter PickFusionServerToolOpenRouter() => FusionServerToolOpenRouter is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'FusionServerToolOpenRouter' but the value was {ToString()}."); /// @@ -264,8 +264,8 @@ public bool TryPickImageGenerationServerToolOpenRouter( /// /// /// - public global::OpenRouter.ImageGenerationServerToolOpenRouter PickImageGenerationServerToolOpenRouter() => IsImageGenerationServerToolOpenRouter - ? ImageGenerationServerToolOpenRouter! + public global::OpenRouter.ImageGenerationServerToolOpenRouter PickImageGenerationServerToolOpenRouter() => ImageGenerationServerToolOpenRouter is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ImageGenerationServerToolOpenRouter' but the value was {ToString()}."); /// @@ -301,8 +301,8 @@ public bool TryPickChatSearchModelsServerTool( /// /// /// - public global::OpenRouter.ChatSearchModelsServerTool PickChatSearchModelsServerTool() => IsChatSearchModelsServerTool - ? ChatSearchModelsServerTool! + public global::OpenRouter.ChatSearchModelsServerTool PickChatSearchModelsServerTool() => ChatSearchModelsServerTool is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ChatSearchModelsServerTool' but the value was {ToString()}."); /// @@ -338,8 +338,8 @@ public bool TryPickSubagentServerToolOpenRouter( /// /// /// - public global::OpenRouter.SubagentServerToolOpenRouter PickSubagentServerToolOpenRouter() => IsSubagentServerToolOpenRouter - ? SubagentServerToolOpenRouter! + public global::OpenRouter.SubagentServerToolOpenRouter PickSubagentServerToolOpenRouter() => SubagentServerToolOpenRouter is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'SubagentServerToolOpenRouter' but the value was {ToString()}."); /// @@ -375,8 +375,8 @@ public bool TryPickWebFetchServerTool( /// /// /// - public global::OpenRouter.WebFetchServerTool PickWebFetchServerTool() => IsWebFetchServerTool - ? WebFetchServerTool! + public global::OpenRouter.WebFetchServerTool PickWebFetchServerTool() => WebFetchServerTool is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'WebFetchServerTool' but the value was {ToString()}."); /// @@ -412,8 +412,8 @@ public bool TryPickOpenRouterWebSearchServerTool( /// /// /// - public global::OpenRouter.OpenRouterWebSearchServerTool PickOpenRouterWebSearchServerTool() => IsOpenRouterWebSearchServerTool - ? OpenRouterWebSearchServerTool! + public global::OpenRouter.OpenRouterWebSearchServerTool PickOpenRouterWebSearchServerTool() => OpenRouterWebSearchServerTool is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OpenRouterWebSearchServerTool' but the value was {ToString()}."); /// @@ -449,8 +449,8 @@ public bool TryPickChatWebSearchShorthand( /// /// /// - public global::OpenRouter.ChatWebSearchShorthand PickChatWebSearchShorthand() => IsChatWebSearchShorthand - ? ChatWebSearchShorthand! + public global::OpenRouter.ChatWebSearchShorthand PickChatWebSearchShorthand() => ChatWebSearchShorthand is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ChatWebSearchShorthand' but the value was {ToString()}."); /// /// @@ -827,53 +827,53 @@ public bool Validate() Validate(); } - if (IsChatFunctionTool0 && chatFunctionTool0 != null) + if (ChatFunctionTool0 is { } __value0 && chatFunctionTool0 != null) { - return chatFunctionTool0(ChatFunctionTool0!); + return chatFunctionTool0(__value0); } - else if (IsAdvisorServerToolOpenRouter && advisorServerToolOpenRouter != null) + else if (AdvisorServerToolOpenRouter is { } __value1 && advisorServerToolOpenRouter != null) { - return advisorServerToolOpenRouter(AdvisorServerToolOpenRouter!); + return advisorServerToolOpenRouter(__value1); } - else if (IsBashServerTool && bashServerTool != null) + else if (BashServerTool is { } __value2 && bashServerTool != null) { - return bashServerTool(BashServerTool!); + return bashServerTool(__value2); } - else if (IsDatetimeServerTool && datetimeServerTool != null) + else if (DatetimeServerTool is { } __value3 && datetimeServerTool != null) { - return datetimeServerTool(DatetimeServerTool!); + return datetimeServerTool(__value3); } - else if (IsFilesServerTool && filesServerTool != null) + else if (FilesServerTool is { } __value4 && filesServerTool != null) { - return filesServerTool(FilesServerTool!); + return filesServerTool(__value4); } - else if (IsFusionServerToolOpenRouter && fusionServerToolOpenRouter != null) + else if (FusionServerToolOpenRouter is { } __value5 && fusionServerToolOpenRouter != null) { - return fusionServerToolOpenRouter(FusionServerToolOpenRouter!); + return fusionServerToolOpenRouter(__value5); } - else if (IsImageGenerationServerToolOpenRouter && imageGenerationServerToolOpenRouter != null) + else if (ImageGenerationServerToolOpenRouter is { } __value6 && imageGenerationServerToolOpenRouter != null) { - return imageGenerationServerToolOpenRouter(ImageGenerationServerToolOpenRouter!); + return imageGenerationServerToolOpenRouter(__value6); } - else if (IsChatSearchModelsServerTool && chatSearchModelsServerTool != null) + else if (ChatSearchModelsServerTool is { } __value7 && chatSearchModelsServerTool != null) { - return chatSearchModelsServerTool(ChatSearchModelsServerTool!); + return chatSearchModelsServerTool(__value7); } - else if (IsSubagentServerToolOpenRouter && subagentServerToolOpenRouter != null) + else if (SubagentServerToolOpenRouter is { } __value8 && subagentServerToolOpenRouter != null) { - return subagentServerToolOpenRouter(SubagentServerToolOpenRouter!); + return subagentServerToolOpenRouter(__value8); } - else if (IsWebFetchServerTool && webFetchServerTool != null) + else if (WebFetchServerTool is { } __value9 && webFetchServerTool != null) { - return webFetchServerTool(WebFetchServerTool!); + return webFetchServerTool(__value9); } - else if (IsOpenRouterWebSearchServerTool && openRouterWebSearchServerTool != null) + else if (OpenRouterWebSearchServerTool is { } __value10 && openRouterWebSearchServerTool != null) { - return openRouterWebSearchServerTool(OpenRouterWebSearchServerTool!); + return openRouterWebSearchServerTool(__value10); } - else if (IsChatWebSearchShorthand && chatWebSearchShorthand != null) + else if (ChatWebSearchShorthand is { } __value11 && chatWebSearchShorthand != null) { - return chatWebSearchShorthand(ChatWebSearchShorthand!); + return chatWebSearchShorthand(__value11); } return default(TResult); @@ -913,53 +913,53 @@ public void Match( Validate(); } - if (IsChatFunctionTool0) + if (ChatFunctionTool0 is { } __value0) { - chatFunctionTool0?.Invoke(ChatFunctionTool0!); + chatFunctionTool0?.Invoke(__value0); } - else if (IsAdvisorServerToolOpenRouter) + else if (AdvisorServerToolOpenRouter is { } __value1) { - advisorServerToolOpenRouter?.Invoke(AdvisorServerToolOpenRouter!); + advisorServerToolOpenRouter?.Invoke(__value1); } - else if (IsBashServerTool) + else if (BashServerTool is { } __value2) { - bashServerTool?.Invoke(BashServerTool!); + bashServerTool?.Invoke(__value2); } - else if (IsDatetimeServerTool) + else if (DatetimeServerTool is { } __value3) { - datetimeServerTool?.Invoke(DatetimeServerTool!); + datetimeServerTool?.Invoke(__value3); } - else if (IsFilesServerTool) + else if (FilesServerTool is { } __value4) { - filesServerTool?.Invoke(FilesServerTool!); + filesServerTool?.Invoke(__value4); } - else if (IsFusionServerToolOpenRouter) + else if (FusionServerToolOpenRouter is { } __value5) { - fusionServerToolOpenRouter?.Invoke(FusionServerToolOpenRouter!); + fusionServerToolOpenRouter?.Invoke(__value5); } - else if (IsImageGenerationServerToolOpenRouter) + else if (ImageGenerationServerToolOpenRouter is { } __value6) { - imageGenerationServerToolOpenRouter?.Invoke(ImageGenerationServerToolOpenRouter!); + imageGenerationServerToolOpenRouter?.Invoke(__value6); } - else if (IsChatSearchModelsServerTool) + else if (ChatSearchModelsServerTool is { } __value7) { - chatSearchModelsServerTool?.Invoke(ChatSearchModelsServerTool!); + chatSearchModelsServerTool?.Invoke(__value7); } - else if (IsSubagentServerToolOpenRouter) + else if (SubagentServerToolOpenRouter is { } __value8) { - subagentServerToolOpenRouter?.Invoke(SubagentServerToolOpenRouter!); + subagentServerToolOpenRouter?.Invoke(__value8); } - else if (IsWebFetchServerTool) + else if (WebFetchServerTool is { } __value9) { - webFetchServerTool?.Invoke(WebFetchServerTool!); + webFetchServerTool?.Invoke(__value9); } - else if (IsOpenRouterWebSearchServerTool) + else if (OpenRouterWebSearchServerTool is { } __value10) { - openRouterWebSearchServerTool?.Invoke(OpenRouterWebSearchServerTool!); + openRouterWebSearchServerTool?.Invoke(__value10); } - else if (IsChatWebSearchShorthand) + else if (ChatWebSearchShorthand is { } __value11) { - chatWebSearchShorthand?.Invoke(ChatWebSearchShorthand!); + chatWebSearchShorthand?.Invoke(__value11); } } @@ -986,53 +986,53 @@ public void Switch( Validate(); } - if (IsChatFunctionTool0) + if (ChatFunctionTool0 is { } __value0) { - chatFunctionTool0?.Invoke(ChatFunctionTool0!); + chatFunctionTool0?.Invoke(__value0); } - else if (IsAdvisorServerToolOpenRouter) + else if (AdvisorServerToolOpenRouter is { } __value1) { - advisorServerToolOpenRouter?.Invoke(AdvisorServerToolOpenRouter!); + advisorServerToolOpenRouter?.Invoke(__value1); } - else if (IsBashServerTool) + else if (BashServerTool is { } __value2) { - bashServerTool?.Invoke(BashServerTool!); + bashServerTool?.Invoke(__value2); } - else if (IsDatetimeServerTool) + else if (DatetimeServerTool is { } __value3) { - datetimeServerTool?.Invoke(DatetimeServerTool!); + datetimeServerTool?.Invoke(__value3); } - else if (IsFilesServerTool) + else if (FilesServerTool is { } __value4) { - filesServerTool?.Invoke(FilesServerTool!); + filesServerTool?.Invoke(__value4); } - else if (IsFusionServerToolOpenRouter) + else if (FusionServerToolOpenRouter is { } __value5) { - fusionServerToolOpenRouter?.Invoke(FusionServerToolOpenRouter!); + fusionServerToolOpenRouter?.Invoke(__value5); } - else if (IsImageGenerationServerToolOpenRouter) + else if (ImageGenerationServerToolOpenRouter is { } __value6) { - imageGenerationServerToolOpenRouter?.Invoke(ImageGenerationServerToolOpenRouter!); + imageGenerationServerToolOpenRouter?.Invoke(__value6); } - else if (IsChatSearchModelsServerTool) + else if (ChatSearchModelsServerTool is { } __value7) { - chatSearchModelsServerTool?.Invoke(ChatSearchModelsServerTool!); + chatSearchModelsServerTool?.Invoke(__value7); } - else if (IsSubagentServerToolOpenRouter) + else if (SubagentServerToolOpenRouter is { } __value8) { - subagentServerToolOpenRouter?.Invoke(SubagentServerToolOpenRouter!); + subagentServerToolOpenRouter?.Invoke(__value8); } - else if (IsWebFetchServerTool) + else if (WebFetchServerTool is { } __value9) { - webFetchServerTool?.Invoke(WebFetchServerTool!); + webFetchServerTool?.Invoke(__value9); } - else if (IsOpenRouterWebSearchServerTool) + else if (OpenRouterWebSearchServerTool is { } __value10) { - openRouterWebSearchServerTool?.Invoke(OpenRouterWebSearchServerTool!); + openRouterWebSearchServerTool?.Invoke(__value10); } - else if (IsChatWebSearchShorthand) + else if (ChatWebSearchShorthand is { } __value11) { - chatWebSearchShorthand?.Invoke(ChatWebSearchShorthand!); + chatWebSearchShorthand?.Invoke(__value11); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.ChatMessages.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.ChatMessages.g.cs index 2f2a311c..9616319c 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.ChatMessages.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.ChatMessages.g.cs @@ -47,8 +47,8 @@ public bool TryPickAssistant( /// /// /// - public global::OpenRouter.ChatMessagesVariant1 PickAssistant() => IsAssistant - ? Assistant! + public global::OpenRouter.ChatMessagesVariant1 PickAssistant() => Assistant is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Assistant' but the value was {ToString()}."); /// @@ -84,8 +84,8 @@ public bool TryPickDeveloper( /// /// /// - public global::OpenRouter.ChatMessagesVariant2 PickDeveloper() => IsDeveloper - ? Developer! + public global::OpenRouter.ChatMessagesVariant2 PickDeveloper() => Developer is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Developer' but the value was {ToString()}."); /// @@ -121,8 +121,8 @@ public bool TryPickSystem( /// /// /// - public global::OpenRouter.ChatMessagesVariant3 PickSystem() => IsSystem - ? System! + public global::OpenRouter.ChatMessagesVariant3 PickSystem() => System is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'System' but the value was {ToString()}."); /// @@ -158,8 +158,8 @@ public bool TryPickTool( /// /// /// - public global::OpenRouter.ChatMessagesVariant4 PickTool() => IsTool - ? Tool! + public global::OpenRouter.ChatMessagesVariant4 PickTool() => Tool is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Tool' but the value was {ToString()}."); /// @@ -195,8 +195,8 @@ public bool TryPickUser( /// /// /// - public global::OpenRouter.ChatMessagesVariant5 PickUser() => IsUser - ? User! + public global::OpenRouter.ChatMessagesVariant5 PickUser() => User is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'User' but the value was {ToString()}."); /// /// @@ -380,25 +380,25 @@ public bool Validate() Validate(); } - if (IsAssistant && assistant != null) + if (Assistant is { } __value0 && assistant != null) { - return assistant(Assistant!); + return assistant(__value0); } - else if (IsDeveloper && developer != null) + else if (Developer is { } __value1 && developer != null) { - return developer(Developer!); + return developer(__value1); } - else if (IsSystem && system != null) + else if (System is { } __value2 && system != null) { - return system(System!); + return system(__value2); } - else if (IsTool && tool != null) + else if (Tool is { } __value3 && tool != null) { - return tool(Tool!); + return tool(__value3); } - else if (IsUser && user != null) + else if (User is { } __value4 && user != null) { - return user(User!); + return user(__value4); } return default(TResult); @@ -424,25 +424,25 @@ public void Match( Validate(); } - if (IsAssistant) + if (Assistant is { } __value0) { - assistant?.Invoke(Assistant!); + assistant?.Invoke(__value0); } - else if (IsDeveloper) + else if (Developer is { } __value1) { - developer?.Invoke(Developer!); + developer?.Invoke(__value1); } - else if (IsSystem) + else if (System is { } __value2) { - system?.Invoke(System!); + system?.Invoke(__value2); } - else if (IsTool) + else if (Tool is { } __value3) { - tool?.Invoke(Tool!); + tool?.Invoke(__value3); } - else if (IsUser) + else if (User is { } __value4) { - user?.Invoke(User!); + user?.Invoke(__value4); } } @@ -462,25 +462,25 @@ public void Switch( Validate(); } - if (IsAssistant) + if (Assistant is { } __value0) { - assistant?.Invoke(Assistant!); + assistant?.Invoke(__value0); } - else if (IsDeveloper) + else if (Developer is { } __value1) { - developer?.Invoke(Developer!); + developer?.Invoke(__value1); } - else if (IsSystem) + else if (System is { } __value2) { - system?.Invoke(System!); + system?.Invoke(__value2); } - else if (IsTool) + else if (Tool is { } __value3) { - tool?.Invoke(Tool!); + tool?.Invoke(__value3); } - else if (IsUser) + else if (User is { } __value4) { - user?.Invoke(User!); + user?.Invoke(__value4); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.ChatMessagesDiscriminatorMappingAssistantContent.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.ChatMessagesDiscriminatorMappingAssistantContent.g.cs index 0cb08032..fc82859c 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.ChatMessagesDiscriminatorMappingAssistantContent.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.ChatMessagesDiscriminatorMappingAssistantContent.g.cs @@ -42,8 +42,8 @@ public bool TryPickChatMessagesDiscriminatorMappingAssistantContentVariant1( /// /// /// - public string PickChatMessagesDiscriminatorMappingAssistantContentVariant1() => IsChatMessagesDiscriminatorMappingAssistantContentVariant1 - ? ChatMessagesDiscriminatorMappingAssistantContentVariant1! + public string PickChatMessagesDiscriminatorMappingAssistantContentVariant1() => ChatMessagesDiscriminatorMappingAssistantContentVariant1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ChatMessagesDiscriminatorMappingAssistantContentVariant1' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickChatMessagesDiscriminatorMappingAssistantContent1( /// /// /// - public global::System.Collections.Generic.IList PickChatMessagesDiscriminatorMappingAssistantContent1() => IsChatMessagesDiscriminatorMappingAssistantContent1 - ? ChatMessagesDiscriminatorMappingAssistantContent1! + public global::System.Collections.Generic.IList PickChatMessagesDiscriminatorMappingAssistantContent1() => ChatMessagesDiscriminatorMappingAssistantContent1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ChatMessagesDiscriminatorMappingAssistantContent1' but the value was {ToString()}."); /// /// @@ -154,13 +154,13 @@ public bool Validate() Validate(); } - if (IsChatMessagesDiscriminatorMappingAssistantContentVariant1 && chatMessagesDiscriminatorMappingAssistantContentVariant1 != null) + if (ChatMessagesDiscriminatorMappingAssistantContentVariant1 is { } __value0 && chatMessagesDiscriminatorMappingAssistantContentVariant1 != null) { - return chatMessagesDiscriminatorMappingAssistantContentVariant1(ChatMessagesDiscriminatorMappingAssistantContentVariant1!); + return chatMessagesDiscriminatorMappingAssistantContentVariant1(__value0); } - else if (IsChatMessagesDiscriminatorMappingAssistantContent1 && chatMessagesDiscriminatorMappingAssistantContent1 != null) + else if (ChatMessagesDiscriminatorMappingAssistantContent1 is { } __value1 && chatMessagesDiscriminatorMappingAssistantContent1 != null) { - return chatMessagesDiscriminatorMappingAssistantContent1(ChatMessagesDiscriminatorMappingAssistantContent1!); + return chatMessagesDiscriminatorMappingAssistantContent1(__value1); } return default(TResult); @@ -180,13 +180,13 @@ public void Match( Validate(); } - if (IsChatMessagesDiscriminatorMappingAssistantContentVariant1) + if (ChatMessagesDiscriminatorMappingAssistantContentVariant1 is { } __value0) { - chatMessagesDiscriminatorMappingAssistantContentVariant1?.Invoke(ChatMessagesDiscriminatorMappingAssistantContentVariant1!); + chatMessagesDiscriminatorMappingAssistantContentVariant1?.Invoke(__value0); } - else if (IsChatMessagesDiscriminatorMappingAssistantContent1) + else if (ChatMessagesDiscriminatorMappingAssistantContent1 is { } __value1) { - chatMessagesDiscriminatorMappingAssistantContent1?.Invoke(ChatMessagesDiscriminatorMappingAssistantContent1!); + chatMessagesDiscriminatorMappingAssistantContent1?.Invoke(__value1); } } @@ -203,13 +203,13 @@ public void Switch( Validate(); } - if (IsChatMessagesDiscriminatorMappingAssistantContentVariant1) + if (ChatMessagesDiscriminatorMappingAssistantContentVariant1 is { } __value0) { - chatMessagesDiscriminatorMappingAssistantContentVariant1?.Invoke(ChatMessagesDiscriminatorMappingAssistantContentVariant1!); + chatMessagesDiscriminatorMappingAssistantContentVariant1?.Invoke(__value0); } - else if (IsChatMessagesDiscriminatorMappingAssistantContent1) + else if (ChatMessagesDiscriminatorMappingAssistantContent1 is { } __value1) { - chatMessagesDiscriminatorMappingAssistantContent1?.Invoke(ChatMessagesDiscriminatorMappingAssistantContent1!); + chatMessagesDiscriminatorMappingAssistantContent1?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.ChatMessagesDiscriminatorMappingDeveloperContent.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.ChatMessagesDiscriminatorMappingDeveloperContent.g.cs index 29ccf38b..2324cde0 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.ChatMessagesDiscriminatorMappingDeveloperContent.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.ChatMessagesDiscriminatorMappingDeveloperContent.g.cs @@ -42,8 +42,8 @@ public bool TryPickChatMessagesDiscriminatorMappingDeveloperContentVariant1( /// /// /// - public string PickChatMessagesDiscriminatorMappingDeveloperContentVariant1() => IsChatMessagesDiscriminatorMappingDeveloperContentVariant1 - ? ChatMessagesDiscriminatorMappingDeveloperContentVariant1! + public string PickChatMessagesDiscriminatorMappingDeveloperContentVariant1() => ChatMessagesDiscriminatorMappingDeveloperContentVariant1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ChatMessagesDiscriminatorMappingDeveloperContentVariant1' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickChatMessagesDiscriminatorMappingDeveloperContent1( /// /// /// - public global::System.Collections.Generic.IList PickChatMessagesDiscriminatorMappingDeveloperContent1() => IsChatMessagesDiscriminatorMappingDeveloperContent1 - ? ChatMessagesDiscriminatorMappingDeveloperContent1! + public global::System.Collections.Generic.IList PickChatMessagesDiscriminatorMappingDeveloperContent1() => ChatMessagesDiscriminatorMappingDeveloperContent1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ChatMessagesDiscriminatorMappingDeveloperContent1' but the value was {ToString()}."); /// /// @@ -154,13 +154,13 @@ public bool Validate() Validate(); } - if (IsChatMessagesDiscriminatorMappingDeveloperContentVariant1 && chatMessagesDiscriminatorMappingDeveloperContentVariant1 != null) + if (ChatMessagesDiscriminatorMappingDeveloperContentVariant1 is { } __value0 && chatMessagesDiscriminatorMappingDeveloperContentVariant1 != null) { - return chatMessagesDiscriminatorMappingDeveloperContentVariant1(ChatMessagesDiscriminatorMappingDeveloperContentVariant1!); + return chatMessagesDiscriminatorMappingDeveloperContentVariant1(__value0); } - else if (IsChatMessagesDiscriminatorMappingDeveloperContent1 && chatMessagesDiscriminatorMappingDeveloperContent1 != null) + else if (ChatMessagesDiscriminatorMappingDeveloperContent1 is { } __value1 && chatMessagesDiscriminatorMappingDeveloperContent1 != null) { - return chatMessagesDiscriminatorMappingDeveloperContent1(ChatMessagesDiscriminatorMappingDeveloperContent1!); + return chatMessagesDiscriminatorMappingDeveloperContent1(__value1); } return default(TResult); @@ -180,13 +180,13 @@ public void Match( Validate(); } - if (IsChatMessagesDiscriminatorMappingDeveloperContentVariant1) + if (ChatMessagesDiscriminatorMappingDeveloperContentVariant1 is { } __value0) { - chatMessagesDiscriminatorMappingDeveloperContentVariant1?.Invoke(ChatMessagesDiscriminatorMappingDeveloperContentVariant1!); + chatMessagesDiscriminatorMappingDeveloperContentVariant1?.Invoke(__value0); } - else if (IsChatMessagesDiscriminatorMappingDeveloperContent1) + else if (ChatMessagesDiscriminatorMappingDeveloperContent1 is { } __value1) { - chatMessagesDiscriminatorMappingDeveloperContent1?.Invoke(ChatMessagesDiscriminatorMappingDeveloperContent1!); + chatMessagesDiscriminatorMappingDeveloperContent1?.Invoke(__value1); } } @@ -203,13 +203,13 @@ public void Switch( Validate(); } - if (IsChatMessagesDiscriminatorMappingDeveloperContentVariant1) + if (ChatMessagesDiscriminatorMappingDeveloperContentVariant1 is { } __value0) { - chatMessagesDiscriminatorMappingDeveloperContentVariant1?.Invoke(ChatMessagesDiscriminatorMappingDeveloperContentVariant1!); + chatMessagesDiscriminatorMappingDeveloperContentVariant1?.Invoke(__value0); } - else if (IsChatMessagesDiscriminatorMappingDeveloperContent1) + else if (ChatMessagesDiscriminatorMappingDeveloperContent1 is { } __value1) { - chatMessagesDiscriminatorMappingDeveloperContent1?.Invoke(ChatMessagesDiscriminatorMappingDeveloperContent1!); + chatMessagesDiscriminatorMappingDeveloperContent1?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.ChatRequestPluginsItems.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.ChatRequestPluginsItems.g.cs index 5454f223..ccd7931e 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.ChatRequestPluginsItems.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.ChatRequestPluginsItems.g.cs @@ -47,8 +47,8 @@ public bool TryPickAutoBetaRouter( /// /// /// - public global::OpenRouter.ChatRequestPluginsItemsVariant1 PickAutoBetaRouter() => IsAutoBetaRouter - ? AutoBetaRouter! + public global::OpenRouter.ChatRequestPluginsItemsVariant1 PickAutoBetaRouter() => AutoBetaRouter is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'AutoBetaRouter' but the value was {ToString()}."); /// @@ -84,8 +84,8 @@ public bool TryPickAutoRouter( /// /// /// - public global::OpenRouter.ChatRequestPluginsItemsVariant2 PickAutoRouter() => IsAutoRouter - ? AutoRouter! + public global::OpenRouter.ChatRequestPluginsItemsVariant2 PickAutoRouter() => AutoRouter is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'AutoRouter' but the value was {ToString()}."); /// @@ -121,8 +121,8 @@ public bool TryPickContextCompression( /// /// /// - public global::OpenRouter.ChatRequestPluginsItemsVariant3 PickContextCompression() => IsContextCompression - ? ContextCompression! + public global::OpenRouter.ChatRequestPluginsItemsVariant3 PickContextCompression() => ContextCompression is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ContextCompression' but the value was {ToString()}."); /// @@ -158,8 +158,8 @@ public bool TryPickFileParser( /// /// /// - public global::OpenRouter.ChatRequestPluginsItemsVariant4 PickFileParser() => IsFileParser - ? FileParser! + public global::OpenRouter.ChatRequestPluginsItemsVariant4 PickFileParser() => FileParser is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'FileParser' but the value was {ToString()}."); /// @@ -195,8 +195,8 @@ public bool TryPickFusion( /// /// /// - public global::OpenRouter.ChatRequestPluginsItemsVariant5 PickFusion() => IsFusion - ? Fusion! + public global::OpenRouter.ChatRequestPluginsItemsVariant5 PickFusion() => Fusion is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Fusion' but the value was {ToString()}."); /// @@ -232,8 +232,8 @@ public bool TryPickModeration( /// /// /// - public global::OpenRouter.ChatRequestPluginsItemsVariant6 PickModeration() => IsModeration - ? Moderation! + public global::OpenRouter.ChatRequestPluginsItemsVariant6 PickModeration() => Moderation is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Moderation' but the value was {ToString()}."); /// @@ -269,8 +269,8 @@ public bool TryPickParetoRouter( /// /// /// - public global::OpenRouter.ChatRequestPluginsItemsVariant7 PickParetoRouter() => IsParetoRouter - ? ParetoRouter! + public global::OpenRouter.ChatRequestPluginsItemsVariant7 PickParetoRouter() => ParetoRouter is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ParetoRouter' but the value was {ToString()}."); /// @@ -306,8 +306,8 @@ public bool TryPickResponseHealing( /// /// /// - public global::OpenRouter.ChatRequestPluginsItemsVariant8 PickResponseHealing() => IsResponseHealing - ? ResponseHealing! + public global::OpenRouter.ChatRequestPluginsItemsVariant8 PickResponseHealing() => ResponseHealing is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ResponseHealing' but the value was {ToString()}."); /// @@ -343,8 +343,8 @@ public bool TryPickWeb( /// /// /// - public global::OpenRouter.ChatRequestPluginsItemsVariant9 PickWeb() => IsWeb - ? Web! + public global::OpenRouter.ChatRequestPluginsItemsVariant9 PickWeb() => Web is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Web' but the value was {ToString()}."); /// @@ -380,8 +380,8 @@ public bool TryPickWebFetch( /// /// /// - public global::OpenRouter.ChatRequestPluginsItemsVariant10 PickWebFetch() => IsWebFetch - ? WebFetch! + public global::OpenRouter.ChatRequestPluginsItemsVariant10 PickWebFetch() => WebFetch is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'WebFetch' but the value was {ToString()}."); /// /// @@ -705,45 +705,45 @@ public bool Validate() Validate(); } - if (IsAutoBetaRouter && autoBetaRouter != null) + if (AutoBetaRouter is { } __value0 && autoBetaRouter != null) { - return autoBetaRouter(AutoBetaRouter!); + return autoBetaRouter(__value0); } - else if (IsAutoRouter && autoRouter != null) + else if (AutoRouter is { } __value1 && autoRouter != null) { - return autoRouter(AutoRouter!); + return autoRouter(__value1); } - else if (IsContextCompression && contextCompression != null) + else if (ContextCompression is { } __value2 && contextCompression != null) { - return contextCompression(ContextCompression!); + return contextCompression(__value2); } - else if (IsFileParser && fileParser != null) + else if (FileParser is { } __value3 && fileParser != null) { - return fileParser(FileParser!); + return fileParser(__value3); } - else if (IsFusion && fusion != null) + else if (Fusion is { } __value4 && fusion != null) { - return fusion(Fusion!); + return fusion(__value4); } - else if (IsModeration && moderation != null) + else if (Moderation is { } __value5 && moderation != null) { - return moderation(Moderation!); + return moderation(__value5); } - else if (IsParetoRouter && paretoRouter != null) + else if (ParetoRouter is { } __value6 && paretoRouter != null) { - return paretoRouter(ParetoRouter!); + return paretoRouter(__value6); } - else if (IsResponseHealing && responseHealing != null) + else if (ResponseHealing is { } __value7 && responseHealing != null) { - return responseHealing(ResponseHealing!); + return responseHealing(__value7); } - else if (IsWeb && web != null) + else if (Web is { } __value8 && web != null) { - return web(Web!); + return web(__value8); } - else if (IsWebFetch && webFetch != null) + else if (WebFetch is { } __value9 && webFetch != null) { - return webFetch(WebFetch!); + return webFetch(__value9); } return default(TResult); @@ -779,45 +779,45 @@ public void Match( Validate(); } - if (IsAutoBetaRouter) + if (AutoBetaRouter is { } __value0) { - autoBetaRouter?.Invoke(AutoBetaRouter!); + autoBetaRouter?.Invoke(__value0); } - else if (IsAutoRouter) + else if (AutoRouter is { } __value1) { - autoRouter?.Invoke(AutoRouter!); + autoRouter?.Invoke(__value1); } - else if (IsContextCompression) + else if (ContextCompression is { } __value2) { - contextCompression?.Invoke(ContextCompression!); + contextCompression?.Invoke(__value2); } - else if (IsFileParser) + else if (FileParser is { } __value3) { - fileParser?.Invoke(FileParser!); + fileParser?.Invoke(__value3); } - else if (IsFusion) + else if (Fusion is { } __value4) { - fusion?.Invoke(Fusion!); + fusion?.Invoke(__value4); } - else if (IsModeration) + else if (Moderation is { } __value5) { - moderation?.Invoke(Moderation!); + moderation?.Invoke(__value5); } - else if (IsParetoRouter) + else if (ParetoRouter is { } __value6) { - paretoRouter?.Invoke(ParetoRouter!); + paretoRouter?.Invoke(__value6); } - else if (IsResponseHealing) + else if (ResponseHealing is { } __value7) { - responseHealing?.Invoke(ResponseHealing!); + responseHealing?.Invoke(__value7); } - else if (IsWeb) + else if (Web is { } __value8) { - web?.Invoke(Web!); + web?.Invoke(__value8); } - else if (IsWebFetch) + else if (WebFetch is { } __value9) { - webFetch?.Invoke(WebFetch!); + webFetch?.Invoke(__value9); } } @@ -842,45 +842,45 @@ public void Switch( Validate(); } - if (IsAutoBetaRouter) + if (AutoBetaRouter is { } __value0) { - autoBetaRouter?.Invoke(AutoBetaRouter!); + autoBetaRouter?.Invoke(__value0); } - else if (IsAutoRouter) + else if (AutoRouter is { } __value1) { - autoRouter?.Invoke(AutoRouter!); + autoRouter?.Invoke(__value1); } - else if (IsContextCompression) + else if (ContextCompression is { } __value2) { - contextCompression?.Invoke(ContextCompression!); + contextCompression?.Invoke(__value2); } - else if (IsFileParser) + else if (FileParser is { } __value3) { - fileParser?.Invoke(FileParser!); + fileParser?.Invoke(__value3); } - else if (IsFusion) + else if (Fusion is { } __value4) { - fusion?.Invoke(Fusion!); + fusion?.Invoke(__value4); } - else if (IsModeration) + else if (Moderation is { } __value5) { - moderation?.Invoke(Moderation!); + moderation?.Invoke(__value5); } - else if (IsParetoRouter) + else if (ParetoRouter is { } __value6) { - paretoRouter?.Invoke(ParetoRouter!); + paretoRouter?.Invoke(__value6); } - else if (IsResponseHealing) + else if (ResponseHealing is { } __value7) { - responseHealing?.Invoke(ResponseHealing!); + responseHealing?.Invoke(__value7); } - else if (IsWeb) + else if (Web is { } __value8) { - web?.Invoke(Web!); + web?.Invoke(__value8); } - else if (IsWebFetch) + else if (WebFetch is { } __value9) { - webFetch?.Invoke(WebFetch!); + webFetch?.Invoke(__value9); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.ChatRequestResponseFormat.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.ChatRequestResponseFormat.g.cs index 61ca5e52..b84d0404 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.ChatRequestResponseFormat.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.ChatRequestResponseFormat.g.cs @@ -47,8 +47,8 @@ public bool TryPickGrammar( /// /// /// - public global::OpenRouter.ChatRequestResponseFormatVariant1 PickGrammar() => IsGrammar - ? Grammar! + public global::OpenRouter.ChatRequestResponseFormatVariant1 PickGrammar() => Grammar is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Grammar' but the value was {ToString()}."); /// @@ -84,8 +84,8 @@ public bool TryPickJsonObject( /// /// /// - public global::OpenRouter.ChatRequestResponseFormatVariant2 PickJsonObject() => IsJsonObject - ? JsonObject! + public global::OpenRouter.ChatRequestResponseFormatVariant2 PickJsonObject() => JsonObject is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'JsonObject' but the value was {ToString()}."); /// @@ -121,8 +121,8 @@ public bool TryPickJsonSchema( /// /// /// - public global::OpenRouter.ChatRequestResponseFormatVariant3 PickJsonSchema() => IsJsonSchema - ? JsonSchema! + public global::OpenRouter.ChatRequestResponseFormatVariant3 PickJsonSchema() => JsonSchema is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'JsonSchema' but the value was {ToString()}."); /// @@ -158,8 +158,8 @@ public bool TryPickPython( /// /// /// - public global::OpenRouter.ChatRequestResponseFormatVariant4 PickPython() => IsPython - ? Python! + public global::OpenRouter.ChatRequestResponseFormatVariant4 PickPython() => Python is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Python' but the value was {ToString()}."); /// @@ -195,8 +195,8 @@ public bool TryPickText( /// /// /// - public global::OpenRouter.ChatRequestResponseFormatVariant5 PickText() => IsText - ? Text! + public global::OpenRouter.ChatRequestResponseFormatVariant5 PickText() => Text is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Text' but the value was {ToString()}."); /// /// @@ -380,25 +380,25 @@ public bool Validate() Validate(); } - if (IsGrammar && grammar != null) + if (Grammar is { } __value0 && grammar != null) { - return grammar(Grammar!); + return grammar(__value0); } - else if (IsJsonObject && jsonObject != null) + else if (JsonObject is { } __value1 && jsonObject != null) { - return jsonObject(JsonObject!); + return jsonObject(__value1); } - else if (IsJsonSchema && jsonSchema != null) + else if (JsonSchema is { } __value2 && jsonSchema != null) { - return jsonSchema(JsonSchema!); + return jsonSchema(__value2); } - else if (IsPython && python != null) + else if (Python is { } __value3 && python != null) { - return python(Python!); + return python(__value3); } - else if (IsText && text != null) + else if (Text is { } __value4 && text != null) { - return text(Text!); + return text(__value4); } return default(TResult); @@ -424,25 +424,25 @@ public void Match( Validate(); } - if (IsGrammar) + if (Grammar is { } __value0) { - grammar?.Invoke(Grammar!); + grammar?.Invoke(__value0); } - else if (IsJsonObject) + else if (JsonObject is { } __value1) { - jsonObject?.Invoke(JsonObject!); + jsonObject?.Invoke(__value1); } - else if (IsJsonSchema) + else if (JsonSchema is { } __value2) { - jsonSchema?.Invoke(JsonSchema!); + jsonSchema?.Invoke(__value2); } - else if (IsPython) + else if (Python is { } __value3) { - python?.Invoke(Python!); + python?.Invoke(__value3); } - else if (IsText) + else if (Text is { } __value4) { - text?.Invoke(Text!); + text?.Invoke(__value4); } } @@ -462,25 +462,25 @@ public void Switch( Validate(); } - if (IsGrammar) + if (Grammar is { } __value0) { - grammar?.Invoke(Grammar!); + grammar?.Invoke(__value0); } - else if (IsJsonObject) + else if (JsonObject is { } __value1) { - jsonObject?.Invoke(JsonObject!); + jsonObject?.Invoke(__value1); } - else if (IsJsonSchema) + else if (JsonSchema is { } __value2) { - jsonSchema?.Invoke(JsonSchema!); + jsonSchema?.Invoke(__value2); } - else if (IsPython) + else if (Python is { } __value3) { - python?.Invoke(Python!); + python?.Invoke(__value3); } - else if (IsText) + else if (Text is { } __value4) { - text?.Invoke(Text!); + text?.Invoke(__value4); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.ChatRequestStop.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.ChatRequestStop.g.cs index f84ca71f..a72b2410 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.ChatRequestStop.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.ChatRequestStop.g.cs @@ -42,8 +42,8 @@ public bool TryPickChatRequestStopVariant1( /// /// /// - public string PickChatRequestStopVariant1() => IsChatRequestStopVariant1 - ? ChatRequestStopVariant1! + public string PickChatRequestStopVariant1() => ChatRequestStopVariant1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ChatRequestStopVariant1' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickChatRequestStopVariant2( /// /// /// - public global::System.Collections.Generic.IList PickChatRequestStopVariant2() => IsChatRequestStopVariant2 - ? ChatRequestStopVariant2! + public global::System.Collections.Generic.IList PickChatRequestStopVariant2() => ChatRequestStopVariant2 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ChatRequestStopVariant2' but the value was {ToString()}."); /// /// @@ -154,13 +154,13 @@ public bool Validate() Validate(); } - if (IsChatRequestStopVariant1 && chatRequestStopVariant1 != null) + if (ChatRequestStopVariant1 is { } __value0 && chatRequestStopVariant1 != null) { - return chatRequestStopVariant1(ChatRequestStopVariant1!); + return chatRequestStopVariant1(__value0); } - else if (IsChatRequestStopVariant2 && chatRequestStopVariant2 != null) + else if (ChatRequestStopVariant2 is { } __value1 && chatRequestStopVariant2 != null) { - return chatRequestStopVariant2(ChatRequestStopVariant2!); + return chatRequestStopVariant2(__value1); } return default(TResult); @@ -180,13 +180,13 @@ public void Match( Validate(); } - if (IsChatRequestStopVariant1) + if (ChatRequestStopVariant1 is { } __value0) { - chatRequestStopVariant1?.Invoke(ChatRequestStopVariant1!); + chatRequestStopVariant1?.Invoke(__value0); } - else if (IsChatRequestStopVariant2) + else if (ChatRequestStopVariant2 is { } __value1) { - chatRequestStopVariant2?.Invoke(ChatRequestStopVariant2!); + chatRequestStopVariant2?.Invoke(__value1); } } @@ -203,13 +203,13 @@ public void Switch( Validate(); } - if (IsChatRequestStopVariant1) + if (ChatRequestStopVariant1 is { } __value0) { - chatRequestStopVariant1?.Invoke(ChatRequestStopVariant1!); + chatRequestStopVariant1?.Invoke(__value0); } - else if (IsChatRequestStopVariant2) + else if (ChatRequestStopVariant2 is { } __value1) { - chatRequestStopVariant2?.Invoke(ChatRequestStopVariant2!); + chatRequestStopVariant2?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.ChatSystemMessageContent.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.ChatSystemMessageContent.g.cs index e31ff112..567a0208 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.ChatSystemMessageContent.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.ChatSystemMessageContent.g.cs @@ -42,8 +42,8 @@ public bool TryPickChatSystemMessageContentVariant1( /// /// /// - public string PickChatSystemMessageContentVariant1() => IsChatSystemMessageContentVariant1 - ? ChatSystemMessageContentVariant1! + public string PickChatSystemMessageContentVariant1() => ChatSystemMessageContentVariant1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ChatSystemMessageContentVariant1' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickChatSystemMessageContent1( /// /// /// - public global::System.Collections.Generic.IList PickChatSystemMessageContent1() => IsChatSystemMessageContent1 - ? ChatSystemMessageContent1! + public global::System.Collections.Generic.IList PickChatSystemMessageContent1() => ChatSystemMessageContent1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ChatSystemMessageContent1' but the value was {ToString()}."); /// /// @@ -154,13 +154,13 @@ public bool Validate() Validate(); } - if (IsChatSystemMessageContentVariant1 && chatSystemMessageContentVariant1 != null) + if (ChatSystemMessageContentVariant1 is { } __value0 && chatSystemMessageContentVariant1 != null) { - return chatSystemMessageContentVariant1(ChatSystemMessageContentVariant1!); + return chatSystemMessageContentVariant1(__value0); } - else if (IsChatSystemMessageContent1 && chatSystemMessageContent1 != null) + else if (ChatSystemMessageContent1 is { } __value1 && chatSystemMessageContent1 != null) { - return chatSystemMessageContent1(ChatSystemMessageContent1!); + return chatSystemMessageContent1(__value1); } return default(TResult); @@ -180,13 +180,13 @@ public void Match( Validate(); } - if (IsChatSystemMessageContentVariant1) + if (ChatSystemMessageContentVariant1 is { } __value0) { - chatSystemMessageContentVariant1?.Invoke(ChatSystemMessageContentVariant1!); + chatSystemMessageContentVariant1?.Invoke(__value0); } - else if (IsChatSystemMessageContent1) + else if (ChatSystemMessageContent1 is { } __value1) { - chatSystemMessageContent1?.Invoke(ChatSystemMessageContent1!); + chatSystemMessageContent1?.Invoke(__value1); } } @@ -203,13 +203,13 @@ public void Switch( Validate(); } - if (IsChatSystemMessageContentVariant1) + if (ChatSystemMessageContentVariant1 is { } __value0) { - chatSystemMessageContentVariant1?.Invoke(ChatSystemMessageContentVariant1!); + chatSystemMessageContentVariant1?.Invoke(__value0); } - else if (IsChatSystemMessageContent1) + else if (ChatSystemMessageContent1 is { } __value1) { - chatSystemMessageContent1?.Invoke(ChatSystemMessageContent1!); + chatSystemMessageContent1?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.ChatToolChoice.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.ChatToolChoice.g.cs index 1bc76506..ce1d5c5f 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.ChatToolChoice.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.ChatToolChoice.g.cs @@ -42,8 +42,8 @@ public bool TryPickChatToolChoice0( /// /// /// - public global::OpenRouter.ChatToolChoice0 PickChatToolChoice0() => IsChatToolChoice0 - ? ChatToolChoice0!.Value + public global::OpenRouter.ChatToolChoice0 PickChatToolChoice0() => ChatToolChoice0 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ChatToolChoice0' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickChatToolChoice1( /// /// /// - public global::OpenRouter.ChatToolChoice1 PickChatToolChoice1() => IsChatToolChoice1 - ? ChatToolChoice1!.Value + public global::OpenRouter.ChatToolChoice1 PickChatToolChoice1() => ChatToolChoice1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ChatToolChoice1' but the value was {ToString()}."); /// @@ -116,8 +116,8 @@ public bool TryPickChatToolChoice2( /// /// /// - public global::OpenRouter.ChatToolChoice2 PickChatToolChoice2() => IsChatToolChoice2 - ? ChatToolChoice2!.Value + public global::OpenRouter.ChatToolChoice2 PickChatToolChoice2() => ChatToolChoice2 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ChatToolChoice2' but the value was {ToString()}."); /// @@ -153,8 +153,8 @@ public bool TryPickChatNamedToolChoice( /// /// /// - public global::OpenRouter.ChatNamedToolChoice PickChatNamedToolChoice() => IsChatNamedToolChoice - ? ChatNamedToolChoice! + public global::OpenRouter.ChatNamedToolChoice PickChatNamedToolChoice() => ChatNamedToolChoice is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ChatNamedToolChoice' but the value was {ToString()}."); /// @@ -190,8 +190,8 @@ public bool TryPickChatServerToolChoice( /// /// /// - public global::OpenRouter.ChatServerToolChoice PickChatServerToolChoice() => IsChatServerToolChoice - ? ChatServerToolChoice! + public global::OpenRouter.ChatServerToolChoice PickChatServerToolChoice() => ChatServerToolChoice is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ChatServerToolChoice' but the value was {ToString()}."); /// /// @@ -372,25 +372,25 @@ public bool Validate() Validate(); } - if (IsChatToolChoice0 && chatToolChoice0 != null) + if (ChatToolChoice0 is { } __value0 && chatToolChoice0 != null) { - return chatToolChoice0(ChatToolChoice0!); + return chatToolChoice0(__value0); } - else if (IsChatToolChoice1 && chatToolChoice1 != null) + else if (ChatToolChoice1 is { } __value1 && chatToolChoice1 != null) { - return chatToolChoice1(ChatToolChoice1!); + return chatToolChoice1(__value1); } - else if (IsChatToolChoice2 && chatToolChoice2 != null) + else if (ChatToolChoice2 is { } __value2 && chatToolChoice2 != null) { - return chatToolChoice2(ChatToolChoice2!); + return chatToolChoice2(__value2); } - else if (IsChatNamedToolChoice && chatNamedToolChoice != null) + else if (ChatNamedToolChoice is { } __value3 && chatNamedToolChoice != null) { - return chatNamedToolChoice(ChatNamedToolChoice!); + return chatNamedToolChoice(__value3); } - else if (IsChatServerToolChoice && chatServerToolChoice != null) + else if (ChatServerToolChoice is { } __value4 && chatServerToolChoice != null) { - return chatServerToolChoice(ChatServerToolChoice!); + return chatServerToolChoice(__value4); } return default(TResult); @@ -416,25 +416,25 @@ public void Match( Validate(); } - if (IsChatToolChoice0) + if (ChatToolChoice0 is { } __value0) { - chatToolChoice0?.Invoke(ChatToolChoice0!); + chatToolChoice0?.Invoke(__value0); } - else if (IsChatToolChoice1) + else if (ChatToolChoice1 is { } __value1) { - chatToolChoice1?.Invoke(ChatToolChoice1!); + chatToolChoice1?.Invoke(__value1); } - else if (IsChatToolChoice2) + else if (ChatToolChoice2 is { } __value2) { - chatToolChoice2?.Invoke(ChatToolChoice2!); + chatToolChoice2?.Invoke(__value2); } - else if (IsChatNamedToolChoice) + else if (ChatNamedToolChoice is { } __value3) { - chatNamedToolChoice?.Invoke(ChatNamedToolChoice!); + chatNamedToolChoice?.Invoke(__value3); } - else if (IsChatServerToolChoice) + else if (ChatServerToolChoice is { } __value4) { - chatServerToolChoice?.Invoke(ChatServerToolChoice!); + chatServerToolChoice?.Invoke(__value4); } } @@ -454,25 +454,25 @@ public void Switch( Validate(); } - if (IsChatToolChoice0) + if (ChatToolChoice0 is { } __value0) { - chatToolChoice0?.Invoke(ChatToolChoice0!); + chatToolChoice0?.Invoke(__value0); } - else if (IsChatToolChoice1) + else if (ChatToolChoice1 is { } __value1) { - chatToolChoice1?.Invoke(ChatToolChoice1!); + chatToolChoice1?.Invoke(__value1); } - else if (IsChatToolChoice2) + else if (ChatToolChoice2 is { } __value2) { - chatToolChoice2?.Invoke(ChatToolChoice2!); + chatToolChoice2?.Invoke(__value2); } - else if (IsChatNamedToolChoice) + else if (ChatNamedToolChoice is { } __value3) { - chatNamedToolChoice?.Invoke(ChatNamedToolChoice!); + chatNamedToolChoice?.Invoke(__value3); } - else if (IsChatServerToolChoice) + else if (ChatServerToolChoice is { } __value4) { - chatServerToolChoice?.Invoke(ChatServerToolChoice!); + chatServerToolChoice?.Invoke(__value4); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.ChatToolMessageContent.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.ChatToolMessageContent.g.cs index 8505c73d..8977d910 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.ChatToolMessageContent.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.ChatToolMessageContent.g.cs @@ -42,8 +42,8 @@ public bool TryPickChatToolMessageContentVariant1( /// /// /// - public string PickChatToolMessageContentVariant1() => IsChatToolMessageContentVariant1 - ? ChatToolMessageContentVariant1! + public string PickChatToolMessageContentVariant1() => ChatToolMessageContentVariant1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ChatToolMessageContentVariant1' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickChatToolMessageContent1( /// /// /// - public global::System.Collections.Generic.IList PickChatToolMessageContent1() => IsChatToolMessageContent1 - ? ChatToolMessageContent1! + public global::System.Collections.Generic.IList PickChatToolMessageContent1() => ChatToolMessageContent1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ChatToolMessageContent1' but the value was {ToString()}."); /// /// @@ -154,13 +154,13 @@ public bool Validate() Validate(); } - if (IsChatToolMessageContentVariant1 && chatToolMessageContentVariant1 != null) + if (ChatToolMessageContentVariant1 is { } __value0 && chatToolMessageContentVariant1 != null) { - return chatToolMessageContentVariant1(ChatToolMessageContentVariant1!); + return chatToolMessageContentVariant1(__value0); } - else if (IsChatToolMessageContent1 && chatToolMessageContent1 != null) + else if (ChatToolMessageContent1 is { } __value1 && chatToolMessageContent1 != null) { - return chatToolMessageContent1(ChatToolMessageContent1!); + return chatToolMessageContent1(__value1); } return default(TResult); @@ -180,13 +180,13 @@ public void Match( Validate(); } - if (IsChatToolMessageContentVariant1) + if (ChatToolMessageContentVariant1 is { } __value0) { - chatToolMessageContentVariant1?.Invoke(ChatToolMessageContentVariant1!); + chatToolMessageContentVariant1?.Invoke(__value0); } - else if (IsChatToolMessageContent1) + else if (ChatToolMessageContent1 is { } __value1) { - chatToolMessageContent1?.Invoke(ChatToolMessageContent1!); + chatToolMessageContent1?.Invoke(__value1); } } @@ -203,13 +203,13 @@ public void Switch( Validate(); } - if (IsChatToolMessageContentVariant1) + if (ChatToolMessageContentVariant1 is { } __value0) { - chatToolMessageContentVariant1?.Invoke(ChatToolMessageContentVariant1!); + chatToolMessageContentVariant1?.Invoke(__value0); } - else if (IsChatToolMessageContent1) + else if (ChatToolMessageContent1 is { } __value1) { - chatToolMessageContent1?.Invoke(ChatToolMessageContent1!); + chatToolMessageContent1?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.ChatUserMessageContent.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.ChatUserMessageContent.g.cs index 68c10d7c..bd5960a0 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.ChatUserMessageContent.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.ChatUserMessageContent.g.cs @@ -42,8 +42,8 @@ public bool TryPickChatUserMessageContentVariant1( /// /// /// - public string PickChatUserMessageContentVariant1() => IsChatUserMessageContentVariant1 - ? ChatUserMessageContentVariant1! + public string PickChatUserMessageContentVariant1() => ChatUserMessageContentVariant1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ChatUserMessageContentVariant1' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickChatUserMessageContent1( /// /// /// - public global::System.Collections.Generic.IList PickChatUserMessageContent1() => IsChatUserMessageContent1 - ? ChatUserMessageContent1! + public global::System.Collections.Generic.IList PickChatUserMessageContent1() => ChatUserMessageContent1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ChatUserMessageContent1' but the value was {ToString()}."); /// /// @@ -154,13 +154,13 @@ public bool Validate() Validate(); } - if (IsChatUserMessageContentVariant1 && chatUserMessageContentVariant1 != null) + if (ChatUserMessageContentVariant1 is { } __value0 && chatUserMessageContentVariant1 != null) { - return chatUserMessageContentVariant1(ChatUserMessageContentVariant1!); + return chatUserMessageContentVariant1(__value0); } - else if (IsChatUserMessageContent1 && chatUserMessageContent1 != null) + else if (ChatUserMessageContent1 is { } __value1 && chatUserMessageContent1 != null) { - return chatUserMessageContent1(ChatUserMessageContent1!); + return chatUserMessageContent1(__value1); } return default(TResult); @@ -180,13 +180,13 @@ public void Match( Validate(); } - if (IsChatUserMessageContentVariant1) + if (ChatUserMessageContentVariant1 is { } __value0) { - chatUserMessageContentVariant1?.Invoke(ChatUserMessageContentVariant1!); + chatUserMessageContentVariant1?.Invoke(__value0); } - else if (IsChatUserMessageContent1) + else if (ChatUserMessageContent1 is { } __value1) { - chatUserMessageContent1?.Invoke(ChatUserMessageContent1!); + chatUserMessageContent1?.Invoke(__value1); } } @@ -203,13 +203,13 @@ public void Switch( Validate(); } - if (IsChatUserMessageContentVariant1) + if (ChatUserMessageContentVariant1 is { } __value0) { - chatUserMessageContentVariant1?.Invoke(ChatUserMessageContentVariant1!); + chatUserMessageContentVariant1?.Invoke(__value0); } - else if (IsChatUserMessageContent1) + else if (ChatUserMessageContent1 is { } __value1) { - chatUserMessageContent1?.Invoke(ChatUserMessageContent1!); + chatUserMessageContent1?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.CodeInterpreterServerToolContainer.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.CodeInterpreterServerToolContainer.g.cs index 1f871b90..ad63955c 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.CodeInterpreterServerToolContainer.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.CodeInterpreterServerToolContainer.g.cs @@ -42,8 +42,8 @@ public bool TryPickCodeInterpreterServerToolContainerVariant1( /// /// /// - public string PickCodeInterpreterServerToolContainerVariant1() => IsCodeInterpreterServerToolContainerVariant1 - ? CodeInterpreterServerToolContainerVariant1! + public string PickCodeInterpreterServerToolContainerVariant1() => CodeInterpreterServerToolContainerVariant1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'CodeInterpreterServerToolContainerVariant1' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickCodeInterpreterServerToolContainer1( /// /// /// - public global::OpenRouter.CodeInterpreterServerToolContainer1 PickCodeInterpreterServerToolContainer1() => IsCodeInterpreterServerToolContainer1 - ? CodeInterpreterServerToolContainer1! + public global::OpenRouter.CodeInterpreterServerToolContainer1 PickCodeInterpreterServerToolContainer1() => CodeInterpreterServerToolContainer1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'CodeInterpreterServerToolContainer1' but the value was {ToString()}."); /// /// @@ -177,13 +177,13 @@ public bool Validate() Validate(); } - if (IsCodeInterpreterServerToolContainerVariant1 && codeInterpreterServerToolContainerVariant1 != null) + if (CodeInterpreterServerToolContainerVariant1 is { } __value0 && codeInterpreterServerToolContainerVariant1 != null) { - return codeInterpreterServerToolContainerVariant1(CodeInterpreterServerToolContainerVariant1!); + return codeInterpreterServerToolContainerVariant1(__value0); } - else if (IsCodeInterpreterServerToolContainer1 && codeInterpreterServerToolContainer1 != null) + else if (CodeInterpreterServerToolContainer1 is { } __value1 && codeInterpreterServerToolContainer1 != null) { - return codeInterpreterServerToolContainer1(CodeInterpreterServerToolContainer1!); + return codeInterpreterServerToolContainer1(__value1); } return default(TResult); @@ -203,13 +203,13 @@ public void Match( Validate(); } - if (IsCodeInterpreterServerToolContainerVariant1) + if (CodeInterpreterServerToolContainerVariant1 is { } __value0) { - codeInterpreterServerToolContainerVariant1?.Invoke(CodeInterpreterServerToolContainerVariant1!); + codeInterpreterServerToolContainerVariant1?.Invoke(__value0); } - else if (IsCodeInterpreterServerToolContainer1) + else if (CodeInterpreterServerToolContainer1 is { } __value1) { - codeInterpreterServerToolContainer1?.Invoke(CodeInterpreterServerToolContainer1!); + codeInterpreterServerToolContainer1?.Invoke(__value1); } } @@ -226,13 +226,13 @@ public void Switch( Validate(); } - if (IsCodeInterpreterServerToolContainerVariant1) + if (CodeInterpreterServerToolContainerVariant1 is { } __value0) { - codeInterpreterServerToolContainerVariant1?.Invoke(CodeInterpreterServerToolContainerVariant1!); + codeInterpreterServerToolContainerVariant1?.Invoke(__value0); } - else if (IsCodeInterpreterServerToolContainer1) + else if (CodeInterpreterServerToolContainer1 is { } __value1) { - codeInterpreterServerToolContainer1?.Invoke(CodeInterpreterServerToolContainer1!); + codeInterpreterServerToolContainer1?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.CreateObservabilityDestinationResponseData.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.CreateObservabilityDestinationResponseData.g.cs index d5c2a4fc..acd71f60 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.CreateObservabilityDestinationResponseData.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.CreateObservabilityDestinationResponseData.g.cs @@ -47,8 +47,8 @@ public bool TryPickArize( /// /// /// - public global::OpenRouter.CreateObservabilityDestinationResponseDataVariant1 PickArize() => IsArize - ? Arize! + public global::OpenRouter.CreateObservabilityDestinationResponseDataVariant1 PickArize() => Arize is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Arize' but the value was {ToString()}."); /// @@ -84,8 +84,8 @@ public bool TryPickBraintrust( /// /// /// - public global::OpenRouter.CreateObservabilityDestinationResponseDataVariant2 PickBraintrust() => IsBraintrust - ? Braintrust! + public global::OpenRouter.CreateObservabilityDestinationResponseDataVariant2 PickBraintrust() => Braintrust is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Braintrust' but the value was {ToString()}."); /// @@ -121,8 +121,8 @@ public bool TryPickClickhouse( /// /// /// - public global::OpenRouter.CreateObservabilityDestinationResponseDataVariant3 PickClickhouse() => IsClickhouse - ? Clickhouse! + public global::OpenRouter.CreateObservabilityDestinationResponseDataVariant3 PickClickhouse() => Clickhouse is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Clickhouse' but the value was {ToString()}."); /// @@ -158,8 +158,8 @@ public bool TryPickDatadog( /// /// /// - public global::OpenRouter.CreateObservabilityDestinationResponseDataVariant4 PickDatadog() => IsDatadog - ? Datadog! + public global::OpenRouter.CreateObservabilityDestinationResponseDataVariant4 PickDatadog() => Datadog is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Datadog' but the value was {ToString()}."); /// @@ -195,8 +195,8 @@ public bool TryPickGrafana( /// /// /// - public global::OpenRouter.CreateObservabilityDestinationResponseDataVariant5 PickGrafana() => IsGrafana - ? Grafana! + public global::OpenRouter.CreateObservabilityDestinationResponseDataVariant5 PickGrafana() => Grafana is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Grafana' but the value was {ToString()}."); /// @@ -232,8 +232,8 @@ public bool TryPickLangfuse( /// /// /// - public global::OpenRouter.CreateObservabilityDestinationResponseDataVariant6 PickLangfuse() => IsLangfuse - ? Langfuse! + public global::OpenRouter.CreateObservabilityDestinationResponseDataVariant6 PickLangfuse() => Langfuse is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Langfuse' but the value was {ToString()}."); /// @@ -269,8 +269,8 @@ public bool TryPickLangsmith( /// /// /// - public global::OpenRouter.CreateObservabilityDestinationResponseDataVariant7 PickLangsmith() => IsLangsmith - ? Langsmith! + public global::OpenRouter.CreateObservabilityDestinationResponseDataVariant7 PickLangsmith() => Langsmith is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Langsmith' but the value was {ToString()}."); /// @@ -306,8 +306,8 @@ public bool TryPickNewrelic( /// /// /// - public global::OpenRouter.CreateObservabilityDestinationResponseDataVariant8 PickNewrelic() => IsNewrelic - ? Newrelic! + public global::OpenRouter.CreateObservabilityDestinationResponseDataVariant8 PickNewrelic() => Newrelic is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Newrelic' but the value was {ToString()}."); /// @@ -343,8 +343,8 @@ public bool TryPickOpik( /// /// /// - public global::OpenRouter.CreateObservabilityDestinationResponseDataVariant9 PickOpik() => IsOpik - ? Opik! + public global::OpenRouter.CreateObservabilityDestinationResponseDataVariant9 PickOpik() => Opik is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Opik' but the value was {ToString()}."); /// @@ -380,8 +380,8 @@ public bool TryPickOtelCollector( /// /// /// - public global::OpenRouter.CreateObservabilityDestinationResponseDataVariant10 PickOtelCollector() => IsOtelCollector - ? OtelCollector! + public global::OpenRouter.CreateObservabilityDestinationResponseDataVariant10 PickOtelCollector() => OtelCollector is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OtelCollector' but the value was {ToString()}."); /// @@ -417,8 +417,8 @@ public bool TryPickPosthog( /// /// /// - public global::OpenRouter.CreateObservabilityDestinationResponseDataVariant11 PickPosthog() => IsPosthog - ? Posthog! + public global::OpenRouter.CreateObservabilityDestinationResponseDataVariant11 PickPosthog() => Posthog is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Posthog' but the value was {ToString()}."); /// @@ -454,8 +454,8 @@ public bool TryPickRamp( /// /// /// - public global::OpenRouter.CreateObservabilityDestinationResponseDataVariant12 PickRamp() => IsRamp - ? Ramp! + public global::OpenRouter.CreateObservabilityDestinationResponseDataVariant12 PickRamp() => Ramp is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Ramp' but the value was {ToString()}."); /// @@ -491,8 +491,8 @@ public bool TryPickS3( /// /// /// - public global::OpenRouter.CreateObservabilityDestinationResponseDataVariant13 PickS3() => IsS3 - ? S3! + public global::OpenRouter.CreateObservabilityDestinationResponseDataVariant13 PickS3() => S3 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'S3' but the value was {ToString()}."); /// @@ -528,8 +528,8 @@ public bool TryPickSentry( /// /// /// - public global::OpenRouter.CreateObservabilityDestinationResponseDataVariant14 PickSentry() => IsSentry - ? Sentry! + public global::OpenRouter.CreateObservabilityDestinationResponseDataVariant14 PickSentry() => Sentry is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Sentry' but the value was {ToString()}."); /// @@ -565,8 +565,8 @@ public bool TryPickSnowflake( /// /// /// - public global::OpenRouter.CreateObservabilityDestinationResponseDataVariant15 PickSnowflake() => IsSnowflake - ? Snowflake! + public global::OpenRouter.CreateObservabilityDestinationResponseDataVariant15 PickSnowflake() => Snowflake is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Snowflake' but the value was {ToString()}."); /// @@ -602,8 +602,8 @@ public bool TryPickWeave( /// /// /// - public global::OpenRouter.CreateObservabilityDestinationResponseDataVariant16 PickWeave() => IsWeave - ? Weave! + public global::OpenRouter.CreateObservabilityDestinationResponseDataVariant16 PickWeave() => Weave is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Weave' but the value was {ToString()}."); /// @@ -639,8 +639,8 @@ public bool TryPickWebhook( /// /// /// - public global::OpenRouter.CreateObservabilityDestinationResponseDataVariant17 PickWebhook() => IsWebhook - ? Webhook! + public global::OpenRouter.CreateObservabilityDestinationResponseDataVariant17 PickWebhook() => Webhook is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Webhook' but the value was {ToString()}."); /// /// @@ -1160,73 +1160,73 @@ public bool Validate() Validate(); } - if (IsArize && arize != null) + if (Arize is { } __value0 && arize != null) { - return arize(Arize!); + return arize(__value0); } - else if (IsBraintrust && braintrust != null) + else if (Braintrust is { } __value1 && braintrust != null) { - return braintrust(Braintrust!); + return braintrust(__value1); } - else if (IsClickhouse && clickhouse != null) + else if (Clickhouse is { } __value2 && clickhouse != null) { - return clickhouse(Clickhouse!); + return clickhouse(__value2); } - else if (IsDatadog && datadog != null) + else if (Datadog is { } __value3 && datadog != null) { - return datadog(Datadog!); + return datadog(__value3); } - else if (IsGrafana && grafana != null) + else if (Grafana is { } __value4 && grafana != null) { - return grafana(Grafana!); + return grafana(__value4); } - else if (IsLangfuse && langfuse != null) + else if (Langfuse is { } __value5 && langfuse != null) { - return langfuse(Langfuse!); + return langfuse(__value5); } - else if (IsLangsmith && langsmith != null) + else if (Langsmith is { } __value6 && langsmith != null) { - return langsmith(Langsmith!); + return langsmith(__value6); } - else if (IsNewrelic && newrelic != null) + else if (Newrelic is { } __value7 && newrelic != null) { - return newrelic(Newrelic!); + return newrelic(__value7); } - else if (IsOpik && opik != null) + else if (Opik is { } __value8 && opik != null) { - return opik(Opik!); + return opik(__value8); } - else if (IsOtelCollector && otelCollector != null) + else if (OtelCollector is { } __value9 && otelCollector != null) { - return otelCollector(OtelCollector!); + return otelCollector(__value9); } - else if (IsPosthog && posthog != null) + else if (Posthog is { } __value10 && posthog != null) { - return posthog(Posthog!); + return posthog(__value10); } - else if (IsRamp && ramp != null) + else if (Ramp is { } __value11 && ramp != null) { - return ramp(Ramp!); + return ramp(__value11); } - else if (IsS3 && s3 != null) + else if (S3 is { } __value12 && s3 != null) { - return s3(S3!); + return s3(__value12); } - else if (IsSentry && sentry != null) + else if (Sentry is { } __value13 && sentry != null) { - return sentry(Sentry!); + return sentry(__value13); } - else if (IsSnowflake && snowflake != null) + else if (Snowflake is { } __value14 && snowflake != null) { - return snowflake(Snowflake!); + return snowflake(__value14); } - else if (IsWeave && weave != null) + else if (Weave is { } __value15 && weave != null) { - return weave(Weave!); + return weave(__value15); } - else if (IsWebhook && webhook != null) + else if (Webhook is { } __value16 && webhook != null) { - return webhook(Webhook!); + return webhook(__value16); } return default(TResult); @@ -1276,73 +1276,73 @@ public void Match( Validate(); } - if (IsArize) + if (Arize is { } __value0) { - arize?.Invoke(Arize!); + arize?.Invoke(__value0); } - else if (IsBraintrust) + else if (Braintrust is { } __value1) { - braintrust?.Invoke(Braintrust!); + braintrust?.Invoke(__value1); } - else if (IsClickhouse) + else if (Clickhouse is { } __value2) { - clickhouse?.Invoke(Clickhouse!); + clickhouse?.Invoke(__value2); } - else if (IsDatadog) + else if (Datadog is { } __value3) { - datadog?.Invoke(Datadog!); + datadog?.Invoke(__value3); } - else if (IsGrafana) + else if (Grafana is { } __value4) { - grafana?.Invoke(Grafana!); + grafana?.Invoke(__value4); } - else if (IsLangfuse) + else if (Langfuse is { } __value5) { - langfuse?.Invoke(Langfuse!); + langfuse?.Invoke(__value5); } - else if (IsLangsmith) + else if (Langsmith is { } __value6) { - langsmith?.Invoke(Langsmith!); + langsmith?.Invoke(__value6); } - else if (IsNewrelic) + else if (Newrelic is { } __value7) { - newrelic?.Invoke(Newrelic!); + newrelic?.Invoke(__value7); } - else if (IsOpik) + else if (Opik is { } __value8) { - opik?.Invoke(Opik!); + opik?.Invoke(__value8); } - else if (IsOtelCollector) + else if (OtelCollector is { } __value9) { - otelCollector?.Invoke(OtelCollector!); + otelCollector?.Invoke(__value9); } - else if (IsPosthog) + else if (Posthog is { } __value10) { - posthog?.Invoke(Posthog!); + posthog?.Invoke(__value10); } - else if (IsRamp) + else if (Ramp is { } __value11) { - ramp?.Invoke(Ramp!); + ramp?.Invoke(__value11); } - else if (IsS3) + else if (S3 is { } __value12) { - s3?.Invoke(S3!); + s3?.Invoke(__value12); } - else if (IsSentry) + else if (Sentry is { } __value13) { - sentry?.Invoke(Sentry!); + sentry?.Invoke(__value13); } - else if (IsSnowflake) + else if (Snowflake is { } __value14) { - snowflake?.Invoke(Snowflake!); + snowflake?.Invoke(__value14); } - else if (IsWeave) + else if (Weave is { } __value15) { - weave?.Invoke(Weave!); + weave?.Invoke(__value15); } - else if (IsWebhook) + else if (Webhook is { } __value16) { - webhook?.Invoke(Webhook!); + webhook?.Invoke(__value16); } } @@ -1374,73 +1374,73 @@ public void Switch( Validate(); } - if (IsArize) + if (Arize is { } __value0) { - arize?.Invoke(Arize!); + arize?.Invoke(__value0); } - else if (IsBraintrust) + else if (Braintrust is { } __value1) { - braintrust?.Invoke(Braintrust!); + braintrust?.Invoke(__value1); } - else if (IsClickhouse) + else if (Clickhouse is { } __value2) { - clickhouse?.Invoke(Clickhouse!); + clickhouse?.Invoke(__value2); } - else if (IsDatadog) + else if (Datadog is { } __value3) { - datadog?.Invoke(Datadog!); + datadog?.Invoke(__value3); } - else if (IsGrafana) + else if (Grafana is { } __value4) { - grafana?.Invoke(Grafana!); + grafana?.Invoke(__value4); } - else if (IsLangfuse) + else if (Langfuse is { } __value5) { - langfuse?.Invoke(Langfuse!); + langfuse?.Invoke(__value5); } - else if (IsLangsmith) + else if (Langsmith is { } __value6) { - langsmith?.Invoke(Langsmith!); + langsmith?.Invoke(__value6); } - else if (IsNewrelic) + else if (Newrelic is { } __value7) { - newrelic?.Invoke(Newrelic!); + newrelic?.Invoke(__value7); } - else if (IsOpik) + else if (Opik is { } __value8) { - opik?.Invoke(Opik!); + opik?.Invoke(__value8); } - else if (IsOtelCollector) + else if (OtelCollector is { } __value9) { - otelCollector?.Invoke(OtelCollector!); + otelCollector?.Invoke(__value9); } - else if (IsPosthog) + else if (Posthog is { } __value10) { - posthog?.Invoke(Posthog!); + posthog?.Invoke(__value10); } - else if (IsRamp) + else if (Ramp is { } __value11) { - ramp?.Invoke(Ramp!); + ramp?.Invoke(__value11); } - else if (IsS3) + else if (S3 is { } __value12) { - s3?.Invoke(S3!); + s3?.Invoke(__value12); } - else if (IsSentry) + else if (Sentry is { } __value13) { - sentry?.Invoke(Sentry!); + sentry?.Invoke(__value13); } - else if (IsSnowflake) + else if (Snowflake is { } __value14) { - snowflake?.Invoke(Snowflake!); + snowflake?.Invoke(__value14); } - else if (IsWeave) + else if (Weave is { } __value15) { - weave?.Invoke(Weave!); + weave?.Invoke(__value15); } - else if (IsWebhook) + else if (Webhook is { } __value16) { - webhook?.Invoke(Webhook!); + webhook?.Invoke(__value16); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.CustomToolCallOutputItemOutput.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.CustomToolCallOutputItemOutput.g.cs index 1ce43e3e..7a584aa8 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.CustomToolCallOutputItemOutput.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.CustomToolCallOutputItemOutput.g.cs @@ -42,8 +42,8 @@ public bool TryPickCustomToolCallOutputItemOutputVariant1( /// /// /// - public string PickCustomToolCallOutputItemOutputVariant1() => IsCustomToolCallOutputItemOutputVariant1 - ? CustomToolCallOutputItemOutputVariant1! + public string PickCustomToolCallOutputItemOutputVariant1() => CustomToolCallOutputItemOutputVariant1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'CustomToolCallOutputItemOutputVariant1' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickCustomToolCallOutputItemOutput1( /// /// /// - public global::System.Collections.Generic.IList PickCustomToolCallOutputItemOutput1() => IsCustomToolCallOutputItemOutput1 - ? CustomToolCallOutputItemOutput1! + public global::System.Collections.Generic.IList PickCustomToolCallOutputItemOutput1() => CustomToolCallOutputItemOutput1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'CustomToolCallOutputItemOutput1' but the value was {ToString()}."); /// /// @@ -154,13 +154,13 @@ public bool Validate() Validate(); } - if (IsCustomToolCallOutputItemOutputVariant1 && customToolCallOutputItemOutputVariant1 != null) + if (CustomToolCallOutputItemOutputVariant1 is { } __value0 && customToolCallOutputItemOutputVariant1 != null) { - return customToolCallOutputItemOutputVariant1(CustomToolCallOutputItemOutputVariant1!); + return customToolCallOutputItemOutputVariant1(__value0); } - else if (IsCustomToolCallOutputItemOutput1 && customToolCallOutputItemOutput1 != null) + else if (CustomToolCallOutputItemOutput1 is { } __value1 && customToolCallOutputItemOutput1 != null) { - return customToolCallOutputItemOutput1(CustomToolCallOutputItemOutput1!); + return customToolCallOutputItemOutput1(__value1); } return default(TResult); @@ -180,13 +180,13 @@ public void Match( Validate(); } - if (IsCustomToolCallOutputItemOutputVariant1) + if (CustomToolCallOutputItemOutputVariant1 is { } __value0) { - customToolCallOutputItemOutputVariant1?.Invoke(CustomToolCallOutputItemOutputVariant1!); + customToolCallOutputItemOutputVariant1?.Invoke(__value0); } - else if (IsCustomToolCallOutputItemOutput1) + else if (CustomToolCallOutputItemOutput1 is { } __value1) { - customToolCallOutputItemOutput1?.Invoke(CustomToolCallOutputItemOutput1!); + customToolCallOutputItemOutput1?.Invoke(__value1); } } @@ -203,13 +203,13 @@ public void Switch( Validate(); } - if (IsCustomToolCallOutputItemOutputVariant1) + if (CustomToolCallOutputItemOutputVariant1 is { } __value0) { - customToolCallOutputItemOutputVariant1?.Invoke(CustomToolCallOutputItemOutputVariant1!); + customToolCallOutputItemOutputVariant1?.Invoke(__value0); } - else if (IsCustomToolCallOutputItemOutput1) + else if (CustomToolCallOutputItemOutput1 is { } __value1) { - customToolCallOutputItemOutput1?.Invoke(CustomToolCallOutputItemOutput1!); + customToolCallOutputItemOutput1?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.CustomToolCallOutputItemOutputOneOf1Items.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.CustomToolCallOutputItemOutputOneOf1Items.g.cs index bf899010..173793e4 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.CustomToolCallOutputItemOutputOneOf1Items.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.CustomToolCallOutputItemOutputOneOf1Items.g.cs @@ -47,8 +47,8 @@ public bool TryPickInputFile( /// /// /// - public global::OpenRouter.CustomToolCallOutputItemOutputOneOf1ItemsVariant1 PickInputFile() => IsInputFile - ? InputFile! + public global::OpenRouter.CustomToolCallOutputItemOutputOneOf1ItemsVariant1 PickInputFile() => InputFile is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'InputFile' but the value was {ToString()}."); /// @@ -84,8 +84,8 @@ public bool TryPickInputImage( /// /// /// - public global::OpenRouter.CustomToolCallOutputItemOutputOneOf1ItemsVariant2 PickInputImage() => IsInputImage - ? InputImage! + public global::OpenRouter.CustomToolCallOutputItemOutputOneOf1ItemsVariant2 PickInputImage() => InputImage is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'InputImage' but the value was {ToString()}."); /// @@ -121,8 +121,8 @@ public bool TryPickInputText( /// /// /// - public global::OpenRouter.CustomToolCallOutputItemOutputOneOf1ItemsVariant3 PickInputText() => IsInputText - ? InputText! + public global::OpenRouter.CustomToolCallOutputItemOutputOneOf1ItemsVariant3 PickInputText() => InputText is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'InputText' but the value was {ToString()}."); /// /// @@ -250,17 +250,17 @@ public bool Validate() Validate(); } - if (IsInputFile && inputFile != null) + if (InputFile is { } __value0 && inputFile != null) { - return inputFile(InputFile!); + return inputFile(__value0); } - else if (IsInputImage && inputImage != null) + else if (InputImage is { } __value1 && inputImage != null) { - return inputImage(InputImage!); + return inputImage(__value1); } - else if (IsInputText && inputText != null) + else if (InputText is { } __value2 && inputText != null) { - return inputText(InputText!); + return inputText(__value2); } return default(TResult); @@ -282,17 +282,17 @@ public void Match( Validate(); } - if (IsInputFile) + if (InputFile is { } __value0) { - inputFile?.Invoke(InputFile!); + inputFile?.Invoke(__value0); } - else if (IsInputImage) + else if (InputImage is { } __value1) { - inputImage?.Invoke(InputImage!); + inputImage?.Invoke(__value1); } - else if (IsInputText) + else if (InputText is { } __value2) { - inputText?.Invoke(InputText!); + inputText?.Invoke(__value2); } } @@ -310,17 +310,17 @@ public void Switch( Validate(); } - if (IsInputFile) + if (InputFile is { } __value0) { - inputFile?.Invoke(InputFile!); + inputFile?.Invoke(__value0); } - else if (IsInputImage) + else if (InputImage is { } __value1) { - inputImage?.Invoke(InputImage!); + inputImage?.Invoke(__value1); } - else if (IsInputText) + else if (InputText is { } __value2) { - inputText?.Invoke(InputText!); + inputText?.Invoke(__value2); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.CustomToolFormat.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.CustomToolFormat.g.cs index 1c8609a2..c35c28dc 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.CustomToolFormat.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.CustomToolFormat.g.cs @@ -42,8 +42,8 @@ public bool TryPickCustomToolFormat0( /// /// /// - public global::OpenRouter.CustomToolFormat0 PickCustomToolFormat0() => IsCustomToolFormat0 - ? CustomToolFormat0! + public global::OpenRouter.CustomToolFormat0 PickCustomToolFormat0() => CustomToolFormat0 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'CustomToolFormat0' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickCustomToolFormat1( /// /// /// - public global::OpenRouter.CustomToolFormat1 PickCustomToolFormat1() => IsCustomToolFormat1 - ? CustomToolFormat1! + public global::OpenRouter.CustomToolFormat1 PickCustomToolFormat1() => CustomToolFormat1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'CustomToolFormat1' but the value was {ToString()}."); /// /// @@ -177,13 +177,13 @@ public bool Validate() Validate(); } - if (IsCustomToolFormat0 && customToolFormat0 != null) + if (CustomToolFormat0 is { } __value0 && customToolFormat0 != null) { - return customToolFormat0(CustomToolFormat0!); + return customToolFormat0(__value0); } - else if (IsCustomToolFormat1 && customToolFormat1 != null) + else if (CustomToolFormat1 is { } __value1 && customToolFormat1 != null) { - return customToolFormat1(CustomToolFormat1!); + return customToolFormat1(__value1); } return default(TResult); @@ -203,13 +203,13 @@ public void Match( Validate(); } - if (IsCustomToolFormat0) + if (CustomToolFormat0 is { } __value0) { - customToolFormat0?.Invoke(CustomToolFormat0!); + customToolFormat0?.Invoke(__value0); } - else if (IsCustomToolFormat1) + else if (CustomToolFormat1 is { } __value1) { - customToolFormat1?.Invoke(CustomToolFormat1!); + customToolFormat1?.Invoke(__value1); } } @@ -226,13 +226,13 @@ public void Switch( Validate(); } - if (IsCustomToolFormat0) + if (CustomToolFormat0 is { } __value0) { - customToolFormat0?.Invoke(CustomToolFormat0!); + customToolFormat0?.Invoke(__value0); } - else if (IsCustomToolFormat1) + else if (CustomToolFormat1 is { } __value1) { - customToolFormat1?.Invoke(CustomToolFormat1!); + customToolFormat1?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.EasyInputMessageContent.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.EasyInputMessageContent.g.cs index 27dd8319..a17cee2a 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.EasyInputMessageContent.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.EasyInputMessageContent.g.cs @@ -42,8 +42,8 @@ public bool TryPickEasyInputMessageContent0( /// /// /// - public global::System.Collections.Generic.IList PickEasyInputMessageContent0() => IsEasyInputMessageContent0 - ? EasyInputMessageContent0! + public global::System.Collections.Generic.IList PickEasyInputMessageContent0() => EasyInputMessageContent0 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'EasyInputMessageContent0' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickEasyInputMessageContentVariant2( /// /// /// - public string PickEasyInputMessageContentVariant2() => IsEasyInputMessageContentVariant2 - ? EasyInputMessageContentVariant2! + public string PickEasyInputMessageContentVariant2() => EasyInputMessageContentVariant2 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'EasyInputMessageContentVariant2' but the value was {ToString()}."); /// /// @@ -154,13 +154,13 @@ public bool Validate() Validate(); } - if (IsEasyInputMessageContent0 && easyInputMessageContent0 != null) + if (EasyInputMessageContent0 is { } __value0 && easyInputMessageContent0 != null) { - return easyInputMessageContent0(EasyInputMessageContent0!); + return easyInputMessageContent0(__value0); } - else if (IsEasyInputMessageContentVariant2 && easyInputMessageContentVariant2 != null) + else if (EasyInputMessageContentVariant2 is { } __value1 && easyInputMessageContentVariant2 != null) { - return easyInputMessageContentVariant2(EasyInputMessageContentVariant2!); + return easyInputMessageContentVariant2(__value1); } return default(TResult); @@ -180,13 +180,13 @@ public void Match( Validate(); } - if (IsEasyInputMessageContent0) + if (EasyInputMessageContent0 is { } __value0) { - easyInputMessageContent0?.Invoke(EasyInputMessageContent0!); + easyInputMessageContent0?.Invoke(__value0); } - else if (IsEasyInputMessageContentVariant2) + else if (EasyInputMessageContentVariant2 is { } __value1) { - easyInputMessageContentVariant2?.Invoke(EasyInputMessageContentVariant2!); + easyInputMessageContentVariant2?.Invoke(__value1); } } @@ -203,13 +203,13 @@ public void Switch( Validate(); } - if (IsEasyInputMessageContent0) + if (EasyInputMessageContent0 is { } __value0) { - easyInputMessageContent0?.Invoke(EasyInputMessageContent0!); + easyInputMessageContent0?.Invoke(__value0); } - else if (IsEasyInputMessageContentVariant2) + else if (EasyInputMessageContentVariant2 is { } __value1) { - easyInputMessageContentVariant2?.Invoke(EasyInputMessageContentVariant2!); + easyInputMessageContentVariant2?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.EasyInputMessageContentOneOf0Items.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.EasyInputMessageContentOneOf0Items.g.cs index 984018fe..41e3f42d 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.EasyInputMessageContentOneOf0Items.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.EasyInputMessageContentOneOf0Items.g.cs @@ -42,8 +42,8 @@ public bool TryPickInputText( /// /// /// - public global::OpenRouter.InputText PickInputText() => IsInputText - ? InputText! + public global::OpenRouter.InputText PickInputText() => InputText is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'InputText' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickEasyInputMessageContentOneOf0Items1( /// /// /// - public global::OpenRouter.EasyInputMessageContentOneOf0Items1 PickEasyInputMessageContentOneOf0Items1() => IsEasyInputMessageContentOneOf0Items1 - ? EasyInputMessageContentOneOf0Items1! + public global::OpenRouter.EasyInputMessageContentOneOf0Items1 PickEasyInputMessageContentOneOf0Items1() => EasyInputMessageContentOneOf0Items1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'EasyInputMessageContentOneOf0Items1' but the value was {ToString()}."); /// @@ -116,8 +116,8 @@ public bool TryPickInputFile( /// /// /// - public global::OpenRouter.InputFile PickInputFile() => IsInputFile - ? InputFile! + public global::OpenRouter.InputFile PickInputFile() => InputFile is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'InputFile' but the value was {ToString()}."); /// @@ -153,8 +153,8 @@ public bool TryPickInputAudio( /// /// /// - public global::OpenRouter.InputAudio PickInputAudio() => IsInputAudio - ? InputAudio! + public global::OpenRouter.InputAudio PickInputAudio() => InputAudio is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'InputAudio' but the value was {ToString()}."); /// @@ -190,8 +190,8 @@ public bool TryPickInputVideo( /// /// /// - public global::OpenRouter.InputVideo PickInputVideo() => IsInputVideo - ? InputVideo! + public global::OpenRouter.InputVideo PickInputVideo() => InputVideo is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'InputVideo' but the value was {ToString()}."); /// /// @@ -372,25 +372,25 @@ public bool Validate() Validate(); } - if (IsInputText && inputText != null) + if (InputText is { } __value0 && inputText != null) { - return inputText(InputText!); + return inputText(__value0); } - else if (IsEasyInputMessageContentOneOf0Items1 && easyInputMessageContentOneOf0Items1 != null) + else if (EasyInputMessageContentOneOf0Items1 is { } __value1 && easyInputMessageContentOneOf0Items1 != null) { - return easyInputMessageContentOneOf0Items1(EasyInputMessageContentOneOf0Items1!); + return easyInputMessageContentOneOf0Items1(__value1); } - else if (IsInputFile && inputFile != null) + else if (InputFile is { } __value2 && inputFile != null) { - return inputFile(InputFile!); + return inputFile(__value2); } - else if (IsInputAudio && inputAudio != null) + else if (InputAudio is { } __value3 && inputAudio != null) { - return inputAudio(InputAudio!); + return inputAudio(__value3); } - else if (IsInputVideo && inputVideo != null) + else if (InputVideo is { } __value4 && inputVideo != null) { - return inputVideo(InputVideo!); + return inputVideo(__value4); } return default(TResult); @@ -416,25 +416,25 @@ public void Match( Validate(); } - if (IsInputText) + if (InputText is { } __value0) { - inputText?.Invoke(InputText!); + inputText?.Invoke(__value0); } - else if (IsEasyInputMessageContentOneOf0Items1) + else if (EasyInputMessageContentOneOf0Items1 is { } __value1) { - easyInputMessageContentOneOf0Items1?.Invoke(EasyInputMessageContentOneOf0Items1!); + easyInputMessageContentOneOf0Items1?.Invoke(__value1); } - else if (IsInputFile) + else if (InputFile is { } __value2) { - inputFile?.Invoke(InputFile!); + inputFile?.Invoke(__value2); } - else if (IsInputAudio) + else if (InputAudio is { } __value3) { - inputAudio?.Invoke(InputAudio!); + inputAudio?.Invoke(__value3); } - else if (IsInputVideo) + else if (InputVideo is { } __value4) { - inputVideo?.Invoke(InputVideo!); + inputVideo?.Invoke(__value4); } } @@ -454,25 +454,25 @@ public void Switch( Validate(); } - if (IsInputText) + if (InputText is { } __value0) { - inputText?.Invoke(InputText!); + inputText?.Invoke(__value0); } - else if (IsEasyInputMessageContentOneOf0Items1) + else if (EasyInputMessageContentOneOf0Items1 is { } __value1) { - easyInputMessageContentOneOf0Items1?.Invoke(EasyInputMessageContentOneOf0Items1!); + easyInputMessageContentOneOf0Items1?.Invoke(__value1); } - else if (IsInputFile) + else if (InputFile is { } __value2) { - inputFile?.Invoke(InputFile!); + inputFile?.Invoke(__value2); } - else if (IsInputAudio) + else if (InputAudio is { } __value3) { - inputAudio?.Invoke(InputAudio!); + inputAudio?.Invoke(__value3); } - else if (IsInputVideo) + else if (InputVideo is { } __value4) { - inputVideo?.Invoke(InputVideo!); + inputVideo?.Invoke(__value4); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.EasyInputMessagePhase.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.EasyInputMessagePhase.g.cs index f845ffa4..6853565f 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.EasyInputMessagePhase.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.EasyInputMessagePhase.g.cs @@ -42,8 +42,8 @@ public bool TryPickEasyInputMessagePhase0( /// /// /// - public global::OpenRouter.EasyInputMessagePhase0 PickEasyInputMessagePhase0() => IsEasyInputMessagePhase0 - ? EasyInputMessagePhase0!.Value + public global::OpenRouter.EasyInputMessagePhase0 PickEasyInputMessagePhase0() => EasyInputMessagePhase0 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'EasyInputMessagePhase0' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickEasyInputMessagePhase1( /// /// /// - public global::OpenRouter.EasyInputMessagePhase1 PickEasyInputMessagePhase1() => IsEasyInputMessagePhase1 - ? EasyInputMessagePhase1!.Value + public global::OpenRouter.EasyInputMessagePhase1 PickEasyInputMessagePhase1() => EasyInputMessagePhase1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'EasyInputMessagePhase1' but the value was {ToString()}."); /// /// @@ -177,13 +177,13 @@ public bool Validate() Validate(); } - if (IsEasyInputMessagePhase0 && easyInputMessagePhase0 != null) + if (EasyInputMessagePhase0 is { } __value0 && easyInputMessagePhase0 != null) { - return easyInputMessagePhase0(EasyInputMessagePhase0!); + return easyInputMessagePhase0(__value0); } - else if (IsEasyInputMessagePhase1 && easyInputMessagePhase1 != null) + else if (EasyInputMessagePhase1 is { } __value1 && easyInputMessagePhase1 != null) { - return easyInputMessagePhase1(EasyInputMessagePhase1!); + return easyInputMessagePhase1(__value1); } return default(TResult); @@ -203,13 +203,13 @@ public void Match( Validate(); } - if (IsEasyInputMessagePhase0) + if (EasyInputMessagePhase0 is { } __value0) { - easyInputMessagePhase0?.Invoke(EasyInputMessagePhase0!); + easyInputMessagePhase0?.Invoke(__value0); } - else if (IsEasyInputMessagePhase1) + else if (EasyInputMessagePhase1 is { } __value1) { - easyInputMessagePhase1?.Invoke(EasyInputMessagePhase1!); + easyInputMessagePhase1?.Invoke(__value1); } } @@ -226,13 +226,13 @@ public void Switch( Validate(); } - if (IsEasyInputMessagePhase0) + if (EasyInputMessagePhase0 is { } __value0) { - easyInputMessagePhase0?.Invoke(EasyInputMessagePhase0!); + easyInputMessagePhase0?.Invoke(__value0); } - else if (IsEasyInputMessagePhase1) + else if (EasyInputMessagePhase1 is { } __value1) { - easyInputMessagePhase1?.Invoke(EasyInputMessagePhase1!); + easyInputMessagePhase1?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.EasyInputMessageRole.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.EasyInputMessageRole.g.cs index 2dddd965..b5788e8e 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.EasyInputMessageRole.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.EasyInputMessageRole.g.cs @@ -42,8 +42,8 @@ public bool TryPickEasyInputMessageRole0( /// /// /// - public global::OpenRouter.EasyInputMessageRole0 PickEasyInputMessageRole0() => IsEasyInputMessageRole0 - ? EasyInputMessageRole0!.Value + public global::OpenRouter.EasyInputMessageRole0 PickEasyInputMessageRole0() => EasyInputMessageRole0 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'EasyInputMessageRole0' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickEasyInputMessageRole1( /// /// /// - public global::OpenRouter.EasyInputMessageRole1 PickEasyInputMessageRole1() => IsEasyInputMessageRole1 - ? EasyInputMessageRole1!.Value + public global::OpenRouter.EasyInputMessageRole1 PickEasyInputMessageRole1() => EasyInputMessageRole1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'EasyInputMessageRole1' but the value was {ToString()}."); /// @@ -116,8 +116,8 @@ public bool TryPickEasyInputMessageRole2( /// /// /// - public global::OpenRouter.EasyInputMessageRole2 PickEasyInputMessageRole2() => IsEasyInputMessageRole2 - ? EasyInputMessageRole2!.Value + public global::OpenRouter.EasyInputMessageRole2 PickEasyInputMessageRole2() => EasyInputMessageRole2 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'EasyInputMessageRole2' but the value was {ToString()}."); /// @@ -153,8 +153,8 @@ public bool TryPickEasyInputMessageRole3( /// /// /// - public global::OpenRouter.EasyInputMessageRole3 PickEasyInputMessageRole3() => IsEasyInputMessageRole3 - ? EasyInputMessageRole3!.Value + public global::OpenRouter.EasyInputMessageRole3 PickEasyInputMessageRole3() => EasyInputMessageRole3 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'EasyInputMessageRole3' but the value was {ToString()}."); /// /// @@ -307,21 +307,21 @@ public bool Validate() Validate(); } - if (IsEasyInputMessageRole0 && easyInputMessageRole0 != null) + if (EasyInputMessageRole0 is { } __value0 && easyInputMessageRole0 != null) { - return easyInputMessageRole0(EasyInputMessageRole0!); + return easyInputMessageRole0(__value0); } - else if (IsEasyInputMessageRole1 && easyInputMessageRole1 != null) + else if (EasyInputMessageRole1 is { } __value1 && easyInputMessageRole1 != null) { - return easyInputMessageRole1(EasyInputMessageRole1!); + return easyInputMessageRole1(__value1); } - else if (IsEasyInputMessageRole2 && easyInputMessageRole2 != null) + else if (EasyInputMessageRole2 is { } __value2 && easyInputMessageRole2 != null) { - return easyInputMessageRole2(EasyInputMessageRole2!); + return easyInputMessageRole2(__value2); } - else if (IsEasyInputMessageRole3 && easyInputMessageRole3 != null) + else if (EasyInputMessageRole3 is { } __value3 && easyInputMessageRole3 != null) { - return easyInputMessageRole3(EasyInputMessageRole3!); + return easyInputMessageRole3(__value3); } return default(TResult); @@ -345,21 +345,21 @@ public void Match( Validate(); } - if (IsEasyInputMessageRole0) + if (EasyInputMessageRole0 is { } __value0) { - easyInputMessageRole0?.Invoke(EasyInputMessageRole0!); + easyInputMessageRole0?.Invoke(__value0); } - else if (IsEasyInputMessageRole1) + else if (EasyInputMessageRole1 is { } __value1) { - easyInputMessageRole1?.Invoke(EasyInputMessageRole1!); + easyInputMessageRole1?.Invoke(__value1); } - else if (IsEasyInputMessageRole2) + else if (EasyInputMessageRole2 is { } __value2) { - easyInputMessageRole2?.Invoke(EasyInputMessageRole2!); + easyInputMessageRole2?.Invoke(__value2); } - else if (IsEasyInputMessageRole3) + else if (EasyInputMessageRole3 is { } __value3) { - easyInputMessageRole3?.Invoke(EasyInputMessageRole3!); + easyInputMessageRole3?.Invoke(__value3); } } @@ -378,21 +378,21 @@ public void Switch( Validate(); } - if (IsEasyInputMessageRole0) + if (EasyInputMessageRole0 is { } __value0) { - easyInputMessageRole0?.Invoke(EasyInputMessageRole0!); + easyInputMessageRole0?.Invoke(__value0); } - else if (IsEasyInputMessageRole1) + else if (EasyInputMessageRole1 is { } __value1) { - easyInputMessageRole1?.Invoke(EasyInputMessageRole1!); + easyInputMessageRole1?.Invoke(__value1); } - else if (IsEasyInputMessageRole2) + else if (EasyInputMessageRole2 is { } __value2) { - easyInputMessageRole2?.Invoke(EasyInputMessageRole2!); + easyInputMessageRole2?.Invoke(__value2); } - else if (IsEasyInputMessageRole3) + else if (EasyInputMessageRole3 is { } __value3) { - easyInputMessageRole3?.Invoke(EasyInputMessageRole3!); + easyInputMessageRole3?.Invoke(__value3); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.EmbeddingsPostRequestBodyContentApplicationJsonSchemaInput.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.EmbeddingsPostRequestBodyContentApplicationJsonSchemaInput.g.cs index cde4854e..0165533a 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.EmbeddingsPostRequestBodyContentApplicationJsonSchemaInput.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.EmbeddingsPostRequestBodyContentApplicationJsonSchemaInput.g.cs @@ -42,8 +42,8 @@ public bool TryPickEmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVar /// /// /// - public string PickEmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant1() => IsEmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant1 - ? EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant1! + public string PickEmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant1() => EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant1' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickEmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVar /// /// /// - public global::System.Collections.Generic.IList PickEmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant2() => IsEmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant2 - ? EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant2! + public global::System.Collections.Generic.IList PickEmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant2() => EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant2 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant2' but the value was {ToString()}."); /// @@ -116,8 +116,8 @@ public bool TryPickEmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVar /// /// /// - public global::System.Collections.Generic.IList PickEmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant3() => IsEmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant3 - ? EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant3! + public global::System.Collections.Generic.IList PickEmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant3() => EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant3 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant3' but the value was {ToString()}."); /// @@ -153,8 +153,8 @@ public bool TryPickEmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVar /// /// /// - public global::System.Collections.Generic.IList> PickEmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant4() => IsEmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant4 - ? EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant4! + public global::System.Collections.Generic.IList> PickEmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant4() => EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant4 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant4' but the value was {ToString()}."); /// @@ -190,8 +190,8 @@ public bool TryPickEmbeddingsPostRequestBodyContentApplicationJsonSchemaInput4( /// /// /// - public global::System.Collections.Generic.IList PickEmbeddingsPostRequestBodyContentApplicationJsonSchemaInput4() => IsEmbeddingsPostRequestBodyContentApplicationJsonSchemaInput4 - ? EmbeddingsPostRequestBodyContentApplicationJsonSchemaInput4! + public global::System.Collections.Generic.IList PickEmbeddingsPostRequestBodyContentApplicationJsonSchemaInput4() => EmbeddingsPostRequestBodyContentApplicationJsonSchemaInput4 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'EmbeddingsPostRequestBodyContentApplicationJsonSchemaInput4' but the value was {ToString()}."); /// /// @@ -280,25 +280,25 @@ public bool Validate() Validate(); } - if (IsEmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant1 && embeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant1 != null) + if (EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant1 is { } __value0 && embeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant1 != null) { - return embeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant1(EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant1!); + return embeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant1(__value0); } - else if (IsEmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant2 && embeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant2 != null) + else if (EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant2 is { } __value1 && embeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant2 != null) { - return embeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant2(EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant2!); + return embeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant2(__value1); } - else if (IsEmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant3 && embeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant3 != null) + else if (EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant3 is { } __value2 && embeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant3 != null) { - return embeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant3(EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant3!); + return embeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant3(__value2); } - else if (IsEmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant4 && embeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant4 != null) + else if (EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant4 is { } __value3 && embeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant4 != null) { - return embeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant4(EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant4!); + return embeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant4(__value3); } - else if (IsEmbeddingsPostRequestBodyContentApplicationJsonSchemaInput4 && embeddingsPostRequestBodyContentApplicationJsonSchemaInput4 != null) + else if (EmbeddingsPostRequestBodyContentApplicationJsonSchemaInput4 is { } __value4 && embeddingsPostRequestBodyContentApplicationJsonSchemaInput4 != null) { - return embeddingsPostRequestBodyContentApplicationJsonSchemaInput4(EmbeddingsPostRequestBodyContentApplicationJsonSchemaInput4!); + return embeddingsPostRequestBodyContentApplicationJsonSchemaInput4(__value4); } return default(TResult); @@ -324,25 +324,25 @@ public void Match( Validate(); } - if (IsEmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant1) + if (EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant1 is { } __value0) { - embeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant1?.Invoke(EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant1!); + embeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant1?.Invoke(__value0); } - else if (IsEmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant2) + else if (EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant2 is { } __value1) { - embeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant2?.Invoke(EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant2!); + embeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant2?.Invoke(__value1); } - else if (IsEmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant3) + else if (EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant3 is { } __value2) { - embeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant3?.Invoke(EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant3!); + embeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant3?.Invoke(__value2); } - else if (IsEmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant4) + else if (EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant4 is { } __value3) { - embeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant4?.Invoke(EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant4!); + embeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant4?.Invoke(__value3); } - else if (IsEmbeddingsPostRequestBodyContentApplicationJsonSchemaInput4) + else if (EmbeddingsPostRequestBodyContentApplicationJsonSchemaInput4 is { } __value4) { - embeddingsPostRequestBodyContentApplicationJsonSchemaInput4?.Invoke(EmbeddingsPostRequestBodyContentApplicationJsonSchemaInput4!); + embeddingsPostRequestBodyContentApplicationJsonSchemaInput4?.Invoke(__value4); } } @@ -362,25 +362,25 @@ public void Switch( Validate(); } - if (IsEmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant1) + if (EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant1 is { } __value0) { - embeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant1?.Invoke(EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant1!); + embeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant1?.Invoke(__value0); } - else if (IsEmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant2) + else if (EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant2 is { } __value1) { - embeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant2?.Invoke(EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant2!); + embeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant2?.Invoke(__value1); } - else if (IsEmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant3) + else if (EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant3 is { } __value2) { - embeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant3?.Invoke(EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant3!); + embeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant3?.Invoke(__value2); } - else if (IsEmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant4) + else if (EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant4 is { } __value3) { - embeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant4?.Invoke(EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant4!); + embeddingsPostRequestBodyContentApplicationJsonSchemaInputVariant4?.Invoke(__value3); } - else if (IsEmbeddingsPostRequestBodyContentApplicationJsonSchemaInput4) + else if (EmbeddingsPostRequestBodyContentApplicationJsonSchemaInput4 is { } __value4) { - embeddingsPostRequestBodyContentApplicationJsonSchemaInput4?.Invoke(EmbeddingsPostRequestBodyContentApplicationJsonSchemaInput4!); + embeddingsPostRequestBodyContentApplicationJsonSchemaInput4?.Invoke(__value4); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItems.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItems.g.cs index a7929b80..4b164feb 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItems.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItems.g.cs @@ -42,8 +42,8 @@ public bool TryPickEmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOne /// /// /// - public global::OpenRouter.EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItems0 PickEmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItems0() => IsEmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItems0 - ? EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItems0! + public global::OpenRouter.EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItems0 PickEmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItems0() => EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItems0 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItems0' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickEmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOne /// /// /// - public global::OpenRouter.EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItems1 PickEmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItems1() => IsEmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItems1 - ? EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItems1! + public global::OpenRouter.EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItems1 PickEmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItems1() => EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItems1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItems1' but the value was {ToString()}."); /// @@ -116,8 +116,8 @@ public bool TryPickContentPartInputAudio( /// /// /// - public global::OpenRouter.ContentPartInputAudio PickContentPartInputAudio() => IsContentPartInputAudio - ? ContentPartInputAudio! + public global::OpenRouter.ContentPartInputAudio PickContentPartInputAudio() => ContentPartInputAudio is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ContentPartInputAudio' but the value was {ToString()}."); /// @@ -153,8 +153,8 @@ public bool TryPickContentPartInputVideo( /// /// /// - public global::OpenRouter.ContentPartInputVideo PickContentPartInputVideo() => IsContentPartInputVideo - ? ContentPartInputVideo! + public global::OpenRouter.ContentPartInputVideo PickContentPartInputVideo() => ContentPartInputVideo is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ContentPartInputVideo' but the value was {ToString()}."); /// @@ -190,8 +190,8 @@ public bool TryPickContentPartInputFile( /// /// /// - public global::OpenRouter.ContentPartInputFile PickContentPartInputFile() => IsContentPartInputFile - ? ContentPartInputFile! + public global::OpenRouter.ContentPartInputFile PickContentPartInputFile() => ContentPartInputFile is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ContentPartInputFile' but the value was {ToString()}."); /// /// @@ -372,25 +372,25 @@ public bool Validate() Validate(); } - if (IsEmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItems0 && embeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItems0 != null) + if (EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItems0 is { } __value0 && embeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItems0 != null) { - return embeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItems0(EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItems0!); + return embeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItems0(__value0); } - else if (IsEmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItems1 && embeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItems1 != null) + else if (EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItems1 is { } __value1 && embeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItems1 != null) { - return embeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItems1(EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItems1!); + return embeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItems1(__value1); } - else if (IsContentPartInputAudio && contentPartInputAudio != null) + else if (ContentPartInputAudio is { } __value2 && contentPartInputAudio != null) { - return contentPartInputAudio(ContentPartInputAudio!); + return contentPartInputAudio(__value2); } - else if (IsContentPartInputVideo && contentPartInputVideo != null) + else if (ContentPartInputVideo is { } __value3 && contentPartInputVideo != null) { - return contentPartInputVideo(ContentPartInputVideo!); + return contentPartInputVideo(__value3); } - else if (IsContentPartInputFile && contentPartInputFile != null) + else if (ContentPartInputFile is { } __value4 && contentPartInputFile != null) { - return contentPartInputFile(ContentPartInputFile!); + return contentPartInputFile(__value4); } return default(TResult); @@ -416,25 +416,25 @@ public void Match( Validate(); } - if (IsEmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItems0) + if (EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItems0 is { } __value0) { - embeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItems0?.Invoke(EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItems0!); + embeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItems0?.Invoke(__value0); } - else if (IsEmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItems1) + else if (EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItems1 is { } __value1) { - embeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItems1?.Invoke(EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItems1!); + embeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItems1?.Invoke(__value1); } - else if (IsContentPartInputAudio) + else if (ContentPartInputAudio is { } __value2) { - contentPartInputAudio?.Invoke(ContentPartInputAudio!); + contentPartInputAudio?.Invoke(__value2); } - else if (IsContentPartInputVideo) + else if (ContentPartInputVideo is { } __value3) { - contentPartInputVideo?.Invoke(ContentPartInputVideo!); + contentPartInputVideo?.Invoke(__value3); } - else if (IsContentPartInputFile) + else if (ContentPartInputFile is { } __value4) { - contentPartInputFile?.Invoke(ContentPartInputFile!); + contentPartInputFile?.Invoke(__value4); } } @@ -454,25 +454,25 @@ public void Switch( Validate(); } - if (IsEmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItems0) + if (EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItems0 is { } __value0) { - embeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItems0?.Invoke(EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItems0!); + embeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItems0?.Invoke(__value0); } - else if (IsEmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItems1) + else if (EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItems1 is { } __value1) { - embeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItems1?.Invoke(EmbeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItems1!); + embeddingsPostRequestBodyContentApplicationJsonSchemaInputOneOf4ItemsContentItems1?.Invoke(__value1); } - else if (IsContentPartInputAudio) + else if (ContentPartInputAudio is { } __value2) { - contentPartInputAudio?.Invoke(ContentPartInputAudio!); + contentPartInputAudio?.Invoke(__value2); } - else if (IsContentPartInputVideo) + else if (ContentPartInputVideo is { } __value3) { - contentPartInputVideo?.Invoke(ContentPartInputVideo!); + contentPartInputVideo?.Invoke(__value3); } - else if (IsContentPartInputFile) + else if (ContentPartInputFile is { } __value4) { - contentPartInputFile?.Invoke(ContentPartInputFile!); + contentPartInputFile?.Invoke(__value4); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItems.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItems.g.cs index 17fb037e..b1e6e002 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItems.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItems.g.cs @@ -42,8 +42,8 @@ public bool TryPickProviderName( /// /// /// - public global::OpenRouter.ProviderName PickProviderName() => IsProviderName - ? ProviderName!.Value + public global::OpenRouter.ProviderName PickProviderName() => ProviderName is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ProviderName' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickEmbeddingsPostRequestBodyContentApplicationJsonSchemaProvider /// /// /// - public string PickEmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItemsVariant2() => IsEmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItemsVariant2 - ? EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItemsVariant2! + public string PickEmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItemsVariant2() => EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItemsVariant2 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItemsVariant2' but the value was {ToString()}."); /// /// @@ -177,13 +177,13 @@ public bool Validate() Validate(); } - if (IsProviderName && providerName != null) + if (ProviderName is { } __value0 && providerName != null) { - return providerName(ProviderName!); + return providerName(__value0); } - else if (IsEmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItemsVariant2 && embeddingsPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItemsVariant2 != null) + else if (EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItemsVariant2 is { } __value1 && embeddingsPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItemsVariant2 != null) { - return embeddingsPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItemsVariant2(EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItemsVariant2!); + return embeddingsPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItemsVariant2(__value1); } return default(TResult); @@ -203,13 +203,13 @@ public void Match( Validate(); } - if (IsProviderName) + if (ProviderName is { } __value0) { - providerName?.Invoke(ProviderName!); + providerName?.Invoke(__value0); } - else if (IsEmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItemsVariant2) + else if (EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItemsVariant2 is { } __value1) { - embeddingsPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItemsVariant2?.Invoke(EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItemsVariant2!); + embeddingsPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItemsVariant2?.Invoke(__value1); } } @@ -226,13 +226,13 @@ public void Switch( Validate(); } - if (IsProviderName) + if (ProviderName is { } __value0) { - providerName?.Invoke(ProviderName!); + providerName?.Invoke(__value0); } - else if (IsEmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItemsVariant2) + else if (EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItemsVariant2 is { } __value1) { - embeddingsPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItemsVariant2?.Invoke(EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItemsVariant2!); + embeddingsPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItemsVariant2?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderOnlyItems.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderOnlyItems.g.cs index f9aeaa45..47882f4f 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderOnlyItems.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderOnlyItems.g.cs @@ -42,8 +42,8 @@ public bool TryPickProviderName( /// /// /// - public global::OpenRouter.ProviderName PickProviderName() => IsProviderName - ? ProviderName!.Value + public global::OpenRouter.ProviderName PickProviderName() => ProviderName is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ProviderName' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickEmbeddingsPostRequestBodyContentApplicationJsonSchemaProvider /// /// /// - public string PickEmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderOnlyItemsVariant2() => IsEmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderOnlyItemsVariant2 - ? EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderOnlyItemsVariant2! + public string PickEmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderOnlyItemsVariant2() => EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderOnlyItemsVariant2 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderOnlyItemsVariant2' but the value was {ToString()}."); /// /// @@ -177,13 +177,13 @@ public bool Validate() Validate(); } - if (IsProviderName && providerName != null) + if (ProviderName is { } __value0 && providerName != null) { - return providerName(ProviderName!); + return providerName(__value0); } - else if (IsEmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderOnlyItemsVariant2 && embeddingsPostRequestBodyContentApplicationJsonSchemaProviderOnlyItemsVariant2 != null) + else if (EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderOnlyItemsVariant2 is { } __value1 && embeddingsPostRequestBodyContentApplicationJsonSchemaProviderOnlyItemsVariant2 != null) { - return embeddingsPostRequestBodyContentApplicationJsonSchemaProviderOnlyItemsVariant2(EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderOnlyItemsVariant2!); + return embeddingsPostRequestBodyContentApplicationJsonSchemaProviderOnlyItemsVariant2(__value1); } return default(TResult); @@ -203,13 +203,13 @@ public void Match( Validate(); } - if (IsProviderName) + if (ProviderName is { } __value0) { - providerName?.Invoke(ProviderName!); + providerName?.Invoke(__value0); } - else if (IsEmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderOnlyItemsVariant2) + else if (EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderOnlyItemsVariant2 is { } __value1) { - embeddingsPostRequestBodyContentApplicationJsonSchemaProviderOnlyItemsVariant2?.Invoke(EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderOnlyItemsVariant2!); + embeddingsPostRequestBodyContentApplicationJsonSchemaProviderOnlyItemsVariant2?.Invoke(__value1); } } @@ -226,13 +226,13 @@ public void Switch( Validate(); } - if (IsProviderName) + if (ProviderName is { } __value0) { - providerName?.Invoke(ProviderName!); + providerName?.Invoke(__value0); } - else if (IsEmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderOnlyItemsVariant2) + else if (EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderOnlyItemsVariant2 is { } __value1) { - embeddingsPostRequestBodyContentApplicationJsonSchemaProviderOnlyItemsVariant2?.Invoke(EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderOnlyItemsVariant2!); + embeddingsPostRequestBodyContentApplicationJsonSchemaProviderOnlyItemsVariant2?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderOrderItems.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderOrderItems.g.cs index 50715f4f..d371aefb 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderOrderItems.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderOrderItems.g.cs @@ -42,8 +42,8 @@ public bool TryPickProviderName( /// /// /// - public global::OpenRouter.ProviderName PickProviderName() => IsProviderName - ? ProviderName!.Value + public global::OpenRouter.ProviderName PickProviderName() => ProviderName is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ProviderName' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickEmbeddingsPostRequestBodyContentApplicationJsonSchemaProvider /// /// /// - public string PickEmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderOrderItemsVariant2() => IsEmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderOrderItemsVariant2 - ? EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderOrderItemsVariant2! + public string PickEmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderOrderItemsVariant2() => EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderOrderItemsVariant2 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderOrderItemsVariant2' but the value was {ToString()}."); /// /// @@ -177,13 +177,13 @@ public bool Validate() Validate(); } - if (IsProviderName && providerName != null) + if (ProviderName is { } __value0 && providerName != null) { - return providerName(ProviderName!); + return providerName(__value0); } - else if (IsEmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderOrderItemsVariant2 && embeddingsPostRequestBodyContentApplicationJsonSchemaProviderOrderItemsVariant2 != null) + else if (EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderOrderItemsVariant2 is { } __value1 && embeddingsPostRequestBodyContentApplicationJsonSchemaProviderOrderItemsVariant2 != null) { - return embeddingsPostRequestBodyContentApplicationJsonSchemaProviderOrderItemsVariant2(EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderOrderItemsVariant2!); + return embeddingsPostRequestBodyContentApplicationJsonSchemaProviderOrderItemsVariant2(__value1); } return default(TResult); @@ -203,13 +203,13 @@ public void Match( Validate(); } - if (IsProviderName) + if (ProviderName is { } __value0) { - providerName?.Invoke(ProviderName!); + providerName?.Invoke(__value0); } - else if (IsEmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderOrderItemsVariant2) + else if (EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderOrderItemsVariant2 is { } __value1) { - embeddingsPostRequestBodyContentApplicationJsonSchemaProviderOrderItemsVariant2?.Invoke(EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderOrderItemsVariant2!); + embeddingsPostRequestBodyContentApplicationJsonSchemaProviderOrderItemsVariant2?.Invoke(__value1); } } @@ -226,13 +226,13 @@ public void Switch( Validate(); } - if (IsProviderName) + if (ProviderName is { } __value0) { - providerName?.Invoke(ProviderName!); + providerName?.Invoke(__value0); } - else if (IsEmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderOrderItemsVariant2) + else if (EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderOrderItemsVariant2 is { } __value1) { - embeddingsPostRequestBodyContentApplicationJsonSchemaProviderOrderItemsVariant2?.Invoke(EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderOrderItemsVariant2!); + embeddingsPostRequestBodyContentApplicationJsonSchemaProviderOrderItemsVariant2?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderSort.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderSort.g.cs index 4f9a0042..e1969eba 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderSort.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.EmbeddingsPostRequestBodyContentApplicationJsonSchemaProviderSort.g.cs @@ -42,8 +42,8 @@ public bool TryPickProviderSort( /// /// /// - public global::OpenRouter.ProviderSort PickProviderSort() => IsProviderSort - ? ProviderSort!.Value + public global::OpenRouter.ProviderSort PickProviderSort() => ProviderSort is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ProviderSort' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickProviderSortConfig( /// /// /// - public global::OpenRouter.ProviderSortConfig PickProviderSortConfig() => IsProviderSortConfig - ? ProviderSortConfig! + public global::OpenRouter.ProviderSortConfig PickProviderSortConfig() => ProviderSortConfig is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ProviderSortConfig' but the value was {ToString()}."); /// /// @@ -177,13 +177,13 @@ public bool Validate() Validate(); } - if (IsProviderSort && providerSort != null) + if (ProviderSort is { } __value0 && providerSort != null) { - return providerSort(ProviderSort!); + return providerSort(__value0); } - else if (IsProviderSortConfig && providerSortConfig != null) + else if (ProviderSortConfig is { } __value1 && providerSortConfig != null) { - return providerSortConfig(ProviderSortConfig!); + return providerSortConfig(__value1); } return default(TResult); @@ -203,13 +203,13 @@ public void Match( Validate(); } - if (IsProviderSort) + if (ProviderSort is { } __value0) { - providerSort?.Invoke(ProviderSort!); + providerSort?.Invoke(__value0); } - else if (IsProviderSortConfig) + else if (ProviderSortConfig is { } __value1) { - providerSortConfig?.Invoke(ProviderSortConfig!); + providerSortConfig?.Invoke(__value1); } } @@ -226,13 +226,13 @@ public void Switch( Validate(); } - if (IsProviderSort) + if (ProviderSort is { } __value0) { - providerSort?.Invoke(ProviderSort!); + providerSort?.Invoke(__value0); } - else if (IsProviderSortConfig) + else if (ProviderSortConfig is { } __value1) { - providerSortConfig?.Invoke(ProviderSortConfig!); + providerSortConfig?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.EmbeddingsPostResponsesContentApplicationJsonSchemaDataItemsEmbedding.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.EmbeddingsPostResponsesContentApplicationJsonSchemaDataItemsEmbedding.g.cs index c8f5c80a..107feb2d 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.EmbeddingsPostResponsesContentApplicationJsonSchemaDataItemsEmbedding.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.EmbeddingsPostResponsesContentApplicationJsonSchemaDataItemsEmbedding.g.cs @@ -42,8 +42,8 @@ public bool TryPickEmbeddingsPostResponsesContentApplicationJsonSchemaDataItemsE /// /// /// - public global::System.Collections.Generic.IList PickEmbeddingsPostResponsesContentApplicationJsonSchemaDataItemsEmbeddingVariant1() => IsEmbeddingsPostResponsesContentApplicationJsonSchemaDataItemsEmbeddingVariant1 - ? EmbeddingsPostResponsesContentApplicationJsonSchemaDataItemsEmbeddingVariant1! + public global::System.Collections.Generic.IList PickEmbeddingsPostResponsesContentApplicationJsonSchemaDataItemsEmbeddingVariant1() => EmbeddingsPostResponsesContentApplicationJsonSchemaDataItemsEmbeddingVariant1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'EmbeddingsPostResponsesContentApplicationJsonSchemaDataItemsEmbeddingVariant1' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickEmbeddingsPostResponsesContentApplicationJsonSchemaDataItemsE /// /// /// - public string PickEmbeddingsPostResponsesContentApplicationJsonSchemaDataItemsEmbeddingVariant2() => IsEmbeddingsPostResponsesContentApplicationJsonSchemaDataItemsEmbeddingVariant2 - ? EmbeddingsPostResponsesContentApplicationJsonSchemaDataItemsEmbeddingVariant2! + public string PickEmbeddingsPostResponsesContentApplicationJsonSchemaDataItemsEmbeddingVariant2() => EmbeddingsPostResponsesContentApplicationJsonSchemaDataItemsEmbeddingVariant2 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'EmbeddingsPostResponsesContentApplicationJsonSchemaDataItemsEmbeddingVariant2' but the value was {ToString()}."); /// /// @@ -154,13 +154,13 @@ public bool Validate() Validate(); } - if (IsEmbeddingsPostResponsesContentApplicationJsonSchemaDataItemsEmbeddingVariant1 && embeddingsPostResponsesContentApplicationJsonSchemaDataItemsEmbeddingVariant1 != null) + if (EmbeddingsPostResponsesContentApplicationJsonSchemaDataItemsEmbeddingVariant1 is { } __value0 && embeddingsPostResponsesContentApplicationJsonSchemaDataItemsEmbeddingVariant1 != null) { - return embeddingsPostResponsesContentApplicationJsonSchemaDataItemsEmbeddingVariant1(EmbeddingsPostResponsesContentApplicationJsonSchemaDataItemsEmbeddingVariant1!); + return embeddingsPostResponsesContentApplicationJsonSchemaDataItemsEmbeddingVariant1(__value0); } - else if (IsEmbeddingsPostResponsesContentApplicationJsonSchemaDataItemsEmbeddingVariant2 && embeddingsPostResponsesContentApplicationJsonSchemaDataItemsEmbeddingVariant2 != null) + else if (EmbeddingsPostResponsesContentApplicationJsonSchemaDataItemsEmbeddingVariant2 is { } __value1 && embeddingsPostResponsesContentApplicationJsonSchemaDataItemsEmbeddingVariant2 != null) { - return embeddingsPostResponsesContentApplicationJsonSchemaDataItemsEmbeddingVariant2(EmbeddingsPostResponsesContentApplicationJsonSchemaDataItemsEmbeddingVariant2!); + return embeddingsPostResponsesContentApplicationJsonSchemaDataItemsEmbeddingVariant2(__value1); } return default(TResult); @@ -180,13 +180,13 @@ public void Match( Validate(); } - if (IsEmbeddingsPostResponsesContentApplicationJsonSchemaDataItemsEmbeddingVariant1) + if (EmbeddingsPostResponsesContentApplicationJsonSchemaDataItemsEmbeddingVariant1 is { } __value0) { - embeddingsPostResponsesContentApplicationJsonSchemaDataItemsEmbeddingVariant1?.Invoke(EmbeddingsPostResponsesContentApplicationJsonSchemaDataItemsEmbeddingVariant1!); + embeddingsPostResponsesContentApplicationJsonSchemaDataItemsEmbeddingVariant1?.Invoke(__value0); } - else if (IsEmbeddingsPostResponsesContentApplicationJsonSchemaDataItemsEmbeddingVariant2) + else if (EmbeddingsPostResponsesContentApplicationJsonSchemaDataItemsEmbeddingVariant2 is { } __value1) { - embeddingsPostResponsesContentApplicationJsonSchemaDataItemsEmbeddingVariant2?.Invoke(EmbeddingsPostResponsesContentApplicationJsonSchemaDataItemsEmbeddingVariant2!); + embeddingsPostResponsesContentApplicationJsonSchemaDataItemsEmbeddingVariant2?.Invoke(__value1); } } @@ -203,13 +203,13 @@ public void Switch( Validate(); } - if (IsEmbeddingsPostResponsesContentApplicationJsonSchemaDataItemsEmbeddingVariant1) + if (EmbeddingsPostResponsesContentApplicationJsonSchemaDataItemsEmbeddingVariant1 is { } __value0) { - embeddingsPostResponsesContentApplicationJsonSchemaDataItemsEmbeddingVariant1?.Invoke(EmbeddingsPostResponsesContentApplicationJsonSchemaDataItemsEmbeddingVariant1!); + embeddingsPostResponsesContentApplicationJsonSchemaDataItemsEmbeddingVariant1?.Invoke(__value0); } - else if (IsEmbeddingsPostResponsesContentApplicationJsonSchemaDataItemsEmbeddingVariant2) + else if (EmbeddingsPostResponsesContentApplicationJsonSchemaDataItemsEmbeddingVariant2 is { } __value1) { - embeddingsPostResponsesContentApplicationJsonSchemaDataItemsEmbeddingVariant2?.Invoke(EmbeddingsPostResponsesContentApplicationJsonSchemaDataItemsEmbeddingVariant2!); + embeddingsPostResponsesContentApplicationJsonSchemaDataItemsEmbeddingVariant2?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.FileSearchServerToolFilters.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.FileSearchServerToolFilters.g.cs index 2eb0dcbf..04623348 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.FileSearchServerToolFilters.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.FileSearchServerToolFilters.g.cs @@ -42,8 +42,8 @@ public bool TryPickFileSearchServerToolFilters0( /// /// /// - public global::OpenRouter.FileSearchServerToolFilters0 PickFileSearchServerToolFilters0() => IsFileSearchServerToolFilters0 - ? FileSearchServerToolFilters0! + public global::OpenRouter.FileSearchServerToolFilters0 PickFileSearchServerToolFilters0() => FileSearchServerToolFilters0 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'FileSearchServerToolFilters0' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickCompoundFilter( /// /// /// - public global::OpenRouter.CompoundFilter PickCompoundFilter() => IsCompoundFilter - ? CompoundFilter! + public global::OpenRouter.CompoundFilter PickCompoundFilter() => CompoundFilter is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'CompoundFilter' but the value was {ToString()}."); /// /// @@ -177,13 +177,13 @@ public bool Validate() Validate(); } - if (IsFileSearchServerToolFilters0 && fileSearchServerToolFilters0 != null) + if (FileSearchServerToolFilters0 is { } __value0 && fileSearchServerToolFilters0 != null) { - return fileSearchServerToolFilters0(FileSearchServerToolFilters0!); + return fileSearchServerToolFilters0(__value0); } - else if (IsCompoundFilter && compoundFilter != null) + else if (CompoundFilter is { } __value1 && compoundFilter != null) { - return compoundFilter(CompoundFilter!); + return compoundFilter(__value1); } return default(TResult); @@ -203,13 +203,13 @@ public void Match( Validate(); } - if (IsFileSearchServerToolFilters0) + if (FileSearchServerToolFilters0 is { } __value0) { - fileSearchServerToolFilters0?.Invoke(FileSearchServerToolFilters0!); + fileSearchServerToolFilters0?.Invoke(__value0); } - else if (IsCompoundFilter) + else if (CompoundFilter is { } __value1) { - compoundFilter?.Invoke(CompoundFilter!); + compoundFilter?.Invoke(__value1); } } @@ -226,13 +226,13 @@ public void Switch( Validate(); } - if (IsFileSearchServerToolFilters0) + if (FileSearchServerToolFilters0 is { } __value0) { - fileSearchServerToolFilters0?.Invoke(FileSearchServerToolFilters0!); + fileSearchServerToolFilters0?.Invoke(__value0); } - else if (IsCompoundFilter) + else if (CompoundFilter is { } __value1) { - compoundFilter?.Invoke(CompoundFilter!); + compoundFilter?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.FileSearchServerToolFiltersOneOf0Value.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.FileSearchServerToolFiltersOneOf0Value.g.cs index d48a421b..cd5ef967 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.FileSearchServerToolFiltersOneOf0Value.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.FileSearchServerToolFiltersOneOf0Value.g.cs @@ -42,8 +42,8 @@ public bool TryPickFileSearchServerToolFiltersOneOf0ValueVariant1( /// /// /// - public string PickFileSearchServerToolFiltersOneOf0ValueVariant1() => IsFileSearchServerToolFiltersOneOf0ValueVariant1 - ? FileSearchServerToolFiltersOneOf0ValueVariant1! + public string PickFileSearchServerToolFiltersOneOf0ValueVariant1() => FileSearchServerToolFiltersOneOf0ValueVariant1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'FileSearchServerToolFiltersOneOf0ValueVariant1' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickFileSearchServerToolFiltersOneOf0ValueVariant2( /// /// /// - public double PickFileSearchServerToolFiltersOneOf0ValueVariant2() => IsFileSearchServerToolFiltersOneOf0ValueVariant2 - ? FileSearchServerToolFiltersOneOf0ValueVariant2!.Value + public double PickFileSearchServerToolFiltersOneOf0ValueVariant2() => FileSearchServerToolFiltersOneOf0ValueVariant2 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'FileSearchServerToolFiltersOneOf0ValueVariant2' but the value was {ToString()}."); /// @@ -116,8 +116,8 @@ public bool TryPickFileSearchServerToolFiltersOneOf0ValueVariant3( /// /// /// - public bool PickFileSearchServerToolFiltersOneOf0ValueVariant3() => IsFileSearchServerToolFiltersOneOf0ValueVariant3 - ? FileSearchServerToolFiltersOneOf0ValueVariant3!.Value + public bool PickFileSearchServerToolFiltersOneOf0ValueVariant3() => FileSearchServerToolFiltersOneOf0ValueVariant3 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'FileSearchServerToolFiltersOneOf0ValueVariant3' but the value was {ToString()}."); /// @@ -153,8 +153,8 @@ public bool TryPickFileSearchServerToolFiltersOneOf0Value3( /// /// /// - public global::System.Collections.Generic.IList PickFileSearchServerToolFiltersOneOf0Value3() => IsFileSearchServerToolFiltersOneOf0Value3 - ? FileSearchServerToolFiltersOneOf0Value3! + public global::System.Collections.Generic.IList PickFileSearchServerToolFiltersOneOf0Value3() => FileSearchServerToolFiltersOneOf0Value3 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'FileSearchServerToolFiltersOneOf0Value3' but the value was {ToString()}."); /// /// @@ -284,21 +284,21 @@ public bool Validate() Validate(); } - if (IsFileSearchServerToolFiltersOneOf0ValueVariant1 && fileSearchServerToolFiltersOneOf0ValueVariant1 != null) + if (FileSearchServerToolFiltersOneOf0ValueVariant1 is { } __value0 && fileSearchServerToolFiltersOneOf0ValueVariant1 != null) { - return fileSearchServerToolFiltersOneOf0ValueVariant1(FileSearchServerToolFiltersOneOf0ValueVariant1!); + return fileSearchServerToolFiltersOneOf0ValueVariant1(__value0); } - else if (IsFileSearchServerToolFiltersOneOf0ValueVariant2 && fileSearchServerToolFiltersOneOf0ValueVariant2 != null) + else if (FileSearchServerToolFiltersOneOf0ValueVariant2 is { } __value1 && fileSearchServerToolFiltersOneOf0ValueVariant2 != null) { - return fileSearchServerToolFiltersOneOf0ValueVariant2(FileSearchServerToolFiltersOneOf0ValueVariant2!); + return fileSearchServerToolFiltersOneOf0ValueVariant2(__value1); } - else if (IsFileSearchServerToolFiltersOneOf0ValueVariant3 && fileSearchServerToolFiltersOneOf0ValueVariant3 != null) + else if (FileSearchServerToolFiltersOneOf0ValueVariant3 is { } __value2 && fileSearchServerToolFiltersOneOf0ValueVariant3 != null) { - return fileSearchServerToolFiltersOneOf0ValueVariant3(FileSearchServerToolFiltersOneOf0ValueVariant3!); + return fileSearchServerToolFiltersOneOf0ValueVariant3(__value2); } - else if (IsFileSearchServerToolFiltersOneOf0Value3 && fileSearchServerToolFiltersOneOf0Value3 != null) + else if (FileSearchServerToolFiltersOneOf0Value3 is { } __value3 && fileSearchServerToolFiltersOneOf0Value3 != null) { - return fileSearchServerToolFiltersOneOf0Value3(FileSearchServerToolFiltersOneOf0Value3!); + return fileSearchServerToolFiltersOneOf0Value3(__value3); } return default(TResult); @@ -322,21 +322,21 @@ public void Match( Validate(); } - if (IsFileSearchServerToolFiltersOneOf0ValueVariant1) + if (FileSearchServerToolFiltersOneOf0ValueVariant1 is { } __value0) { - fileSearchServerToolFiltersOneOf0ValueVariant1?.Invoke(FileSearchServerToolFiltersOneOf0ValueVariant1!); + fileSearchServerToolFiltersOneOf0ValueVariant1?.Invoke(__value0); } - else if (IsFileSearchServerToolFiltersOneOf0ValueVariant2) + else if (FileSearchServerToolFiltersOneOf0ValueVariant2 is { } __value1) { - fileSearchServerToolFiltersOneOf0ValueVariant2?.Invoke(FileSearchServerToolFiltersOneOf0ValueVariant2!); + fileSearchServerToolFiltersOneOf0ValueVariant2?.Invoke(__value1); } - else if (IsFileSearchServerToolFiltersOneOf0ValueVariant3) + else if (FileSearchServerToolFiltersOneOf0ValueVariant3 is { } __value2) { - fileSearchServerToolFiltersOneOf0ValueVariant3?.Invoke(FileSearchServerToolFiltersOneOf0ValueVariant3!); + fileSearchServerToolFiltersOneOf0ValueVariant3?.Invoke(__value2); } - else if (IsFileSearchServerToolFiltersOneOf0Value3) + else if (FileSearchServerToolFiltersOneOf0Value3 is { } __value3) { - fileSearchServerToolFiltersOneOf0Value3?.Invoke(FileSearchServerToolFiltersOneOf0Value3!); + fileSearchServerToolFiltersOneOf0Value3?.Invoke(__value3); } } @@ -355,21 +355,21 @@ public void Switch( Validate(); } - if (IsFileSearchServerToolFiltersOneOf0ValueVariant1) + if (FileSearchServerToolFiltersOneOf0ValueVariant1 is { } __value0) { - fileSearchServerToolFiltersOneOf0ValueVariant1?.Invoke(FileSearchServerToolFiltersOneOf0ValueVariant1!); + fileSearchServerToolFiltersOneOf0ValueVariant1?.Invoke(__value0); } - else if (IsFileSearchServerToolFiltersOneOf0ValueVariant2) + else if (FileSearchServerToolFiltersOneOf0ValueVariant2 is { } __value1) { - fileSearchServerToolFiltersOneOf0ValueVariant2?.Invoke(FileSearchServerToolFiltersOneOf0ValueVariant2!); + fileSearchServerToolFiltersOneOf0ValueVariant2?.Invoke(__value1); } - else if (IsFileSearchServerToolFiltersOneOf0ValueVariant3) + else if (FileSearchServerToolFiltersOneOf0ValueVariant3 is { } __value2) { - fileSearchServerToolFiltersOneOf0ValueVariant3?.Invoke(FileSearchServerToolFiltersOneOf0ValueVariant3!); + fileSearchServerToolFiltersOneOf0ValueVariant3?.Invoke(__value2); } - else if (IsFileSearchServerToolFiltersOneOf0Value3) + else if (FileSearchServerToolFiltersOneOf0Value3 is { } __value3) { - fileSearchServerToolFiltersOneOf0Value3?.Invoke(FileSearchServerToolFiltersOneOf0Value3!); + fileSearchServerToolFiltersOneOf0Value3?.Invoke(__value3); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.FileSearchServerToolFiltersOneOf0ValueOneOf3Items.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.FileSearchServerToolFiltersOneOf0ValueOneOf3Items.g.cs index 7acbbdd8..3a3c390a 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.FileSearchServerToolFiltersOneOf0ValueOneOf3Items.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.FileSearchServerToolFiltersOneOf0ValueOneOf3Items.g.cs @@ -42,8 +42,8 @@ public bool TryPickFileSearchServerToolFiltersOneOf0ValueOneOf3ItemsVariant1( /// /// /// - public string PickFileSearchServerToolFiltersOneOf0ValueOneOf3ItemsVariant1() => IsFileSearchServerToolFiltersOneOf0ValueOneOf3ItemsVariant1 - ? FileSearchServerToolFiltersOneOf0ValueOneOf3ItemsVariant1! + public string PickFileSearchServerToolFiltersOneOf0ValueOneOf3ItemsVariant1() => FileSearchServerToolFiltersOneOf0ValueOneOf3ItemsVariant1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'FileSearchServerToolFiltersOneOf0ValueOneOf3ItemsVariant1' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickFileSearchServerToolFiltersOneOf0ValueOneOf3ItemsVariant2( /// /// /// - public double PickFileSearchServerToolFiltersOneOf0ValueOneOf3ItemsVariant2() => IsFileSearchServerToolFiltersOneOf0ValueOneOf3ItemsVariant2 - ? FileSearchServerToolFiltersOneOf0ValueOneOf3ItemsVariant2!.Value + public double PickFileSearchServerToolFiltersOneOf0ValueOneOf3ItemsVariant2() => FileSearchServerToolFiltersOneOf0ValueOneOf3ItemsVariant2 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'FileSearchServerToolFiltersOneOf0ValueOneOf3ItemsVariant2' but the value was {ToString()}."); /// /// @@ -177,13 +177,13 @@ public bool Validate() Validate(); } - if (IsFileSearchServerToolFiltersOneOf0ValueOneOf3ItemsVariant1 && fileSearchServerToolFiltersOneOf0ValueOneOf3ItemsVariant1 != null) + if (FileSearchServerToolFiltersOneOf0ValueOneOf3ItemsVariant1 is { } __value0 && fileSearchServerToolFiltersOneOf0ValueOneOf3ItemsVariant1 != null) { - return fileSearchServerToolFiltersOneOf0ValueOneOf3ItemsVariant1(FileSearchServerToolFiltersOneOf0ValueOneOf3ItemsVariant1!); + return fileSearchServerToolFiltersOneOf0ValueOneOf3ItemsVariant1(__value0); } - else if (IsFileSearchServerToolFiltersOneOf0ValueOneOf3ItemsVariant2 && fileSearchServerToolFiltersOneOf0ValueOneOf3ItemsVariant2 != null) + else if (FileSearchServerToolFiltersOneOf0ValueOneOf3ItemsVariant2 is { } __value1 && fileSearchServerToolFiltersOneOf0ValueOneOf3ItemsVariant2 != null) { - return fileSearchServerToolFiltersOneOf0ValueOneOf3ItemsVariant2(FileSearchServerToolFiltersOneOf0ValueOneOf3ItemsVariant2!); + return fileSearchServerToolFiltersOneOf0ValueOneOf3ItemsVariant2(__value1); } return default(TResult); @@ -203,13 +203,13 @@ public void Match( Validate(); } - if (IsFileSearchServerToolFiltersOneOf0ValueOneOf3ItemsVariant1) + if (FileSearchServerToolFiltersOneOf0ValueOneOf3ItemsVariant1 is { } __value0) { - fileSearchServerToolFiltersOneOf0ValueOneOf3ItemsVariant1?.Invoke(FileSearchServerToolFiltersOneOf0ValueOneOf3ItemsVariant1!); + fileSearchServerToolFiltersOneOf0ValueOneOf3ItemsVariant1?.Invoke(__value0); } - else if (IsFileSearchServerToolFiltersOneOf0ValueOneOf3ItemsVariant2) + else if (FileSearchServerToolFiltersOneOf0ValueOneOf3ItemsVariant2 is { } __value1) { - fileSearchServerToolFiltersOneOf0ValueOneOf3ItemsVariant2?.Invoke(FileSearchServerToolFiltersOneOf0ValueOneOf3ItemsVariant2!); + fileSearchServerToolFiltersOneOf0ValueOneOf3ItemsVariant2?.Invoke(__value1); } } @@ -226,13 +226,13 @@ public void Switch( Validate(); } - if (IsFileSearchServerToolFiltersOneOf0ValueOneOf3ItemsVariant1) + if (FileSearchServerToolFiltersOneOf0ValueOneOf3ItemsVariant1 is { } __value0) { - fileSearchServerToolFiltersOneOf0ValueOneOf3ItemsVariant1?.Invoke(FileSearchServerToolFiltersOneOf0ValueOneOf3ItemsVariant1!); + fileSearchServerToolFiltersOneOf0ValueOneOf3ItemsVariant1?.Invoke(__value0); } - else if (IsFileSearchServerToolFiltersOneOf0ValueOneOf3ItemsVariant2) + else if (FileSearchServerToolFiltersOneOf0ValueOneOf3ItemsVariant2 is { } __value1) { - fileSearchServerToolFiltersOneOf0ValueOneOf3ItemsVariant2?.Invoke(FileSearchServerToolFiltersOneOf0ValueOneOf3ItemsVariant2!); + fileSearchServerToolFiltersOneOf0ValueOneOf3ItemsVariant2?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.Formats.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.Formats.g.cs index 0eb30a29..016149c7 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.Formats.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.Formats.g.cs @@ -42,8 +42,8 @@ public bool TryPickFormatTextConfig( /// /// /// - public global::OpenRouter.FormatTextConfig PickFormatTextConfig() => IsFormatTextConfig - ? FormatTextConfig! + public global::OpenRouter.FormatTextConfig PickFormatTextConfig() => FormatTextConfig is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'FormatTextConfig' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickFormatJsonObjectConfig( /// /// /// - public global::OpenRouter.FormatJsonObjectConfig PickFormatJsonObjectConfig() => IsFormatJsonObjectConfig - ? FormatJsonObjectConfig! + public global::OpenRouter.FormatJsonObjectConfig PickFormatJsonObjectConfig() => FormatJsonObjectConfig is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'FormatJsonObjectConfig' but the value was {ToString()}."); /// @@ -116,8 +116,8 @@ public bool TryPickFormatJsonSchemaConfig( /// /// /// - public global::OpenRouter.FormatJsonSchemaConfig PickFormatJsonSchemaConfig() => IsFormatJsonSchemaConfig - ? FormatJsonSchemaConfig! + public global::OpenRouter.FormatJsonSchemaConfig PickFormatJsonSchemaConfig() => FormatJsonSchemaConfig is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'FormatJsonSchemaConfig' but the value was {ToString()}."); /// /// @@ -242,17 +242,17 @@ public bool Validate() Validate(); } - if (IsFormatTextConfig && formatTextConfig != null) + if (FormatTextConfig is { } __value0 && formatTextConfig != null) { - return formatTextConfig(FormatTextConfig!); + return formatTextConfig(__value0); } - else if (IsFormatJsonObjectConfig && formatJsonObjectConfig != null) + else if (FormatJsonObjectConfig is { } __value1 && formatJsonObjectConfig != null) { - return formatJsonObjectConfig(FormatJsonObjectConfig!); + return formatJsonObjectConfig(__value1); } - else if (IsFormatJsonSchemaConfig && formatJsonSchemaConfig != null) + else if (FormatJsonSchemaConfig is { } __value2 && formatJsonSchemaConfig != null) { - return formatJsonSchemaConfig(FormatJsonSchemaConfig!); + return formatJsonSchemaConfig(__value2); } return default(TResult); @@ -274,17 +274,17 @@ public void Match( Validate(); } - if (IsFormatTextConfig) + if (FormatTextConfig is { } __value0) { - formatTextConfig?.Invoke(FormatTextConfig!); + formatTextConfig?.Invoke(__value0); } - else if (IsFormatJsonObjectConfig) + else if (FormatJsonObjectConfig is { } __value1) { - formatJsonObjectConfig?.Invoke(FormatJsonObjectConfig!); + formatJsonObjectConfig?.Invoke(__value1); } - else if (IsFormatJsonSchemaConfig) + else if (FormatJsonSchemaConfig is { } __value2) { - formatJsonSchemaConfig?.Invoke(FormatJsonSchemaConfig!); + formatJsonSchemaConfig?.Invoke(__value2); } } @@ -302,17 +302,17 @@ public void Switch( Validate(); } - if (IsFormatTextConfig) + if (FormatTextConfig is { } __value0) { - formatTextConfig?.Invoke(FormatTextConfig!); + formatTextConfig?.Invoke(__value0); } - else if (IsFormatJsonObjectConfig) + else if (FormatJsonObjectConfig is { } __value1) { - formatJsonObjectConfig?.Invoke(FormatJsonObjectConfig!); + formatJsonObjectConfig?.Invoke(__value1); } - else if (IsFormatJsonSchemaConfig) + else if (FormatJsonSchemaConfig is { } __value2) { - formatJsonSchemaConfig?.Invoke(FormatJsonSchemaConfig!); + formatJsonSchemaConfig?.Invoke(__value2); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.FunctionCallOutputItemOutput.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.FunctionCallOutputItemOutput.g.cs index 32bdbe5c..1956e9bb 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.FunctionCallOutputItemOutput.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.FunctionCallOutputItemOutput.g.cs @@ -42,8 +42,8 @@ public bool TryPickFunctionCallOutputItemOutputVariant1( /// /// /// - public string PickFunctionCallOutputItemOutputVariant1() => IsFunctionCallOutputItemOutputVariant1 - ? FunctionCallOutputItemOutputVariant1! + public string PickFunctionCallOutputItemOutputVariant1() => FunctionCallOutputItemOutputVariant1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'FunctionCallOutputItemOutputVariant1' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickFunctionCallOutputItemOutput1( /// /// /// - public global::System.Collections.Generic.IList PickFunctionCallOutputItemOutput1() => IsFunctionCallOutputItemOutput1 - ? FunctionCallOutputItemOutput1! + public global::System.Collections.Generic.IList PickFunctionCallOutputItemOutput1() => FunctionCallOutputItemOutput1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'FunctionCallOutputItemOutput1' but the value was {ToString()}."); /// /// @@ -154,13 +154,13 @@ public bool Validate() Validate(); } - if (IsFunctionCallOutputItemOutputVariant1 && functionCallOutputItemOutputVariant1 != null) + if (FunctionCallOutputItemOutputVariant1 is { } __value0 && functionCallOutputItemOutputVariant1 != null) { - return functionCallOutputItemOutputVariant1(FunctionCallOutputItemOutputVariant1!); + return functionCallOutputItemOutputVariant1(__value0); } - else if (IsFunctionCallOutputItemOutput1 && functionCallOutputItemOutput1 != null) + else if (FunctionCallOutputItemOutput1 is { } __value1 && functionCallOutputItemOutput1 != null) { - return functionCallOutputItemOutput1(FunctionCallOutputItemOutput1!); + return functionCallOutputItemOutput1(__value1); } return default(TResult); @@ -180,13 +180,13 @@ public void Match( Validate(); } - if (IsFunctionCallOutputItemOutputVariant1) + if (FunctionCallOutputItemOutputVariant1 is { } __value0) { - functionCallOutputItemOutputVariant1?.Invoke(FunctionCallOutputItemOutputVariant1!); + functionCallOutputItemOutputVariant1?.Invoke(__value0); } - else if (IsFunctionCallOutputItemOutput1) + else if (FunctionCallOutputItemOutput1 is { } __value1) { - functionCallOutputItemOutput1?.Invoke(FunctionCallOutputItemOutput1!); + functionCallOutputItemOutput1?.Invoke(__value1); } } @@ -203,13 +203,13 @@ public void Switch( Validate(); } - if (IsFunctionCallOutputItemOutputVariant1) + if (FunctionCallOutputItemOutputVariant1 is { } __value0) { - functionCallOutputItemOutputVariant1?.Invoke(FunctionCallOutputItemOutputVariant1!); + functionCallOutputItemOutputVariant1?.Invoke(__value0); } - else if (IsFunctionCallOutputItemOutput1) + else if (FunctionCallOutputItemOutput1 is { } __value1) { - functionCallOutputItemOutput1?.Invoke(FunctionCallOutputItemOutput1!); + functionCallOutputItemOutput1?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.FunctionCallOutputItemOutputOneOf1Items.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.FunctionCallOutputItemOutputOneOf1Items.g.cs index a94899b7..e8ef108e 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.FunctionCallOutputItemOutputOneOf1Items.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.FunctionCallOutputItemOutputOneOf1Items.g.cs @@ -47,8 +47,8 @@ public bool TryPickInputFile( /// /// /// - public global::OpenRouter.FunctionCallOutputItemOutputOneOf1ItemsVariant1 PickInputFile() => IsInputFile - ? InputFile! + public global::OpenRouter.FunctionCallOutputItemOutputOneOf1ItemsVariant1 PickInputFile() => InputFile is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'InputFile' but the value was {ToString()}."); /// @@ -84,8 +84,8 @@ public bool TryPickInputImage( /// /// /// - public global::OpenRouter.FunctionCallOutputItemOutputOneOf1ItemsVariant2 PickInputImage() => IsInputImage - ? InputImage! + public global::OpenRouter.FunctionCallOutputItemOutputOneOf1ItemsVariant2 PickInputImage() => InputImage is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'InputImage' but the value was {ToString()}."); /// @@ -121,8 +121,8 @@ public bool TryPickInputText( /// /// /// - public global::OpenRouter.FunctionCallOutputItemOutputOneOf1ItemsVariant3 PickInputText() => IsInputText - ? InputText! + public global::OpenRouter.FunctionCallOutputItemOutputOneOf1ItemsVariant3 PickInputText() => InputText is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'InputText' but the value was {ToString()}."); /// /// @@ -250,17 +250,17 @@ public bool Validate() Validate(); } - if (IsInputFile && inputFile != null) + if (InputFile is { } __value0 && inputFile != null) { - return inputFile(InputFile!); + return inputFile(__value0); } - else if (IsInputImage && inputImage != null) + else if (InputImage is { } __value1 && inputImage != null) { - return inputImage(InputImage!); + return inputImage(__value1); } - else if (IsInputText && inputText != null) + else if (InputText is { } __value2 && inputText != null) { - return inputText(InputText!); + return inputText(__value2); } return default(TResult); @@ -282,17 +282,17 @@ public void Match( Validate(); } - if (IsInputFile) + if (InputFile is { } __value0) { - inputFile?.Invoke(InputFile!); + inputFile?.Invoke(__value0); } - else if (IsInputImage) + else if (InputImage is { } __value1) { - inputImage?.Invoke(InputImage!); + inputImage?.Invoke(__value1); } - else if (IsInputText) + else if (InputText is { } __value2) { - inputText?.Invoke(InputText!); + inputText?.Invoke(__value2); } } @@ -310,17 +310,17 @@ public void Switch( Validate(); } - if (IsInputFile) + if (InputFile is { } __value0) { - inputFile?.Invoke(InputFile!); + inputFile?.Invoke(__value0); } - else if (IsInputImage) + else if (InputImage is { } __value1) { - inputImage?.Invoke(InputImage!); + inputImage?.Invoke(__value1); } - else if (IsInputText) + else if (InputText is { } __value2) { - inputText?.Invoke(InputText!); + inputText?.Invoke(__value2); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.GenerationContentDataInput.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.GenerationContentDataInput.g.cs index 117ef6f0..0c5d925f 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.GenerationContentDataInput.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.GenerationContentDataInput.g.cs @@ -42,8 +42,8 @@ public bool TryPickGenerationContentDataInput0( /// /// /// - public global::OpenRouter.GenerationContentDataInput0 PickGenerationContentDataInput0() => IsGenerationContentDataInput0 - ? GenerationContentDataInput0! + public global::OpenRouter.GenerationContentDataInput0 PickGenerationContentDataInput0() => GenerationContentDataInput0 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'GenerationContentDataInput0' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickGenerationContentDataInput1( /// /// /// - public global::OpenRouter.GenerationContentDataInput1 PickGenerationContentDataInput1() => IsGenerationContentDataInput1 - ? GenerationContentDataInput1! + public global::OpenRouter.GenerationContentDataInput1 PickGenerationContentDataInput1() => GenerationContentDataInput1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'GenerationContentDataInput1' but the value was {ToString()}."); /// /// @@ -177,13 +177,13 @@ public bool Validate() Validate(); } - if (IsGenerationContentDataInput0 && generationContentDataInput0 != null) + if (GenerationContentDataInput0 is { } __value0 && generationContentDataInput0 != null) { - return generationContentDataInput0(GenerationContentDataInput0!); + return generationContentDataInput0(__value0); } - else if (IsGenerationContentDataInput1 && generationContentDataInput1 != null) + else if (GenerationContentDataInput1 is { } __value1 && generationContentDataInput1 != null) { - return generationContentDataInput1(GenerationContentDataInput1!); + return generationContentDataInput1(__value1); } return default(TResult); @@ -203,13 +203,13 @@ public void Match( Validate(); } - if (IsGenerationContentDataInput0) + if (GenerationContentDataInput0 is { } __value0) { - generationContentDataInput0?.Invoke(GenerationContentDataInput0!); + generationContentDataInput0?.Invoke(__value0); } - else if (IsGenerationContentDataInput1) + else if (GenerationContentDataInput1 is { } __value1) { - generationContentDataInput1?.Invoke(GenerationContentDataInput1!); + generationContentDataInput1?.Invoke(__value1); } } @@ -226,13 +226,13 @@ public void Switch( Validate(); } - if (IsGenerationContentDataInput0) + if (GenerationContentDataInput0 is { } __value0) { - generationContentDataInput0?.Invoke(GenerationContentDataInput0!); + generationContentDataInput0?.Invoke(__value0); } - else if (IsGenerationContentDataInput1) + else if (GenerationContentDataInput1 is { } __value1) { - generationContentDataInput1?.Invoke(GenerationContentDataInput1!); + generationContentDataInput1?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.GetObservabilityDestinationResponseData.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.GetObservabilityDestinationResponseData.g.cs index fb911891..4b59e6c5 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.GetObservabilityDestinationResponseData.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.GetObservabilityDestinationResponseData.g.cs @@ -47,8 +47,8 @@ public bool TryPickArize( /// /// /// - public global::OpenRouter.GetObservabilityDestinationResponseDataVariant1 PickArize() => IsArize - ? Arize! + public global::OpenRouter.GetObservabilityDestinationResponseDataVariant1 PickArize() => Arize is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Arize' but the value was {ToString()}."); /// @@ -84,8 +84,8 @@ public bool TryPickBraintrust( /// /// /// - public global::OpenRouter.GetObservabilityDestinationResponseDataVariant2 PickBraintrust() => IsBraintrust - ? Braintrust! + public global::OpenRouter.GetObservabilityDestinationResponseDataVariant2 PickBraintrust() => Braintrust is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Braintrust' but the value was {ToString()}."); /// @@ -121,8 +121,8 @@ public bool TryPickClickhouse( /// /// /// - public global::OpenRouter.GetObservabilityDestinationResponseDataVariant3 PickClickhouse() => IsClickhouse - ? Clickhouse! + public global::OpenRouter.GetObservabilityDestinationResponseDataVariant3 PickClickhouse() => Clickhouse is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Clickhouse' but the value was {ToString()}."); /// @@ -158,8 +158,8 @@ public bool TryPickDatadog( /// /// /// - public global::OpenRouter.GetObservabilityDestinationResponseDataVariant4 PickDatadog() => IsDatadog - ? Datadog! + public global::OpenRouter.GetObservabilityDestinationResponseDataVariant4 PickDatadog() => Datadog is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Datadog' but the value was {ToString()}."); /// @@ -195,8 +195,8 @@ public bool TryPickGrafana( /// /// /// - public global::OpenRouter.GetObservabilityDestinationResponseDataVariant5 PickGrafana() => IsGrafana - ? Grafana! + public global::OpenRouter.GetObservabilityDestinationResponseDataVariant5 PickGrafana() => Grafana is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Grafana' but the value was {ToString()}."); /// @@ -232,8 +232,8 @@ public bool TryPickLangfuse( /// /// /// - public global::OpenRouter.GetObservabilityDestinationResponseDataVariant6 PickLangfuse() => IsLangfuse - ? Langfuse! + public global::OpenRouter.GetObservabilityDestinationResponseDataVariant6 PickLangfuse() => Langfuse is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Langfuse' but the value was {ToString()}."); /// @@ -269,8 +269,8 @@ public bool TryPickLangsmith( /// /// /// - public global::OpenRouter.GetObservabilityDestinationResponseDataVariant7 PickLangsmith() => IsLangsmith - ? Langsmith! + public global::OpenRouter.GetObservabilityDestinationResponseDataVariant7 PickLangsmith() => Langsmith is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Langsmith' but the value was {ToString()}."); /// @@ -306,8 +306,8 @@ public bool TryPickNewrelic( /// /// /// - public global::OpenRouter.GetObservabilityDestinationResponseDataVariant8 PickNewrelic() => IsNewrelic - ? Newrelic! + public global::OpenRouter.GetObservabilityDestinationResponseDataVariant8 PickNewrelic() => Newrelic is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Newrelic' but the value was {ToString()}."); /// @@ -343,8 +343,8 @@ public bool TryPickOpik( /// /// /// - public global::OpenRouter.GetObservabilityDestinationResponseDataVariant9 PickOpik() => IsOpik - ? Opik! + public global::OpenRouter.GetObservabilityDestinationResponseDataVariant9 PickOpik() => Opik is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Opik' but the value was {ToString()}."); /// @@ -380,8 +380,8 @@ public bool TryPickOtelCollector( /// /// /// - public global::OpenRouter.GetObservabilityDestinationResponseDataVariant10 PickOtelCollector() => IsOtelCollector - ? OtelCollector! + public global::OpenRouter.GetObservabilityDestinationResponseDataVariant10 PickOtelCollector() => OtelCollector is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OtelCollector' but the value was {ToString()}."); /// @@ -417,8 +417,8 @@ public bool TryPickPosthog( /// /// /// - public global::OpenRouter.GetObservabilityDestinationResponseDataVariant11 PickPosthog() => IsPosthog - ? Posthog! + public global::OpenRouter.GetObservabilityDestinationResponseDataVariant11 PickPosthog() => Posthog is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Posthog' but the value was {ToString()}."); /// @@ -454,8 +454,8 @@ public bool TryPickRamp( /// /// /// - public global::OpenRouter.GetObservabilityDestinationResponseDataVariant12 PickRamp() => IsRamp - ? Ramp! + public global::OpenRouter.GetObservabilityDestinationResponseDataVariant12 PickRamp() => Ramp is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Ramp' but the value was {ToString()}."); /// @@ -491,8 +491,8 @@ public bool TryPickS3( /// /// /// - public global::OpenRouter.GetObservabilityDestinationResponseDataVariant13 PickS3() => IsS3 - ? S3! + public global::OpenRouter.GetObservabilityDestinationResponseDataVariant13 PickS3() => S3 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'S3' but the value was {ToString()}."); /// @@ -528,8 +528,8 @@ public bool TryPickSentry( /// /// /// - public global::OpenRouter.GetObservabilityDestinationResponseDataVariant14 PickSentry() => IsSentry - ? Sentry! + public global::OpenRouter.GetObservabilityDestinationResponseDataVariant14 PickSentry() => Sentry is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Sentry' but the value was {ToString()}."); /// @@ -565,8 +565,8 @@ public bool TryPickSnowflake( /// /// /// - public global::OpenRouter.GetObservabilityDestinationResponseDataVariant15 PickSnowflake() => IsSnowflake - ? Snowflake! + public global::OpenRouter.GetObservabilityDestinationResponseDataVariant15 PickSnowflake() => Snowflake is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Snowflake' but the value was {ToString()}."); /// @@ -602,8 +602,8 @@ public bool TryPickWeave( /// /// /// - public global::OpenRouter.GetObservabilityDestinationResponseDataVariant16 PickWeave() => IsWeave - ? Weave! + public global::OpenRouter.GetObservabilityDestinationResponseDataVariant16 PickWeave() => Weave is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Weave' but the value was {ToString()}."); /// @@ -639,8 +639,8 @@ public bool TryPickWebhook( /// /// /// - public global::OpenRouter.GetObservabilityDestinationResponseDataVariant17 PickWebhook() => IsWebhook - ? Webhook! + public global::OpenRouter.GetObservabilityDestinationResponseDataVariant17 PickWebhook() => Webhook is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Webhook' but the value was {ToString()}."); /// /// @@ -1160,73 +1160,73 @@ public bool Validate() Validate(); } - if (IsArize && arize != null) + if (Arize is { } __value0 && arize != null) { - return arize(Arize!); + return arize(__value0); } - else if (IsBraintrust && braintrust != null) + else if (Braintrust is { } __value1 && braintrust != null) { - return braintrust(Braintrust!); + return braintrust(__value1); } - else if (IsClickhouse && clickhouse != null) + else if (Clickhouse is { } __value2 && clickhouse != null) { - return clickhouse(Clickhouse!); + return clickhouse(__value2); } - else if (IsDatadog && datadog != null) + else if (Datadog is { } __value3 && datadog != null) { - return datadog(Datadog!); + return datadog(__value3); } - else if (IsGrafana && grafana != null) + else if (Grafana is { } __value4 && grafana != null) { - return grafana(Grafana!); + return grafana(__value4); } - else if (IsLangfuse && langfuse != null) + else if (Langfuse is { } __value5 && langfuse != null) { - return langfuse(Langfuse!); + return langfuse(__value5); } - else if (IsLangsmith && langsmith != null) + else if (Langsmith is { } __value6 && langsmith != null) { - return langsmith(Langsmith!); + return langsmith(__value6); } - else if (IsNewrelic && newrelic != null) + else if (Newrelic is { } __value7 && newrelic != null) { - return newrelic(Newrelic!); + return newrelic(__value7); } - else if (IsOpik && opik != null) + else if (Opik is { } __value8 && opik != null) { - return opik(Opik!); + return opik(__value8); } - else if (IsOtelCollector && otelCollector != null) + else if (OtelCollector is { } __value9 && otelCollector != null) { - return otelCollector(OtelCollector!); + return otelCollector(__value9); } - else if (IsPosthog && posthog != null) + else if (Posthog is { } __value10 && posthog != null) { - return posthog(Posthog!); + return posthog(__value10); } - else if (IsRamp && ramp != null) + else if (Ramp is { } __value11 && ramp != null) { - return ramp(Ramp!); + return ramp(__value11); } - else if (IsS3 && s3 != null) + else if (S3 is { } __value12 && s3 != null) { - return s3(S3!); + return s3(__value12); } - else if (IsSentry && sentry != null) + else if (Sentry is { } __value13 && sentry != null) { - return sentry(Sentry!); + return sentry(__value13); } - else if (IsSnowflake && snowflake != null) + else if (Snowflake is { } __value14 && snowflake != null) { - return snowflake(Snowflake!); + return snowflake(__value14); } - else if (IsWeave && weave != null) + else if (Weave is { } __value15 && weave != null) { - return weave(Weave!); + return weave(__value15); } - else if (IsWebhook && webhook != null) + else if (Webhook is { } __value16 && webhook != null) { - return webhook(Webhook!); + return webhook(__value16); } return default(TResult); @@ -1276,73 +1276,73 @@ public void Match( Validate(); } - if (IsArize) + if (Arize is { } __value0) { - arize?.Invoke(Arize!); + arize?.Invoke(__value0); } - else if (IsBraintrust) + else if (Braintrust is { } __value1) { - braintrust?.Invoke(Braintrust!); + braintrust?.Invoke(__value1); } - else if (IsClickhouse) + else if (Clickhouse is { } __value2) { - clickhouse?.Invoke(Clickhouse!); + clickhouse?.Invoke(__value2); } - else if (IsDatadog) + else if (Datadog is { } __value3) { - datadog?.Invoke(Datadog!); + datadog?.Invoke(__value3); } - else if (IsGrafana) + else if (Grafana is { } __value4) { - grafana?.Invoke(Grafana!); + grafana?.Invoke(__value4); } - else if (IsLangfuse) + else if (Langfuse is { } __value5) { - langfuse?.Invoke(Langfuse!); + langfuse?.Invoke(__value5); } - else if (IsLangsmith) + else if (Langsmith is { } __value6) { - langsmith?.Invoke(Langsmith!); + langsmith?.Invoke(__value6); } - else if (IsNewrelic) + else if (Newrelic is { } __value7) { - newrelic?.Invoke(Newrelic!); + newrelic?.Invoke(__value7); } - else if (IsOpik) + else if (Opik is { } __value8) { - opik?.Invoke(Opik!); + opik?.Invoke(__value8); } - else if (IsOtelCollector) + else if (OtelCollector is { } __value9) { - otelCollector?.Invoke(OtelCollector!); + otelCollector?.Invoke(__value9); } - else if (IsPosthog) + else if (Posthog is { } __value10) { - posthog?.Invoke(Posthog!); + posthog?.Invoke(__value10); } - else if (IsRamp) + else if (Ramp is { } __value11) { - ramp?.Invoke(Ramp!); + ramp?.Invoke(__value11); } - else if (IsS3) + else if (S3 is { } __value12) { - s3?.Invoke(S3!); + s3?.Invoke(__value12); } - else if (IsSentry) + else if (Sentry is { } __value13) { - sentry?.Invoke(Sentry!); + sentry?.Invoke(__value13); } - else if (IsSnowflake) + else if (Snowflake is { } __value14) { - snowflake?.Invoke(Snowflake!); + snowflake?.Invoke(__value14); } - else if (IsWeave) + else if (Weave is { } __value15) { - weave?.Invoke(Weave!); + weave?.Invoke(__value15); } - else if (IsWebhook) + else if (Webhook is { } __value16) { - webhook?.Invoke(Webhook!); + webhook?.Invoke(__value16); } } @@ -1374,73 +1374,73 @@ public void Switch( Validate(); } - if (IsArize) + if (Arize is { } __value0) { - arize?.Invoke(Arize!); + arize?.Invoke(__value0); } - else if (IsBraintrust) + else if (Braintrust is { } __value1) { - braintrust?.Invoke(Braintrust!); + braintrust?.Invoke(__value1); } - else if (IsClickhouse) + else if (Clickhouse is { } __value2) { - clickhouse?.Invoke(Clickhouse!); + clickhouse?.Invoke(__value2); } - else if (IsDatadog) + else if (Datadog is { } __value3) { - datadog?.Invoke(Datadog!); + datadog?.Invoke(__value3); } - else if (IsGrafana) + else if (Grafana is { } __value4) { - grafana?.Invoke(Grafana!); + grafana?.Invoke(__value4); } - else if (IsLangfuse) + else if (Langfuse is { } __value5) { - langfuse?.Invoke(Langfuse!); + langfuse?.Invoke(__value5); } - else if (IsLangsmith) + else if (Langsmith is { } __value6) { - langsmith?.Invoke(Langsmith!); + langsmith?.Invoke(__value6); } - else if (IsNewrelic) + else if (Newrelic is { } __value7) { - newrelic?.Invoke(Newrelic!); + newrelic?.Invoke(__value7); } - else if (IsOpik) + else if (Opik is { } __value8) { - opik?.Invoke(Opik!); + opik?.Invoke(__value8); } - else if (IsOtelCollector) + else if (OtelCollector is { } __value9) { - otelCollector?.Invoke(OtelCollector!); + otelCollector?.Invoke(__value9); } - else if (IsPosthog) + else if (Posthog is { } __value10) { - posthog?.Invoke(Posthog!); + posthog?.Invoke(__value10); } - else if (IsRamp) + else if (Ramp is { } __value11) { - ramp?.Invoke(Ramp!); + ramp?.Invoke(__value11); } - else if (IsS3) + else if (S3 is { } __value12) { - s3?.Invoke(S3!); + s3?.Invoke(__value12); } - else if (IsSentry) + else if (Sentry is { } __value13) { - sentry?.Invoke(Sentry!); + sentry?.Invoke(__value13); } - else if (IsSnowflake) + else if (Snowflake is { } __value14) { - snowflake?.Invoke(Snowflake!); + snowflake?.Invoke(__value14); } - else if (IsWeave) + else if (Weave is { } __value15) { - weave?.Invoke(Weave!); + weave?.Invoke(__value15); } - else if (IsWebhook) + else if (Webhook is { } __value16) { - webhook?.Invoke(Webhook!); + webhook?.Invoke(__value16); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.ImageConfig.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.ImageConfig.g.cs index 35510022..e5651e87 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.ImageConfig.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.ImageConfig.g.cs @@ -42,8 +42,8 @@ public bool TryPickImageConfigVariant1( /// /// /// - public string PickImageConfigVariant1() => IsImageConfigVariant1 - ? ImageConfigVariant1! + public string PickImageConfigVariant1() => ImageConfigVariant1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ImageConfigVariant1' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickImageConfigVariant2( /// /// /// - public double PickImageConfigVariant2() => IsImageConfigVariant2 - ? ImageConfigVariant2!.Value + public double PickImageConfigVariant2() => ImageConfigVariant2 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ImageConfigVariant2' but the value was {ToString()}."); /// @@ -116,8 +116,8 @@ public bool TryPickImageConfigVariant3( /// /// /// - public global::System.Collections.Generic.IList PickImageConfigVariant3() => IsImageConfigVariant3 - ? ImageConfigVariant3! + public global::System.Collections.Generic.IList PickImageConfigVariant3() => ImageConfigVariant3 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ImageConfigVariant3' but the value was {ToString()}."); /// /// @@ -219,17 +219,17 @@ public bool Validate() Validate(); } - if (IsImageConfigVariant1 && imageConfigVariant1 != null) + if (ImageConfigVariant1 is { } __value0 && imageConfigVariant1 != null) { - return imageConfigVariant1(ImageConfigVariant1!); + return imageConfigVariant1(__value0); } - else if (IsImageConfigVariant2 && imageConfigVariant2 != null) + else if (ImageConfigVariant2 is { } __value1 && imageConfigVariant2 != null) { - return imageConfigVariant2(ImageConfigVariant2!); + return imageConfigVariant2(__value1); } - else if (IsImageConfigVariant3 && imageConfigVariant3 != null) + else if (ImageConfigVariant3 is { } __value2 && imageConfigVariant3 != null) { - return imageConfigVariant3(ImageConfigVariant3!); + return imageConfigVariant3(__value2); } return default(TResult); @@ -251,17 +251,17 @@ public void Match( Validate(); } - if (IsImageConfigVariant1) + if (ImageConfigVariant1 is { } __value0) { - imageConfigVariant1?.Invoke(ImageConfigVariant1!); + imageConfigVariant1?.Invoke(__value0); } - else if (IsImageConfigVariant2) + else if (ImageConfigVariant2 is { } __value1) { - imageConfigVariant2?.Invoke(ImageConfigVariant2!); + imageConfigVariant2?.Invoke(__value1); } - else if (IsImageConfigVariant3) + else if (ImageConfigVariant3 is { } __value2) { - imageConfigVariant3?.Invoke(ImageConfigVariant3!); + imageConfigVariant3?.Invoke(__value2); } } @@ -279,17 +279,17 @@ public void Switch( Validate(); } - if (IsImageConfigVariant1) + if (ImageConfigVariant1 is { } __value0) { - imageConfigVariant1?.Invoke(ImageConfigVariant1!); + imageConfigVariant1?.Invoke(__value0); } - else if (IsImageConfigVariant2) + else if (ImageConfigVariant2 is { } __value1) { - imageConfigVariant2?.Invoke(ImageConfigVariant2!); + imageConfigVariant2?.Invoke(__value1); } - else if (IsImageConfigVariant3) + else if (ImageConfigVariant3 is { } __value2) { - imageConfigVariant3?.Invoke(ImageConfigVariant3!); + imageConfigVariant3?.Invoke(__value2); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.ImageGenerationProviderPreferencesIgnoreItems.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.ImageGenerationProviderPreferencesIgnoreItems.g.cs index cdad34da..5d895050 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.ImageGenerationProviderPreferencesIgnoreItems.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.ImageGenerationProviderPreferencesIgnoreItems.g.cs @@ -42,8 +42,8 @@ public bool TryPickProviderName( /// /// /// - public global::OpenRouter.ProviderName PickProviderName() => IsProviderName - ? ProviderName!.Value + public global::OpenRouter.ProviderName PickProviderName() => ProviderName is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ProviderName' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickImageGenerationProviderPreferencesIgnoreItemsVariant2( /// /// /// - public string PickImageGenerationProviderPreferencesIgnoreItemsVariant2() => IsImageGenerationProviderPreferencesIgnoreItemsVariant2 - ? ImageGenerationProviderPreferencesIgnoreItemsVariant2! + public string PickImageGenerationProviderPreferencesIgnoreItemsVariant2() => ImageGenerationProviderPreferencesIgnoreItemsVariant2 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ImageGenerationProviderPreferencesIgnoreItemsVariant2' but the value was {ToString()}."); /// /// @@ -177,13 +177,13 @@ public bool Validate() Validate(); } - if (IsProviderName && providerName != null) + if (ProviderName is { } __value0 && providerName != null) { - return providerName(ProviderName!); + return providerName(__value0); } - else if (IsImageGenerationProviderPreferencesIgnoreItemsVariant2 && imageGenerationProviderPreferencesIgnoreItemsVariant2 != null) + else if (ImageGenerationProviderPreferencesIgnoreItemsVariant2 is { } __value1 && imageGenerationProviderPreferencesIgnoreItemsVariant2 != null) { - return imageGenerationProviderPreferencesIgnoreItemsVariant2(ImageGenerationProviderPreferencesIgnoreItemsVariant2!); + return imageGenerationProviderPreferencesIgnoreItemsVariant2(__value1); } return default(TResult); @@ -203,13 +203,13 @@ public void Match( Validate(); } - if (IsProviderName) + if (ProviderName is { } __value0) { - providerName?.Invoke(ProviderName!); + providerName?.Invoke(__value0); } - else if (IsImageGenerationProviderPreferencesIgnoreItemsVariant2) + else if (ImageGenerationProviderPreferencesIgnoreItemsVariant2 is { } __value1) { - imageGenerationProviderPreferencesIgnoreItemsVariant2?.Invoke(ImageGenerationProviderPreferencesIgnoreItemsVariant2!); + imageGenerationProviderPreferencesIgnoreItemsVariant2?.Invoke(__value1); } } @@ -226,13 +226,13 @@ public void Switch( Validate(); } - if (IsProviderName) + if (ProviderName is { } __value0) { - providerName?.Invoke(ProviderName!); + providerName?.Invoke(__value0); } - else if (IsImageGenerationProviderPreferencesIgnoreItemsVariant2) + else if (ImageGenerationProviderPreferencesIgnoreItemsVariant2 is { } __value1) { - imageGenerationProviderPreferencesIgnoreItemsVariant2?.Invoke(ImageGenerationProviderPreferencesIgnoreItemsVariant2!); + imageGenerationProviderPreferencesIgnoreItemsVariant2?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.ImageGenerationProviderPreferencesOnlyItems.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.ImageGenerationProviderPreferencesOnlyItems.g.cs index 4f362074..f2ae6c0d 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.ImageGenerationProviderPreferencesOnlyItems.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.ImageGenerationProviderPreferencesOnlyItems.g.cs @@ -42,8 +42,8 @@ public bool TryPickProviderName( /// /// /// - public global::OpenRouter.ProviderName PickProviderName() => IsProviderName - ? ProviderName!.Value + public global::OpenRouter.ProviderName PickProviderName() => ProviderName is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ProviderName' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickImageGenerationProviderPreferencesOnlyItemsVariant2( /// /// /// - public string PickImageGenerationProviderPreferencesOnlyItemsVariant2() => IsImageGenerationProviderPreferencesOnlyItemsVariant2 - ? ImageGenerationProviderPreferencesOnlyItemsVariant2! + public string PickImageGenerationProviderPreferencesOnlyItemsVariant2() => ImageGenerationProviderPreferencesOnlyItemsVariant2 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ImageGenerationProviderPreferencesOnlyItemsVariant2' but the value was {ToString()}."); /// /// @@ -177,13 +177,13 @@ public bool Validate() Validate(); } - if (IsProviderName && providerName != null) + if (ProviderName is { } __value0 && providerName != null) { - return providerName(ProviderName!); + return providerName(__value0); } - else if (IsImageGenerationProviderPreferencesOnlyItemsVariant2 && imageGenerationProviderPreferencesOnlyItemsVariant2 != null) + else if (ImageGenerationProviderPreferencesOnlyItemsVariant2 is { } __value1 && imageGenerationProviderPreferencesOnlyItemsVariant2 != null) { - return imageGenerationProviderPreferencesOnlyItemsVariant2(ImageGenerationProviderPreferencesOnlyItemsVariant2!); + return imageGenerationProviderPreferencesOnlyItemsVariant2(__value1); } return default(TResult); @@ -203,13 +203,13 @@ public void Match( Validate(); } - if (IsProviderName) + if (ProviderName is { } __value0) { - providerName?.Invoke(ProviderName!); + providerName?.Invoke(__value0); } - else if (IsImageGenerationProviderPreferencesOnlyItemsVariant2) + else if (ImageGenerationProviderPreferencesOnlyItemsVariant2 is { } __value1) { - imageGenerationProviderPreferencesOnlyItemsVariant2?.Invoke(ImageGenerationProviderPreferencesOnlyItemsVariant2!); + imageGenerationProviderPreferencesOnlyItemsVariant2?.Invoke(__value1); } } @@ -226,13 +226,13 @@ public void Switch( Validate(); } - if (IsProviderName) + if (ProviderName is { } __value0) { - providerName?.Invoke(ProviderName!); + providerName?.Invoke(__value0); } - else if (IsImageGenerationProviderPreferencesOnlyItemsVariant2) + else if (ImageGenerationProviderPreferencesOnlyItemsVariant2 is { } __value1) { - imageGenerationProviderPreferencesOnlyItemsVariant2?.Invoke(ImageGenerationProviderPreferencesOnlyItemsVariant2!); + imageGenerationProviderPreferencesOnlyItemsVariant2?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.ImageGenerationProviderPreferencesOrderItems.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.ImageGenerationProviderPreferencesOrderItems.g.cs index 0812eca8..259631f5 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.ImageGenerationProviderPreferencesOrderItems.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.ImageGenerationProviderPreferencesOrderItems.g.cs @@ -42,8 +42,8 @@ public bool TryPickProviderName( /// /// /// - public global::OpenRouter.ProviderName PickProviderName() => IsProviderName - ? ProviderName!.Value + public global::OpenRouter.ProviderName PickProviderName() => ProviderName is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ProviderName' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickImageGenerationProviderPreferencesOrderItemsVariant2( /// /// /// - public string PickImageGenerationProviderPreferencesOrderItemsVariant2() => IsImageGenerationProviderPreferencesOrderItemsVariant2 - ? ImageGenerationProviderPreferencesOrderItemsVariant2! + public string PickImageGenerationProviderPreferencesOrderItemsVariant2() => ImageGenerationProviderPreferencesOrderItemsVariant2 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ImageGenerationProviderPreferencesOrderItemsVariant2' but the value was {ToString()}."); /// /// @@ -177,13 +177,13 @@ public bool Validate() Validate(); } - if (IsProviderName && providerName != null) + if (ProviderName is { } __value0 && providerName != null) { - return providerName(ProviderName!); + return providerName(__value0); } - else if (IsImageGenerationProviderPreferencesOrderItemsVariant2 && imageGenerationProviderPreferencesOrderItemsVariant2 != null) + else if (ImageGenerationProviderPreferencesOrderItemsVariant2 is { } __value1 && imageGenerationProviderPreferencesOrderItemsVariant2 != null) { - return imageGenerationProviderPreferencesOrderItemsVariant2(ImageGenerationProviderPreferencesOrderItemsVariant2!); + return imageGenerationProviderPreferencesOrderItemsVariant2(__value1); } return default(TResult); @@ -203,13 +203,13 @@ public void Match( Validate(); } - if (IsProviderName) + if (ProviderName is { } __value0) { - providerName?.Invoke(ProviderName!); + providerName?.Invoke(__value0); } - else if (IsImageGenerationProviderPreferencesOrderItemsVariant2) + else if (ImageGenerationProviderPreferencesOrderItemsVariant2 is { } __value1) { - imageGenerationProviderPreferencesOrderItemsVariant2?.Invoke(ImageGenerationProviderPreferencesOrderItemsVariant2!); + imageGenerationProviderPreferencesOrderItemsVariant2?.Invoke(__value1); } } @@ -226,13 +226,13 @@ public void Switch( Validate(); } - if (IsProviderName) + if (ProviderName is { } __value0) { - providerName?.Invoke(ProviderName!); + providerName?.Invoke(__value0); } - else if (IsImageGenerationProviderPreferencesOrderItemsVariant2) + else if (ImageGenerationProviderPreferencesOrderItemsVariant2 is { } __value1) { - imageGenerationProviderPreferencesOrderItemsVariant2?.Invoke(ImageGenerationProviderPreferencesOrderItemsVariant2!); + imageGenerationProviderPreferencesOrderItemsVariant2?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.ImageGenerationProviderPreferencesSort.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.ImageGenerationProviderPreferencesSort.g.cs index 51d69b4c..c70b6157 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.ImageGenerationProviderPreferencesSort.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.ImageGenerationProviderPreferencesSort.g.cs @@ -42,8 +42,8 @@ public bool TryPickProviderSort( /// /// /// - public global::OpenRouter.ProviderSort PickProviderSort() => IsProviderSort - ? ProviderSort!.Value + public global::OpenRouter.ProviderSort PickProviderSort() => ProviderSort is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ProviderSort' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickProviderSortConfig( /// /// /// - public global::OpenRouter.ProviderSortConfig PickProviderSortConfig() => IsProviderSortConfig - ? ProviderSortConfig! + public global::OpenRouter.ProviderSortConfig PickProviderSortConfig() => ProviderSortConfig is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ProviderSortConfig' but the value was {ToString()}."); /// /// @@ -177,13 +177,13 @@ public bool Validate() Validate(); } - if (IsProviderSort && providerSort != null) + if (ProviderSort is { } __value0 && providerSort != null) { - return providerSort(ProviderSort!); + return providerSort(__value0); } - else if (IsProviderSortConfig && providerSortConfig != null) + else if (ProviderSortConfig is { } __value1 && providerSortConfig != null) { - return providerSortConfig(ProviderSortConfig!); + return providerSortConfig(__value1); } return default(TResult); @@ -203,13 +203,13 @@ public void Match( Validate(); } - if (IsProviderSort) + if (ProviderSort is { } __value0) { - providerSort?.Invoke(ProviderSort!); + providerSort?.Invoke(__value0); } - else if (IsProviderSortConfig) + else if (ProviderSortConfig is { } __value1) { - providerSortConfig?.Invoke(ProviderSortConfig!); + providerSortConfig?.Invoke(__value1); } } @@ -226,13 +226,13 @@ public void Switch( Validate(); } - if (IsProviderSort) + if (ProviderSort is { } __value0) { - providerSort?.Invoke(ProviderSort!); + providerSort?.Invoke(__value0); } - else if (IsProviderSortConfig) + else if (ProviderSortConfig is { } __value1) { - providerSortConfig?.Invoke(ProviderSortConfig!); + providerSortConfig?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.InputMessageItemContentItems.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.InputMessageItemContentItems.g.cs index afa4ee84..4cb0b4da 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.InputMessageItemContentItems.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.InputMessageItemContentItems.g.cs @@ -42,8 +42,8 @@ public bool TryPickInputText( /// /// /// - public global::OpenRouter.InputText PickInputText() => IsInputText - ? InputText! + public global::OpenRouter.InputText PickInputText() => InputText is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'InputText' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickInputMessageItemContentItems1( /// /// /// - public global::OpenRouter.InputMessageItemContentItems1 PickInputMessageItemContentItems1() => IsInputMessageItemContentItems1 - ? InputMessageItemContentItems1! + public global::OpenRouter.InputMessageItemContentItems1 PickInputMessageItemContentItems1() => InputMessageItemContentItems1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'InputMessageItemContentItems1' but the value was {ToString()}."); /// @@ -116,8 +116,8 @@ public bool TryPickInputFile( /// /// /// - public global::OpenRouter.InputFile PickInputFile() => IsInputFile - ? InputFile! + public global::OpenRouter.InputFile PickInputFile() => InputFile is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'InputFile' but the value was {ToString()}."); /// @@ -153,8 +153,8 @@ public bool TryPickInputAudio( /// /// /// - public global::OpenRouter.InputAudio PickInputAudio() => IsInputAudio - ? InputAudio! + public global::OpenRouter.InputAudio PickInputAudio() => InputAudio is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'InputAudio' but the value was {ToString()}."); /// @@ -190,8 +190,8 @@ public bool TryPickInputVideo( /// /// /// - public global::OpenRouter.InputVideo PickInputVideo() => IsInputVideo - ? InputVideo! + public global::OpenRouter.InputVideo PickInputVideo() => InputVideo is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'InputVideo' but the value was {ToString()}."); /// /// @@ -372,25 +372,25 @@ public bool Validate() Validate(); } - if (IsInputText && inputText != null) + if (InputText is { } __value0 && inputText != null) { - return inputText(InputText!); + return inputText(__value0); } - else if (IsInputMessageItemContentItems1 && inputMessageItemContentItems1 != null) + else if (InputMessageItemContentItems1 is { } __value1 && inputMessageItemContentItems1 != null) { - return inputMessageItemContentItems1(InputMessageItemContentItems1!); + return inputMessageItemContentItems1(__value1); } - else if (IsInputFile && inputFile != null) + else if (InputFile is { } __value2 && inputFile != null) { - return inputFile(InputFile!); + return inputFile(__value2); } - else if (IsInputAudio && inputAudio != null) + else if (InputAudio is { } __value3 && inputAudio != null) { - return inputAudio(InputAudio!); + return inputAudio(__value3); } - else if (IsInputVideo && inputVideo != null) + else if (InputVideo is { } __value4 && inputVideo != null) { - return inputVideo(InputVideo!); + return inputVideo(__value4); } return default(TResult); @@ -416,25 +416,25 @@ public void Match( Validate(); } - if (IsInputText) + if (InputText is { } __value0) { - inputText?.Invoke(InputText!); + inputText?.Invoke(__value0); } - else if (IsInputMessageItemContentItems1) + else if (InputMessageItemContentItems1 is { } __value1) { - inputMessageItemContentItems1?.Invoke(InputMessageItemContentItems1!); + inputMessageItemContentItems1?.Invoke(__value1); } - else if (IsInputFile) + else if (InputFile is { } __value2) { - inputFile?.Invoke(InputFile!); + inputFile?.Invoke(__value2); } - else if (IsInputAudio) + else if (InputAudio is { } __value3) { - inputAudio?.Invoke(InputAudio!); + inputAudio?.Invoke(__value3); } - else if (IsInputVideo) + else if (InputVideo is { } __value4) { - inputVideo?.Invoke(InputVideo!); + inputVideo?.Invoke(__value4); } } @@ -454,25 +454,25 @@ public void Switch( Validate(); } - if (IsInputText) + if (InputText is { } __value0) { - inputText?.Invoke(InputText!); + inputText?.Invoke(__value0); } - else if (IsInputMessageItemContentItems1) + else if (InputMessageItemContentItems1 is { } __value1) { - inputMessageItemContentItems1?.Invoke(InputMessageItemContentItems1!); + inputMessageItemContentItems1?.Invoke(__value1); } - else if (IsInputFile) + else if (InputFile is { } __value2) { - inputFile?.Invoke(InputFile!); + inputFile?.Invoke(__value2); } - else if (IsInputAudio) + else if (InputAudio is { } __value3) { - inputAudio?.Invoke(InputAudio!); + inputAudio?.Invoke(__value3); } - else if (IsInputVideo) + else if (InputVideo is { } __value4) { - inputVideo?.Invoke(InputVideo!); + inputVideo?.Invoke(__value4); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.InputMessageItemRole.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.InputMessageItemRole.g.cs index 58f0e4e2..a7009abd 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.InputMessageItemRole.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.InputMessageItemRole.g.cs @@ -42,8 +42,8 @@ public bool TryPickInputMessageItemRole0( /// /// /// - public global::OpenRouter.InputMessageItemRole0 PickInputMessageItemRole0() => IsInputMessageItemRole0 - ? InputMessageItemRole0!.Value + public global::OpenRouter.InputMessageItemRole0 PickInputMessageItemRole0() => InputMessageItemRole0 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'InputMessageItemRole0' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickInputMessageItemRole1( /// /// /// - public global::OpenRouter.InputMessageItemRole1 PickInputMessageItemRole1() => IsInputMessageItemRole1 - ? InputMessageItemRole1!.Value + public global::OpenRouter.InputMessageItemRole1 PickInputMessageItemRole1() => InputMessageItemRole1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'InputMessageItemRole1' but the value was {ToString()}."); /// @@ -116,8 +116,8 @@ public bool TryPickInputMessageItemRole2( /// /// /// - public global::OpenRouter.InputMessageItemRole2 PickInputMessageItemRole2() => IsInputMessageItemRole2 - ? InputMessageItemRole2!.Value + public global::OpenRouter.InputMessageItemRole2 PickInputMessageItemRole2() => InputMessageItemRole2 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'InputMessageItemRole2' but the value was {ToString()}."); /// /// @@ -242,17 +242,17 @@ public bool Validate() Validate(); } - if (IsInputMessageItemRole0 && inputMessageItemRole0 != null) + if (InputMessageItemRole0 is { } __value0 && inputMessageItemRole0 != null) { - return inputMessageItemRole0(InputMessageItemRole0!); + return inputMessageItemRole0(__value0); } - else if (IsInputMessageItemRole1 && inputMessageItemRole1 != null) + else if (InputMessageItemRole1 is { } __value1 && inputMessageItemRole1 != null) { - return inputMessageItemRole1(InputMessageItemRole1!); + return inputMessageItemRole1(__value1); } - else if (IsInputMessageItemRole2 && inputMessageItemRole2 != null) + else if (InputMessageItemRole2 is { } __value2 && inputMessageItemRole2 != null) { - return inputMessageItemRole2(InputMessageItemRole2!); + return inputMessageItemRole2(__value2); } return default(TResult); @@ -274,17 +274,17 @@ public void Match( Validate(); } - if (IsInputMessageItemRole0) + if (InputMessageItemRole0 is { } __value0) { - inputMessageItemRole0?.Invoke(InputMessageItemRole0!); + inputMessageItemRole0?.Invoke(__value0); } - else if (IsInputMessageItemRole1) + else if (InputMessageItemRole1 is { } __value1) { - inputMessageItemRole1?.Invoke(InputMessageItemRole1!); + inputMessageItemRole1?.Invoke(__value1); } - else if (IsInputMessageItemRole2) + else if (InputMessageItemRole2 is { } __value2) { - inputMessageItemRole2?.Invoke(InputMessageItemRole2!); + inputMessageItemRole2?.Invoke(__value2); } } @@ -302,17 +302,17 @@ public void Switch( Validate(); } - if (IsInputMessageItemRole0) + if (InputMessageItemRole0 is { } __value0) { - inputMessageItemRole0?.Invoke(InputMessageItemRole0!); + inputMessageItemRole0?.Invoke(__value0); } - else if (IsInputMessageItemRole1) + else if (InputMessageItemRole1 is { } __value1) { - inputMessageItemRole1?.Invoke(InputMessageItemRole1!); + inputMessageItemRole1?.Invoke(__value1); } - else if (IsInputMessageItemRole2) + else if (InputMessageItemRole2 is { } __value2) { - inputMessageItemRole2?.Invoke(InputMessageItemRole2!); + inputMessageItemRole2?.Invoke(__value2); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.InputReference.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.InputReference.g.cs index 7fd5912b..0f88e8fb 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.InputReference.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.InputReference.g.cs @@ -47,8 +47,8 @@ public bool TryPickAudioUrl( /// /// /// - public global::OpenRouter.InputReferenceVariant1 PickAudioUrl() => IsAudioUrl - ? AudioUrl! + public global::OpenRouter.InputReferenceVariant1 PickAudioUrl() => AudioUrl is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'AudioUrl' but the value was {ToString()}."); /// @@ -84,8 +84,8 @@ public bool TryPickImageUrl( /// /// /// - public global::OpenRouter.InputReferenceVariant2 PickImageUrl() => IsImageUrl - ? ImageUrl! + public global::OpenRouter.InputReferenceVariant2 PickImageUrl() => ImageUrl is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ImageUrl' but the value was {ToString()}."); /// @@ -121,8 +121,8 @@ public bool TryPickVideoUrl( /// /// /// - public global::OpenRouter.InputReferenceVariant3 PickVideoUrl() => IsVideoUrl - ? VideoUrl! + public global::OpenRouter.InputReferenceVariant3 PickVideoUrl() => VideoUrl is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'VideoUrl' but the value was {ToString()}."); /// /// @@ -250,17 +250,17 @@ public bool Validate() Validate(); } - if (IsAudioUrl && audioUrl != null) + if (AudioUrl is { } __value0 && audioUrl != null) { - return audioUrl(AudioUrl!); + return audioUrl(__value0); } - else if (IsImageUrl && imageUrl != null) + else if (ImageUrl is { } __value1 && imageUrl != null) { - return imageUrl(ImageUrl!); + return imageUrl(__value1); } - else if (IsVideoUrl && videoUrl != null) + else if (VideoUrl is { } __value2 && videoUrl != null) { - return videoUrl(VideoUrl!); + return videoUrl(__value2); } return default(TResult); @@ -282,17 +282,17 @@ public void Match( Validate(); } - if (IsAudioUrl) + if (AudioUrl is { } __value0) { - audioUrl?.Invoke(AudioUrl!); + audioUrl?.Invoke(__value0); } - else if (IsImageUrl) + else if (ImageUrl is { } __value1) { - imageUrl?.Invoke(ImageUrl!); + imageUrl?.Invoke(__value1); } - else if (IsVideoUrl) + else if (VideoUrl is { } __value2) { - videoUrl?.Invoke(VideoUrl!); + videoUrl?.Invoke(__value2); } } @@ -310,17 +310,17 @@ public void Switch( Validate(); } - if (IsAudioUrl) + if (AudioUrl is { } __value0) { - audioUrl?.Invoke(AudioUrl!); + audioUrl?.Invoke(__value0); } - else if (IsImageUrl) + else if (ImageUrl is { } __value1) { - imageUrl?.Invoke(ImageUrl!); + imageUrl?.Invoke(__value1); } - else if (IsVideoUrl) + else if (VideoUrl is { } __value2) { - videoUrl?.Invoke(VideoUrl!); + videoUrl?.Invoke(__value2); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.Inputs.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.Inputs.g.cs index 51f3e714..18533eec 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.Inputs.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.Inputs.g.cs @@ -42,8 +42,8 @@ public bool TryPickInputsVariant1( /// /// /// - public string PickInputsVariant1() => IsInputsVariant1 - ? InputsVariant1! + public string PickInputsVariant1() => InputsVariant1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'InputsVariant1' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickInputs1( /// /// /// - public global::System.Collections.Generic.IList PickInputs1() => IsInputs1 - ? Inputs1! + public global::System.Collections.Generic.IList PickInputs1() => Inputs1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Inputs1' but the value was {ToString()}."); /// /// @@ -154,13 +154,13 @@ public bool Validate() Validate(); } - if (IsInputsVariant1 && inputsVariant1 != null) + if (InputsVariant1 is { } __value0 && inputsVariant1 != null) { - return inputsVariant1(InputsVariant1!); + return inputsVariant1(__value0); } - else if (IsInputs1 && inputs1 != null) + else if (Inputs1 is { } __value1 && inputs1 != null) { - return inputs1(Inputs1!); + return inputs1(__value1); } return default(TResult); @@ -180,13 +180,13 @@ public void Match( Validate(); } - if (IsInputsVariant1) + if (InputsVariant1 is { } __value0) { - inputsVariant1?.Invoke(InputsVariant1!); + inputsVariant1?.Invoke(__value0); } - else if (IsInputs1) + else if (Inputs1 is { } __value1) { - inputs1?.Invoke(Inputs1!); + inputs1?.Invoke(__value1); } } @@ -203,13 +203,13 @@ public void Switch( Validate(); } - if (IsInputsVariant1) + if (InputsVariant1 is { } __value0) { - inputsVariant1?.Invoke(InputsVariant1!); + inputsVariant1?.Invoke(__value0); } - else if (IsInputs1) + else if (Inputs1 is { } __value1) { - inputs1?.Invoke(Inputs1!); + inputs1?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.InputsOneOf1Items.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.InputsOneOf1Items.g.cs index 4de40a37..659ef00e 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.InputsOneOf1Items.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.InputsOneOf1Items.g.cs @@ -42,8 +42,8 @@ public bool TryPickReasoningItem( /// /// /// - public global::OpenRouter.ReasoningItem PickReasoningItem() => IsReasoningItem - ? ReasoningItem! + public global::OpenRouter.ReasoningItem PickReasoningItem() => ReasoningItem is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ReasoningItem' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickEasyInputMessage( /// /// /// - public global::OpenRouter.EasyInputMessage PickEasyInputMessage() => IsEasyInputMessage - ? EasyInputMessage! + public global::OpenRouter.EasyInputMessage PickEasyInputMessage() => EasyInputMessage is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'EasyInputMessage' but the value was {ToString()}."); /// @@ -116,8 +116,8 @@ public bool TryPickInputMessageItem( /// /// /// - public global::OpenRouter.InputMessageItem PickInputMessageItem() => IsInputMessageItem - ? InputMessageItem! + public global::OpenRouter.InputMessageItem PickInputMessageItem() => InputMessageItem is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'InputMessageItem' but the value was {ToString()}."); /// @@ -153,8 +153,8 @@ public bool TryPickFunctionCallItem( /// /// /// - public global::OpenRouter.FunctionCallItem PickFunctionCallItem() => IsFunctionCallItem - ? FunctionCallItem! + public global::OpenRouter.FunctionCallItem PickFunctionCallItem() => FunctionCallItem is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'FunctionCallItem' but the value was {ToString()}."); /// @@ -190,8 +190,8 @@ public bool TryPickFunctionCallOutputItem( /// /// /// - public global::OpenRouter.FunctionCallOutputItem PickFunctionCallOutputItem() => IsFunctionCallOutputItem - ? FunctionCallOutputItem! + public global::OpenRouter.FunctionCallOutputItem PickFunctionCallOutputItem() => FunctionCallOutputItem is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'FunctionCallOutputItem' but the value was {ToString()}."); /// @@ -227,8 +227,8 @@ public bool TryPickApplyPatchCallItem( /// /// /// - public global::OpenRouter.ApplyPatchCallItem PickApplyPatchCallItem() => IsApplyPatchCallItem - ? ApplyPatchCallItem! + public global::OpenRouter.ApplyPatchCallItem PickApplyPatchCallItem() => ApplyPatchCallItem is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ApplyPatchCallItem' but the value was {ToString()}."); /// @@ -264,8 +264,8 @@ public bool TryPickApplyPatchCallOutputItem( /// /// /// - public global::OpenRouter.ApplyPatchCallOutputItem PickApplyPatchCallOutputItem() => IsApplyPatchCallOutputItem - ? ApplyPatchCallOutputItem! + public global::OpenRouter.ApplyPatchCallOutputItem PickApplyPatchCallOutputItem() => ApplyPatchCallOutputItem is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ApplyPatchCallOutputItem' but the value was {ToString()}."); /// @@ -301,8 +301,8 @@ public bool TryPickInputsOneOf1Items7( /// /// /// - public global::OpenRouter.InputsOneOf1Items7 PickInputsOneOf1Items7() => IsInputsOneOf1Items7 - ? InputsOneOf1Items7! + public global::OpenRouter.InputsOneOf1Items7 PickInputsOneOf1Items7() => InputsOneOf1Items7 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'InputsOneOf1Items7' but the value was {ToString()}."); /// @@ -338,8 +338,8 @@ public bool TryPickInputsOneOf1Items8( /// /// /// - public global::OpenRouter.InputsOneOf1Items8 PickInputsOneOf1Items8() => IsInputsOneOf1Items8 - ? InputsOneOf1Items8! + public global::OpenRouter.InputsOneOf1Items8 PickInputsOneOf1Items8() => InputsOneOf1Items8 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'InputsOneOf1Items8' but the value was {ToString()}."); /// @@ -375,8 +375,8 @@ public bool TryPickOutputFunctionCallItem( /// /// /// - public global::OpenRouter.OutputFunctionCallItem PickOutputFunctionCallItem() => IsOutputFunctionCallItem - ? OutputFunctionCallItem! + public global::OpenRouter.OutputFunctionCallItem PickOutputFunctionCallItem() => OutputFunctionCallItem is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OutputFunctionCallItem' but the value was {ToString()}."); /// @@ -412,8 +412,8 @@ public bool TryPickOutputCustomToolCallItem( /// /// /// - public global::OpenRouter.OutputCustomToolCallItem PickOutputCustomToolCallItem() => IsOutputCustomToolCallItem - ? OutputCustomToolCallItem! + public global::OpenRouter.OutputCustomToolCallItem PickOutputCustomToolCallItem() => OutputCustomToolCallItem is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OutputCustomToolCallItem' but the value was {ToString()}."); /// @@ -449,8 +449,8 @@ public bool TryPickOutputWebSearchCallItem( /// /// /// - public global::OpenRouter.OutputWebSearchCallItem PickOutputWebSearchCallItem() => IsOutputWebSearchCallItem - ? OutputWebSearchCallItem! + public global::OpenRouter.OutputWebSearchCallItem PickOutputWebSearchCallItem() => OutputWebSearchCallItem is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OutputWebSearchCallItem' but the value was {ToString()}."); /// @@ -486,8 +486,8 @@ public bool TryPickOutputFileSearchCallItem( /// /// /// - public global::OpenRouter.OutputFileSearchCallItem PickOutputFileSearchCallItem() => IsOutputFileSearchCallItem - ? OutputFileSearchCallItem! + public global::OpenRouter.OutputFileSearchCallItem PickOutputFileSearchCallItem() => OutputFileSearchCallItem is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OutputFileSearchCallItem' but the value was {ToString()}."); /// @@ -523,8 +523,8 @@ public bool TryPickOutputImageGenerationCallItem( /// /// /// - public global::OpenRouter.OutputImageGenerationCallItem PickOutputImageGenerationCallItem() => IsOutputImageGenerationCallItem - ? OutputImageGenerationCallItem! + public global::OpenRouter.OutputImageGenerationCallItem PickOutputImageGenerationCallItem() => OutputImageGenerationCallItem is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OutputImageGenerationCallItem' but the value was {ToString()}."); /// @@ -560,8 +560,8 @@ public bool TryPickOutputCodeInterpreterCallItem( /// /// /// - public global::OpenRouter.OutputCodeInterpreterCallItem PickOutputCodeInterpreterCallItem() => IsOutputCodeInterpreterCallItem - ? OutputCodeInterpreterCallItem! + public global::OpenRouter.OutputCodeInterpreterCallItem PickOutputCodeInterpreterCallItem() => OutputCodeInterpreterCallItem is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OutputCodeInterpreterCallItem' but the value was {ToString()}."); /// @@ -597,8 +597,8 @@ public bool TryPickOutputComputerCallItem( /// /// /// - public global::OpenRouter.OutputComputerCallItem PickOutputComputerCallItem() => IsOutputComputerCallItem - ? OutputComputerCallItem! + public global::OpenRouter.OutputComputerCallItem PickOutputComputerCallItem() => OutputComputerCallItem is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OutputComputerCallItem' but the value was {ToString()}."); /// @@ -634,8 +634,8 @@ public bool TryPickOutputDatetimeItem( /// /// /// - public global::OpenRouter.OutputDatetimeItem PickOutputDatetimeItem() => IsOutputDatetimeItem - ? OutputDatetimeItem! + public global::OpenRouter.OutputDatetimeItem PickOutputDatetimeItem() => OutputDatetimeItem is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OutputDatetimeItem' but the value was {ToString()}."); /// @@ -671,8 +671,8 @@ public bool TryPickOutputWebSearchServerToolItem( /// /// /// - public global::OpenRouter.OutputWebSearchServerToolItem PickOutputWebSearchServerToolItem() => IsOutputWebSearchServerToolItem - ? OutputWebSearchServerToolItem! + public global::OpenRouter.OutputWebSearchServerToolItem PickOutputWebSearchServerToolItem() => OutputWebSearchServerToolItem is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OutputWebSearchServerToolItem' but the value was {ToString()}."); /// @@ -708,8 +708,8 @@ public bool TryPickOutputCodeInterpreterServerToolItem( /// /// /// - public global::OpenRouter.OutputCodeInterpreterServerToolItem PickOutputCodeInterpreterServerToolItem() => IsOutputCodeInterpreterServerToolItem - ? OutputCodeInterpreterServerToolItem! + public global::OpenRouter.OutputCodeInterpreterServerToolItem PickOutputCodeInterpreterServerToolItem() => OutputCodeInterpreterServerToolItem is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OutputCodeInterpreterServerToolItem' but the value was {ToString()}."); /// @@ -745,8 +745,8 @@ public bool TryPickOutputFileSearchServerToolItem( /// /// /// - public global::OpenRouter.OutputFileSearchServerToolItem PickOutputFileSearchServerToolItem() => IsOutputFileSearchServerToolItem - ? OutputFileSearchServerToolItem! + public global::OpenRouter.OutputFileSearchServerToolItem PickOutputFileSearchServerToolItem() => OutputFileSearchServerToolItem is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OutputFileSearchServerToolItem' but the value was {ToString()}."); /// @@ -782,8 +782,8 @@ public bool TryPickOutputImageGenerationServerToolItem( /// /// /// - public global::OpenRouter.OutputImageGenerationServerToolItem PickOutputImageGenerationServerToolItem() => IsOutputImageGenerationServerToolItem - ? OutputImageGenerationServerToolItem! + public global::OpenRouter.OutputImageGenerationServerToolItem PickOutputImageGenerationServerToolItem() => OutputImageGenerationServerToolItem is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OutputImageGenerationServerToolItem' but the value was {ToString()}."); /// @@ -819,8 +819,8 @@ public bool TryPickOutputBrowserUseServerToolItem( /// /// /// - public global::OpenRouter.OutputBrowserUseServerToolItem PickOutputBrowserUseServerToolItem() => IsOutputBrowserUseServerToolItem - ? OutputBrowserUseServerToolItem! + public global::OpenRouter.OutputBrowserUseServerToolItem PickOutputBrowserUseServerToolItem() => OutputBrowserUseServerToolItem is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OutputBrowserUseServerToolItem' but the value was {ToString()}."); /// @@ -856,8 +856,8 @@ public bool TryPickOutputBashServerToolItem( /// /// /// - public global::OpenRouter.OutputBashServerToolItem PickOutputBashServerToolItem() => IsOutputBashServerToolItem - ? OutputBashServerToolItem! + public global::OpenRouter.OutputBashServerToolItem PickOutputBashServerToolItem() => OutputBashServerToolItem is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OutputBashServerToolItem' but the value was {ToString()}."); /// @@ -893,8 +893,8 @@ public bool TryPickOutputTextEditorServerToolItem( /// /// /// - public global::OpenRouter.OutputTextEditorServerToolItem PickOutputTextEditorServerToolItem() => IsOutputTextEditorServerToolItem - ? OutputTextEditorServerToolItem! + public global::OpenRouter.OutputTextEditorServerToolItem PickOutputTextEditorServerToolItem() => OutputTextEditorServerToolItem is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OutputTextEditorServerToolItem' but the value was {ToString()}."); /// @@ -930,8 +930,8 @@ public bool TryPickOutputApplyPatchServerToolItem( /// /// /// - public global::OpenRouter.OutputApplyPatchServerToolItem PickOutputApplyPatchServerToolItem() => IsOutputApplyPatchServerToolItem - ? OutputApplyPatchServerToolItem! + public global::OpenRouter.OutputApplyPatchServerToolItem PickOutputApplyPatchServerToolItem() => OutputApplyPatchServerToolItem is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OutputApplyPatchServerToolItem' but the value was {ToString()}."); /// @@ -967,8 +967,8 @@ public bool TryPickOutputWebFetchServerToolItem( /// /// /// - public global::OpenRouter.OutputWebFetchServerToolItem PickOutputWebFetchServerToolItem() => IsOutputWebFetchServerToolItem - ? OutputWebFetchServerToolItem! + public global::OpenRouter.OutputWebFetchServerToolItem PickOutputWebFetchServerToolItem() => OutputWebFetchServerToolItem is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OutputWebFetchServerToolItem' but the value was {ToString()}."); /// @@ -1004,8 +1004,8 @@ public bool TryPickOutputToolSearchServerToolItem( /// /// /// - public global::OpenRouter.OutputToolSearchServerToolItem PickOutputToolSearchServerToolItem() => IsOutputToolSearchServerToolItem - ? OutputToolSearchServerToolItem! + public global::OpenRouter.OutputToolSearchServerToolItem PickOutputToolSearchServerToolItem() => OutputToolSearchServerToolItem is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OutputToolSearchServerToolItem' but the value was {ToString()}."); /// @@ -1041,8 +1041,8 @@ public bool TryPickOutputMemoryServerToolItem( /// /// /// - public global::OpenRouter.OutputMemoryServerToolItem PickOutputMemoryServerToolItem() => IsOutputMemoryServerToolItem - ? OutputMemoryServerToolItem! + public global::OpenRouter.OutputMemoryServerToolItem PickOutputMemoryServerToolItem() => OutputMemoryServerToolItem is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OutputMemoryServerToolItem' but the value was {ToString()}."); /// @@ -1078,8 +1078,8 @@ public bool TryPickOutputMcpServerToolItem( /// /// /// - public global::OpenRouter.OutputMcpServerToolItem PickOutputMcpServerToolItem() => IsOutputMcpServerToolItem - ? OutputMcpServerToolItem! + public global::OpenRouter.OutputMcpServerToolItem PickOutputMcpServerToolItem() => OutputMcpServerToolItem is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OutputMcpServerToolItem' but the value was {ToString()}."); /// @@ -1115,8 +1115,8 @@ public bool TryPickOutputSearchModelsServerToolItem( /// /// /// - public global::OpenRouter.OutputSearchModelsServerToolItem PickOutputSearchModelsServerToolItem() => IsOutputSearchModelsServerToolItem - ? OutputSearchModelsServerToolItem! + public global::OpenRouter.OutputSearchModelsServerToolItem PickOutputSearchModelsServerToolItem() => OutputSearchModelsServerToolItem is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OutputSearchModelsServerToolItem' but the value was {ToString()}."); /// @@ -1152,8 +1152,8 @@ public bool TryPickOutputFusionServerToolItem( /// /// /// - public global::OpenRouter.OutputFusionServerToolItem PickOutputFusionServerToolItem() => IsOutputFusionServerToolItem - ? OutputFusionServerToolItem! + public global::OpenRouter.OutputFusionServerToolItem PickOutputFusionServerToolItem() => OutputFusionServerToolItem is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OutputFusionServerToolItem' but the value was {ToString()}."); /// @@ -1189,8 +1189,8 @@ public bool TryPickOutputAdvisorServerToolItem( /// /// /// - public global::OpenRouter.OutputAdvisorServerToolItem PickOutputAdvisorServerToolItem() => IsOutputAdvisorServerToolItem - ? OutputAdvisorServerToolItem! + public global::OpenRouter.OutputAdvisorServerToolItem PickOutputAdvisorServerToolItem() => OutputAdvisorServerToolItem is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OutputAdvisorServerToolItem' but the value was {ToString()}."); /// @@ -1226,8 +1226,8 @@ public bool TryPickOutputSubagentServerToolItem( /// /// /// - public global::OpenRouter.OutputSubagentServerToolItem PickOutputSubagentServerToolItem() => IsOutputSubagentServerToolItem - ? OutputSubagentServerToolItem! + public global::OpenRouter.OutputSubagentServerToolItem PickOutputSubagentServerToolItem() => OutputSubagentServerToolItem is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OutputSubagentServerToolItem' but the value was {ToString()}."); /// @@ -1263,8 +1263,8 @@ public bool TryPickOutputFilesServerToolItem( /// /// /// - public global::OpenRouter.OutputFilesServerToolItem PickOutputFilesServerToolItem() => IsOutputFilesServerToolItem - ? OutputFilesServerToolItem! + public global::OpenRouter.OutputFilesServerToolItem PickOutputFilesServerToolItem() => OutputFilesServerToolItem is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OutputFilesServerToolItem' but the value was {ToString()}."); /// @@ -1300,8 +1300,8 @@ public bool TryPickLocalShellCallItem( /// /// /// - public global::OpenRouter.LocalShellCallItem PickLocalShellCallItem() => IsLocalShellCallItem - ? LocalShellCallItem! + public global::OpenRouter.LocalShellCallItem PickLocalShellCallItem() => LocalShellCallItem is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'LocalShellCallItem' but the value was {ToString()}."); /// @@ -1337,8 +1337,8 @@ public bool TryPickLocalShellCallOutputItem( /// /// /// - public global::OpenRouter.LocalShellCallOutputItem PickLocalShellCallOutputItem() => IsLocalShellCallOutputItem - ? LocalShellCallOutputItem! + public global::OpenRouter.LocalShellCallOutputItem PickLocalShellCallOutputItem() => LocalShellCallOutputItem is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'LocalShellCallOutputItem' but the value was {ToString()}."); /// @@ -1374,8 +1374,8 @@ public bool TryPickShellCallItem( /// /// /// - public global::OpenRouter.ShellCallItem PickShellCallItem() => IsShellCallItem - ? ShellCallItem! + public global::OpenRouter.ShellCallItem PickShellCallItem() => ShellCallItem is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ShellCallItem' but the value was {ToString()}."); /// @@ -1411,8 +1411,8 @@ public bool TryPickShellCallOutputItem( /// /// /// - public global::OpenRouter.ShellCallOutputItem PickShellCallOutputItem() => IsShellCallOutputItem - ? ShellCallOutputItem! + public global::OpenRouter.ShellCallOutputItem PickShellCallOutputItem() => ShellCallOutputItem is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ShellCallOutputItem' but the value was {ToString()}."); /// @@ -1448,8 +1448,8 @@ public bool TryPickMcpListToolsItem( /// /// /// - public global::OpenRouter.McpListToolsItem PickMcpListToolsItem() => IsMcpListToolsItem - ? McpListToolsItem! + public global::OpenRouter.McpListToolsItem PickMcpListToolsItem() => McpListToolsItem is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'McpListToolsItem' but the value was {ToString()}."); /// @@ -1485,8 +1485,8 @@ public bool TryPickMcpApprovalRequestItem( /// /// /// - public global::OpenRouter.McpApprovalRequestItem PickMcpApprovalRequestItem() => IsMcpApprovalRequestItem - ? McpApprovalRequestItem! + public global::OpenRouter.McpApprovalRequestItem PickMcpApprovalRequestItem() => McpApprovalRequestItem is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'McpApprovalRequestItem' but the value was {ToString()}."); /// @@ -1522,8 +1522,8 @@ public bool TryPickMcpApprovalResponseItem( /// /// /// - public global::OpenRouter.McpApprovalResponseItem PickMcpApprovalResponseItem() => IsMcpApprovalResponseItem - ? McpApprovalResponseItem! + public global::OpenRouter.McpApprovalResponseItem PickMcpApprovalResponseItem() => McpApprovalResponseItem is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'McpApprovalResponseItem' but the value was {ToString()}."); /// @@ -1559,8 +1559,8 @@ public bool TryPickMcpCallItem( /// /// /// - public global::OpenRouter.McpCallItem PickMcpCallItem() => IsMcpCallItem - ? McpCallItem! + public global::OpenRouter.McpCallItem PickMcpCallItem() => McpCallItem is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'McpCallItem' but the value was {ToString()}."); /// @@ -1596,8 +1596,8 @@ public bool TryPickCustomToolCallItem( /// /// /// - public global::OpenRouter.CustomToolCallItem PickCustomToolCallItem() => IsCustomToolCallItem - ? CustomToolCallItem! + public global::OpenRouter.CustomToolCallItem PickCustomToolCallItem() => CustomToolCallItem is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'CustomToolCallItem' but the value was {ToString()}."); /// @@ -1633,8 +1633,8 @@ public bool TryPickCustomToolCallOutputItem( /// /// /// - public global::OpenRouter.CustomToolCallOutputItem PickCustomToolCallOutputItem() => IsCustomToolCallOutputItem - ? CustomToolCallOutputItem! + public global::OpenRouter.CustomToolCallOutputItem PickCustomToolCallOutputItem() => CustomToolCallOutputItem is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'CustomToolCallOutputItem' but the value was {ToString()}."); /// @@ -1670,8 +1670,8 @@ public bool TryPickCompactionItem( /// /// /// - public global::OpenRouter.CompactionItem PickCompactionItem() => IsCompactionItem - ? CompactionItem! + public global::OpenRouter.CompactionItem PickCompactionItem() => CompactionItem is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'CompactionItem' but the value was {ToString()}."); /// @@ -1707,8 +1707,8 @@ public bool TryPickContextCompactionItem( /// /// /// - public global::OpenRouter.ContextCompactionItem PickContextCompactionItem() => IsContextCompactionItem - ? ContextCompactionItem! + public global::OpenRouter.ContextCompactionItem PickContextCompactionItem() => ContextCompactionItem is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ContextCompactionItem' but the value was {ToString()}."); /// @@ -1744,8 +1744,8 @@ public bool TryPickItemReferenceItem( /// /// /// - public global::OpenRouter.ItemReferenceItem PickItemReferenceItem() => IsItemReferenceItem - ? ItemReferenceItem! + public global::OpenRouter.ItemReferenceItem PickItemReferenceItem() => ItemReferenceItem is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ItemReferenceItem' but the value was {ToString()}."); /// @@ -1781,8 +1781,8 @@ public bool TryPickAdditionalToolsItem( /// /// /// - public global::OpenRouter.AdditionalToolsItem PickAdditionalToolsItem() => IsAdditionalToolsItem - ? AdditionalToolsItem! + public global::OpenRouter.AdditionalToolsItem PickAdditionalToolsItem() => AdditionalToolsItem is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'AdditionalToolsItem' but the value was {ToString()}."); /// @@ -1818,8 +1818,8 @@ public bool TryPickAgentMessageItem( /// /// /// - public global::OpenRouter.AgentMessageItem PickAgentMessageItem() => IsAgentMessageItem - ? AgentMessageItem! + public global::OpenRouter.AgentMessageItem PickAgentMessageItem() => AgentMessageItem is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'AgentMessageItem' but the value was {ToString()}."); /// /// @@ -3232,201 +3232,201 @@ public bool Validate() Validate(); } - if (IsReasoningItem && reasoningItem != null) + if (ReasoningItem is { } __value0 && reasoningItem != null) { - return reasoningItem(ReasoningItem!); + return reasoningItem(__value0); } - else if (IsEasyInputMessage && easyInputMessage != null) + else if (EasyInputMessage is { } __value1 && easyInputMessage != null) { - return easyInputMessage(EasyInputMessage!); + return easyInputMessage(__value1); } - else if (IsInputMessageItem && inputMessageItem != null) + else if (InputMessageItem is { } __value2 && inputMessageItem != null) { - return inputMessageItem(InputMessageItem!); + return inputMessageItem(__value2); } - else if (IsFunctionCallItem && functionCallItem != null) + else if (FunctionCallItem is { } __value3 && functionCallItem != null) { - return functionCallItem(FunctionCallItem!); + return functionCallItem(__value3); } - else if (IsFunctionCallOutputItem && functionCallOutputItem != null) + else if (FunctionCallOutputItem is { } __value4 && functionCallOutputItem != null) { - return functionCallOutputItem(FunctionCallOutputItem!); + return functionCallOutputItem(__value4); } - else if (IsApplyPatchCallItem && applyPatchCallItem != null) + else if (ApplyPatchCallItem is { } __value5 && applyPatchCallItem != null) { - return applyPatchCallItem(ApplyPatchCallItem!); + return applyPatchCallItem(__value5); } - else if (IsApplyPatchCallOutputItem && applyPatchCallOutputItem != null) + else if (ApplyPatchCallOutputItem is { } __value6 && applyPatchCallOutputItem != null) { - return applyPatchCallOutputItem(ApplyPatchCallOutputItem!); + return applyPatchCallOutputItem(__value6); } - else if (IsInputsOneOf1Items7 && inputsOneOf1Items7 != null) + else if (InputsOneOf1Items7 is { } __value7 && inputsOneOf1Items7 != null) { - return inputsOneOf1Items7(InputsOneOf1Items7!); + return inputsOneOf1Items7(__value7); } - else if (IsInputsOneOf1Items8 && inputsOneOf1Items8 != null) + else if (InputsOneOf1Items8 is { } __value8 && inputsOneOf1Items8 != null) { - return inputsOneOf1Items8(InputsOneOf1Items8!); + return inputsOneOf1Items8(__value8); } - else if (IsOutputFunctionCallItem && outputFunctionCallItem != null) + else if (OutputFunctionCallItem is { } __value9 && outputFunctionCallItem != null) { - return outputFunctionCallItem(OutputFunctionCallItem!); + return outputFunctionCallItem(__value9); } - else if (IsOutputCustomToolCallItem && outputCustomToolCallItem != null) + else if (OutputCustomToolCallItem is { } __value10 && outputCustomToolCallItem != null) { - return outputCustomToolCallItem(OutputCustomToolCallItem!); + return outputCustomToolCallItem(__value10); } - else if (IsOutputWebSearchCallItem && outputWebSearchCallItem != null) + else if (OutputWebSearchCallItem is { } __value11 && outputWebSearchCallItem != null) { - return outputWebSearchCallItem(OutputWebSearchCallItem!); + return outputWebSearchCallItem(__value11); } - else if (IsOutputFileSearchCallItem && outputFileSearchCallItem != null) + else if (OutputFileSearchCallItem is { } __value12 && outputFileSearchCallItem != null) { - return outputFileSearchCallItem(OutputFileSearchCallItem!); + return outputFileSearchCallItem(__value12); } - else if (IsOutputImageGenerationCallItem && outputImageGenerationCallItem != null) + else if (OutputImageGenerationCallItem is { } __value13 && outputImageGenerationCallItem != null) { - return outputImageGenerationCallItem(OutputImageGenerationCallItem!); + return outputImageGenerationCallItem(__value13); } - else if (IsOutputCodeInterpreterCallItem && outputCodeInterpreterCallItem != null) + else if (OutputCodeInterpreterCallItem is { } __value14 && outputCodeInterpreterCallItem != null) { - return outputCodeInterpreterCallItem(OutputCodeInterpreterCallItem!); + return outputCodeInterpreterCallItem(__value14); } - else if (IsOutputComputerCallItem && outputComputerCallItem != null) + else if (OutputComputerCallItem is { } __value15 && outputComputerCallItem != null) { - return outputComputerCallItem(OutputComputerCallItem!); + return outputComputerCallItem(__value15); } - else if (IsOutputDatetimeItem && outputDatetimeItem != null) + else if (OutputDatetimeItem is { } __value16 && outputDatetimeItem != null) { - return outputDatetimeItem(OutputDatetimeItem!); + return outputDatetimeItem(__value16); } - else if (IsOutputWebSearchServerToolItem && outputWebSearchServerToolItem != null) + else if (OutputWebSearchServerToolItem is { } __value17 && outputWebSearchServerToolItem != null) { - return outputWebSearchServerToolItem(OutputWebSearchServerToolItem!); + return outputWebSearchServerToolItem(__value17); } - else if (IsOutputCodeInterpreterServerToolItem && outputCodeInterpreterServerToolItem != null) + else if (OutputCodeInterpreterServerToolItem is { } __value18 && outputCodeInterpreterServerToolItem != null) { - return outputCodeInterpreterServerToolItem(OutputCodeInterpreterServerToolItem!); + return outputCodeInterpreterServerToolItem(__value18); } - else if (IsOutputFileSearchServerToolItem && outputFileSearchServerToolItem != null) + else if (OutputFileSearchServerToolItem is { } __value19 && outputFileSearchServerToolItem != null) { - return outputFileSearchServerToolItem(OutputFileSearchServerToolItem!); + return outputFileSearchServerToolItem(__value19); } - else if (IsOutputImageGenerationServerToolItem && outputImageGenerationServerToolItem != null) + else if (OutputImageGenerationServerToolItem is { } __value20 && outputImageGenerationServerToolItem != null) { - return outputImageGenerationServerToolItem(OutputImageGenerationServerToolItem!); + return outputImageGenerationServerToolItem(__value20); } - else if (IsOutputBrowserUseServerToolItem && outputBrowserUseServerToolItem != null) + else if (OutputBrowserUseServerToolItem is { } __value21 && outputBrowserUseServerToolItem != null) { - return outputBrowserUseServerToolItem(OutputBrowserUseServerToolItem!); + return outputBrowserUseServerToolItem(__value21); } - else if (IsOutputBashServerToolItem && outputBashServerToolItem != null) + else if (OutputBashServerToolItem is { } __value22 && outputBashServerToolItem != null) { - return outputBashServerToolItem(OutputBashServerToolItem!); + return outputBashServerToolItem(__value22); } - else if (IsOutputTextEditorServerToolItem && outputTextEditorServerToolItem != null) + else if (OutputTextEditorServerToolItem is { } __value23 && outputTextEditorServerToolItem != null) { - return outputTextEditorServerToolItem(OutputTextEditorServerToolItem!); + return outputTextEditorServerToolItem(__value23); } - else if (IsOutputApplyPatchServerToolItem && outputApplyPatchServerToolItem != null) + else if (OutputApplyPatchServerToolItem is { } __value24 && outputApplyPatchServerToolItem != null) { - return outputApplyPatchServerToolItem(OutputApplyPatchServerToolItem!); + return outputApplyPatchServerToolItem(__value24); } - else if (IsOutputWebFetchServerToolItem && outputWebFetchServerToolItem != null) + else if (OutputWebFetchServerToolItem is { } __value25 && outputWebFetchServerToolItem != null) { - return outputWebFetchServerToolItem(OutputWebFetchServerToolItem!); + return outputWebFetchServerToolItem(__value25); } - else if (IsOutputToolSearchServerToolItem && outputToolSearchServerToolItem != null) + else if (OutputToolSearchServerToolItem is { } __value26 && outputToolSearchServerToolItem != null) { - return outputToolSearchServerToolItem(OutputToolSearchServerToolItem!); + return outputToolSearchServerToolItem(__value26); } - else if (IsOutputMemoryServerToolItem && outputMemoryServerToolItem != null) + else if (OutputMemoryServerToolItem is { } __value27 && outputMemoryServerToolItem != null) { - return outputMemoryServerToolItem(OutputMemoryServerToolItem!); + return outputMemoryServerToolItem(__value27); } - else if (IsOutputMcpServerToolItem && outputMcpServerToolItem != null) + else if (OutputMcpServerToolItem is { } __value28 && outputMcpServerToolItem != null) { - return outputMcpServerToolItem(OutputMcpServerToolItem!); + return outputMcpServerToolItem(__value28); } - else if (IsOutputSearchModelsServerToolItem && outputSearchModelsServerToolItem != null) + else if (OutputSearchModelsServerToolItem is { } __value29 && outputSearchModelsServerToolItem != null) { - return outputSearchModelsServerToolItem(OutputSearchModelsServerToolItem!); + return outputSearchModelsServerToolItem(__value29); } - else if (IsOutputFusionServerToolItem && outputFusionServerToolItem != null) + else if (OutputFusionServerToolItem is { } __value30 && outputFusionServerToolItem != null) { - return outputFusionServerToolItem(OutputFusionServerToolItem!); + return outputFusionServerToolItem(__value30); } - else if (IsOutputAdvisorServerToolItem && outputAdvisorServerToolItem != null) + else if (OutputAdvisorServerToolItem is { } __value31 && outputAdvisorServerToolItem != null) { - return outputAdvisorServerToolItem(OutputAdvisorServerToolItem!); + return outputAdvisorServerToolItem(__value31); } - else if (IsOutputSubagentServerToolItem && outputSubagentServerToolItem != null) + else if (OutputSubagentServerToolItem is { } __value32 && outputSubagentServerToolItem != null) { - return outputSubagentServerToolItem(OutputSubagentServerToolItem!); + return outputSubagentServerToolItem(__value32); } - else if (IsOutputFilesServerToolItem && outputFilesServerToolItem != null) + else if (OutputFilesServerToolItem is { } __value33 && outputFilesServerToolItem != null) { - return outputFilesServerToolItem(OutputFilesServerToolItem!); + return outputFilesServerToolItem(__value33); } - else if (IsLocalShellCallItem && localShellCallItem != null) + else if (LocalShellCallItem is { } __value34 && localShellCallItem != null) { - return localShellCallItem(LocalShellCallItem!); + return localShellCallItem(__value34); } - else if (IsLocalShellCallOutputItem && localShellCallOutputItem != null) + else if (LocalShellCallOutputItem is { } __value35 && localShellCallOutputItem != null) { - return localShellCallOutputItem(LocalShellCallOutputItem!); + return localShellCallOutputItem(__value35); } - else if (IsShellCallItem && shellCallItem != null) + else if (ShellCallItem is { } __value36 && shellCallItem != null) { - return shellCallItem(ShellCallItem!); + return shellCallItem(__value36); } - else if (IsShellCallOutputItem && shellCallOutputItem != null) + else if (ShellCallOutputItem is { } __value37 && shellCallOutputItem != null) { - return shellCallOutputItem(ShellCallOutputItem!); + return shellCallOutputItem(__value37); } - else if (IsMcpListToolsItem && mcpListToolsItem != null) + else if (McpListToolsItem is { } __value38 && mcpListToolsItem != null) { - return mcpListToolsItem(McpListToolsItem!); + return mcpListToolsItem(__value38); } - else if (IsMcpApprovalRequestItem && mcpApprovalRequestItem != null) + else if (McpApprovalRequestItem is { } __value39 && mcpApprovalRequestItem != null) { - return mcpApprovalRequestItem(McpApprovalRequestItem!); + return mcpApprovalRequestItem(__value39); } - else if (IsMcpApprovalResponseItem && mcpApprovalResponseItem != null) + else if (McpApprovalResponseItem is { } __value40 && mcpApprovalResponseItem != null) { - return mcpApprovalResponseItem(McpApprovalResponseItem!); + return mcpApprovalResponseItem(__value40); } - else if (IsMcpCallItem && mcpCallItem != null) + else if (McpCallItem is { } __value41 && mcpCallItem != null) { - return mcpCallItem(McpCallItem!); + return mcpCallItem(__value41); } - else if (IsCustomToolCallItem && customToolCallItem != null) + else if (CustomToolCallItem is { } __value42 && customToolCallItem != null) { - return customToolCallItem(CustomToolCallItem!); + return customToolCallItem(__value42); } - else if (IsCustomToolCallOutputItem && customToolCallOutputItem != null) + else if (CustomToolCallOutputItem is { } __value43 && customToolCallOutputItem != null) { - return customToolCallOutputItem(CustomToolCallOutputItem!); + return customToolCallOutputItem(__value43); } - else if (IsCompactionItem && compactionItem != null) + else if (CompactionItem is { } __value44 && compactionItem != null) { - return compactionItem(CompactionItem!); + return compactionItem(__value44); } - else if (IsContextCompactionItem && contextCompactionItem != null) + else if (ContextCompactionItem is { } __value45 && contextCompactionItem != null) { - return contextCompactionItem(ContextCompactionItem!); + return contextCompactionItem(__value45); } - else if (IsItemReferenceItem && itemReferenceItem != null) + else if (ItemReferenceItem is { } __value46 && itemReferenceItem != null) { - return itemReferenceItem(ItemReferenceItem!); + return itemReferenceItem(__value46); } - else if (IsAdditionalToolsItem && additionalToolsItem != null) + else if (AdditionalToolsItem is { } __value47 && additionalToolsItem != null) { - return additionalToolsItem(AdditionalToolsItem!); + return additionalToolsItem(__value47); } - else if (IsAgentMessageItem && agentMessageItem != null) + else if (AgentMessageItem is { } __value48 && agentMessageItem != null) { - return agentMessageItem(AgentMessageItem!); + return agentMessageItem(__value48); } return default(TResult); @@ -3540,201 +3540,201 @@ public void Match( Validate(); } - if (IsReasoningItem) + if (ReasoningItem is { } __value0) { - reasoningItem?.Invoke(ReasoningItem!); + reasoningItem?.Invoke(__value0); } - else if (IsEasyInputMessage) + else if (EasyInputMessage is { } __value1) { - easyInputMessage?.Invoke(EasyInputMessage!); + easyInputMessage?.Invoke(__value1); } - else if (IsInputMessageItem) + else if (InputMessageItem is { } __value2) { - inputMessageItem?.Invoke(InputMessageItem!); + inputMessageItem?.Invoke(__value2); } - else if (IsFunctionCallItem) + else if (FunctionCallItem is { } __value3) { - functionCallItem?.Invoke(FunctionCallItem!); + functionCallItem?.Invoke(__value3); } - else if (IsFunctionCallOutputItem) + else if (FunctionCallOutputItem is { } __value4) { - functionCallOutputItem?.Invoke(FunctionCallOutputItem!); + functionCallOutputItem?.Invoke(__value4); } - else if (IsApplyPatchCallItem) + else if (ApplyPatchCallItem is { } __value5) { - applyPatchCallItem?.Invoke(ApplyPatchCallItem!); + applyPatchCallItem?.Invoke(__value5); } - else if (IsApplyPatchCallOutputItem) + else if (ApplyPatchCallOutputItem is { } __value6) { - applyPatchCallOutputItem?.Invoke(ApplyPatchCallOutputItem!); + applyPatchCallOutputItem?.Invoke(__value6); } - else if (IsInputsOneOf1Items7) + else if (InputsOneOf1Items7 is { } __value7) { - inputsOneOf1Items7?.Invoke(InputsOneOf1Items7!); + inputsOneOf1Items7?.Invoke(__value7); } - else if (IsInputsOneOf1Items8) + else if (InputsOneOf1Items8 is { } __value8) { - inputsOneOf1Items8?.Invoke(InputsOneOf1Items8!); + inputsOneOf1Items8?.Invoke(__value8); } - else if (IsOutputFunctionCallItem) + else if (OutputFunctionCallItem is { } __value9) { - outputFunctionCallItem?.Invoke(OutputFunctionCallItem!); + outputFunctionCallItem?.Invoke(__value9); } - else if (IsOutputCustomToolCallItem) + else if (OutputCustomToolCallItem is { } __value10) { - outputCustomToolCallItem?.Invoke(OutputCustomToolCallItem!); + outputCustomToolCallItem?.Invoke(__value10); } - else if (IsOutputWebSearchCallItem) + else if (OutputWebSearchCallItem is { } __value11) { - outputWebSearchCallItem?.Invoke(OutputWebSearchCallItem!); + outputWebSearchCallItem?.Invoke(__value11); } - else if (IsOutputFileSearchCallItem) + else if (OutputFileSearchCallItem is { } __value12) { - outputFileSearchCallItem?.Invoke(OutputFileSearchCallItem!); + outputFileSearchCallItem?.Invoke(__value12); } - else if (IsOutputImageGenerationCallItem) + else if (OutputImageGenerationCallItem is { } __value13) { - outputImageGenerationCallItem?.Invoke(OutputImageGenerationCallItem!); + outputImageGenerationCallItem?.Invoke(__value13); } - else if (IsOutputCodeInterpreterCallItem) + else if (OutputCodeInterpreterCallItem is { } __value14) { - outputCodeInterpreterCallItem?.Invoke(OutputCodeInterpreterCallItem!); + outputCodeInterpreterCallItem?.Invoke(__value14); } - else if (IsOutputComputerCallItem) + else if (OutputComputerCallItem is { } __value15) { - outputComputerCallItem?.Invoke(OutputComputerCallItem!); + outputComputerCallItem?.Invoke(__value15); } - else if (IsOutputDatetimeItem) + else if (OutputDatetimeItem is { } __value16) { - outputDatetimeItem?.Invoke(OutputDatetimeItem!); + outputDatetimeItem?.Invoke(__value16); } - else if (IsOutputWebSearchServerToolItem) + else if (OutputWebSearchServerToolItem is { } __value17) { - outputWebSearchServerToolItem?.Invoke(OutputWebSearchServerToolItem!); + outputWebSearchServerToolItem?.Invoke(__value17); } - else if (IsOutputCodeInterpreterServerToolItem) + else if (OutputCodeInterpreterServerToolItem is { } __value18) { - outputCodeInterpreterServerToolItem?.Invoke(OutputCodeInterpreterServerToolItem!); + outputCodeInterpreterServerToolItem?.Invoke(__value18); } - else if (IsOutputFileSearchServerToolItem) + else if (OutputFileSearchServerToolItem is { } __value19) { - outputFileSearchServerToolItem?.Invoke(OutputFileSearchServerToolItem!); + outputFileSearchServerToolItem?.Invoke(__value19); } - else if (IsOutputImageGenerationServerToolItem) + else if (OutputImageGenerationServerToolItem is { } __value20) { - outputImageGenerationServerToolItem?.Invoke(OutputImageGenerationServerToolItem!); + outputImageGenerationServerToolItem?.Invoke(__value20); } - else if (IsOutputBrowserUseServerToolItem) + else if (OutputBrowserUseServerToolItem is { } __value21) { - outputBrowserUseServerToolItem?.Invoke(OutputBrowserUseServerToolItem!); + outputBrowserUseServerToolItem?.Invoke(__value21); } - else if (IsOutputBashServerToolItem) + else if (OutputBashServerToolItem is { } __value22) { - outputBashServerToolItem?.Invoke(OutputBashServerToolItem!); + outputBashServerToolItem?.Invoke(__value22); } - else if (IsOutputTextEditorServerToolItem) + else if (OutputTextEditorServerToolItem is { } __value23) { - outputTextEditorServerToolItem?.Invoke(OutputTextEditorServerToolItem!); + outputTextEditorServerToolItem?.Invoke(__value23); } - else if (IsOutputApplyPatchServerToolItem) + else if (OutputApplyPatchServerToolItem is { } __value24) { - outputApplyPatchServerToolItem?.Invoke(OutputApplyPatchServerToolItem!); + outputApplyPatchServerToolItem?.Invoke(__value24); } - else if (IsOutputWebFetchServerToolItem) + else if (OutputWebFetchServerToolItem is { } __value25) { - outputWebFetchServerToolItem?.Invoke(OutputWebFetchServerToolItem!); + outputWebFetchServerToolItem?.Invoke(__value25); } - else if (IsOutputToolSearchServerToolItem) + else if (OutputToolSearchServerToolItem is { } __value26) { - outputToolSearchServerToolItem?.Invoke(OutputToolSearchServerToolItem!); + outputToolSearchServerToolItem?.Invoke(__value26); } - else if (IsOutputMemoryServerToolItem) + else if (OutputMemoryServerToolItem is { } __value27) { - outputMemoryServerToolItem?.Invoke(OutputMemoryServerToolItem!); + outputMemoryServerToolItem?.Invoke(__value27); } - else if (IsOutputMcpServerToolItem) + else if (OutputMcpServerToolItem is { } __value28) { - outputMcpServerToolItem?.Invoke(OutputMcpServerToolItem!); + outputMcpServerToolItem?.Invoke(__value28); } - else if (IsOutputSearchModelsServerToolItem) + else if (OutputSearchModelsServerToolItem is { } __value29) { - outputSearchModelsServerToolItem?.Invoke(OutputSearchModelsServerToolItem!); + outputSearchModelsServerToolItem?.Invoke(__value29); } - else if (IsOutputFusionServerToolItem) + else if (OutputFusionServerToolItem is { } __value30) { - outputFusionServerToolItem?.Invoke(OutputFusionServerToolItem!); + outputFusionServerToolItem?.Invoke(__value30); } - else if (IsOutputAdvisorServerToolItem) + else if (OutputAdvisorServerToolItem is { } __value31) { - outputAdvisorServerToolItem?.Invoke(OutputAdvisorServerToolItem!); + outputAdvisorServerToolItem?.Invoke(__value31); } - else if (IsOutputSubagentServerToolItem) + else if (OutputSubagentServerToolItem is { } __value32) { - outputSubagentServerToolItem?.Invoke(OutputSubagentServerToolItem!); + outputSubagentServerToolItem?.Invoke(__value32); } - else if (IsOutputFilesServerToolItem) + else if (OutputFilesServerToolItem is { } __value33) { - outputFilesServerToolItem?.Invoke(OutputFilesServerToolItem!); + outputFilesServerToolItem?.Invoke(__value33); } - else if (IsLocalShellCallItem) + else if (LocalShellCallItem is { } __value34) { - localShellCallItem?.Invoke(LocalShellCallItem!); + localShellCallItem?.Invoke(__value34); } - else if (IsLocalShellCallOutputItem) + else if (LocalShellCallOutputItem is { } __value35) { - localShellCallOutputItem?.Invoke(LocalShellCallOutputItem!); + localShellCallOutputItem?.Invoke(__value35); } - else if (IsShellCallItem) + else if (ShellCallItem is { } __value36) { - shellCallItem?.Invoke(ShellCallItem!); + shellCallItem?.Invoke(__value36); } - else if (IsShellCallOutputItem) + else if (ShellCallOutputItem is { } __value37) { - shellCallOutputItem?.Invoke(ShellCallOutputItem!); + shellCallOutputItem?.Invoke(__value37); } - else if (IsMcpListToolsItem) + else if (McpListToolsItem is { } __value38) { - mcpListToolsItem?.Invoke(McpListToolsItem!); + mcpListToolsItem?.Invoke(__value38); } - else if (IsMcpApprovalRequestItem) + else if (McpApprovalRequestItem is { } __value39) { - mcpApprovalRequestItem?.Invoke(McpApprovalRequestItem!); + mcpApprovalRequestItem?.Invoke(__value39); } - else if (IsMcpApprovalResponseItem) + else if (McpApprovalResponseItem is { } __value40) { - mcpApprovalResponseItem?.Invoke(McpApprovalResponseItem!); + mcpApprovalResponseItem?.Invoke(__value40); } - else if (IsMcpCallItem) + else if (McpCallItem is { } __value41) { - mcpCallItem?.Invoke(McpCallItem!); + mcpCallItem?.Invoke(__value41); } - else if (IsCustomToolCallItem) + else if (CustomToolCallItem is { } __value42) { - customToolCallItem?.Invoke(CustomToolCallItem!); + customToolCallItem?.Invoke(__value42); } - else if (IsCustomToolCallOutputItem) + else if (CustomToolCallOutputItem is { } __value43) { - customToolCallOutputItem?.Invoke(CustomToolCallOutputItem!); + customToolCallOutputItem?.Invoke(__value43); } - else if (IsCompactionItem) + else if (CompactionItem is { } __value44) { - compactionItem?.Invoke(CompactionItem!); + compactionItem?.Invoke(__value44); } - else if (IsContextCompactionItem) + else if (ContextCompactionItem is { } __value45) { - contextCompactionItem?.Invoke(ContextCompactionItem!); + contextCompactionItem?.Invoke(__value45); } - else if (IsItemReferenceItem) + else if (ItemReferenceItem is { } __value46) { - itemReferenceItem?.Invoke(ItemReferenceItem!); + itemReferenceItem?.Invoke(__value46); } - else if (IsAdditionalToolsItem) + else if (AdditionalToolsItem is { } __value47) { - additionalToolsItem?.Invoke(AdditionalToolsItem!); + additionalToolsItem?.Invoke(__value47); } - else if (IsAgentMessageItem) + else if (AgentMessageItem is { } __value48) { - agentMessageItem?.Invoke(AgentMessageItem!); + agentMessageItem?.Invoke(__value48); } } @@ -3798,201 +3798,201 @@ public void Switch( Validate(); } - if (IsReasoningItem) + if (ReasoningItem is { } __value0) { - reasoningItem?.Invoke(ReasoningItem!); + reasoningItem?.Invoke(__value0); } - else if (IsEasyInputMessage) + else if (EasyInputMessage is { } __value1) { - easyInputMessage?.Invoke(EasyInputMessage!); + easyInputMessage?.Invoke(__value1); } - else if (IsInputMessageItem) + else if (InputMessageItem is { } __value2) { - inputMessageItem?.Invoke(InputMessageItem!); + inputMessageItem?.Invoke(__value2); } - else if (IsFunctionCallItem) + else if (FunctionCallItem is { } __value3) { - functionCallItem?.Invoke(FunctionCallItem!); + functionCallItem?.Invoke(__value3); } - else if (IsFunctionCallOutputItem) + else if (FunctionCallOutputItem is { } __value4) { - functionCallOutputItem?.Invoke(FunctionCallOutputItem!); + functionCallOutputItem?.Invoke(__value4); } - else if (IsApplyPatchCallItem) + else if (ApplyPatchCallItem is { } __value5) { - applyPatchCallItem?.Invoke(ApplyPatchCallItem!); + applyPatchCallItem?.Invoke(__value5); } - else if (IsApplyPatchCallOutputItem) + else if (ApplyPatchCallOutputItem is { } __value6) { - applyPatchCallOutputItem?.Invoke(ApplyPatchCallOutputItem!); + applyPatchCallOutputItem?.Invoke(__value6); } - else if (IsInputsOneOf1Items7) + else if (InputsOneOf1Items7 is { } __value7) { - inputsOneOf1Items7?.Invoke(InputsOneOf1Items7!); + inputsOneOf1Items7?.Invoke(__value7); } - else if (IsInputsOneOf1Items8) + else if (InputsOneOf1Items8 is { } __value8) { - inputsOneOf1Items8?.Invoke(InputsOneOf1Items8!); + inputsOneOf1Items8?.Invoke(__value8); } - else if (IsOutputFunctionCallItem) + else if (OutputFunctionCallItem is { } __value9) { - outputFunctionCallItem?.Invoke(OutputFunctionCallItem!); + outputFunctionCallItem?.Invoke(__value9); } - else if (IsOutputCustomToolCallItem) + else if (OutputCustomToolCallItem is { } __value10) { - outputCustomToolCallItem?.Invoke(OutputCustomToolCallItem!); + outputCustomToolCallItem?.Invoke(__value10); } - else if (IsOutputWebSearchCallItem) + else if (OutputWebSearchCallItem is { } __value11) { - outputWebSearchCallItem?.Invoke(OutputWebSearchCallItem!); + outputWebSearchCallItem?.Invoke(__value11); } - else if (IsOutputFileSearchCallItem) + else if (OutputFileSearchCallItem is { } __value12) { - outputFileSearchCallItem?.Invoke(OutputFileSearchCallItem!); + outputFileSearchCallItem?.Invoke(__value12); } - else if (IsOutputImageGenerationCallItem) + else if (OutputImageGenerationCallItem is { } __value13) { - outputImageGenerationCallItem?.Invoke(OutputImageGenerationCallItem!); + outputImageGenerationCallItem?.Invoke(__value13); } - else if (IsOutputCodeInterpreterCallItem) + else if (OutputCodeInterpreterCallItem is { } __value14) { - outputCodeInterpreterCallItem?.Invoke(OutputCodeInterpreterCallItem!); + outputCodeInterpreterCallItem?.Invoke(__value14); } - else if (IsOutputComputerCallItem) + else if (OutputComputerCallItem is { } __value15) { - outputComputerCallItem?.Invoke(OutputComputerCallItem!); + outputComputerCallItem?.Invoke(__value15); } - else if (IsOutputDatetimeItem) + else if (OutputDatetimeItem is { } __value16) { - outputDatetimeItem?.Invoke(OutputDatetimeItem!); + outputDatetimeItem?.Invoke(__value16); } - else if (IsOutputWebSearchServerToolItem) + else if (OutputWebSearchServerToolItem is { } __value17) { - outputWebSearchServerToolItem?.Invoke(OutputWebSearchServerToolItem!); + outputWebSearchServerToolItem?.Invoke(__value17); } - else if (IsOutputCodeInterpreterServerToolItem) + else if (OutputCodeInterpreterServerToolItem is { } __value18) { - outputCodeInterpreterServerToolItem?.Invoke(OutputCodeInterpreterServerToolItem!); + outputCodeInterpreterServerToolItem?.Invoke(__value18); } - else if (IsOutputFileSearchServerToolItem) + else if (OutputFileSearchServerToolItem is { } __value19) { - outputFileSearchServerToolItem?.Invoke(OutputFileSearchServerToolItem!); + outputFileSearchServerToolItem?.Invoke(__value19); } - else if (IsOutputImageGenerationServerToolItem) + else if (OutputImageGenerationServerToolItem is { } __value20) { - outputImageGenerationServerToolItem?.Invoke(OutputImageGenerationServerToolItem!); + outputImageGenerationServerToolItem?.Invoke(__value20); } - else if (IsOutputBrowserUseServerToolItem) + else if (OutputBrowserUseServerToolItem is { } __value21) { - outputBrowserUseServerToolItem?.Invoke(OutputBrowserUseServerToolItem!); + outputBrowserUseServerToolItem?.Invoke(__value21); } - else if (IsOutputBashServerToolItem) + else if (OutputBashServerToolItem is { } __value22) { - outputBashServerToolItem?.Invoke(OutputBashServerToolItem!); + outputBashServerToolItem?.Invoke(__value22); } - else if (IsOutputTextEditorServerToolItem) + else if (OutputTextEditorServerToolItem is { } __value23) { - outputTextEditorServerToolItem?.Invoke(OutputTextEditorServerToolItem!); + outputTextEditorServerToolItem?.Invoke(__value23); } - else if (IsOutputApplyPatchServerToolItem) + else if (OutputApplyPatchServerToolItem is { } __value24) { - outputApplyPatchServerToolItem?.Invoke(OutputApplyPatchServerToolItem!); + outputApplyPatchServerToolItem?.Invoke(__value24); } - else if (IsOutputWebFetchServerToolItem) + else if (OutputWebFetchServerToolItem is { } __value25) { - outputWebFetchServerToolItem?.Invoke(OutputWebFetchServerToolItem!); + outputWebFetchServerToolItem?.Invoke(__value25); } - else if (IsOutputToolSearchServerToolItem) + else if (OutputToolSearchServerToolItem is { } __value26) { - outputToolSearchServerToolItem?.Invoke(OutputToolSearchServerToolItem!); + outputToolSearchServerToolItem?.Invoke(__value26); } - else if (IsOutputMemoryServerToolItem) + else if (OutputMemoryServerToolItem is { } __value27) { - outputMemoryServerToolItem?.Invoke(OutputMemoryServerToolItem!); + outputMemoryServerToolItem?.Invoke(__value27); } - else if (IsOutputMcpServerToolItem) + else if (OutputMcpServerToolItem is { } __value28) { - outputMcpServerToolItem?.Invoke(OutputMcpServerToolItem!); + outputMcpServerToolItem?.Invoke(__value28); } - else if (IsOutputSearchModelsServerToolItem) + else if (OutputSearchModelsServerToolItem is { } __value29) { - outputSearchModelsServerToolItem?.Invoke(OutputSearchModelsServerToolItem!); + outputSearchModelsServerToolItem?.Invoke(__value29); } - else if (IsOutputFusionServerToolItem) + else if (OutputFusionServerToolItem is { } __value30) { - outputFusionServerToolItem?.Invoke(OutputFusionServerToolItem!); + outputFusionServerToolItem?.Invoke(__value30); } - else if (IsOutputAdvisorServerToolItem) + else if (OutputAdvisorServerToolItem is { } __value31) { - outputAdvisorServerToolItem?.Invoke(OutputAdvisorServerToolItem!); + outputAdvisorServerToolItem?.Invoke(__value31); } - else if (IsOutputSubagentServerToolItem) + else if (OutputSubagentServerToolItem is { } __value32) { - outputSubagentServerToolItem?.Invoke(OutputSubagentServerToolItem!); + outputSubagentServerToolItem?.Invoke(__value32); } - else if (IsOutputFilesServerToolItem) + else if (OutputFilesServerToolItem is { } __value33) { - outputFilesServerToolItem?.Invoke(OutputFilesServerToolItem!); + outputFilesServerToolItem?.Invoke(__value33); } - else if (IsLocalShellCallItem) + else if (LocalShellCallItem is { } __value34) { - localShellCallItem?.Invoke(LocalShellCallItem!); + localShellCallItem?.Invoke(__value34); } - else if (IsLocalShellCallOutputItem) + else if (LocalShellCallOutputItem is { } __value35) { - localShellCallOutputItem?.Invoke(LocalShellCallOutputItem!); + localShellCallOutputItem?.Invoke(__value35); } - else if (IsShellCallItem) + else if (ShellCallItem is { } __value36) { - shellCallItem?.Invoke(ShellCallItem!); + shellCallItem?.Invoke(__value36); } - else if (IsShellCallOutputItem) + else if (ShellCallOutputItem is { } __value37) { - shellCallOutputItem?.Invoke(ShellCallOutputItem!); + shellCallOutputItem?.Invoke(__value37); } - else if (IsMcpListToolsItem) + else if (McpListToolsItem is { } __value38) { - mcpListToolsItem?.Invoke(McpListToolsItem!); + mcpListToolsItem?.Invoke(__value38); } - else if (IsMcpApprovalRequestItem) + else if (McpApprovalRequestItem is { } __value39) { - mcpApprovalRequestItem?.Invoke(McpApprovalRequestItem!); + mcpApprovalRequestItem?.Invoke(__value39); } - else if (IsMcpApprovalResponseItem) + else if (McpApprovalResponseItem is { } __value40) { - mcpApprovalResponseItem?.Invoke(McpApprovalResponseItem!); + mcpApprovalResponseItem?.Invoke(__value40); } - else if (IsMcpCallItem) + else if (McpCallItem is { } __value41) { - mcpCallItem?.Invoke(McpCallItem!); + mcpCallItem?.Invoke(__value41); } - else if (IsCustomToolCallItem) + else if (CustomToolCallItem is { } __value42) { - customToolCallItem?.Invoke(CustomToolCallItem!); + customToolCallItem?.Invoke(__value42); } - else if (IsCustomToolCallOutputItem) + else if (CustomToolCallOutputItem is { } __value43) { - customToolCallOutputItem?.Invoke(CustomToolCallOutputItem!); + customToolCallOutputItem?.Invoke(__value43); } - else if (IsCompactionItem) + else if (CompactionItem is { } __value44) { - compactionItem?.Invoke(CompactionItem!); + compactionItem?.Invoke(__value44); } - else if (IsContextCompactionItem) + else if (ContextCompactionItem is { } __value45) { - contextCompactionItem?.Invoke(ContextCompactionItem!); + contextCompactionItem?.Invoke(__value45); } - else if (IsItemReferenceItem) + else if (ItemReferenceItem is { } __value46) { - itemReferenceItem?.Invoke(ItemReferenceItem!); + itemReferenceItem?.Invoke(__value46); } - else if (IsAdditionalToolsItem) + else if (AdditionalToolsItem is { } __value47) { - additionalToolsItem?.Invoke(AdditionalToolsItem!); + additionalToolsItem?.Invoke(__value47); } - else if (IsAgentMessageItem) + else if (AgentMessageItem is { } __value48) { - agentMessageItem?.Invoke(AgentMessageItem!); + agentMessageItem?.Invoke(__value48); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.InputsOneOf1ItemsOneOf7Content.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.InputsOneOf1ItemsOneOf7Content.g.cs index a6ec0e5b..a301dec5 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.InputsOneOf1ItemsOneOf7Content.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.InputsOneOf1ItemsOneOf7Content.g.cs @@ -42,8 +42,8 @@ public bool TryPickInputsOneOf1ItemsOneOf7Content0( /// /// /// - public global::System.Collections.Generic.IList PickInputsOneOf1ItemsOneOf7Content0() => IsInputsOneOf1ItemsOneOf7Content0 - ? InputsOneOf1ItemsOneOf7Content0! + public global::System.Collections.Generic.IList PickInputsOneOf1ItemsOneOf7Content0() => InputsOneOf1ItemsOneOf7Content0 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'InputsOneOf1ItemsOneOf7Content0' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickInputsOneOf1ItemsOneOf7ContentVariant2( /// /// /// - public string PickInputsOneOf1ItemsOneOf7ContentVariant2() => IsInputsOneOf1ItemsOneOf7ContentVariant2 - ? InputsOneOf1ItemsOneOf7ContentVariant2! + public string PickInputsOneOf1ItemsOneOf7ContentVariant2() => InputsOneOf1ItemsOneOf7ContentVariant2 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'InputsOneOf1ItemsOneOf7ContentVariant2' but the value was {ToString()}."); /// /// @@ -154,13 +154,13 @@ public bool Validate() Validate(); } - if (IsInputsOneOf1ItemsOneOf7Content0 && inputsOneOf1ItemsOneOf7Content0 != null) + if (InputsOneOf1ItemsOneOf7Content0 is { } __value0 && inputsOneOf1ItemsOneOf7Content0 != null) { - return inputsOneOf1ItemsOneOf7Content0(InputsOneOf1ItemsOneOf7Content0!); + return inputsOneOf1ItemsOneOf7Content0(__value0); } - else if (IsInputsOneOf1ItemsOneOf7ContentVariant2 && inputsOneOf1ItemsOneOf7ContentVariant2 != null) + else if (InputsOneOf1ItemsOneOf7ContentVariant2 is { } __value1 && inputsOneOf1ItemsOneOf7ContentVariant2 != null) { - return inputsOneOf1ItemsOneOf7ContentVariant2(InputsOneOf1ItemsOneOf7ContentVariant2!); + return inputsOneOf1ItemsOneOf7ContentVariant2(__value1); } return default(TResult); @@ -180,13 +180,13 @@ public void Match( Validate(); } - if (IsInputsOneOf1ItemsOneOf7Content0) + if (InputsOneOf1ItemsOneOf7Content0 is { } __value0) { - inputsOneOf1ItemsOneOf7Content0?.Invoke(InputsOneOf1ItemsOneOf7Content0!); + inputsOneOf1ItemsOneOf7Content0?.Invoke(__value0); } - else if (IsInputsOneOf1ItemsOneOf7ContentVariant2) + else if (InputsOneOf1ItemsOneOf7ContentVariant2 is { } __value1) { - inputsOneOf1ItemsOneOf7ContentVariant2?.Invoke(InputsOneOf1ItemsOneOf7ContentVariant2!); + inputsOneOf1ItemsOneOf7ContentVariant2?.Invoke(__value1); } } @@ -203,13 +203,13 @@ public void Switch( Validate(); } - if (IsInputsOneOf1ItemsOneOf7Content0) + if (InputsOneOf1ItemsOneOf7Content0 is { } __value0) { - inputsOneOf1ItemsOneOf7Content0?.Invoke(InputsOneOf1ItemsOneOf7Content0!); + inputsOneOf1ItemsOneOf7Content0?.Invoke(__value0); } - else if (IsInputsOneOf1ItemsOneOf7ContentVariant2) + else if (InputsOneOf1ItemsOneOf7ContentVariant2 is { } __value1) { - inputsOneOf1ItemsOneOf7ContentVariant2?.Invoke(InputsOneOf1ItemsOneOf7ContentVariant2!); + inputsOneOf1ItemsOneOf7ContentVariant2?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.InputsOneOf1ItemsOneOf7ContentOneOf0Items.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.InputsOneOf1ItemsOneOf7ContentOneOf0Items.g.cs index 206666d0..4d0edcde 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.InputsOneOf1ItemsOneOf7ContentOneOf0Items.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.InputsOneOf1ItemsOneOf7ContentOneOf0Items.g.cs @@ -42,8 +42,8 @@ public bool TryPickResponseOutputText( /// /// /// - public global::OpenRouter.ResponseOutputText PickResponseOutputText() => IsResponseOutputText - ? ResponseOutputText! + public global::OpenRouter.ResponseOutputText PickResponseOutputText() => ResponseOutputText is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ResponseOutputText' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickOpenAIResponsesRefusalContent( /// /// /// - public global::OpenRouter.OpenAIResponsesRefusalContent PickOpenAIResponsesRefusalContent() => IsOpenAIResponsesRefusalContent - ? OpenAIResponsesRefusalContent! + public global::OpenRouter.OpenAIResponsesRefusalContent PickOpenAIResponsesRefusalContent() => OpenAIResponsesRefusalContent is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OpenAIResponsesRefusalContent' but the value was {ToString()}."); /// /// @@ -177,13 +177,13 @@ public bool Validate() Validate(); } - if (IsResponseOutputText && responseOutputText != null) + if (ResponseOutputText is { } __value0 && responseOutputText != null) { - return responseOutputText(ResponseOutputText!); + return responseOutputText(__value0); } - else if (IsOpenAIResponsesRefusalContent && openAIResponsesRefusalContent != null) + else if (OpenAIResponsesRefusalContent is { } __value1 && openAIResponsesRefusalContent != null) { - return openAIResponsesRefusalContent(OpenAIResponsesRefusalContent!); + return openAIResponsesRefusalContent(__value1); } return default(TResult); @@ -203,13 +203,13 @@ public void Match( Validate(); } - if (IsResponseOutputText) + if (ResponseOutputText is { } __value0) { - responseOutputText?.Invoke(ResponseOutputText!); + responseOutputText?.Invoke(__value0); } - else if (IsOpenAIResponsesRefusalContent) + else if (OpenAIResponsesRefusalContent is { } __value1) { - openAIResponsesRefusalContent?.Invoke(OpenAIResponsesRefusalContent!); + openAIResponsesRefusalContent?.Invoke(__value1); } } @@ -226,13 +226,13 @@ public void Switch( Validate(); } - if (IsResponseOutputText) + if (ResponseOutputText is { } __value0) { - responseOutputText?.Invoke(ResponseOutputText!); + responseOutputText?.Invoke(__value0); } - else if (IsOpenAIResponsesRefusalContent) + else if (OpenAIResponsesRefusalContent is { } __value1) { - openAIResponsesRefusalContent?.Invoke(OpenAIResponsesRefusalContent!); + openAIResponsesRefusalContent?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.McpServerToolAllowedTools.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.McpServerToolAllowedTools.g.cs index 25fcd530..852d92b5 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.McpServerToolAllowedTools.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.McpServerToolAllowedTools.g.cs @@ -42,8 +42,8 @@ public bool TryPickMcpServerToolAllowedToolsVariant1( /// /// /// - public global::System.Collections.Generic.IList PickMcpServerToolAllowedToolsVariant1() => IsMcpServerToolAllowedToolsVariant1 - ? McpServerToolAllowedToolsVariant1! + public global::System.Collections.Generic.IList PickMcpServerToolAllowedToolsVariant1() => McpServerToolAllowedToolsVariant1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'McpServerToolAllowedToolsVariant1' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickMcpServerToolAllowedTools1( /// /// /// - public global::OpenRouter.McpServerToolAllowedTools1 PickMcpServerToolAllowedTools1() => IsMcpServerToolAllowedTools1 - ? McpServerToolAllowedTools1! + public global::OpenRouter.McpServerToolAllowedTools1 PickMcpServerToolAllowedTools1() => McpServerToolAllowedTools1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'McpServerToolAllowedTools1' but the value was {ToString()}."); /// /// @@ -154,13 +154,13 @@ public bool Validate() Validate(); } - if (IsMcpServerToolAllowedToolsVariant1 && mcpServerToolAllowedToolsVariant1 != null) + if (McpServerToolAllowedToolsVariant1 is { } __value0 && mcpServerToolAllowedToolsVariant1 != null) { - return mcpServerToolAllowedToolsVariant1(McpServerToolAllowedToolsVariant1!); + return mcpServerToolAllowedToolsVariant1(__value0); } - else if (IsMcpServerToolAllowedTools1 && mcpServerToolAllowedTools1 != null) + else if (McpServerToolAllowedTools1 is { } __value1 && mcpServerToolAllowedTools1 != null) { - return mcpServerToolAllowedTools1(McpServerToolAllowedTools1!); + return mcpServerToolAllowedTools1(__value1); } return default(TResult); @@ -180,13 +180,13 @@ public void Match( Validate(); } - if (IsMcpServerToolAllowedToolsVariant1) + if (McpServerToolAllowedToolsVariant1 is { } __value0) { - mcpServerToolAllowedToolsVariant1?.Invoke(McpServerToolAllowedToolsVariant1!); + mcpServerToolAllowedToolsVariant1?.Invoke(__value0); } - else if (IsMcpServerToolAllowedTools1) + else if (McpServerToolAllowedTools1 is { } __value1) { - mcpServerToolAllowedTools1?.Invoke(McpServerToolAllowedTools1!); + mcpServerToolAllowedTools1?.Invoke(__value1); } } @@ -203,13 +203,13 @@ public void Switch( Validate(); } - if (IsMcpServerToolAllowedToolsVariant1) + if (McpServerToolAllowedToolsVariant1 is { } __value0) { - mcpServerToolAllowedToolsVariant1?.Invoke(McpServerToolAllowedToolsVariant1!); + mcpServerToolAllowedToolsVariant1?.Invoke(__value0); } - else if (IsMcpServerToolAllowedTools1) + else if (McpServerToolAllowedTools1 is { } __value1) { - mcpServerToolAllowedTools1?.Invoke(McpServerToolAllowedTools1!); + mcpServerToolAllowedTools1?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.McpServerToolRequireApproval.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.McpServerToolRequireApproval.g.cs index 312a46c6..8576aea5 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.McpServerToolRequireApproval.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.McpServerToolRequireApproval.g.cs @@ -42,8 +42,8 @@ public bool TryPickMcpServerToolRequireApproval0( /// /// /// - public global::OpenRouter.McpServerToolRequireApproval0 PickMcpServerToolRequireApproval0() => IsMcpServerToolRequireApproval0 - ? McpServerToolRequireApproval0! + public global::OpenRouter.McpServerToolRequireApproval0 PickMcpServerToolRequireApproval0() => McpServerToolRequireApproval0 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'McpServerToolRequireApproval0' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickMcpServerToolRequireApproval1( /// /// /// - public global::OpenRouter.McpServerToolRequireApproval1 PickMcpServerToolRequireApproval1() => IsMcpServerToolRequireApproval1 - ? McpServerToolRequireApproval1!.Value + public global::OpenRouter.McpServerToolRequireApproval1 PickMcpServerToolRequireApproval1() => McpServerToolRequireApproval1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'McpServerToolRequireApproval1' but the value was {ToString()}."); /// @@ -116,8 +116,8 @@ public bool TryPickMcpServerToolRequireApproval2( /// /// /// - public global::OpenRouter.McpServerToolRequireApproval2 PickMcpServerToolRequireApproval2() => IsMcpServerToolRequireApproval2 - ? McpServerToolRequireApproval2!.Value + public global::OpenRouter.McpServerToolRequireApproval2 PickMcpServerToolRequireApproval2() => McpServerToolRequireApproval2 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'McpServerToolRequireApproval2' but the value was {ToString()}."); /// /// @@ -242,17 +242,17 @@ public bool Validate() Validate(); } - if (IsMcpServerToolRequireApproval0 && mcpServerToolRequireApproval0 != null) + if (McpServerToolRequireApproval0 is { } __value0 && mcpServerToolRequireApproval0 != null) { - return mcpServerToolRequireApproval0(McpServerToolRequireApproval0!); + return mcpServerToolRequireApproval0(__value0); } - else if (IsMcpServerToolRequireApproval1 && mcpServerToolRequireApproval1 != null) + else if (McpServerToolRequireApproval1 is { } __value1 && mcpServerToolRequireApproval1 != null) { - return mcpServerToolRequireApproval1(McpServerToolRequireApproval1!); + return mcpServerToolRequireApproval1(__value1); } - else if (IsMcpServerToolRequireApproval2 && mcpServerToolRequireApproval2 != null) + else if (McpServerToolRequireApproval2 is { } __value2 && mcpServerToolRequireApproval2 != null) { - return mcpServerToolRequireApproval2(McpServerToolRequireApproval2!); + return mcpServerToolRequireApproval2(__value2); } return default(TResult); @@ -274,17 +274,17 @@ public void Match( Validate(); } - if (IsMcpServerToolRequireApproval0) + if (McpServerToolRequireApproval0 is { } __value0) { - mcpServerToolRequireApproval0?.Invoke(McpServerToolRequireApproval0!); + mcpServerToolRequireApproval0?.Invoke(__value0); } - else if (IsMcpServerToolRequireApproval1) + else if (McpServerToolRequireApproval1 is { } __value1) { - mcpServerToolRequireApproval1?.Invoke(McpServerToolRequireApproval1!); + mcpServerToolRequireApproval1?.Invoke(__value1); } - else if (IsMcpServerToolRequireApproval2) + else if (McpServerToolRequireApproval2 is { } __value2) { - mcpServerToolRequireApproval2?.Invoke(McpServerToolRequireApproval2!); + mcpServerToolRequireApproval2?.Invoke(__value2); } } @@ -302,17 +302,17 @@ public void Switch( Validate(); } - if (IsMcpServerToolRequireApproval0) + if (McpServerToolRequireApproval0 is { } __value0) { - mcpServerToolRequireApproval0?.Invoke(McpServerToolRequireApproval0!); + mcpServerToolRequireApproval0?.Invoke(__value0); } - else if (IsMcpServerToolRequireApproval1) + else if (McpServerToolRequireApproval1 is { } __value1) { - mcpServerToolRequireApproval1?.Invoke(McpServerToolRequireApproval1!); + mcpServerToolRequireApproval1?.Invoke(__value1); } - else if (IsMcpServerToolRequireApproval2) + else if (McpServerToolRequireApproval2 is { } __value2) { - mcpServerToolRequireApproval2?.Invoke(McpServerToolRequireApproval2!); + mcpServerToolRequireApproval2?.Invoke(__value2); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.MessagesMessageParamContent.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.MessagesMessageParamContent.g.cs index a1ef2271..2f2fa44c 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.MessagesMessageParamContent.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.MessagesMessageParamContent.g.cs @@ -42,8 +42,8 @@ public bool TryPickMessagesMessageParamContentVariant1( /// /// /// - public string PickMessagesMessageParamContentVariant1() => IsMessagesMessageParamContentVariant1 - ? MessagesMessageParamContentVariant1! + public string PickMessagesMessageParamContentVariant1() => MessagesMessageParamContentVariant1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'MessagesMessageParamContentVariant1' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickMessagesMessageParamContent1( /// /// /// - public global::System.Collections.Generic.IList PickMessagesMessageParamContent1() => IsMessagesMessageParamContent1 - ? MessagesMessageParamContent1! + public global::System.Collections.Generic.IList PickMessagesMessageParamContent1() => MessagesMessageParamContent1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'MessagesMessageParamContent1' but the value was {ToString()}."); /// /// @@ -154,13 +154,13 @@ public bool Validate() Validate(); } - if (IsMessagesMessageParamContentVariant1 && messagesMessageParamContentVariant1 != null) + if (MessagesMessageParamContentVariant1 is { } __value0 && messagesMessageParamContentVariant1 != null) { - return messagesMessageParamContentVariant1(MessagesMessageParamContentVariant1!); + return messagesMessageParamContentVariant1(__value0); } - else if (IsMessagesMessageParamContent1 && messagesMessageParamContent1 != null) + else if (MessagesMessageParamContent1 is { } __value1 && messagesMessageParamContent1 != null) { - return messagesMessageParamContent1(MessagesMessageParamContent1!); + return messagesMessageParamContent1(__value1); } return default(TResult); @@ -180,13 +180,13 @@ public void Match( Validate(); } - if (IsMessagesMessageParamContentVariant1) + if (MessagesMessageParamContentVariant1 is { } __value0) { - messagesMessageParamContentVariant1?.Invoke(MessagesMessageParamContentVariant1!); + messagesMessageParamContentVariant1?.Invoke(__value0); } - else if (IsMessagesMessageParamContent1) + else if (MessagesMessageParamContent1 is { } __value1) { - messagesMessageParamContent1?.Invoke(MessagesMessageParamContent1!); + messagesMessageParamContent1?.Invoke(__value1); } } @@ -203,13 +203,13 @@ public void Switch( Validate(); } - if (IsMessagesMessageParamContentVariant1) + if (MessagesMessageParamContentVariant1 is { } __value0) { - messagesMessageParamContentVariant1?.Invoke(MessagesMessageParamContentVariant1!); + messagesMessageParamContentVariant1?.Invoke(__value0); } - else if (IsMessagesMessageParamContent1) + else if (MessagesMessageParamContent1 is { } __value1) { - messagesMessageParamContent1?.Invoke(MessagesMessageParamContent1!); + messagesMessageParamContent1?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.MessagesMessageParamContentOneOf1Items.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.MessagesMessageParamContentOneOf1Items.g.cs index 0d580dc3..0707bc5f 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.MessagesMessageParamContentOneOf1Items.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.MessagesMessageParamContentOneOf1Items.g.cs @@ -42,8 +42,8 @@ public bool TryPickAnthropicTextBlockParam( /// /// /// - public global::OpenRouter.AnthropicTextBlockParam PickAnthropicTextBlockParam() => IsAnthropicTextBlockParam - ? AnthropicTextBlockParam! + public global::OpenRouter.AnthropicTextBlockParam PickAnthropicTextBlockParam() => AnthropicTextBlockParam is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'AnthropicTextBlockParam' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickAnthropicImageBlockParam( /// /// /// - public global::OpenRouter.AnthropicImageBlockParam PickAnthropicImageBlockParam() => IsAnthropicImageBlockParam - ? AnthropicImageBlockParam! + public global::OpenRouter.AnthropicImageBlockParam PickAnthropicImageBlockParam() => AnthropicImageBlockParam is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'AnthropicImageBlockParam' but the value was {ToString()}."); /// @@ -116,8 +116,8 @@ public bool TryPickAnthropicDocumentBlockParam( /// /// /// - public global::OpenRouter.AnthropicDocumentBlockParam PickAnthropicDocumentBlockParam() => IsAnthropicDocumentBlockParam - ? AnthropicDocumentBlockParam! + public global::OpenRouter.AnthropicDocumentBlockParam PickAnthropicDocumentBlockParam() => AnthropicDocumentBlockParam is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'AnthropicDocumentBlockParam' but the value was {ToString()}."); /// @@ -153,8 +153,8 @@ public bool TryPickMessagesMessageParamContentOneOf1Items3( /// /// /// - public global::OpenRouter.MessagesMessageParamContentOneOf1Items3 PickMessagesMessageParamContentOneOf1Items3() => IsMessagesMessageParamContentOneOf1Items3 - ? MessagesMessageParamContentOneOf1Items3! + public global::OpenRouter.MessagesMessageParamContentOneOf1Items3 PickMessagesMessageParamContentOneOf1Items3() => MessagesMessageParamContentOneOf1Items3 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'MessagesMessageParamContentOneOf1Items3' but the value was {ToString()}."); /// @@ -190,8 +190,8 @@ public bool TryPickMessagesMessageParamContentOneOf1Items4( /// /// /// - public global::OpenRouter.MessagesMessageParamContentOneOf1Items4 PickMessagesMessageParamContentOneOf1Items4() => IsMessagesMessageParamContentOneOf1Items4 - ? MessagesMessageParamContentOneOf1Items4! + public global::OpenRouter.MessagesMessageParamContentOneOf1Items4 PickMessagesMessageParamContentOneOf1Items4() => MessagesMessageParamContentOneOf1Items4 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'MessagesMessageParamContentOneOf1Items4' but the value was {ToString()}."); /// @@ -227,8 +227,8 @@ public bool TryPickMessagesMessageParamContentOneOf1Items5( /// /// /// - public global::OpenRouter.MessagesMessageParamContentOneOf1Items5 PickMessagesMessageParamContentOneOf1Items5() => IsMessagesMessageParamContentOneOf1Items5 - ? MessagesMessageParamContentOneOf1Items5! + public global::OpenRouter.MessagesMessageParamContentOneOf1Items5 PickMessagesMessageParamContentOneOf1Items5() => MessagesMessageParamContentOneOf1Items5 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'MessagesMessageParamContentOneOf1Items5' but the value was {ToString()}."); /// @@ -264,8 +264,8 @@ public bool TryPickMessagesMessageParamContentOneOf1Items6( /// /// /// - public global::OpenRouter.MessagesMessageParamContentOneOf1Items6 PickMessagesMessageParamContentOneOf1Items6() => IsMessagesMessageParamContentOneOf1Items6 - ? MessagesMessageParamContentOneOf1Items6! + public global::OpenRouter.MessagesMessageParamContentOneOf1Items6 PickMessagesMessageParamContentOneOf1Items6() => MessagesMessageParamContentOneOf1Items6 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'MessagesMessageParamContentOneOf1Items6' but the value was {ToString()}."); /// @@ -301,8 +301,8 @@ public bool TryPickMessagesMessageParamContentOneOf1Items7( /// /// /// - public global::OpenRouter.MessagesMessageParamContentOneOf1Items7 PickMessagesMessageParamContentOneOf1Items7() => IsMessagesMessageParamContentOneOf1Items7 - ? MessagesMessageParamContentOneOf1Items7! + public global::OpenRouter.MessagesMessageParamContentOneOf1Items7 PickMessagesMessageParamContentOneOf1Items7() => MessagesMessageParamContentOneOf1Items7 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'MessagesMessageParamContentOneOf1Items7' but the value was {ToString()}."); /// @@ -338,8 +338,8 @@ public bool TryPickMessagesMessageParamContentOneOf1Items8( /// /// /// - public global::OpenRouter.MessagesMessageParamContentOneOf1Items8 PickMessagesMessageParamContentOneOf1Items8() => IsMessagesMessageParamContentOneOf1Items8 - ? MessagesMessageParamContentOneOf1Items8! + public global::OpenRouter.MessagesMessageParamContentOneOf1Items8 PickMessagesMessageParamContentOneOf1Items8() => MessagesMessageParamContentOneOf1Items8 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'MessagesMessageParamContentOneOf1Items8' but the value was {ToString()}."); /// @@ -375,8 +375,8 @@ public bool TryPickAnthropicSearchResultBlockParam( /// /// /// - public global::OpenRouter.AnthropicSearchResultBlockParam PickAnthropicSearchResultBlockParam() => IsAnthropicSearchResultBlockParam - ? AnthropicSearchResultBlockParam! + public global::OpenRouter.AnthropicSearchResultBlockParam PickAnthropicSearchResultBlockParam() => AnthropicSearchResultBlockParam is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'AnthropicSearchResultBlockParam' but the value was {ToString()}."); /// @@ -412,8 +412,8 @@ public bool TryPickMessagesMessageParamContentOneOf1Items10( /// /// /// - public global::OpenRouter.MessagesMessageParamContentOneOf1Items10 PickMessagesMessageParamContentOneOf1Items10() => IsMessagesMessageParamContentOneOf1Items10 - ? MessagesMessageParamContentOneOf1Items10! + public global::OpenRouter.MessagesMessageParamContentOneOf1Items10 PickMessagesMessageParamContentOneOf1Items10() => MessagesMessageParamContentOneOf1Items10 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'MessagesMessageParamContentOneOf1Items10' but the value was {ToString()}."); /// @@ -449,8 +449,8 @@ public bool TryPickMessagesAdvisorToolResultBlock( /// /// /// - public global::OpenRouter.MessagesAdvisorToolResultBlock PickMessagesAdvisorToolResultBlock() => IsMessagesAdvisorToolResultBlock - ? MessagesAdvisorToolResultBlock! + public global::OpenRouter.MessagesAdvisorToolResultBlock PickMessagesAdvisorToolResultBlock() => MessagesAdvisorToolResultBlock is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'MessagesAdvisorToolResultBlock' but the value was {ToString()}."); /// /// @@ -827,53 +827,53 @@ public bool Validate() Validate(); } - if (IsAnthropicTextBlockParam && anthropicTextBlockParam != null) + if (AnthropicTextBlockParam is { } __value0 && anthropicTextBlockParam != null) { - return anthropicTextBlockParam(AnthropicTextBlockParam!); + return anthropicTextBlockParam(__value0); } - else if (IsAnthropicImageBlockParam && anthropicImageBlockParam != null) + else if (AnthropicImageBlockParam is { } __value1 && anthropicImageBlockParam != null) { - return anthropicImageBlockParam(AnthropicImageBlockParam!); + return anthropicImageBlockParam(__value1); } - else if (IsAnthropicDocumentBlockParam && anthropicDocumentBlockParam != null) + else if (AnthropicDocumentBlockParam is { } __value2 && anthropicDocumentBlockParam != null) { - return anthropicDocumentBlockParam(AnthropicDocumentBlockParam!); + return anthropicDocumentBlockParam(__value2); } - else if (IsMessagesMessageParamContentOneOf1Items3 && messagesMessageParamContentOneOf1Items3 != null) + else if (MessagesMessageParamContentOneOf1Items3 is { } __value3 && messagesMessageParamContentOneOf1Items3 != null) { - return messagesMessageParamContentOneOf1Items3(MessagesMessageParamContentOneOf1Items3!); + return messagesMessageParamContentOneOf1Items3(__value3); } - else if (IsMessagesMessageParamContentOneOf1Items4 && messagesMessageParamContentOneOf1Items4 != null) + else if (MessagesMessageParamContentOneOf1Items4 is { } __value4 && messagesMessageParamContentOneOf1Items4 != null) { - return messagesMessageParamContentOneOf1Items4(MessagesMessageParamContentOneOf1Items4!); + return messagesMessageParamContentOneOf1Items4(__value4); } - else if (IsMessagesMessageParamContentOneOf1Items5 && messagesMessageParamContentOneOf1Items5 != null) + else if (MessagesMessageParamContentOneOf1Items5 is { } __value5 && messagesMessageParamContentOneOf1Items5 != null) { - return messagesMessageParamContentOneOf1Items5(MessagesMessageParamContentOneOf1Items5!); + return messagesMessageParamContentOneOf1Items5(__value5); } - else if (IsMessagesMessageParamContentOneOf1Items6 && messagesMessageParamContentOneOf1Items6 != null) + else if (MessagesMessageParamContentOneOf1Items6 is { } __value6 && messagesMessageParamContentOneOf1Items6 != null) { - return messagesMessageParamContentOneOf1Items6(MessagesMessageParamContentOneOf1Items6!); + return messagesMessageParamContentOneOf1Items6(__value6); } - else if (IsMessagesMessageParamContentOneOf1Items7 && messagesMessageParamContentOneOf1Items7 != null) + else if (MessagesMessageParamContentOneOf1Items7 is { } __value7 && messagesMessageParamContentOneOf1Items7 != null) { - return messagesMessageParamContentOneOf1Items7(MessagesMessageParamContentOneOf1Items7!); + return messagesMessageParamContentOneOf1Items7(__value7); } - else if (IsMessagesMessageParamContentOneOf1Items8 && messagesMessageParamContentOneOf1Items8 != null) + else if (MessagesMessageParamContentOneOf1Items8 is { } __value8 && messagesMessageParamContentOneOf1Items8 != null) { - return messagesMessageParamContentOneOf1Items8(MessagesMessageParamContentOneOf1Items8!); + return messagesMessageParamContentOneOf1Items8(__value8); } - else if (IsAnthropicSearchResultBlockParam && anthropicSearchResultBlockParam != null) + else if (AnthropicSearchResultBlockParam is { } __value9 && anthropicSearchResultBlockParam != null) { - return anthropicSearchResultBlockParam(AnthropicSearchResultBlockParam!); + return anthropicSearchResultBlockParam(__value9); } - else if (IsMessagesMessageParamContentOneOf1Items10 && messagesMessageParamContentOneOf1Items10 != null) + else if (MessagesMessageParamContentOneOf1Items10 is { } __value10 && messagesMessageParamContentOneOf1Items10 != null) { - return messagesMessageParamContentOneOf1Items10(MessagesMessageParamContentOneOf1Items10!); + return messagesMessageParamContentOneOf1Items10(__value10); } - else if (IsMessagesAdvisorToolResultBlock && messagesAdvisorToolResultBlock != null) + else if (MessagesAdvisorToolResultBlock is { } __value11 && messagesAdvisorToolResultBlock != null) { - return messagesAdvisorToolResultBlock(MessagesAdvisorToolResultBlock!); + return messagesAdvisorToolResultBlock(__value11); } return default(TResult); @@ -913,53 +913,53 @@ public void Match( Validate(); } - if (IsAnthropicTextBlockParam) + if (AnthropicTextBlockParam is { } __value0) { - anthropicTextBlockParam?.Invoke(AnthropicTextBlockParam!); + anthropicTextBlockParam?.Invoke(__value0); } - else if (IsAnthropicImageBlockParam) + else if (AnthropicImageBlockParam is { } __value1) { - anthropicImageBlockParam?.Invoke(AnthropicImageBlockParam!); + anthropicImageBlockParam?.Invoke(__value1); } - else if (IsAnthropicDocumentBlockParam) + else if (AnthropicDocumentBlockParam is { } __value2) { - anthropicDocumentBlockParam?.Invoke(AnthropicDocumentBlockParam!); + anthropicDocumentBlockParam?.Invoke(__value2); } - else if (IsMessagesMessageParamContentOneOf1Items3) + else if (MessagesMessageParamContentOneOf1Items3 is { } __value3) { - messagesMessageParamContentOneOf1Items3?.Invoke(MessagesMessageParamContentOneOf1Items3!); + messagesMessageParamContentOneOf1Items3?.Invoke(__value3); } - else if (IsMessagesMessageParamContentOneOf1Items4) + else if (MessagesMessageParamContentOneOf1Items4 is { } __value4) { - messagesMessageParamContentOneOf1Items4?.Invoke(MessagesMessageParamContentOneOf1Items4!); + messagesMessageParamContentOneOf1Items4?.Invoke(__value4); } - else if (IsMessagesMessageParamContentOneOf1Items5) + else if (MessagesMessageParamContentOneOf1Items5 is { } __value5) { - messagesMessageParamContentOneOf1Items5?.Invoke(MessagesMessageParamContentOneOf1Items5!); + messagesMessageParamContentOneOf1Items5?.Invoke(__value5); } - else if (IsMessagesMessageParamContentOneOf1Items6) + else if (MessagesMessageParamContentOneOf1Items6 is { } __value6) { - messagesMessageParamContentOneOf1Items6?.Invoke(MessagesMessageParamContentOneOf1Items6!); + messagesMessageParamContentOneOf1Items6?.Invoke(__value6); } - else if (IsMessagesMessageParamContentOneOf1Items7) + else if (MessagesMessageParamContentOneOf1Items7 is { } __value7) { - messagesMessageParamContentOneOf1Items7?.Invoke(MessagesMessageParamContentOneOf1Items7!); + messagesMessageParamContentOneOf1Items7?.Invoke(__value7); } - else if (IsMessagesMessageParamContentOneOf1Items8) + else if (MessagesMessageParamContentOneOf1Items8 is { } __value8) { - messagesMessageParamContentOneOf1Items8?.Invoke(MessagesMessageParamContentOneOf1Items8!); + messagesMessageParamContentOneOf1Items8?.Invoke(__value8); } - else if (IsAnthropicSearchResultBlockParam) + else if (AnthropicSearchResultBlockParam is { } __value9) { - anthropicSearchResultBlockParam?.Invoke(AnthropicSearchResultBlockParam!); + anthropicSearchResultBlockParam?.Invoke(__value9); } - else if (IsMessagesMessageParamContentOneOf1Items10) + else if (MessagesMessageParamContentOneOf1Items10 is { } __value10) { - messagesMessageParamContentOneOf1Items10?.Invoke(MessagesMessageParamContentOneOf1Items10!); + messagesMessageParamContentOneOf1Items10?.Invoke(__value10); } - else if (IsMessagesAdvisorToolResultBlock) + else if (MessagesAdvisorToolResultBlock is { } __value11) { - messagesAdvisorToolResultBlock?.Invoke(MessagesAdvisorToolResultBlock!); + messagesAdvisorToolResultBlock?.Invoke(__value11); } } @@ -986,53 +986,53 @@ public void Switch( Validate(); } - if (IsAnthropicTextBlockParam) + if (AnthropicTextBlockParam is { } __value0) { - anthropicTextBlockParam?.Invoke(AnthropicTextBlockParam!); + anthropicTextBlockParam?.Invoke(__value0); } - else if (IsAnthropicImageBlockParam) + else if (AnthropicImageBlockParam is { } __value1) { - anthropicImageBlockParam?.Invoke(AnthropicImageBlockParam!); + anthropicImageBlockParam?.Invoke(__value1); } - else if (IsAnthropicDocumentBlockParam) + else if (AnthropicDocumentBlockParam is { } __value2) { - anthropicDocumentBlockParam?.Invoke(AnthropicDocumentBlockParam!); + anthropicDocumentBlockParam?.Invoke(__value2); } - else if (IsMessagesMessageParamContentOneOf1Items3) + else if (MessagesMessageParamContentOneOf1Items3 is { } __value3) { - messagesMessageParamContentOneOf1Items3?.Invoke(MessagesMessageParamContentOneOf1Items3!); + messagesMessageParamContentOneOf1Items3?.Invoke(__value3); } - else if (IsMessagesMessageParamContentOneOf1Items4) + else if (MessagesMessageParamContentOneOf1Items4 is { } __value4) { - messagesMessageParamContentOneOf1Items4?.Invoke(MessagesMessageParamContentOneOf1Items4!); + messagesMessageParamContentOneOf1Items4?.Invoke(__value4); } - else if (IsMessagesMessageParamContentOneOf1Items5) + else if (MessagesMessageParamContentOneOf1Items5 is { } __value5) { - messagesMessageParamContentOneOf1Items5?.Invoke(MessagesMessageParamContentOneOf1Items5!); + messagesMessageParamContentOneOf1Items5?.Invoke(__value5); } - else if (IsMessagesMessageParamContentOneOf1Items6) + else if (MessagesMessageParamContentOneOf1Items6 is { } __value6) { - messagesMessageParamContentOneOf1Items6?.Invoke(MessagesMessageParamContentOneOf1Items6!); + messagesMessageParamContentOneOf1Items6?.Invoke(__value6); } - else if (IsMessagesMessageParamContentOneOf1Items7) + else if (MessagesMessageParamContentOneOf1Items7 is { } __value7) { - messagesMessageParamContentOneOf1Items7?.Invoke(MessagesMessageParamContentOneOf1Items7!); + messagesMessageParamContentOneOf1Items7?.Invoke(__value7); } - else if (IsMessagesMessageParamContentOneOf1Items8) + else if (MessagesMessageParamContentOneOf1Items8 is { } __value8) { - messagesMessageParamContentOneOf1Items8?.Invoke(MessagesMessageParamContentOneOf1Items8!); + messagesMessageParamContentOneOf1Items8?.Invoke(__value8); } - else if (IsAnthropicSearchResultBlockParam) + else if (AnthropicSearchResultBlockParam is { } __value9) { - anthropicSearchResultBlockParam?.Invoke(AnthropicSearchResultBlockParam!); + anthropicSearchResultBlockParam?.Invoke(__value9); } - else if (IsMessagesMessageParamContentOneOf1Items10) + else if (MessagesMessageParamContentOneOf1Items10 is { } __value10) { - messagesMessageParamContentOneOf1Items10?.Invoke(MessagesMessageParamContentOneOf1Items10!); + messagesMessageParamContentOneOf1Items10?.Invoke(__value10); } - else if (IsMessagesAdvisorToolResultBlock) + else if (MessagesAdvisorToolResultBlock is { } __value11) { - messagesAdvisorToolResultBlock?.Invoke(MessagesAdvisorToolResultBlock!); + messagesAdvisorToolResultBlock?.Invoke(__value11); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.MessagesMessageParamContentOneOf1ItemsOneOf4Content.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.MessagesMessageParamContentOneOf1ItemsOneOf4Content.g.cs index cb6acfe5..934631a7 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.MessagesMessageParamContentOneOf1ItemsOneOf4Content.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.MessagesMessageParamContentOneOf1ItemsOneOf4Content.g.cs @@ -42,8 +42,8 @@ public bool TryPickMessagesMessageParamContentOneOf1ItemsOneOf4ContentVariant1( /// /// /// - public string PickMessagesMessageParamContentOneOf1ItemsOneOf4ContentVariant1() => IsMessagesMessageParamContentOneOf1ItemsOneOf4ContentVariant1 - ? MessagesMessageParamContentOneOf1ItemsOneOf4ContentVariant1! + public string PickMessagesMessageParamContentOneOf1ItemsOneOf4ContentVariant1() => MessagesMessageParamContentOneOf1ItemsOneOf4ContentVariant1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'MessagesMessageParamContentOneOf1ItemsOneOf4ContentVariant1' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickMessagesMessageParamContentOneOf1ItemsOneOf4Content1( /// /// /// - public global::System.Collections.Generic.IList PickMessagesMessageParamContentOneOf1ItemsOneOf4Content1() => IsMessagesMessageParamContentOneOf1ItemsOneOf4Content1 - ? MessagesMessageParamContentOneOf1ItemsOneOf4Content1! + public global::System.Collections.Generic.IList PickMessagesMessageParamContentOneOf1ItemsOneOf4Content1() => MessagesMessageParamContentOneOf1ItemsOneOf4Content1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'MessagesMessageParamContentOneOf1ItemsOneOf4Content1' but the value was {ToString()}."); /// /// @@ -154,13 +154,13 @@ public bool Validate() Validate(); } - if (IsMessagesMessageParamContentOneOf1ItemsOneOf4ContentVariant1 && messagesMessageParamContentOneOf1ItemsOneOf4ContentVariant1 != null) + if (MessagesMessageParamContentOneOf1ItemsOneOf4ContentVariant1 is { } __value0 && messagesMessageParamContentOneOf1ItemsOneOf4ContentVariant1 != null) { - return messagesMessageParamContentOneOf1ItemsOneOf4ContentVariant1(MessagesMessageParamContentOneOf1ItemsOneOf4ContentVariant1!); + return messagesMessageParamContentOneOf1ItemsOneOf4ContentVariant1(__value0); } - else if (IsMessagesMessageParamContentOneOf1ItemsOneOf4Content1 && messagesMessageParamContentOneOf1ItemsOneOf4Content1 != null) + else if (MessagesMessageParamContentOneOf1ItemsOneOf4Content1 is { } __value1 && messagesMessageParamContentOneOf1ItemsOneOf4Content1 != null) { - return messagesMessageParamContentOneOf1ItemsOneOf4Content1(MessagesMessageParamContentOneOf1ItemsOneOf4Content1!); + return messagesMessageParamContentOneOf1ItemsOneOf4Content1(__value1); } return default(TResult); @@ -180,13 +180,13 @@ public void Match( Validate(); } - if (IsMessagesMessageParamContentOneOf1ItemsOneOf4ContentVariant1) + if (MessagesMessageParamContentOneOf1ItemsOneOf4ContentVariant1 is { } __value0) { - messagesMessageParamContentOneOf1ItemsOneOf4ContentVariant1?.Invoke(MessagesMessageParamContentOneOf1ItemsOneOf4ContentVariant1!); + messagesMessageParamContentOneOf1ItemsOneOf4ContentVariant1?.Invoke(__value0); } - else if (IsMessagesMessageParamContentOneOf1ItemsOneOf4Content1) + else if (MessagesMessageParamContentOneOf1ItemsOneOf4Content1 is { } __value1) { - messagesMessageParamContentOneOf1ItemsOneOf4Content1?.Invoke(MessagesMessageParamContentOneOf1ItemsOneOf4Content1!); + messagesMessageParamContentOneOf1ItemsOneOf4Content1?.Invoke(__value1); } } @@ -203,13 +203,13 @@ public void Switch( Validate(); } - if (IsMessagesMessageParamContentOneOf1ItemsOneOf4ContentVariant1) + if (MessagesMessageParamContentOneOf1ItemsOneOf4ContentVariant1 is { } __value0) { - messagesMessageParamContentOneOf1ItemsOneOf4ContentVariant1?.Invoke(MessagesMessageParamContentOneOf1ItemsOneOf4ContentVariant1!); + messagesMessageParamContentOneOf1ItemsOneOf4ContentVariant1?.Invoke(__value0); } - else if (IsMessagesMessageParamContentOneOf1ItemsOneOf4Content1) + else if (MessagesMessageParamContentOneOf1ItemsOneOf4Content1 is { } __value1) { - messagesMessageParamContentOneOf1ItemsOneOf4Content1?.Invoke(MessagesMessageParamContentOneOf1ItemsOneOf4Content1!); + messagesMessageParamContentOneOf1ItemsOneOf4Content1?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.MessagesMessageParamContentOneOf1ItemsOneOf4ContentOneOf1Items.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.MessagesMessageParamContentOneOf1ItemsOneOf4ContentOneOf1Items.g.cs index ea4ccf66..b9335d1f 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.MessagesMessageParamContentOneOf1ItemsOneOf4ContentOneOf1Items.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.MessagesMessageParamContentOneOf1ItemsOneOf4ContentOneOf1Items.g.cs @@ -42,8 +42,8 @@ public bool TryPickAnthropicTextBlockParam( /// /// /// - public global::OpenRouter.AnthropicTextBlockParam PickAnthropicTextBlockParam() => IsAnthropicTextBlockParam - ? AnthropicTextBlockParam! + public global::OpenRouter.AnthropicTextBlockParam PickAnthropicTextBlockParam() => AnthropicTextBlockParam is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'AnthropicTextBlockParam' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickAnthropicImageBlockParam( /// /// /// - public global::OpenRouter.AnthropicImageBlockParam PickAnthropicImageBlockParam() => IsAnthropicImageBlockParam - ? AnthropicImageBlockParam! + public global::OpenRouter.AnthropicImageBlockParam PickAnthropicImageBlockParam() => AnthropicImageBlockParam is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'AnthropicImageBlockParam' but the value was {ToString()}."); /// @@ -116,8 +116,8 @@ public bool TryPickMessagesMessageParamContentOneOf1ItemsOneOf4ContentOneOf1Item /// /// /// - public global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf4ContentOneOf1Items2 PickMessagesMessageParamContentOneOf1ItemsOneOf4ContentOneOf1Items2() => IsMessagesMessageParamContentOneOf1ItemsOneOf4ContentOneOf1Items2 - ? MessagesMessageParamContentOneOf1ItemsOneOf4ContentOneOf1Items2! + public global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf4ContentOneOf1Items2 PickMessagesMessageParamContentOneOf1ItemsOneOf4ContentOneOf1Items2() => MessagesMessageParamContentOneOf1ItemsOneOf4ContentOneOf1Items2 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'MessagesMessageParamContentOneOf1ItemsOneOf4ContentOneOf1Items2' but the value was {ToString()}."); /// @@ -153,8 +153,8 @@ public bool TryPickAnthropicSearchResultBlockParam( /// /// /// - public global::OpenRouter.AnthropicSearchResultBlockParam PickAnthropicSearchResultBlockParam() => IsAnthropicSearchResultBlockParam - ? AnthropicSearchResultBlockParam! + public global::OpenRouter.AnthropicSearchResultBlockParam PickAnthropicSearchResultBlockParam() => AnthropicSearchResultBlockParam is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'AnthropicSearchResultBlockParam' but the value was {ToString()}."); /// @@ -190,8 +190,8 @@ public bool TryPickAnthropicDocumentBlockParam( /// /// /// - public global::OpenRouter.AnthropicDocumentBlockParam PickAnthropicDocumentBlockParam() => IsAnthropicDocumentBlockParam - ? AnthropicDocumentBlockParam! + public global::OpenRouter.AnthropicDocumentBlockParam PickAnthropicDocumentBlockParam() => AnthropicDocumentBlockParam is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'AnthropicDocumentBlockParam' but the value was {ToString()}."); /// /// @@ -372,25 +372,25 @@ public bool Validate() Validate(); } - if (IsAnthropicTextBlockParam && anthropicTextBlockParam != null) + if (AnthropicTextBlockParam is { } __value0 && anthropicTextBlockParam != null) { - return anthropicTextBlockParam(AnthropicTextBlockParam!); + return anthropicTextBlockParam(__value0); } - else if (IsAnthropicImageBlockParam && anthropicImageBlockParam != null) + else if (AnthropicImageBlockParam is { } __value1 && anthropicImageBlockParam != null) { - return anthropicImageBlockParam(AnthropicImageBlockParam!); + return anthropicImageBlockParam(__value1); } - else if (IsMessagesMessageParamContentOneOf1ItemsOneOf4ContentOneOf1Items2 && messagesMessageParamContentOneOf1ItemsOneOf4ContentOneOf1Items2 != null) + else if (MessagesMessageParamContentOneOf1ItemsOneOf4ContentOneOf1Items2 is { } __value2 && messagesMessageParamContentOneOf1ItemsOneOf4ContentOneOf1Items2 != null) { - return messagesMessageParamContentOneOf1ItemsOneOf4ContentOneOf1Items2(MessagesMessageParamContentOneOf1ItemsOneOf4ContentOneOf1Items2!); + return messagesMessageParamContentOneOf1ItemsOneOf4ContentOneOf1Items2(__value2); } - else if (IsAnthropicSearchResultBlockParam && anthropicSearchResultBlockParam != null) + else if (AnthropicSearchResultBlockParam is { } __value3 && anthropicSearchResultBlockParam != null) { - return anthropicSearchResultBlockParam(AnthropicSearchResultBlockParam!); + return anthropicSearchResultBlockParam(__value3); } - else if (IsAnthropicDocumentBlockParam && anthropicDocumentBlockParam != null) + else if (AnthropicDocumentBlockParam is { } __value4 && anthropicDocumentBlockParam != null) { - return anthropicDocumentBlockParam(AnthropicDocumentBlockParam!); + return anthropicDocumentBlockParam(__value4); } return default(TResult); @@ -416,25 +416,25 @@ public void Match( Validate(); } - if (IsAnthropicTextBlockParam) + if (AnthropicTextBlockParam is { } __value0) { - anthropicTextBlockParam?.Invoke(AnthropicTextBlockParam!); + anthropicTextBlockParam?.Invoke(__value0); } - else if (IsAnthropicImageBlockParam) + else if (AnthropicImageBlockParam is { } __value1) { - anthropicImageBlockParam?.Invoke(AnthropicImageBlockParam!); + anthropicImageBlockParam?.Invoke(__value1); } - else if (IsMessagesMessageParamContentOneOf1ItemsOneOf4ContentOneOf1Items2) + else if (MessagesMessageParamContentOneOf1ItemsOneOf4ContentOneOf1Items2 is { } __value2) { - messagesMessageParamContentOneOf1ItemsOneOf4ContentOneOf1Items2?.Invoke(MessagesMessageParamContentOneOf1ItemsOneOf4ContentOneOf1Items2!); + messagesMessageParamContentOneOf1ItemsOneOf4ContentOneOf1Items2?.Invoke(__value2); } - else if (IsAnthropicSearchResultBlockParam) + else if (AnthropicSearchResultBlockParam is { } __value3) { - anthropicSearchResultBlockParam?.Invoke(AnthropicSearchResultBlockParam!); + anthropicSearchResultBlockParam?.Invoke(__value3); } - else if (IsAnthropicDocumentBlockParam) + else if (AnthropicDocumentBlockParam is { } __value4) { - anthropicDocumentBlockParam?.Invoke(AnthropicDocumentBlockParam!); + anthropicDocumentBlockParam?.Invoke(__value4); } } @@ -454,25 +454,25 @@ public void Switch( Validate(); } - if (IsAnthropicTextBlockParam) + if (AnthropicTextBlockParam is { } __value0) { - anthropicTextBlockParam?.Invoke(AnthropicTextBlockParam!); + anthropicTextBlockParam?.Invoke(__value0); } - else if (IsAnthropicImageBlockParam) + else if (AnthropicImageBlockParam is { } __value1) { - anthropicImageBlockParam?.Invoke(AnthropicImageBlockParam!); + anthropicImageBlockParam?.Invoke(__value1); } - else if (IsMessagesMessageParamContentOneOf1ItemsOneOf4ContentOneOf1Items2) + else if (MessagesMessageParamContentOneOf1ItemsOneOf4ContentOneOf1Items2 is { } __value2) { - messagesMessageParamContentOneOf1ItemsOneOf4ContentOneOf1Items2?.Invoke(MessagesMessageParamContentOneOf1ItemsOneOf4ContentOneOf1Items2!); + messagesMessageParamContentOneOf1ItemsOneOf4ContentOneOf1Items2?.Invoke(__value2); } - else if (IsAnthropicSearchResultBlockParam) + else if (AnthropicSearchResultBlockParam is { } __value3) { - anthropicSearchResultBlockParam?.Invoke(AnthropicSearchResultBlockParam!); + anthropicSearchResultBlockParam?.Invoke(__value3); } - else if (IsAnthropicDocumentBlockParam) + else if (AnthropicDocumentBlockParam is { } __value4) { - anthropicDocumentBlockParam?.Invoke(AnthropicDocumentBlockParam!); + anthropicDocumentBlockParam?.Invoke(__value4); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.MessagesMessageParamContentOneOf1ItemsOneOf8Content.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.MessagesMessageParamContentOneOf1ItemsOneOf8Content.g.cs index 51ba3c11..f56b972c 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.MessagesMessageParamContentOneOf1ItemsOneOf8Content.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.MessagesMessageParamContentOneOf1ItemsOneOf8Content.g.cs @@ -42,8 +42,8 @@ public bool TryPickMessagesMessageParamContentOneOf1ItemsOneOf8Content0( /// /// /// - public global::System.Collections.Generic.IList PickMessagesMessageParamContentOneOf1ItemsOneOf8Content0() => IsMessagesMessageParamContentOneOf1ItemsOneOf8Content0 - ? MessagesMessageParamContentOneOf1ItemsOneOf8Content0! + public global::System.Collections.Generic.IList PickMessagesMessageParamContentOneOf1ItemsOneOf8Content0() => MessagesMessageParamContentOneOf1ItemsOneOf8Content0 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'MessagesMessageParamContentOneOf1ItemsOneOf8Content0' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickMessagesMessageParamContentOneOf1ItemsOneOf8Content1( /// /// /// - public global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf8Content1 PickMessagesMessageParamContentOneOf1ItemsOneOf8Content1() => IsMessagesMessageParamContentOneOf1ItemsOneOf8Content1 - ? MessagesMessageParamContentOneOf1ItemsOneOf8Content1! + public global::OpenRouter.MessagesMessageParamContentOneOf1ItemsOneOf8Content1 PickMessagesMessageParamContentOneOf1ItemsOneOf8Content1() => MessagesMessageParamContentOneOf1ItemsOneOf8Content1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'MessagesMessageParamContentOneOf1ItemsOneOf8Content1' but the value was {ToString()}."); /// /// @@ -154,13 +154,13 @@ public bool Validate() Validate(); } - if (IsMessagesMessageParamContentOneOf1ItemsOneOf8Content0 && messagesMessageParamContentOneOf1ItemsOneOf8Content0 != null) + if (MessagesMessageParamContentOneOf1ItemsOneOf8Content0 is { } __value0 && messagesMessageParamContentOneOf1ItemsOneOf8Content0 != null) { - return messagesMessageParamContentOneOf1ItemsOneOf8Content0(MessagesMessageParamContentOneOf1ItemsOneOf8Content0!); + return messagesMessageParamContentOneOf1ItemsOneOf8Content0(__value0); } - else if (IsMessagesMessageParamContentOneOf1ItemsOneOf8Content1 && messagesMessageParamContentOneOf1ItemsOneOf8Content1 != null) + else if (MessagesMessageParamContentOneOf1ItemsOneOf8Content1 is { } __value1 && messagesMessageParamContentOneOf1ItemsOneOf8Content1 != null) { - return messagesMessageParamContentOneOf1ItemsOneOf8Content1(MessagesMessageParamContentOneOf1ItemsOneOf8Content1!); + return messagesMessageParamContentOneOf1ItemsOneOf8Content1(__value1); } return default(TResult); @@ -180,13 +180,13 @@ public void Match( Validate(); } - if (IsMessagesMessageParamContentOneOf1ItemsOneOf8Content0) + if (MessagesMessageParamContentOneOf1ItemsOneOf8Content0 is { } __value0) { - messagesMessageParamContentOneOf1ItemsOneOf8Content0?.Invoke(MessagesMessageParamContentOneOf1ItemsOneOf8Content0!); + messagesMessageParamContentOneOf1ItemsOneOf8Content0?.Invoke(__value0); } - else if (IsMessagesMessageParamContentOneOf1ItemsOneOf8Content1) + else if (MessagesMessageParamContentOneOf1ItemsOneOf8Content1 is { } __value1) { - messagesMessageParamContentOneOf1ItemsOneOf8Content1?.Invoke(MessagesMessageParamContentOneOf1ItemsOneOf8Content1!); + messagesMessageParamContentOneOf1ItemsOneOf8Content1?.Invoke(__value1); } } @@ -203,13 +203,13 @@ public void Switch( Validate(); } - if (IsMessagesMessageParamContentOneOf1ItemsOneOf8Content0) + if (MessagesMessageParamContentOneOf1ItemsOneOf8Content0 is { } __value0) { - messagesMessageParamContentOneOf1ItemsOneOf8Content0?.Invoke(MessagesMessageParamContentOneOf1ItemsOneOf8Content0!); + messagesMessageParamContentOneOf1ItemsOneOf8Content0?.Invoke(__value0); } - else if (IsMessagesMessageParamContentOneOf1ItemsOneOf8Content1) + else if (MessagesMessageParamContentOneOf1ItemsOneOf8Content1 is { } __value1) { - messagesMessageParamContentOneOf1ItemsOneOf8Content1?.Invoke(MessagesMessageParamContentOneOf1ItemsOneOf8Content1!); + messagesMessageParamContentOneOf1ItemsOneOf8Content1?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.MessagesRequestContextManagementEditsItems.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.MessagesRequestContextManagementEditsItems.g.cs index a6fbad66..312220af 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.MessagesRequestContextManagementEditsItems.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.MessagesRequestContextManagementEditsItems.g.cs @@ -42,8 +42,8 @@ public bool TryPickMessagesRequestContextManagementEditsItems0( /// /// /// - public global::OpenRouter.MessagesRequestContextManagementEditsItems0 PickMessagesRequestContextManagementEditsItems0() => IsMessagesRequestContextManagementEditsItems0 - ? MessagesRequestContextManagementEditsItems0! + public global::OpenRouter.MessagesRequestContextManagementEditsItems0 PickMessagesRequestContextManagementEditsItems0() => MessagesRequestContextManagementEditsItems0 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'MessagesRequestContextManagementEditsItems0' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickMessagesRequestContextManagementEditsItems1( /// /// /// - public global::OpenRouter.MessagesRequestContextManagementEditsItems1 PickMessagesRequestContextManagementEditsItems1() => IsMessagesRequestContextManagementEditsItems1 - ? MessagesRequestContextManagementEditsItems1! + public global::OpenRouter.MessagesRequestContextManagementEditsItems1 PickMessagesRequestContextManagementEditsItems1() => MessagesRequestContextManagementEditsItems1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'MessagesRequestContextManagementEditsItems1' but the value was {ToString()}."); /// @@ -116,8 +116,8 @@ public bool TryPickMessagesRequestContextManagementEditsItems2( /// /// /// - public global::OpenRouter.MessagesRequestContextManagementEditsItems2 PickMessagesRequestContextManagementEditsItems2() => IsMessagesRequestContextManagementEditsItems2 - ? MessagesRequestContextManagementEditsItems2! + public global::OpenRouter.MessagesRequestContextManagementEditsItems2 PickMessagesRequestContextManagementEditsItems2() => MessagesRequestContextManagementEditsItems2 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'MessagesRequestContextManagementEditsItems2' but the value was {ToString()}."); /// /// @@ -242,17 +242,17 @@ public bool Validate() Validate(); } - if (IsMessagesRequestContextManagementEditsItems0 && messagesRequestContextManagementEditsItems0 != null) + if (MessagesRequestContextManagementEditsItems0 is { } __value0 && messagesRequestContextManagementEditsItems0 != null) { - return messagesRequestContextManagementEditsItems0(MessagesRequestContextManagementEditsItems0!); + return messagesRequestContextManagementEditsItems0(__value0); } - else if (IsMessagesRequestContextManagementEditsItems1 && messagesRequestContextManagementEditsItems1 != null) + else if (MessagesRequestContextManagementEditsItems1 is { } __value1 && messagesRequestContextManagementEditsItems1 != null) { - return messagesRequestContextManagementEditsItems1(MessagesRequestContextManagementEditsItems1!); + return messagesRequestContextManagementEditsItems1(__value1); } - else if (IsMessagesRequestContextManagementEditsItems2 && messagesRequestContextManagementEditsItems2 != null) + else if (MessagesRequestContextManagementEditsItems2 is { } __value2 && messagesRequestContextManagementEditsItems2 != null) { - return messagesRequestContextManagementEditsItems2(MessagesRequestContextManagementEditsItems2!); + return messagesRequestContextManagementEditsItems2(__value2); } return default(TResult); @@ -274,17 +274,17 @@ public void Match( Validate(); } - if (IsMessagesRequestContextManagementEditsItems0) + if (MessagesRequestContextManagementEditsItems0 is { } __value0) { - messagesRequestContextManagementEditsItems0?.Invoke(MessagesRequestContextManagementEditsItems0!); + messagesRequestContextManagementEditsItems0?.Invoke(__value0); } - else if (IsMessagesRequestContextManagementEditsItems1) + else if (MessagesRequestContextManagementEditsItems1 is { } __value1) { - messagesRequestContextManagementEditsItems1?.Invoke(MessagesRequestContextManagementEditsItems1!); + messagesRequestContextManagementEditsItems1?.Invoke(__value1); } - else if (IsMessagesRequestContextManagementEditsItems2) + else if (MessagesRequestContextManagementEditsItems2 is { } __value2) { - messagesRequestContextManagementEditsItems2?.Invoke(MessagesRequestContextManagementEditsItems2!); + messagesRequestContextManagementEditsItems2?.Invoke(__value2); } } @@ -302,17 +302,17 @@ public void Switch( Validate(); } - if (IsMessagesRequestContextManagementEditsItems0) + if (MessagesRequestContextManagementEditsItems0 is { } __value0) { - messagesRequestContextManagementEditsItems0?.Invoke(MessagesRequestContextManagementEditsItems0!); + messagesRequestContextManagementEditsItems0?.Invoke(__value0); } - else if (IsMessagesRequestContextManagementEditsItems1) + else if (MessagesRequestContextManagementEditsItems1 is { } __value1) { - messagesRequestContextManagementEditsItems1?.Invoke(MessagesRequestContextManagementEditsItems1!); + messagesRequestContextManagementEditsItems1?.Invoke(__value1); } - else if (IsMessagesRequestContextManagementEditsItems2) + else if (MessagesRequestContextManagementEditsItems2 is { } __value2) { - messagesRequestContextManagementEditsItems2?.Invoke(MessagesRequestContextManagementEditsItems2!); + messagesRequestContextManagementEditsItems2?.Invoke(__value2); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.MessagesRequestContextManagementEditsItemsOneOf0ClearToolInputs.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.MessagesRequestContextManagementEditsItemsOneOf0ClearToolInputs.g.cs index 1c1a3615..1bd90c08 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.MessagesRequestContextManagementEditsItemsOneOf0ClearToolInputs.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.MessagesRequestContextManagementEditsItemsOneOf0ClearToolInputs.g.cs @@ -42,8 +42,8 @@ public bool TryPickMessagesRequestContextManagementEditsItemsOneOf0ClearToolInpu /// /// /// - public bool PickMessagesRequestContextManagementEditsItemsOneOf0ClearToolInputsVariant1() => IsMessagesRequestContextManagementEditsItemsOneOf0ClearToolInputsVariant1 - ? MessagesRequestContextManagementEditsItemsOneOf0ClearToolInputsVariant1!.Value + public bool PickMessagesRequestContextManagementEditsItemsOneOf0ClearToolInputsVariant1() => MessagesRequestContextManagementEditsItemsOneOf0ClearToolInputsVariant1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'MessagesRequestContextManagementEditsItemsOneOf0ClearToolInputsVariant1' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickMessagesRequestContextManagementEditsItemsOneOf0ClearToolInpu /// /// /// - public global::System.Collections.Generic.IList PickMessagesRequestContextManagementEditsItemsOneOf0ClearToolInputsVariant2() => IsMessagesRequestContextManagementEditsItemsOneOf0ClearToolInputsVariant2 - ? MessagesRequestContextManagementEditsItemsOneOf0ClearToolInputsVariant2! + public global::System.Collections.Generic.IList PickMessagesRequestContextManagementEditsItemsOneOf0ClearToolInputsVariant2() => MessagesRequestContextManagementEditsItemsOneOf0ClearToolInputsVariant2 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'MessagesRequestContextManagementEditsItemsOneOf0ClearToolInputsVariant2' but the value was {ToString()}."); /// /// @@ -154,13 +154,13 @@ public bool Validate() Validate(); } - if (IsMessagesRequestContextManagementEditsItemsOneOf0ClearToolInputsVariant1 && messagesRequestContextManagementEditsItemsOneOf0ClearToolInputsVariant1 != null) + if (MessagesRequestContextManagementEditsItemsOneOf0ClearToolInputsVariant1 is { } __value0 && messagesRequestContextManagementEditsItemsOneOf0ClearToolInputsVariant1 != null) { - return messagesRequestContextManagementEditsItemsOneOf0ClearToolInputsVariant1(MessagesRequestContextManagementEditsItemsOneOf0ClearToolInputsVariant1!); + return messagesRequestContextManagementEditsItemsOneOf0ClearToolInputsVariant1(__value0); } - else if (IsMessagesRequestContextManagementEditsItemsOneOf0ClearToolInputsVariant2 && messagesRequestContextManagementEditsItemsOneOf0ClearToolInputsVariant2 != null) + else if (MessagesRequestContextManagementEditsItemsOneOf0ClearToolInputsVariant2 is { } __value1 && messagesRequestContextManagementEditsItemsOneOf0ClearToolInputsVariant2 != null) { - return messagesRequestContextManagementEditsItemsOneOf0ClearToolInputsVariant2(MessagesRequestContextManagementEditsItemsOneOf0ClearToolInputsVariant2!); + return messagesRequestContextManagementEditsItemsOneOf0ClearToolInputsVariant2(__value1); } return default(TResult); @@ -180,13 +180,13 @@ public void Match( Validate(); } - if (IsMessagesRequestContextManagementEditsItemsOneOf0ClearToolInputsVariant1) + if (MessagesRequestContextManagementEditsItemsOneOf0ClearToolInputsVariant1 is { } __value0) { - messagesRequestContextManagementEditsItemsOneOf0ClearToolInputsVariant1?.Invoke(MessagesRequestContextManagementEditsItemsOneOf0ClearToolInputsVariant1!); + messagesRequestContextManagementEditsItemsOneOf0ClearToolInputsVariant1?.Invoke(__value0); } - else if (IsMessagesRequestContextManagementEditsItemsOneOf0ClearToolInputsVariant2) + else if (MessagesRequestContextManagementEditsItemsOneOf0ClearToolInputsVariant2 is { } __value1) { - messagesRequestContextManagementEditsItemsOneOf0ClearToolInputsVariant2?.Invoke(MessagesRequestContextManagementEditsItemsOneOf0ClearToolInputsVariant2!); + messagesRequestContextManagementEditsItemsOneOf0ClearToolInputsVariant2?.Invoke(__value1); } } @@ -203,13 +203,13 @@ public void Switch( Validate(); } - if (IsMessagesRequestContextManagementEditsItemsOneOf0ClearToolInputsVariant1) + if (MessagesRequestContextManagementEditsItemsOneOf0ClearToolInputsVariant1 is { } __value0) { - messagesRequestContextManagementEditsItemsOneOf0ClearToolInputsVariant1?.Invoke(MessagesRequestContextManagementEditsItemsOneOf0ClearToolInputsVariant1!); + messagesRequestContextManagementEditsItemsOneOf0ClearToolInputsVariant1?.Invoke(__value0); } - else if (IsMessagesRequestContextManagementEditsItemsOneOf0ClearToolInputsVariant2) + else if (MessagesRequestContextManagementEditsItemsOneOf0ClearToolInputsVariant2 is { } __value1) { - messagesRequestContextManagementEditsItemsOneOf0ClearToolInputsVariant2?.Invoke(MessagesRequestContextManagementEditsItemsOneOf0ClearToolInputsVariant2!); + messagesRequestContextManagementEditsItemsOneOf0ClearToolInputsVariant2?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.MessagesRequestContextManagementEditsItemsOneOf0Trigger.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.MessagesRequestContextManagementEditsItemsOneOf0Trigger.g.cs index 721509a9..0409f047 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.MessagesRequestContextManagementEditsItemsOneOf0Trigger.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.MessagesRequestContextManagementEditsItemsOneOf0Trigger.g.cs @@ -47,8 +47,8 @@ public bool TryPickInputTokens( /// /// /// - public global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf0TriggerVariant1 PickInputTokens() => IsInputTokens - ? InputTokens! + public global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf0TriggerVariant1 PickInputTokens() => InputTokens is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'InputTokens' but the value was {ToString()}."); /// @@ -84,8 +84,8 @@ public bool TryPickToolUses( /// /// /// - public global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf0TriggerVariant2 PickToolUses() => IsToolUses - ? ToolUses! + public global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf0TriggerVariant2 PickToolUses() => ToolUses is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ToolUses' but the value was {ToString()}."); /// /// @@ -185,13 +185,13 @@ public bool Validate() Validate(); } - if (IsInputTokens && inputTokens != null) + if (InputTokens is { } __value0 && inputTokens != null) { - return inputTokens(InputTokens!); + return inputTokens(__value0); } - else if (IsToolUses && toolUses != null) + else if (ToolUses is { } __value1 && toolUses != null) { - return toolUses(ToolUses!); + return toolUses(__value1); } return default(TResult); @@ -211,13 +211,13 @@ public void Match( Validate(); } - if (IsInputTokens) + if (InputTokens is { } __value0) { - inputTokens?.Invoke(InputTokens!); + inputTokens?.Invoke(__value0); } - else if (IsToolUses) + else if (ToolUses is { } __value1) { - toolUses?.Invoke(ToolUses!); + toolUses?.Invoke(__value1); } } @@ -234,13 +234,13 @@ public void Switch( Validate(); } - if (IsInputTokens) + if (InputTokens is { } __value0) { - inputTokens?.Invoke(InputTokens!); + inputTokens?.Invoke(__value0); } - else if (IsToolUses) + else if (ToolUses is { } __value1) { - toolUses?.Invoke(ToolUses!); + toolUses?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.MessagesRequestContextManagementEditsItemsOneOf1Keep.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.MessagesRequestContextManagementEditsItemsOneOf1Keep.g.cs index 83e0e8ee..7d3411df 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.MessagesRequestContextManagementEditsItemsOneOf1Keep.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.MessagesRequestContextManagementEditsItemsOneOf1Keep.g.cs @@ -42,8 +42,8 @@ public bool TryPickAnthropicThinkingTurns( /// /// /// - public global::OpenRouter.AnthropicThinkingTurns PickAnthropicThinkingTurns() => IsAnthropicThinkingTurns - ? AnthropicThinkingTurns! + public global::OpenRouter.AnthropicThinkingTurns PickAnthropicThinkingTurns() => AnthropicThinkingTurns is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'AnthropicThinkingTurns' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickMessagesRequestContextManagementEditsItemsOneOf1Keep1( /// /// /// - public global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf1Keep1 PickMessagesRequestContextManagementEditsItemsOneOf1Keep1() => IsMessagesRequestContextManagementEditsItemsOneOf1Keep1 - ? MessagesRequestContextManagementEditsItemsOneOf1Keep1! + public global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf1Keep1 PickMessagesRequestContextManagementEditsItemsOneOf1Keep1() => MessagesRequestContextManagementEditsItemsOneOf1Keep1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'MessagesRequestContextManagementEditsItemsOneOf1Keep1' but the value was {ToString()}."); /// @@ -116,8 +116,8 @@ public bool TryPickMessagesRequestContextManagementEditsItemsOneOf1Keep2( /// /// /// - public global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf1Keep2 PickMessagesRequestContextManagementEditsItemsOneOf1Keep2() => IsMessagesRequestContextManagementEditsItemsOneOf1Keep2 - ? MessagesRequestContextManagementEditsItemsOneOf1Keep2!.Value + public global::OpenRouter.MessagesRequestContextManagementEditsItemsOneOf1Keep2 PickMessagesRequestContextManagementEditsItemsOneOf1Keep2() => MessagesRequestContextManagementEditsItemsOneOf1Keep2 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'MessagesRequestContextManagementEditsItemsOneOf1Keep2' but the value was {ToString()}."); /// /// @@ -242,17 +242,17 @@ public bool Validate() Validate(); } - if (IsAnthropicThinkingTurns && anthropicThinkingTurns != null) + if (AnthropicThinkingTurns is { } __value0 && anthropicThinkingTurns != null) { - return anthropicThinkingTurns(AnthropicThinkingTurns!); + return anthropicThinkingTurns(__value0); } - else if (IsMessagesRequestContextManagementEditsItemsOneOf1Keep1 && messagesRequestContextManagementEditsItemsOneOf1Keep1 != null) + else if (MessagesRequestContextManagementEditsItemsOneOf1Keep1 is { } __value1 && messagesRequestContextManagementEditsItemsOneOf1Keep1 != null) { - return messagesRequestContextManagementEditsItemsOneOf1Keep1(MessagesRequestContextManagementEditsItemsOneOf1Keep1!); + return messagesRequestContextManagementEditsItemsOneOf1Keep1(__value1); } - else if (IsMessagesRequestContextManagementEditsItemsOneOf1Keep2 && messagesRequestContextManagementEditsItemsOneOf1Keep2 != null) + else if (MessagesRequestContextManagementEditsItemsOneOf1Keep2 is { } __value2 && messagesRequestContextManagementEditsItemsOneOf1Keep2 != null) { - return messagesRequestContextManagementEditsItemsOneOf1Keep2(MessagesRequestContextManagementEditsItemsOneOf1Keep2!); + return messagesRequestContextManagementEditsItemsOneOf1Keep2(__value2); } return default(TResult); @@ -274,17 +274,17 @@ public void Match( Validate(); } - if (IsAnthropicThinkingTurns) + if (AnthropicThinkingTurns is { } __value0) { - anthropicThinkingTurns?.Invoke(AnthropicThinkingTurns!); + anthropicThinkingTurns?.Invoke(__value0); } - else if (IsMessagesRequestContextManagementEditsItemsOneOf1Keep1) + else if (MessagesRequestContextManagementEditsItemsOneOf1Keep1 is { } __value1) { - messagesRequestContextManagementEditsItemsOneOf1Keep1?.Invoke(MessagesRequestContextManagementEditsItemsOneOf1Keep1!); + messagesRequestContextManagementEditsItemsOneOf1Keep1?.Invoke(__value1); } - else if (IsMessagesRequestContextManagementEditsItemsOneOf1Keep2) + else if (MessagesRequestContextManagementEditsItemsOneOf1Keep2 is { } __value2) { - messagesRequestContextManagementEditsItemsOneOf1Keep2?.Invoke(MessagesRequestContextManagementEditsItemsOneOf1Keep2!); + messagesRequestContextManagementEditsItemsOneOf1Keep2?.Invoke(__value2); } } @@ -302,17 +302,17 @@ public void Switch( Validate(); } - if (IsAnthropicThinkingTurns) + if (AnthropicThinkingTurns is { } __value0) { - anthropicThinkingTurns?.Invoke(AnthropicThinkingTurns!); + anthropicThinkingTurns?.Invoke(__value0); } - else if (IsMessagesRequestContextManagementEditsItemsOneOf1Keep1) + else if (MessagesRequestContextManagementEditsItemsOneOf1Keep1 is { } __value1) { - messagesRequestContextManagementEditsItemsOneOf1Keep1?.Invoke(MessagesRequestContextManagementEditsItemsOneOf1Keep1!); + messagesRequestContextManagementEditsItemsOneOf1Keep1?.Invoke(__value1); } - else if (IsMessagesRequestContextManagementEditsItemsOneOf1Keep2) + else if (MessagesRequestContextManagementEditsItemsOneOf1Keep2 is { } __value2) { - messagesRequestContextManagementEditsItemsOneOf1Keep2?.Invoke(MessagesRequestContextManagementEditsItemsOneOf1Keep2!); + messagesRequestContextManagementEditsItemsOneOf1Keep2?.Invoke(__value2); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.MessagesRequestPluginsItems.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.MessagesRequestPluginsItems.g.cs index f24dd959..ac0eb949 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.MessagesRequestPluginsItems.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.MessagesRequestPluginsItems.g.cs @@ -47,8 +47,8 @@ public bool TryPickAutoBetaRouter( /// /// /// - public global::OpenRouter.MessagesRequestPluginsItemsVariant1 PickAutoBetaRouter() => IsAutoBetaRouter - ? AutoBetaRouter! + public global::OpenRouter.MessagesRequestPluginsItemsVariant1 PickAutoBetaRouter() => AutoBetaRouter is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'AutoBetaRouter' but the value was {ToString()}."); /// @@ -84,8 +84,8 @@ public bool TryPickAutoRouter( /// /// /// - public global::OpenRouter.MessagesRequestPluginsItemsVariant2 PickAutoRouter() => IsAutoRouter - ? AutoRouter! + public global::OpenRouter.MessagesRequestPluginsItemsVariant2 PickAutoRouter() => AutoRouter is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'AutoRouter' but the value was {ToString()}."); /// @@ -121,8 +121,8 @@ public bool TryPickContextCompression( /// /// /// - public global::OpenRouter.MessagesRequestPluginsItemsVariant3 PickContextCompression() => IsContextCompression - ? ContextCompression! + public global::OpenRouter.MessagesRequestPluginsItemsVariant3 PickContextCompression() => ContextCompression is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ContextCompression' but the value was {ToString()}."); /// @@ -158,8 +158,8 @@ public bool TryPickFileParser( /// /// /// - public global::OpenRouter.MessagesRequestPluginsItemsVariant4 PickFileParser() => IsFileParser - ? FileParser! + public global::OpenRouter.MessagesRequestPluginsItemsVariant4 PickFileParser() => FileParser is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'FileParser' but the value was {ToString()}."); /// @@ -195,8 +195,8 @@ public bool TryPickFusion( /// /// /// - public global::OpenRouter.MessagesRequestPluginsItemsVariant5 PickFusion() => IsFusion - ? Fusion! + public global::OpenRouter.MessagesRequestPluginsItemsVariant5 PickFusion() => Fusion is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Fusion' but the value was {ToString()}."); /// @@ -232,8 +232,8 @@ public bool TryPickModeration( /// /// /// - public global::OpenRouter.MessagesRequestPluginsItemsVariant6 PickModeration() => IsModeration - ? Moderation! + public global::OpenRouter.MessagesRequestPluginsItemsVariant6 PickModeration() => Moderation is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Moderation' but the value was {ToString()}."); /// @@ -269,8 +269,8 @@ public bool TryPickParetoRouter( /// /// /// - public global::OpenRouter.MessagesRequestPluginsItemsVariant7 PickParetoRouter() => IsParetoRouter - ? ParetoRouter! + public global::OpenRouter.MessagesRequestPluginsItemsVariant7 PickParetoRouter() => ParetoRouter is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ParetoRouter' but the value was {ToString()}."); /// @@ -306,8 +306,8 @@ public bool TryPickResponseHealing( /// /// /// - public global::OpenRouter.MessagesRequestPluginsItemsVariant8 PickResponseHealing() => IsResponseHealing - ? ResponseHealing! + public global::OpenRouter.MessagesRequestPluginsItemsVariant8 PickResponseHealing() => ResponseHealing is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ResponseHealing' but the value was {ToString()}."); /// @@ -343,8 +343,8 @@ public bool TryPickWeb( /// /// /// - public global::OpenRouter.MessagesRequestPluginsItemsVariant9 PickWeb() => IsWeb - ? Web! + public global::OpenRouter.MessagesRequestPluginsItemsVariant9 PickWeb() => Web is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Web' but the value was {ToString()}."); /// @@ -380,8 +380,8 @@ public bool TryPickWebFetch( /// /// /// - public global::OpenRouter.MessagesRequestPluginsItemsVariant10 PickWebFetch() => IsWebFetch - ? WebFetch! + public global::OpenRouter.MessagesRequestPluginsItemsVariant10 PickWebFetch() => WebFetch is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'WebFetch' but the value was {ToString()}."); /// /// @@ -705,45 +705,45 @@ public bool Validate() Validate(); } - if (IsAutoBetaRouter && autoBetaRouter != null) + if (AutoBetaRouter is { } __value0 && autoBetaRouter != null) { - return autoBetaRouter(AutoBetaRouter!); + return autoBetaRouter(__value0); } - else if (IsAutoRouter && autoRouter != null) + else if (AutoRouter is { } __value1 && autoRouter != null) { - return autoRouter(AutoRouter!); + return autoRouter(__value1); } - else if (IsContextCompression && contextCompression != null) + else if (ContextCompression is { } __value2 && contextCompression != null) { - return contextCompression(ContextCompression!); + return contextCompression(__value2); } - else if (IsFileParser && fileParser != null) + else if (FileParser is { } __value3 && fileParser != null) { - return fileParser(FileParser!); + return fileParser(__value3); } - else if (IsFusion && fusion != null) + else if (Fusion is { } __value4 && fusion != null) { - return fusion(Fusion!); + return fusion(__value4); } - else if (IsModeration && moderation != null) + else if (Moderation is { } __value5 && moderation != null) { - return moderation(Moderation!); + return moderation(__value5); } - else if (IsParetoRouter && paretoRouter != null) + else if (ParetoRouter is { } __value6 && paretoRouter != null) { - return paretoRouter(ParetoRouter!); + return paretoRouter(__value6); } - else if (IsResponseHealing && responseHealing != null) + else if (ResponseHealing is { } __value7 && responseHealing != null) { - return responseHealing(ResponseHealing!); + return responseHealing(__value7); } - else if (IsWeb && web != null) + else if (Web is { } __value8 && web != null) { - return web(Web!); + return web(__value8); } - else if (IsWebFetch && webFetch != null) + else if (WebFetch is { } __value9 && webFetch != null) { - return webFetch(WebFetch!); + return webFetch(__value9); } return default(TResult); @@ -779,45 +779,45 @@ public void Match( Validate(); } - if (IsAutoBetaRouter) + if (AutoBetaRouter is { } __value0) { - autoBetaRouter?.Invoke(AutoBetaRouter!); + autoBetaRouter?.Invoke(__value0); } - else if (IsAutoRouter) + else if (AutoRouter is { } __value1) { - autoRouter?.Invoke(AutoRouter!); + autoRouter?.Invoke(__value1); } - else if (IsContextCompression) + else if (ContextCompression is { } __value2) { - contextCompression?.Invoke(ContextCompression!); + contextCompression?.Invoke(__value2); } - else if (IsFileParser) + else if (FileParser is { } __value3) { - fileParser?.Invoke(FileParser!); + fileParser?.Invoke(__value3); } - else if (IsFusion) + else if (Fusion is { } __value4) { - fusion?.Invoke(Fusion!); + fusion?.Invoke(__value4); } - else if (IsModeration) + else if (Moderation is { } __value5) { - moderation?.Invoke(Moderation!); + moderation?.Invoke(__value5); } - else if (IsParetoRouter) + else if (ParetoRouter is { } __value6) { - paretoRouter?.Invoke(ParetoRouter!); + paretoRouter?.Invoke(__value6); } - else if (IsResponseHealing) + else if (ResponseHealing is { } __value7) { - responseHealing?.Invoke(ResponseHealing!); + responseHealing?.Invoke(__value7); } - else if (IsWeb) + else if (Web is { } __value8) { - web?.Invoke(Web!); + web?.Invoke(__value8); } - else if (IsWebFetch) + else if (WebFetch is { } __value9) { - webFetch?.Invoke(WebFetch!); + webFetch?.Invoke(__value9); } } @@ -842,45 +842,45 @@ public void Switch( Validate(); } - if (IsAutoBetaRouter) + if (AutoBetaRouter is { } __value0) { - autoBetaRouter?.Invoke(AutoBetaRouter!); + autoBetaRouter?.Invoke(__value0); } - else if (IsAutoRouter) + else if (AutoRouter is { } __value1) { - autoRouter?.Invoke(AutoRouter!); + autoRouter?.Invoke(__value1); } - else if (IsContextCompression) + else if (ContextCompression is { } __value2) { - contextCompression?.Invoke(ContextCompression!); + contextCompression?.Invoke(__value2); } - else if (IsFileParser) + else if (FileParser is { } __value3) { - fileParser?.Invoke(FileParser!); + fileParser?.Invoke(__value3); } - else if (IsFusion) + else if (Fusion is { } __value4) { - fusion?.Invoke(Fusion!); + fusion?.Invoke(__value4); } - else if (IsModeration) + else if (Moderation is { } __value5) { - moderation?.Invoke(Moderation!); + moderation?.Invoke(__value5); } - else if (IsParetoRouter) + else if (ParetoRouter is { } __value6) { - paretoRouter?.Invoke(ParetoRouter!); + paretoRouter?.Invoke(__value6); } - else if (IsResponseHealing) + else if (ResponseHealing is { } __value7) { - responseHealing?.Invoke(ResponseHealing!); + responseHealing?.Invoke(__value7); } - else if (IsWeb) + else if (Web is { } __value8) { - web?.Invoke(Web!); + web?.Invoke(__value8); } - else if (IsWebFetch) + else if (WebFetch is { } __value9) { - webFetch?.Invoke(WebFetch!); + webFetch?.Invoke(__value9); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.MessagesRequestSystem.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.MessagesRequestSystem.g.cs index 1f2852f5..6d08d55b 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.MessagesRequestSystem.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.MessagesRequestSystem.g.cs @@ -42,8 +42,8 @@ public bool TryPickMessagesRequestSystemVariant1( /// /// /// - public string PickMessagesRequestSystemVariant1() => IsMessagesRequestSystemVariant1 - ? MessagesRequestSystemVariant1! + public string PickMessagesRequestSystemVariant1() => MessagesRequestSystemVariant1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'MessagesRequestSystemVariant1' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickMessagesRequestSystem1( /// /// /// - public global::System.Collections.Generic.IList PickMessagesRequestSystem1() => IsMessagesRequestSystem1 - ? MessagesRequestSystem1! + public global::System.Collections.Generic.IList PickMessagesRequestSystem1() => MessagesRequestSystem1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'MessagesRequestSystem1' but the value was {ToString()}."); /// /// @@ -154,13 +154,13 @@ public bool Validate() Validate(); } - if (IsMessagesRequestSystemVariant1 && messagesRequestSystemVariant1 != null) + if (MessagesRequestSystemVariant1 is { } __value0 && messagesRequestSystemVariant1 != null) { - return messagesRequestSystemVariant1(MessagesRequestSystemVariant1!); + return messagesRequestSystemVariant1(__value0); } - else if (IsMessagesRequestSystem1 && messagesRequestSystem1 != null) + else if (MessagesRequestSystem1 is { } __value1 && messagesRequestSystem1 != null) { - return messagesRequestSystem1(MessagesRequestSystem1!); + return messagesRequestSystem1(__value1); } return default(TResult); @@ -180,13 +180,13 @@ public void Match( Validate(); } - if (IsMessagesRequestSystemVariant1) + if (MessagesRequestSystemVariant1 is { } __value0) { - messagesRequestSystemVariant1?.Invoke(MessagesRequestSystemVariant1!); + messagesRequestSystemVariant1?.Invoke(__value0); } - else if (IsMessagesRequestSystem1) + else if (MessagesRequestSystem1 is { } __value1) { - messagesRequestSystem1?.Invoke(MessagesRequestSystem1!); + messagesRequestSystem1?.Invoke(__value1); } } @@ -203,13 +203,13 @@ public void Switch( Validate(); } - if (IsMessagesRequestSystemVariant1) + if (MessagesRequestSystemVariant1 is { } __value0) { - messagesRequestSystemVariant1?.Invoke(MessagesRequestSystemVariant1!); + messagesRequestSystemVariant1?.Invoke(__value0); } - else if (IsMessagesRequestSystem1) + else if (MessagesRequestSystem1 is { } __value1) { - messagesRequestSystem1?.Invoke(MessagesRequestSystem1!); + messagesRequestSystem1?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.MessagesRequestThinking.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.MessagesRequestThinking.g.cs index b2a18b39..72fefab4 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.MessagesRequestThinking.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.MessagesRequestThinking.g.cs @@ -42,8 +42,8 @@ public bool TryPickMessagesRequestThinking0( /// /// /// - public global::OpenRouter.MessagesRequestThinking0 PickMessagesRequestThinking0() => IsMessagesRequestThinking0 - ? MessagesRequestThinking0! + public global::OpenRouter.MessagesRequestThinking0 PickMessagesRequestThinking0() => MessagesRequestThinking0 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'MessagesRequestThinking0' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickMessagesRequestThinking1( /// /// /// - public global::OpenRouter.MessagesRequestThinking1 PickMessagesRequestThinking1() => IsMessagesRequestThinking1 - ? MessagesRequestThinking1! + public global::OpenRouter.MessagesRequestThinking1 PickMessagesRequestThinking1() => MessagesRequestThinking1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'MessagesRequestThinking1' but the value was {ToString()}."); /// @@ -116,8 +116,8 @@ public bool TryPickMessagesRequestThinking2( /// /// /// - public global::OpenRouter.MessagesRequestThinking2 PickMessagesRequestThinking2() => IsMessagesRequestThinking2 - ? MessagesRequestThinking2! + public global::OpenRouter.MessagesRequestThinking2 PickMessagesRequestThinking2() => MessagesRequestThinking2 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'MessagesRequestThinking2' but the value was {ToString()}."); /// /// @@ -242,17 +242,17 @@ public bool Validate() Validate(); } - if (IsMessagesRequestThinking0 && messagesRequestThinking0 != null) + if (MessagesRequestThinking0 is { } __value0 && messagesRequestThinking0 != null) { - return messagesRequestThinking0(MessagesRequestThinking0!); + return messagesRequestThinking0(__value0); } - else if (IsMessagesRequestThinking1 && messagesRequestThinking1 != null) + else if (MessagesRequestThinking1 is { } __value1 && messagesRequestThinking1 != null) { - return messagesRequestThinking1(MessagesRequestThinking1!); + return messagesRequestThinking1(__value1); } - else if (IsMessagesRequestThinking2 && messagesRequestThinking2 != null) + else if (MessagesRequestThinking2 is { } __value2 && messagesRequestThinking2 != null) { - return messagesRequestThinking2(MessagesRequestThinking2!); + return messagesRequestThinking2(__value2); } return default(TResult); @@ -274,17 +274,17 @@ public void Match( Validate(); } - if (IsMessagesRequestThinking0) + if (MessagesRequestThinking0 is { } __value0) { - messagesRequestThinking0?.Invoke(MessagesRequestThinking0!); + messagesRequestThinking0?.Invoke(__value0); } - else if (IsMessagesRequestThinking1) + else if (MessagesRequestThinking1 is { } __value1) { - messagesRequestThinking1?.Invoke(MessagesRequestThinking1!); + messagesRequestThinking1?.Invoke(__value1); } - else if (IsMessagesRequestThinking2) + else if (MessagesRequestThinking2 is { } __value2) { - messagesRequestThinking2?.Invoke(MessagesRequestThinking2!); + messagesRequestThinking2?.Invoke(__value2); } } @@ -302,17 +302,17 @@ public void Switch( Validate(); } - if (IsMessagesRequestThinking0) + if (MessagesRequestThinking0 is { } __value0) { - messagesRequestThinking0?.Invoke(MessagesRequestThinking0!); + messagesRequestThinking0?.Invoke(__value0); } - else if (IsMessagesRequestThinking1) + else if (MessagesRequestThinking1 is { } __value1) { - messagesRequestThinking1?.Invoke(MessagesRequestThinking1!); + messagesRequestThinking1?.Invoke(__value1); } - else if (IsMessagesRequestThinking2) + else if (MessagesRequestThinking2 is { } __value2) { - messagesRequestThinking2?.Invoke(MessagesRequestThinking2!); + messagesRequestThinking2?.Invoke(__value2); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.MessagesRequestToolChoice.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.MessagesRequestToolChoice.g.cs index e97c5434..8a288e22 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.MessagesRequestToolChoice.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.MessagesRequestToolChoice.g.cs @@ -42,8 +42,8 @@ public bool TryPickMessagesRequestToolChoice0( /// /// /// - public global::OpenRouter.MessagesRequestToolChoice0 PickMessagesRequestToolChoice0() => IsMessagesRequestToolChoice0 - ? MessagesRequestToolChoice0! + public global::OpenRouter.MessagesRequestToolChoice0 PickMessagesRequestToolChoice0() => MessagesRequestToolChoice0 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'MessagesRequestToolChoice0' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickMessagesRequestToolChoice1( /// /// /// - public global::OpenRouter.MessagesRequestToolChoice1 PickMessagesRequestToolChoice1() => IsMessagesRequestToolChoice1 - ? MessagesRequestToolChoice1! + public global::OpenRouter.MessagesRequestToolChoice1 PickMessagesRequestToolChoice1() => MessagesRequestToolChoice1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'MessagesRequestToolChoice1' but the value was {ToString()}."); /// @@ -116,8 +116,8 @@ public bool TryPickMessagesRequestToolChoice2( /// /// /// - public global::OpenRouter.MessagesRequestToolChoice2 PickMessagesRequestToolChoice2() => IsMessagesRequestToolChoice2 - ? MessagesRequestToolChoice2! + public global::OpenRouter.MessagesRequestToolChoice2 PickMessagesRequestToolChoice2() => MessagesRequestToolChoice2 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'MessagesRequestToolChoice2' but the value was {ToString()}."); /// @@ -153,8 +153,8 @@ public bool TryPickMessagesRequestToolChoice3( /// /// /// - public global::OpenRouter.MessagesRequestToolChoice3 PickMessagesRequestToolChoice3() => IsMessagesRequestToolChoice3 - ? MessagesRequestToolChoice3! + public global::OpenRouter.MessagesRequestToolChoice3 PickMessagesRequestToolChoice3() => MessagesRequestToolChoice3 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'MessagesRequestToolChoice3' but the value was {ToString()}."); /// /// @@ -307,21 +307,21 @@ public bool Validate() Validate(); } - if (IsMessagesRequestToolChoice0 && messagesRequestToolChoice0 != null) + if (MessagesRequestToolChoice0 is { } __value0 && messagesRequestToolChoice0 != null) { - return messagesRequestToolChoice0(MessagesRequestToolChoice0!); + return messagesRequestToolChoice0(__value0); } - else if (IsMessagesRequestToolChoice1 && messagesRequestToolChoice1 != null) + else if (MessagesRequestToolChoice1 is { } __value1 && messagesRequestToolChoice1 != null) { - return messagesRequestToolChoice1(MessagesRequestToolChoice1!); + return messagesRequestToolChoice1(__value1); } - else if (IsMessagesRequestToolChoice2 && messagesRequestToolChoice2 != null) + else if (MessagesRequestToolChoice2 is { } __value2 && messagesRequestToolChoice2 != null) { - return messagesRequestToolChoice2(MessagesRequestToolChoice2!); + return messagesRequestToolChoice2(__value2); } - else if (IsMessagesRequestToolChoice3 && messagesRequestToolChoice3 != null) + else if (MessagesRequestToolChoice3 is { } __value3 && messagesRequestToolChoice3 != null) { - return messagesRequestToolChoice3(MessagesRequestToolChoice3!); + return messagesRequestToolChoice3(__value3); } return default(TResult); @@ -345,21 +345,21 @@ public void Match( Validate(); } - if (IsMessagesRequestToolChoice0) + if (MessagesRequestToolChoice0 is { } __value0) { - messagesRequestToolChoice0?.Invoke(MessagesRequestToolChoice0!); + messagesRequestToolChoice0?.Invoke(__value0); } - else if (IsMessagesRequestToolChoice1) + else if (MessagesRequestToolChoice1 is { } __value1) { - messagesRequestToolChoice1?.Invoke(MessagesRequestToolChoice1!); + messagesRequestToolChoice1?.Invoke(__value1); } - else if (IsMessagesRequestToolChoice2) + else if (MessagesRequestToolChoice2 is { } __value2) { - messagesRequestToolChoice2?.Invoke(MessagesRequestToolChoice2!); + messagesRequestToolChoice2?.Invoke(__value2); } - else if (IsMessagesRequestToolChoice3) + else if (MessagesRequestToolChoice3 is { } __value3) { - messagesRequestToolChoice3?.Invoke(MessagesRequestToolChoice3!); + messagesRequestToolChoice3?.Invoke(__value3); } } @@ -378,21 +378,21 @@ public void Switch( Validate(); } - if (IsMessagesRequestToolChoice0) + if (MessagesRequestToolChoice0 is { } __value0) { - messagesRequestToolChoice0?.Invoke(MessagesRequestToolChoice0!); + messagesRequestToolChoice0?.Invoke(__value0); } - else if (IsMessagesRequestToolChoice1) + else if (MessagesRequestToolChoice1 is { } __value1) { - messagesRequestToolChoice1?.Invoke(MessagesRequestToolChoice1!); + messagesRequestToolChoice1?.Invoke(__value1); } - else if (IsMessagesRequestToolChoice2) + else if (MessagesRequestToolChoice2 is { } __value2) { - messagesRequestToolChoice2?.Invoke(MessagesRequestToolChoice2!); + messagesRequestToolChoice2?.Invoke(__value2); } - else if (IsMessagesRequestToolChoice3) + else if (MessagesRequestToolChoice3 is { } __value3) { - messagesRequestToolChoice3?.Invoke(MessagesRequestToolChoice3!); + messagesRequestToolChoice3?.Invoke(__value3); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.MessagesRequestToolsItems.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.MessagesRequestToolsItems.g.cs index df57c2d3..9884f901 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.MessagesRequestToolsItems.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.MessagesRequestToolsItems.g.cs @@ -42,8 +42,8 @@ public bool TryPickMessagesRequestToolsItems0( /// /// /// - public global::OpenRouter.MessagesRequestToolsItems0 PickMessagesRequestToolsItems0() => IsMessagesRequestToolsItems0 - ? MessagesRequestToolsItems0! + public global::OpenRouter.MessagesRequestToolsItems0 PickMessagesRequestToolsItems0() => MessagesRequestToolsItems0 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'MessagesRequestToolsItems0' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickMessagesRequestToolsItems1( /// /// /// - public global::OpenRouter.MessagesRequestToolsItems1 PickMessagesRequestToolsItems1() => IsMessagesRequestToolsItems1 - ? MessagesRequestToolsItems1! + public global::OpenRouter.MessagesRequestToolsItems1 PickMessagesRequestToolsItems1() => MessagesRequestToolsItems1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'MessagesRequestToolsItems1' but the value was {ToString()}."); /// @@ -116,8 +116,8 @@ public bool TryPickMessagesRequestToolsItems2( /// /// /// - public global::OpenRouter.MessagesRequestToolsItems2 PickMessagesRequestToolsItems2() => IsMessagesRequestToolsItems2 - ? MessagesRequestToolsItems2! + public global::OpenRouter.MessagesRequestToolsItems2 PickMessagesRequestToolsItems2() => MessagesRequestToolsItems2 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'MessagesRequestToolsItems2' but the value was {ToString()}."); /// @@ -153,8 +153,8 @@ public bool TryPickMessagesRequestToolsItems3( /// /// /// - public global::OpenRouter.MessagesRequestToolsItems3 PickMessagesRequestToolsItems3() => IsMessagesRequestToolsItems3 - ? MessagesRequestToolsItems3! + public global::OpenRouter.MessagesRequestToolsItems3 PickMessagesRequestToolsItems3() => MessagesRequestToolsItems3 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'MessagesRequestToolsItems3' but the value was {ToString()}."); /// @@ -190,8 +190,8 @@ public bool TryPickMessagesRequestToolsItems4( /// /// /// - public global::OpenRouter.MessagesRequestToolsItems4 PickMessagesRequestToolsItems4() => IsMessagesRequestToolsItems4 - ? MessagesRequestToolsItems4! + public global::OpenRouter.MessagesRequestToolsItems4 PickMessagesRequestToolsItems4() => MessagesRequestToolsItems4 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'MessagesRequestToolsItems4' but the value was {ToString()}."); /// @@ -227,8 +227,8 @@ public bool TryPickMessagesRequestToolsItems5( /// /// /// - public global::OpenRouter.MessagesRequestToolsItems5 PickMessagesRequestToolsItems5() => IsMessagesRequestToolsItems5 - ? MessagesRequestToolsItems5! + public global::OpenRouter.MessagesRequestToolsItems5 PickMessagesRequestToolsItems5() => MessagesRequestToolsItems5 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'MessagesRequestToolsItems5' but the value was {ToString()}."); /// @@ -264,8 +264,8 @@ public bool TryPickBashServerTool( /// /// /// - public global::OpenRouter.BashServerTool PickBashServerTool() => IsBashServerTool - ? BashServerTool! + public global::OpenRouter.BashServerTool PickBashServerTool() => BashServerTool is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'BashServerTool' but the value was {ToString()}."); /// @@ -301,8 +301,8 @@ public bool TryPickDatetimeServerTool( /// /// /// - public global::OpenRouter.DatetimeServerTool PickDatetimeServerTool() => IsDatetimeServerTool - ? DatetimeServerTool! + public global::OpenRouter.DatetimeServerTool PickDatetimeServerTool() => DatetimeServerTool is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'DatetimeServerTool' but the value was {ToString()}."); /// @@ -338,8 +338,8 @@ public bool TryPickImageGenerationServerToolOpenRouter( /// /// /// - public global::OpenRouter.ImageGenerationServerToolOpenRouter PickImageGenerationServerToolOpenRouter() => IsImageGenerationServerToolOpenRouter - ? ImageGenerationServerToolOpenRouter! + public global::OpenRouter.ImageGenerationServerToolOpenRouter PickImageGenerationServerToolOpenRouter() => ImageGenerationServerToolOpenRouter is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ImageGenerationServerToolOpenRouter' but the value was {ToString()}."); /// @@ -375,8 +375,8 @@ public bool TryPickMessagesSearchModelsServerTool( /// /// /// - public global::OpenRouter.MessagesSearchModelsServerTool PickMessagesSearchModelsServerTool() => IsMessagesSearchModelsServerTool - ? MessagesSearchModelsServerTool! + public global::OpenRouter.MessagesSearchModelsServerTool PickMessagesSearchModelsServerTool() => MessagesSearchModelsServerTool is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'MessagesSearchModelsServerTool' but the value was {ToString()}."); /// @@ -412,8 +412,8 @@ public bool TryPickWebFetchServerTool( /// /// /// - public global::OpenRouter.WebFetchServerTool PickWebFetchServerTool() => IsWebFetchServerTool - ? WebFetchServerTool! + public global::OpenRouter.WebFetchServerTool PickWebFetchServerTool() => WebFetchServerTool is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'WebFetchServerTool' but the value was {ToString()}."); /// @@ -449,8 +449,8 @@ public bool TryPickOpenRouterWebSearchServerTool( /// /// /// - public global::OpenRouter.OpenRouterWebSearchServerTool PickOpenRouterWebSearchServerTool() => IsOpenRouterWebSearchServerTool - ? OpenRouterWebSearchServerTool! + public global::OpenRouter.OpenRouterWebSearchServerTool PickOpenRouterWebSearchServerTool() => OpenRouterWebSearchServerTool is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OpenRouterWebSearchServerTool' but the value was {ToString()}."); /// @@ -486,8 +486,8 @@ public bool TryPickMessagesRequestToolsItems12( /// /// /// - public global::OpenRouter.MessagesRequestToolsItems12 PickMessagesRequestToolsItems12() => IsMessagesRequestToolsItems12 - ? MessagesRequestToolsItems12! + public global::OpenRouter.MessagesRequestToolsItems12 PickMessagesRequestToolsItems12() => MessagesRequestToolsItems12 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'MessagesRequestToolsItems12' but the value was {ToString()}."); /// /// @@ -892,57 +892,57 @@ public bool Validate() Validate(); } - if (IsMessagesRequestToolsItems0 && messagesRequestToolsItems0 != null) + if (MessagesRequestToolsItems0 is { } __value0 && messagesRequestToolsItems0 != null) { - return messagesRequestToolsItems0(MessagesRequestToolsItems0!); + return messagesRequestToolsItems0(__value0); } - else if (IsMessagesRequestToolsItems1 && messagesRequestToolsItems1 != null) + else if (MessagesRequestToolsItems1 is { } __value1 && messagesRequestToolsItems1 != null) { - return messagesRequestToolsItems1(MessagesRequestToolsItems1!); + return messagesRequestToolsItems1(__value1); } - else if (IsMessagesRequestToolsItems2 && messagesRequestToolsItems2 != null) + else if (MessagesRequestToolsItems2 is { } __value2 && messagesRequestToolsItems2 != null) { - return messagesRequestToolsItems2(MessagesRequestToolsItems2!); + return messagesRequestToolsItems2(__value2); } - else if (IsMessagesRequestToolsItems3 && messagesRequestToolsItems3 != null) + else if (MessagesRequestToolsItems3 is { } __value3 && messagesRequestToolsItems3 != null) { - return messagesRequestToolsItems3(MessagesRequestToolsItems3!); + return messagesRequestToolsItems3(__value3); } - else if (IsMessagesRequestToolsItems4 && messagesRequestToolsItems4 != null) + else if (MessagesRequestToolsItems4 is { } __value4 && messagesRequestToolsItems4 != null) { - return messagesRequestToolsItems4(MessagesRequestToolsItems4!); + return messagesRequestToolsItems4(__value4); } - else if (IsMessagesRequestToolsItems5 && messagesRequestToolsItems5 != null) + else if (MessagesRequestToolsItems5 is { } __value5 && messagesRequestToolsItems5 != null) { - return messagesRequestToolsItems5(MessagesRequestToolsItems5!); + return messagesRequestToolsItems5(__value5); } - else if (IsBashServerTool && bashServerTool != null) + else if (BashServerTool is { } __value6 && bashServerTool != null) { - return bashServerTool(BashServerTool!); + return bashServerTool(__value6); } - else if (IsDatetimeServerTool && datetimeServerTool != null) + else if (DatetimeServerTool is { } __value7 && datetimeServerTool != null) { - return datetimeServerTool(DatetimeServerTool!); + return datetimeServerTool(__value7); } - else if (IsImageGenerationServerToolOpenRouter && imageGenerationServerToolOpenRouter != null) + else if (ImageGenerationServerToolOpenRouter is { } __value8 && imageGenerationServerToolOpenRouter != null) { - return imageGenerationServerToolOpenRouter(ImageGenerationServerToolOpenRouter!); + return imageGenerationServerToolOpenRouter(__value8); } - else if (IsMessagesSearchModelsServerTool && messagesSearchModelsServerTool != null) + else if (MessagesSearchModelsServerTool is { } __value9 && messagesSearchModelsServerTool != null) { - return messagesSearchModelsServerTool(MessagesSearchModelsServerTool!); + return messagesSearchModelsServerTool(__value9); } - else if (IsWebFetchServerTool && webFetchServerTool != null) + else if (WebFetchServerTool is { } __value10 && webFetchServerTool != null) { - return webFetchServerTool(WebFetchServerTool!); + return webFetchServerTool(__value10); } - else if (IsOpenRouterWebSearchServerTool && openRouterWebSearchServerTool != null) + else if (OpenRouterWebSearchServerTool is { } __value11 && openRouterWebSearchServerTool != null) { - return openRouterWebSearchServerTool(OpenRouterWebSearchServerTool!); + return openRouterWebSearchServerTool(__value11); } - else if (IsMessagesRequestToolsItems12 && messagesRequestToolsItems12 != null) + else if (MessagesRequestToolsItems12 is { } __value12 && messagesRequestToolsItems12 != null) { - return messagesRequestToolsItems12(MessagesRequestToolsItems12!); + return messagesRequestToolsItems12(__value12); } return default(TResult); @@ -984,57 +984,57 @@ public void Match( Validate(); } - if (IsMessagesRequestToolsItems0) + if (MessagesRequestToolsItems0 is { } __value0) { - messagesRequestToolsItems0?.Invoke(MessagesRequestToolsItems0!); + messagesRequestToolsItems0?.Invoke(__value0); } - else if (IsMessagesRequestToolsItems1) + else if (MessagesRequestToolsItems1 is { } __value1) { - messagesRequestToolsItems1?.Invoke(MessagesRequestToolsItems1!); + messagesRequestToolsItems1?.Invoke(__value1); } - else if (IsMessagesRequestToolsItems2) + else if (MessagesRequestToolsItems2 is { } __value2) { - messagesRequestToolsItems2?.Invoke(MessagesRequestToolsItems2!); + messagesRequestToolsItems2?.Invoke(__value2); } - else if (IsMessagesRequestToolsItems3) + else if (MessagesRequestToolsItems3 is { } __value3) { - messagesRequestToolsItems3?.Invoke(MessagesRequestToolsItems3!); + messagesRequestToolsItems3?.Invoke(__value3); } - else if (IsMessagesRequestToolsItems4) + else if (MessagesRequestToolsItems4 is { } __value4) { - messagesRequestToolsItems4?.Invoke(MessagesRequestToolsItems4!); + messagesRequestToolsItems4?.Invoke(__value4); } - else if (IsMessagesRequestToolsItems5) + else if (MessagesRequestToolsItems5 is { } __value5) { - messagesRequestToolsItems5?.Invoke(MessagesRequestToolsItems5!); + messagesRequestToolsItems5?.Invoke(__value5); } - else if (IsBashServerTool) + else if (BashServerTool is { } __value6) { - bashServerTool?.Invoke(BashServerTool!); + bashServerTool?.Invoke(__value6); } - else if (IsDatetimeServerTool) + else if (DatetimeServerTool is { } __value7) { - datetimeServerTool?.Invoke(DatetimeServerTool!); + datetimeServerTool?.Invoke(__value7); } - else if (IsImageGenerationServerToolOpenRouter) + else if (ImageGenerationServerToolOpenRouter is { } __value8) { - imageGenerationServerToolOpenRouter?.Invoke(ImageGenerationServerToolOpenRouter!); + imageGenerationServerToolOpenRouter?.Invoke(__value8); } - else if (IsMessagesSearchModelsServerTool) + else if (MessagesSearchModelsServerTool is { } __value9) { - messagesSearchModelsServerTool?.Invoke(MessagesSearchModelsServerTool!); + messagesSearchModelsServerTool?.Invoke(__value9); } - else if (IsWebFetchServerTool) + else if (WebFetchServerTool is { } __value10) { - webFetchServerTool?.Invoke(WebFetchServerTool!); + webFetchServerTool?.Invoke(__value10); } - else if (IsOpenRouterWebSearchServerTool) + else if (OpenRouterWebSearchServerTool is { } __value11) { - openRouterWebSearchServerTool?.Invoke(OpenRouterWebSearchServerTool!); + openRouterWebSearchServerTool?.Invoke(__value11); } - else if (IsMessagesRequestToolsItems12) + else if (MessagesRequestToolsItems12 is { } __value12) { - messagesRequestToolsItems12?.Invoke(MessagesRequestToolsItems12!); + messagesRequestToolsItems12?.Invoke(__value12); } } @@ -1062,57 +1062,57 @@ public void Switch( Validate(); } - if (IsMessagesRequestToolsItems0) + if (MessagesRequestToolsItems0 is { } __value0) { - messagesRequestToolsItems0?.Invoke(MessagesRequestToolsItems0!); + messagesRequestToolsItems0?.Invoke(__value0); } - else if (IsMessagesRequestToolsItems1) + else if (MessagesRequestToolsItems1 is { } __value1) { - messagesRequestToolsItems1?.Invoke(MessagesRequestToolsItems1!); + messagesRequestToolsItems1?.Invoke(__value1); } - else if (IsMessagesRequestToolsItems2) + else if (MessagesRequestToolsItems2 is { } __value2) { - messagesRequestToolsItems2?.Invoke(MessagesRequestToolsItems2!); + messagesRequestToolsItems2?.Invoke(__value2); } - else if (IsMessagesRequestToolsItems3) + else if (MessagesRequestToolsItems3 is { } __value3) { - messagesRequestToolsItems3?.Invoke(MessagesRequestToolsItems3!); + messagesRequestToolsItems3?.Invoke(__value3); } - else if (IsMessagesRequestToolsItems4) + else if (MessagesRequestToolsItems4 is { } __value4) { - messagesRequestToolsItems4?.Invoke(MessagesRequestToolsItems4!); + messagesRequestToolsItems4?.Invoke(__value4); } - else if (IsMessagesRequestToolsItems5) + else if (MessagesRequestToolsItems5 is { } __value5) { - messagesRequestToolsItems5?.Invoke(MessagesRequestToolsItems5!); + messagesRequestToolsItems5?.Invoke(__value5); } - else if (IsBashServerTool) + else if (BashServerTool is { } __value6) { - bashServerTool?.Invoke(BashServerTool!); + bashServerTool?.Invoke(__value6); } - else if (IsDatetimeServerTool) + else if (DatetimeServerTool is { } __value7) { - datetimeServerTool?.Invoke(DatetimeServerTool!); + datetimeServerTool?.Invoke(__value7); } - else if (IsImageGenerationServerToolOpenRouter) + else if (ImageGenerationServerToolOpenRouter is { } __value8) { - imageGenerationServerToolOpenRouter?.Invoke(ImageGenerationServerToolOpenRouter!); + imageGenerationServerToolOpenRouter?.Invoke(__value8); } - else if (IsMessagesSearchModelsServerTool) + else if (MessagesSearchModelsServerTool is { } __value9) { - messagesSearchModelsServerTool?.Invoke(MessagesSearchModelsServerTool!); + messagesSearchModelsServerTool?.Invoke(__value9); } - else if (IsWebFetchServerTool) + else if (WebFetchServerTool is { } __value10) { - webFetchServerTool?.Invoke(WebFetchServerTool!); + webFetchServerTool?.Invoke(__value10); } - else if (IsOpenRouterWebSearchServerTool) + else if (OpenRouterWebSearchServerTool is { } __value11) { - openRouterWebSearchServerTool?.Invoke(OpenRouterWebSearchServerTool!); + openRouterWebSearchServerTool?.Invoke(__value11); } - else if (IsMessagesRequestToolsItems12) + else if (MessagesRequestToolsItems12 is { } __value12) { - messagesRequestToolsItems12?.Invoke(MessagesRequestToolsItems12!); + messagesRequestToolsItems12?.Invoke(__value12); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.NamespaceToolToolsItems.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.NamespaceToolToolsItems.g.cs index 1bda9ec4..06cdf2a9 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.NamespaceToolToolsItems.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.NamespaceToolToolsItems.g.cs @@ -42,8 +42,8 @@ public bool TryPickNamespaceFunctionTool( /// /// /// - public global::OpenRouter.NamespaceFunctionTool PickNamespaceFunctionTool() => IsNamespaceFunctionTool - ? NamespaceFunctionTool! + public global::OpenRouter.NamespaceFunctionTool PickNamespaceFunctionTool() => NamespaceFunctionTool is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'NamespaceFunctionTool' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickCustomTool( /// /// /// - public global::OpenRouter.CustomTool PickCustomTool() => IsCustomTool - ? CustomTool! + public global::OpenRouter.CustomTool PickCustomTool() => CustomTool is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'CustomTool' but the value was {ToString()}."); /// /// @@ -177,13 +177,13 @@ public bool Validate() Validate(); } - if (IsNamespaceFunctionTool && namespaceFunctionTool != null) + if (NamespaceFunctionTool is { } __value0 && namespaceFunctionTool != null) { - return namespaceFunctionTool(NamespaceFunctionTool!); + return namespaceFunctionTool(__value0); } - else if (IsCustomTool && customTool != null) + else if (CustomTool is { } __value1 && customTool != null) { - return customTool(CustomTool!); + return customTool(__value1); } return default(TResult); @@ -203,13 +203,13 @@ public void Match( Validate(); } - if (IsNamespaceFunctionTool) + if (NamespaceFunctionTool is { } __value0) { - namespaceFunctionTool?.Invoke(NamespaceFunctionTool!); + namespaceFunctionTool?.Invoke(__value0); } - else if (IsCustomTool) + else if (CustomTool is { } __value1) { - customTool?.Invoke(CustomTool!); + customTool?.Invoke(__value1); } } @@ -226,13 +226,13 @@ public void Switch( Validate(); } - if (IsNamespaceFunctionTool) + if (NamespaceFunctionTool is { } __value0) { - namespaceFunctionTool?.Invoke(NamespaceFunctionTool!); + namespaceFunctionTool?.Invoke(__value0); } - else if (IsCustomTool) + else if (CustomTool is { } __value1) { - customTool?.Invoke(CustomTool!); + customTool?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.ORAnthropicContentBlock.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.ORAnthropicContentBlock.g.cs index 80c2afb0..93d23ce3 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.ORAnthropicContentBlock.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.ORAnthropicContentBlock.g.cs @@ -47,8 +47,8 @@ public bool TryPickAdvisorToolResult( /// /// /// - public global::OpenRouter.ORAnthropicContentBlockVariant1 PickAdvisorToolResult() => IsAdvisorToolResult - ? AdvisorToolResult! + public global::OpenRouter.ORAnthropicContentBlockVariant1 PickAdvisorToolResult() => AdvisorToolResult is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'AdvisorToolResult' but the value was {ToString()}."); /// @@ -84,8 +84,8 @@ public bool TryPickBashCodeExecutionToolResult( /// /// /// - public global::OpenRouter.ORAnthropicContentBlockVariant2 PickBashCodeExecutionToolResult() => IsBashCodeExecutionToolResult - ? BashCodeExecutionToolResult! + public global::OpenRouter.ORAnthropicContentBlockVariant2 PickBashCodeExecutionToolResult() => BashCodeExecutionToolResult is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'BashCodeExecutionToolResult' but the value was {ToString()}."); /// @@ -121,8 +121,8 @@ public bool TryPickCodeExecutionToolResult( /// /// /// - public global::OpenRouter.ORAnthropicContentBlockVariant3 PickCodeExecutionToolResult() => IsCodeExecutionToolResult - ? CodeExecutionToolResult! + public global::OpenRouter.ORAnthropicContentBlockVariant3 PickCodeExecutionToolResult() => CodeExecutionToolResult is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'CodeExecutionToolResult' but the value was {ToString()}."); /// @@ -158,8 +158,8 @@ public bool TryPickCompaction( /// /// /// - public global::OpenRouter.ORAnthropicContentBlockVariant4 PickCompaction() => IsCompaction - ? Compaction! + public global::OpenRouter.ORAnthropicContentBlockVariant4 PickCompaction() => Compaction is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Compaction' but the value was {ToString()}."); /// @@ -195,8 +195,8 @@ public bool TryPickContainerUpload( /// /// /// - public global::OpenRouter.ORAnthropicContentBlockVariant5 PickContainerUpload() => IsContainerUpload - ? ContainerUpload! + public global::OpenRouter.ORAnthropicContentBlockVariant5 PickContainerUpload() => ContainerUpload is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ContainerUpload' but the value was {ToString()}."); /// @@ -232,8 +232,8 @@ public bool TryPickRedactedThinking( /// /// /// - public global::OpenRouter.ORAnthropicContentBlockVariant6 PickRedactedThinking() => IsRedactedThinking - ? RedactedThinking! + public global::OpenRouter.ORAnthropicContentBlockVariant6 PickRedactedThinking() => RedactedThinking is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'RedactedThinking' but the value was {ToString()}."); /// @@ -269,8 +269,8 @@ public bool TryPickServerToolUse( /// /// /// - public global::OpenRouter.ORAnthropicContentBlockVariant7 PickServerToolUse() => IsServerToolUse - ? ServerToolUse! + public global::OpenRouter.ORAnthropicContentBlockVariant7 PickServerToolUse() => ServerToolUse is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ServerToolUse' but the value was {ToString()}."); /// @@ -306,8 +306,8 @@ public bool TryPickText( /// /// /// - public global::OpenRouter.ORAnthropicContentBlockVariant8 PickText() => IsText - ? Text! + public global::OpenRouter.ORAnthropicContentBlockVariant8 PickText() => Text is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Text' but the value was {ToString()}."); /// @@ -343,8 +343,8 @@ public bool TryPickTextEditorCodeExecutionToolResult( /// /// /// - public global::OpenRouter.ORAnthropicContentBlockVariant9 PickTextEditorCodeExecutionToolResult() => IsTextEditorCodeExecutionToolResult - ? TextEditorCodeExecutionToolResult! + public global::OpenRouter.ORAnthropicContentBlockVariant9 PickTextEditorCodeExecutionToolResult() => TextEditorCodeExecutionToolResult is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'TextEditorCodeExecutionToolResult' but the value was {ToString()}."); /// @@ -380,8 +380,8 @@ public bool TryPickThinking( /// /// /// - public global::OpenRouter.ORAnthropicContentBlockVariant10 PickThinking() => IsThinking - ? Thinking! + public global::OpenRouter.ORAnthropicContentBlockVariant10 PickThinking() => Thinking is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Thinking' but the value was {ToString()}."); /// @@ -417,8 +417,8 @@ public bool TryPickToolSearchToolResult( /// /// /// - public global::OpenRouter.ORAnthropicContentBlockVariant11 PickToolSearchToolResult() => IsToolSearchToolResult - ? ToolSearchToolResult! + public global::OpenRouter.ORAnthropicContentBlockVariant11 PickToolSearchToolResult() => ToolSearchToolResult is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ToolSearchToolResult' but the value was {ToString()}."); /// @@ -454,8 +454,8 @@ public bool TryPickToolUse( /// /// /// - public global::OpenRouter.ORAnthropicContentBlockVariant12 PickToolUse() => IsToolUse - ? ToolUse! + public global::OpenRouter.ORAnthropicContentBlockVariant12 PickToolUse() => ToolUse is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ToolUse' but the value was {ToString()}."); /// @@ -491,8 +491,8 @@ public bool TryPickWebFetchToolResult( /// /// /// - public global::OpenRouter.ORAnthropicContentBlockVariant13 PickWebFetchToolResult() => IsWebFetchToolResult - ? WebFetchToolResult! + public global::OpenRouter.ORAnthropicContentBlockVariant13 PickWebFetchToolResult() => WebFetchToolResult is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'WebFetchToolResult' but the value was {ToString()}."); /// @@ -528,8 +528,8 @@ public bool TryPickWebSearchToolResult( /// /// /// - public global::OpenRouter.ORAnthropicContentBlockVariant14 PickWebSearchToolResult() => IsWebSearchToolResult - ? WebSearchToolResult! + public global::OpenRouter.ORAnthropicContentBlockVariant14 PickWebSearchToolResult() => WebSearchToolResult is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'WebSearchToolResult' but the value was {ToString()}."); /// /// @@ -965,61 +965,61 @@ public bool Validate() Validate(); } - if (IsAdvisorToolResult && advisorToolResult != null) + if (AdvisorToolResult is { } __value0 && advisorToolResult != null) { - return advisorToolResult(AdvisorToolResult!); + return advisorToolResult(__value0); } - else if (IsBashCodeExecutionToolResult && bashCodeExecutionToolResult != null) + else if (BashCodeExecutionToolResult is { } __value1 && bashCodeExecutionToolResult != null) { - return bashCodeExecutionToolResult(BashCodeExecutionToolResult!); + return bashCodeExecutionToolResult(__value1); } - else if (IsCodeExecutionToolResult && codeExecutionToolResult != null) + else if (CodeExecutionToolResult is { } __value2 && codeExecutionToolResult != null) { - return codeExecutionToolResult(CodeExecutionToolResult!); + return codeExecutionToolResult(__value2); } - else if (IsCompaction && compaction != null) + else if (Compaction is { } __value3 && compaction != null) { - return compaction(Compaction!); + return compaction(__value3); } - else if (IsContainerUpload && containerUpload != null) + else if (ContainerUpload is { } __value4 && containerUpload != null) { - return containerUpload(ContainerUpload!); + return containerUpload(__value4); } - else if (IsRedactedThinking && redactedThinking != null) + else if (RedactedThinking is { } __value5 && redactedThinking != null) { - return redactedThinking(RedactedThinking!); + return redactedThinking(__value5); } - else if (IsServerToolUse && serverToolUse != null) + else if (ServerToolUse is { } __value6 && serverToolUse != null) { - return serverToolUse(ServerToolUse!); + return serverToolUse(__value6); } - else if (IsText && text != null) + else if (Text is { } __value7 && text != null) { - return text(Text!); + return text(__value7); } - else if (IsTextEditorCodeExecutionToolResult && textEditorCodeExecutionToolResult != null) + else if (TextEditorCodeExecutionToolResult is { } __value8 && textEditorCodeExecutionToolResult != null) { - return textEditorCodeExecutionToolResult(TextEditorCodeExecutionToolResult!); + return textEditorCodeExecutionToolResult(__value8); } - else if (IsThinking && thinking != null) + else if (Thinking is { } __value9 && thinking != null) { - return thinking(Thinking!); + return thinking(__value9); } - else if (IsToolSearchToolResult && toolSearchToolResult != null) + else if (ToolSearchToolResult is { } __value10 && toolSearchToolResult != null) { - return toolSearchToolResult(ToolSearchToolResult!); + return toolSearchToolResult(__value10); } - else if (IsToolUse && toolUse != null) + else if (ToolUse is { } __value11 && toolUse != null) { - return toolUse(ToolUse!); + return toolUse(__value11); } - else if (IsWebFetchToolResult && webFetchToolResult != null) + else if (WebFetchToolResult is { } __value12 && webFetchToolResult != null) { - return webFetchToolResult(WebFetchToolResult!); + return webFetchToolResult(__value12); } - else if (IsWebSearchToolResult && webSearchToolResult != null) + else if (WebSearchToolResult is { } __value13 && webSearchToolResult != null) { - return webSearchToolResult(WebSearchToolResult!); + return webSearchToolResult(__value13); } return default(TResult); @@ -1063,61 +1063,61 @@ public void Match( Validate(); } - if (IsAdvisorToolResult) + if (AdvisorToolResult is { } __value0) { - advisorToolResult?.Invoke(AdvisorToolResult!); + advisorToolResult?.Invoke(__value0); } - else if (IsBashCodeExecutionToolResult) + else if (BashCodeExecutionToolResult is { } __value1) { - bashCodeExecutionToolResult?.Invoke(BashCodeExecutionToolResult!); + bashCodeExecutionToolResult?.Invoke(__value1); } - else if (IsCodeExecutionToolResult) + else if (CodeExecutionToolResult is { } __value2) { - codeExecutionToolResult?.Invoke(CodeExecutionToolResult!); + codeExecutionToolResult?.Invoke(__value2); } - else if (IsCompaction) + else if (Compaction is { } __value3) { - compaction?.Invoke(Compaction!); + compaction?.Invoke(__value3); } - else if (IsContainerUpload) + else if (ContainerUpload is { } __value4) { - containerUpload?.Invoke(ContainerUpload!); + containerUpload?.Invoke(__value4); } - else if (IsRedactedThinking) + else if (RedactedThinking is { } __value5) { - redactedThinking?.Invoke(RedactedThinking!); + redactedThinking?.Invoke(__value5); } - else if (IsServerToolUse) + else if (ServerToolUse is { } __value6) { - serverToolUse?.Invoke(ServerToolUse!); + serverToolUse?.Invoke(__value6); } - else if (IsText) + else if (Text is { } __value7) { - text?.Invoke(Text!); + text?.Invoke(__value7); } - else if (IsTextEditorCodeExecutionToolResult) + else if (TextEditorCodeExecutionToolResult is { } __value8) { - textEditorCodeExecutionToolResult?.Invoke(TextEditorCodeExecutionToolResult!); + textEditorCodeExecutionToolResult?.Invoke(__value8); } - else if (IsThinking) + else if (Thinking is { } __value9) { - thinking?.Invoke(Thinking!); + thinking?.Invoke(__value9); } - else if (IsToolSearchToolResult) + else if (ToolSearchToolResult is { } __value10) { - toolSearchToolResult?.Invoke(ToolSearchToolResult!); + toolSearchToolResult?.Invoke(__value10); } - else if (IsToolUse) + else if (ToolUse is { } __value11) { - toolUse?.Invoke(ToolUse!); + toolUse?.Invoke(__value11); } - else if (IsWebFetchToolResult) + else if (WebFetchToolResult is { } __value12) { - webFetchToolResult?.Invoke(WebFetchToolResult!); + webFetchToolResult?.Invoke(__value12); } - else if (IsWebSearchToolResult) + else if (WebSearchToolResult is { } __value13) { - webSearchToolResult?.Invoke(WebSearchToolResult!); + webSearchToolResult?.Invoke(__value13); } } @@ -1146,61 +1146,61 @@ public void Switch( Validate(); } - if (IsAdvisorToolResult) + if (AdvisorToolResult is { } __value0) { - advisorToolResult?.Invoke(AdvisorToolResult!); + advisorToolResult?.Invoke(__value0); } - else if (IsBashCodeExecutionToolResult) + else if (BashCodeExecutionToolResult is { } __value1) { - bashCodeExecutionToolResult?.Invoke(BashCodeExecutionToolResult!); + bashCodeExecutionToolResult?.Invoke(__value1); } - else if (IsCodeExecutionToolResult) + else if (CodeExecutionToolResult is { } __value2) { - codeExecutionToolResult?.Invoke(CodeExecutionToolResult!); + codeExecutionToolResult?.Invoke(__value2); } - else if (IsCompaction) + else if (Compaction is { } __value3) { - compaction?.Invoke(Compaction!); + compaction?.Invoke(__value3); } - else if (IsContainerUpload) + else if (ContainerUpload is { } __value4) { - containerUpload?.Invoke(ContainerUpload!); + containerUpload?.Invoke(__value4); } - else if (IsRedactedThinking) + else if (RedactedThinking is { } __value5) { - redactedThinking?.Invoke(RedactedThinking!); + redactedThinking?.Invoke(__value5); } - else if (IsServerToolUse) + else if (ServerToolUse is { } __value6) { - serverToolUse?.Invoke(ServerToolUse!); + serverToolUse?.Invoke(__value6); } - else if (IsText) + else if (Text is { } __value7) { - text?.Invoke(Text!); + text?.Invoke(__value7); } - else if (IsTextEditorCodeExecutionToolResult) + else if (TextEditorCodeExecutionToolResult is { } __value8) { - textEditorCodeExecutionToolResult?.Invoke(TextEditorCodeExecutionToolResult!); + textEditorCodeExecutionToolResult?.Invoke(__value8); } - else if (IsThinking) + else if (Thinking is { } __value9) { - thinking?.Invoke(Thinking!); + thinking?.Invoke(__value9); } - else if (IsToolSearchToolResult) + else if (ToolSearchToolResult is { } __value10) { - toolSearchToolResult?.Invoke(ToolSearchToolResult!); + toolSearchToolResult?.Invoke(__value10); } - else if (IsToolUse) + else if (ToolUse is { } __value11) { - toolUse?.Invoke(ToolUse!); + toolUse?.Invoke(__value11); } - else if (IsWebFetchToolResult) + else if (WebFetchToolResult is { } __value12) { - webFetchToolResult?.Invoke(WebFetchToolResult!); + webFetchToolResult?.Invoke(__value12); } - else if (IsWebSearchToolResult) + else if (WebSearchToolResult is { } __value13) { - webSearchToolResult?.Invoke(WebSearchToolResult!); + webSearchToolResult?.Invoke(__value13); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.ObservabilityDestination.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.ObservabilityDestination.g.cs index afd93f98..7e384e08 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.ObservabilityDestination.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.ObservabilityDestination.g.cs @@ -47,8 +47,8 @@ public bool TryPickArize( /// /// /// - public global::OpenRouter.ObservabilityDestinationVariant1 PickArize() => IsArize - ? Arize! + public global::OpenRouter.ObservabilityDestinationVariant1 PickArize() => Arize is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Arize' but the value was {ToString()}."); /// @@ -84,8 +84,8 @@ public bool TryPickBraintrust( /// /// /// - public global::OpenRouter.ObservabilityDestinationVariant2 PickBraintrust() => IsBraintrust - ? Braintrust! + public global::OpenRouter.ObservabilityDestinationVariant2 PickBraintrust() => Braintrust is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Braintrust' but the value was {ToString()}."); /// @@ -121,8 +121,8 @@ public bool TryPickClickhouse( /// /// /// - public global::OpenRouter.ObservabilityDestinationVariant3 PickClickhouse() => IsClickhouse - ? Clickhouse! + public global::OpenRouter.ObservabilityDestinationVariant3 PickClickhouse() => Clickhouse is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Clickhouse' but the value was {ToString()}."); /// @@ -158,8 +158,8 @@ public bool TryPickDatadog( /// /// /// - public global::OpenRouter.ObservabilityDestinationVariant4 PickDatadog() => IsDatadog - ? Datadog! + public global::OpenRouter.ObservabilityDestinationVariant4 PickDatadog() => Datadog is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Datadog' but the value was {ToString()}."); /// @@ -195,8 +195,8 @@ public bool TryPickGrafana( /// /// /// - public global::OpenRouter.ObservabilityDestinationVariant5 PickGrafana() => IsGrafana - ? Grafana! + public global::OpenRouter.ObservabilityDestinationVariant5 PickGrafana() => Grafana is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Grafana' but the value was {ToString()}."); /// @@ -232,8 +232,8 @@ public bool TryPickLangfuse( /// /// /// - public global::OpenRouter.ObservabilityDestinationVariant6 PickLangfuse() => IsLangfuse - ? Langfuse! + public global::OpenRouter.ObservabilityDestinationVariant6 PickLangfuse() => Langfuse is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Langfuse' but the value was {ToString()}."); /// @@ -269,8 +269,8 @@ public bool TryPickLangsmith( /// /// /// - public global::OpenRouter.ObservabilityDestinationVariant7 PickLangsmith() => IsLangsmith - ? Langsmith! + public global::OpenRouter.ObservabilityDestinationVariant7 PickLangsmith() => Langsmith is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Langsmith' but the value was {ToString()}."); /// @@ -306,8 +306,8 @@ public bool TryPickNewrelic( /// /// /// - public global::OpenRouter.ObservabilityDestinationVariant8 PickNewrelic() => IsNewrelic - ? Newrelic! + public global::OpenRouter.ObservabilityDestinationVariant8 PickNewrelic() => Newrelic is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Newrelic' but the value was {ToString()}."); /// @@ -343,8 +343,8 @@ public bool TryPickOpik( /// /// /// - public global::OpenRouter.ObservabilityDestinationVariant9 PickOpik() => IsOpik - ? Opik! + public global::OpenRouter.ObservabilityDestinationVariant9 PickOpik() => Opik is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Opik' but the value was {ToString()}."); /// @@ -380,8 +380,8 @@ public bool TryPickOtelCollector( /// /// /// - public global::OpenRouter.ObservabilityDestinationVariant10 PickOtelCollector() => IsOtelCollector - ? OtelCollector! + public global::OpenRouter.ObservabilityDestinationVariant10 PickOtelCollector() => OtelCollector is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OtelCollector' but the value was {ToString()}."); /// @@ -417,8 +417,8 @@ public bool TryPickPosthog( /// /// /// - public global::OpenRouter.ObservabilityDestinationVariant11 PickPosthog() => IsPosthog - ? Posthog! + public global::OpenRouter.ObservabilityDestinationVariant11 PickPosthog() => Posthog is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Posthog' but the value was {ToString()}."); /// @@ -454,8 +454,8 @@ public bool TryPickRamp( /// /// /// - public global::OpenRouter.ObservabilityDestinationVariant12 PickRamp() => IsRamp - ? Ramp! + public global::OpenRouter.ObservabilityDestinationVariant12 PickRamp() => Ramp is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Ramp' but the value was {ToString()}."); /// @@ -491,8 +491,8 @@ public bool TryPickS3( /// /// /// - public global::OpenRouter.ObservabilityDestinationVariant13 PickS3() => IsS3 - ? S3! + public global::OpenRouter.ObservabilityDestinationVariant13 PickS3() => S3 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'S3' but the value was {ToString()}."); /// @@ -528,8 +528,8 @@ public bool TryPickSentry( /// /// /// - public global::OpenRouter.ObservabilityDestinationVariant14 PickSentry() => IsSentry - ? Sentry! + public global::OpenRouter.ObservabilityDestinationVariant14 PickSentry() => Sentry is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Sentry' but the value was {ToString()}."); /// @@ -565,8 +565,8 @@ public bool TryPickSnowflake( /// /// /// - public global::OpenRouter.ObservabilityDestinationVariant15 PickSnowflake() => IsSnowflake - ? Snowflake! + public global::OpenRouter.ObservabilityDestinationVariant15 PickSnowflake() => Snowflake is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Snowflake' but the value was {ToString()}."); /// @@ -602,8 +602,8 @@ public bool TryPickWeave( /// /// /// - public global::OpenRouter.ObservabilityDestinationVariant16 PickWeave() => IsWeave - ? Weave! + public global::OpenRouter.ObservabilityDestinationVariant16 PickWeave() => Weave is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Weave' but the value was {ToString()}."); /// @@ -639,8 +639,8 @@ public bool TryPickWebhook( /// /// /// - public global::OpenRouter.ObservabilityDestinationVariant17 PickWebhook() => IsWebhook - ? Webhook! + public global::OpenRouter.ObservabilityDestinationVariant17 PickWebhook() => Webhook is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Webhook' but the value was {ToString()}."); /// /// @@ -1160,73 +1160,73 @@ public bool Validate() Validate(); } - if (IsArize && arize != null) + if (Arize is { } __value0 && arize != null) { - return arize(Arize!); + return arize(__value0); } - else if (IsBraintrust && braintrust != null) + else if (Braintrust is { } __value1 && braintrust != null) { - return braintrust(Braintrust!); + return braintrust(__value1); } - else if (IsClickhouse && clickhouse != null) + else if (Clickhouse is { } __value2 && clickhouse != null) { - return clickhouse(Clickhouse!); + return clickhouse(__value2); } - else if (IsDatadog && datadog != null) + else if (Datadog is { } __value3 && datadog != null) { - return datadog(Datadog!); + return datadog(__value3); } - else if (IsGrafana && grafana != null) + else if (Grafana is { } __value4 && grafana != null) { - return grafana(Grafana!); + return grafana(__value4); } - else if (IsLangfuse && langfuse != null) + else if (Langfuse is { } __value5 && langfuse != null) { - return langfuse(Langfuse!); + return langfuse(__value5); } - else if (IsLangsmith && langsmith != null) + else if (Langsmith is { } __value6 && langsmith != null) { - return langsmith(Langsmith!); + return langsmith(__value6); } - else if (IsNewrelic && newrelic != null) + else if (Newrelic is { } __value7 && newrelic != null) { - return newrelic(Newrelic!); + return newrelic(__value7); } - else if (IsOpik && opik != null) + else if (Opik is { } __value8 && opik != null) { - return opik(Opik!); + return opik(__value8); } - else if (IsOtelCollector && otelCollector != null) + else if (OtelCollector is { } __value9 && otelCollector != null) { - return otelCollector(OtelCollector!); + return otelCollector(__value9); } - else if (IsPosthog && posthog != null) + else if (Posthog is { } __value10 && posthog != null) { - return posthog(Posthog!); + return posthog(__value10); } - else if (IsRamp && ramp != null) + else if (Ramp is { } __value11 && ramp != null) { - return ramp(Ramp!); + return ramp(__value11); } - else if (IsS3 && s3 != null) + else if (S3 is { } __value12 && s3 != null) { - return s3(S3!); + return s3(__value12); } - else if (IsSentry && sentry != null) + else if (Sentry is { } __value13 && sentry != null) { - return sentry(Sentry!); + return sentry(__value13); } - else if (IsSnowflake && snowflake != null) + else if (Snowflake is { } __value14 && snowflake != null) { - return snowflake(Snowflake!); + return snowflake(__value14); } - else if (IsWeave && weave != null) + else if (Weave is { } __value15 && weave != null) { - return weave(Weave!); + return weave(__value15); } - else if (IsWebhook && webhook != null) + else if (Webhook is { } __value16 && webhook != null) { - return webhook(Webhook!); + return webhook(__value16); } return default(TResult); @@ -1276,73 +1276,73 @@ public void Match( Validate(); } - if (IsArize) + if (Arize is { } __value0) { - arize?.Invoke(Arize!); + arize?.Invoke(__value0); } - else if (IsBraintrust) + else if (Braintrust is { } __value1) { - braintrust?.Invoke(Braintrust!); + braintrust?.Invoke(__value1); } - else if (IsClickhouse) + else if (Clickhouse is { } __value2) { - clickhouse?.Invoke(Clickhouse!); + clickhouse?.Invoke(__value2); } - else if (IsDatadog) + else if (Datadog is { } __value3) { - datadog?.Invoke(Datadog!); + datadog?.Invoke(__value3); } - else if (IsGrafana) + else if (Grafana is { } __value4) { - grafana?.Invoke(Grafana!); + grafana?.Invoke(__value4); } - else if (IsLangfuse) + else if (Langfuse is { } __value5) { - langfuse?.Invoke(Langfuse!); + langfuse?.Invoke(__value5); } - else if (IsLangsmith) + else if (Langsmith is { } __value6) { - langsmith?.Invoke(Langsmith!); + langsmith?.Invoke(__value6); } - else if (IsNewrelic) + else if (Newrelic is { } __value7) { - newrelic?.Invoke(Newrelic!); + newrelic?.Invoke(__value7); } - else if (IsOpik) + else if (Opik is { } __value8) { - opik?.Invoke(Opik!); + opik?.Invoke(__value8); } - else if (IsOtelCollector) + else if (OtelCollector is { } __value9) { - otelCollector?.Invoke(OtelCollector!); + otelCollector?.Invoke(__value9); } - else if (IsPosthog) + else if (Posthog is { } __value10) { - posthog?.Invoke(Posthog!); + posthog?.Invoke(__value10); } - else if (IsRamp) + else if (Ramp is { } __value11) { - ramp?.Invoke(Ramp!); + ramp?.Invoke(__value11); } - else if (IsS3) + else if (S3 is { } __value12) { - s3?.Invoke(S3!); + s3?.Invoke(__value12); } - else if (IsSentry) + else if (Sentry is { } __value13) { - sentry?.Invoke(Sentry!); + sentry?.Invoke(__value13); } - else if (IsSnowflake) + else if (Snowflake is { } __value14) { - snowflake?.Invoke(Snowflake!); + snowflake?.Invoke(__value14); } - else if (IsWeave) + else if (Weave is { } __value15) { - weave?.Invoke(Weave!); + weave?.Invoke(__value15); } - else if (IsWebhook) + else if (Webhook is { } __value16) { - webhook?.Invoke(Webhook!); + webhook?.Invoke(__value16); } } @@ -1374,73 +1374,73 @@ public void Switch( Validate(); } - if (IsArize) + if (Arize is { } __value0) { - arize?.Invoke(Arize!); + arize?.Invoke(__value0); } - else if (IsBraintrust) + else if (Braintrust is { } __value1) { - braintrust?.Invoke(Braintrust!); + braintrust?.Invoke(__value1); } - else if (IsClickhouse) + else if (Clickhouse is { } __value2) { - clickhouse?.Invoke(Clickhouse!); + clickhouse?.Invoke(__value2); } - else if (IsDatadog) + else if (Datadog is { } __value3) { - datadog?.Invoke(Datadog!); + datadog?.Invoke(__value3); } - else if (IsGrafana) + else if (Grafana is { } __value4) { - grafana?.Invoke(Grafana!); + grafana?.Invoke(__value4); } - else if (IsLangfuse) + else if (Langfuse is { } __value5) { - langfuse?.Invoke(Langfuse!); + langfuse?.Invoke(__value5); } - else if (IsLangsmith) + else if (Langsmith is { } __value6) { - langsmith?.Invoke(Langsmith!); + langsmith?.Invoke(__value6); } - else if (IsNewrelic) + else if (Newrelic is { } __value7) { - newrelic?.Invoke(Newrelic!); + newrelic?.Invoke(__value7); } - else if (IsOpik) + else if (Opik is { } __value8) { - opik?.Invoke(Opik!); + opik?.Invoke(__value8); } - else if (IsOtelCollector) + else if (OtelCollector is { } __value9) { - otelCollector?.Invoke(OtelCollector!); + otelCollector?.Invoke(__value9); } - else if (IsPosthog) + else if (Posthog is { } __value10) { - posthog?.Invoke(Posthog!); + posthog?.Invoke(__value10); } - else if (IsRamp) + else if (Ramp is { } __value11) { - ramp?.Invoke(Ramp!); + ramp?.Invoke(__value11); } - else if (IsS3) + else if (S3 is { } __value12) { - s3?.Invoke(S3!); + s3?.Invoke(__value12); } - else if (IsSentry) + else if (Sentry is { } __value13) { - sentry?.Invoke(Sentry!); + sentry?.Invoke(__value13); } - else if (IsSnowflake) + else if (Snowflake is { } __value14) { - snowflake?.Invoke(Snowflake!); + snowflake?.Invoke(__value14); } - else if (IsWeave) + else if (Weave is { } __value15) { - weave?.Invoke(Weave!); + weave?.Invoke(__value15); } - else if (IsWebhook) + else if (Webhook is { } __value16) { - webhook?.Invoke(Webhook!); + webhook?.Invoke(__value16); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.ObservabilityFilterRuleGroupRulesItemsValue.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.ObservabilityFilterRuleGroupRulesItemsValue.g.cs index ea73501b..13434055 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.ObservabilityFilterRuleGroupRulesItemsValue.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.ObservabilityFilterRuleGroupRulesItemsValue.g.cs @@ -42,8 +42,8 @@ public bool TryPickObservabilityFilterRuleGroupRulesItemsValueVariant1( /// /// /// - public string PickObservabilityFilterRuleGroupRulesItemsValueVariant1() => IsObservabilityFilterRuleGroupRulesItemsValueVariant1 - ? ObservabilityFilterRuleGroupRulesItemsValueVariant1! + public string PickObservabilityFilterRuleGroupRulesItemsValueVariant1() => ObservabilityFilterRuleGroupRulesItemsValueVariant1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ObservabilityFilterRuleGroupRulesItemsValueVariant1' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickObservabilityFilterRuleGroupRulesItemsValueVariant2( /// /// /// - public double PickObservabilityFilterRuleGroupRulesItemsValueVariant2() => IsObservabilityFilterRuleGroupRulesItemsValueVariant2 - ? ObservabilityFilterRuleGroupRulesItemsValueVariant2!.Value + public double PickObservabilityFilterRuleGroupRulesItemsValueVariant2() => ObservabilityFilterRuleGroupRulesItemsValueVariant2 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ObservabilityFilterRuleGroupRulesItemsValueVariant2' but the value was {ToString()}."); /// /// @@ -177,13 +177,13 @@ public bool Validate() Validate(); } - if (IsObservabilityFilterRuleGroupRulesItemsValueVariant1 && observabilityFilterRuleGroupRulesItemsValueVariant1 != null) + if (ObservabilityFilterRuleGroupRulesItemsValueVariant1 is { } __value0 && observabilityFilterRuleGroupRulesItemsValueVariant1 != null) { - return observabilityFilterRuleGroupRulesItemsValueVariant1(ObservabilityFilterRuleGroupRulesItemsValueVariant1!); + return observabilityFilterRuleGroupRulesItemsValueVariant1(__value0); } - else if (IsObservabilityFilterRuleGroupRulesItemsValueVariant2 && observabilityFilterRuleGroupRulesItemsValueVariant2 != null) + else if (ObservabilityFilterRuleGroupRulesItemsValueVariant2 is { } __value1 && observabilityFilterRuleGroupRulesItemsValueVariant2 != null) { - return observabilityFilterRuleGroupRulesItemsValueVariant2(ObservabilityFilterRuleGroupRulesItemsValueVariant2!); + return observabilityFilterRuleGroupRulesItemsValueVariant2(__value1); } return default(TResult); @@ -203,13 +203,13 @@ public void Match( Validate(); } - if (IsObservabilityFilterRuleGroupRulesItemsValueVariant1) + if (ObservabilityFilterRuleGroupRulesItemsValueVariant1 is { } __value0) { - observabilityFilterRuleGroupRulesItemsValueVariant1?.Invoke(ObservabilityFilterRuleGroupRulesItemsValueVariant1!); + observabilityFilterRuleGroupRulesItemsValueVariant1?.Invoke(__value0); } - else if (IsObservabilityFilterRuleGroupRulesItemsValueVariant2) + else if (ObservabilityFilterRuleGroupRulesItemsValueVariant2 is { } __value1) { - observabilityFilterRuleGroupRulesItemsValueVariant2?.Invoke(ObservabilityFilterRuleGroupRulesItemsValueVariant2!); + observabilityFilterRuleGroupRulesItemsValueVariant2?.Invoke(__value1); } } @@ -226,13 +226,13 @@ public void Switch( Validate(); } - if (IsObservabilityFilterRuleGroupRulesItemsValueVariant1) + if (ObservabilityFilterRuleGroupRulesItemsValueVariant1 is { } __value0) { - observabilityFilterRuleGroupRulesItemsValueVariant1?.Invoke(ObservabilityFilterRuleGroupRulesItemsValueVariant1!); + observabilityFilterRuleGroupRulesItemsValueVariant1?.Invoke(__value0); } - else if (IsObservabilityFilterRuleGroupRulesItemsValueVariant2) + else if (ObservabilityFilterRuleGroupRulesItemsValueVariant2 is { } __value1) { - observabilityFilterRuleGroupRulesItemsValueVariant2?.Invoke(ObservabilityFilterRuleGroupRulesItemsValueVariant2!); + observabilityFilterRuleGroupRulesItemsValueVariant2?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.OpenAIResponsesAnnotation.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.OpenAIResponsesAnnotation.g.cs index 135225b4..ee6b9650 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.OpenAIResponsesAnnotation.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.OpenAIResponsesAnnotation.g.cs @@ -42,8 +42,8 @@ public bool TryPickFileCitation( /// /// /// - public global::OpenRouter.FileCitation PickFileCitation() => IsFileCitation - ? FileCitation! + public global::OpenRouter.FileCitation PickFileCitation() => FileCitation is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'FileCitation' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickURLCitation( /// /// /// - public global::OpenRouter.URLCitation PickURLCitation() => IsURLCitation - ? URLCitation! + public global::OpenRouter.URLCitation PickURLCitation() => URLCitation is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'URLCitation' but the value was {ToString()}."); /// @@ -116,8 +116,8 @@ public bool TryPickFilePath( /// /// /// - public global::OpenRouter.FilePath PickFilePath() => IsFilePath - ? FilePath! + public global::OpenRouter.FilePath PickFilePath() => FilePath is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'FilePath' but the value was {ToString()}."); /// /// @@ -242,17 +242,17 @@ public bool Validate() Validate(); } - if (IsFileCitation && fileCitation != null) + if (FileCitation is { } __value0 && fileCitation != null) { - return fileCitation(FileCitation!); + return fileCitation(__value0); } - else if (IsURLCitation && uRLCitation != null) + else if (URLCitation is { } __value1 && uRLCitation != null) { - return uRLCitation(URLCitation!); + return uRLCitation(__value1); } - else if (IsFilePath && filePath != null) + else if (FilePath is { } __value2 && filePath != null) { - return filePath(FilePath!); + return filePath(__value2); } return default(TResult); @@ -274,17 +274,17 @@ public void Match( Validate(); } - if (IsFileCitation) + if (FileCitation is { } __value0) { - fileCitation?.Invoke(FileCitation!); + fileCitation?.Invoke(__value0); } - else if (IsURLCitation) + else if (URLCitation is { } __value1) { - uRLCitation?.Invoke(URLCitation!); + uRLCitation?.Invoke(__value1); } - else if (IsFilePath) + else if (FilePath is { } __value2) { - filePath?.Invoke(FilePath!); + filePath?.Invoke(__value2); } } @@ -302,17 +302,17 @@ public void Switch( Validate(); } - if (IsFileCitation) + if (FileCitation is { } __value0) { - fileCitation?.Invoke(FileCitation!); + fileCitation?.Invoke(__value0); } - else if (IsURLCitation) + else if (URLCitation is { } __value1) { - uRLCitation?.Invoke(URLCitation!); + uRLCitation?.Invoke(__value1); } - else if (IsFilePath) + else if (FilePath is { } __value2) { - filePath?.Invoke(FilePath!); + filePath?.Invoke(__value2); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.OpenAIResponsesToolChoice.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.OpenAIResponsesToolChoice.g.cs index 13b36ba9..c004e29c 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.OpenAIResponsesToolChoice.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.OpenAIResponsesToolChoice.g.cs @@ -42,8 +42,8 @@ public bool TryPickOpenAiResponsesToolChoice0( /// /// /// - public global::OpenRouter.OpenAiResponsesToolChoice0 PickOpenAiResponsesToolChoice0() => IsOpenAiResponsesToolChoice0 - ? OpenAiResponsesToolChoice0!.Value + public global::OpenRouter.OpenAiResponsesToolChoice0 PickOpenAiResponsesToolChoice0() => OpenAiResponsesToolChoice0 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OpenAiResponsesToolChoice0' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickOpenAiResponsesToolChoice1( /// /// /// - public global::OpenRouter.OpenAiResponsesToolChoice1 PickOpenAiResponsesToolChoice1() => IsOpenAiResponsesToolChoice1 - ? OpenAiResponsesToolChoice1!.Value + public global::OpenRouter.OpenAiResponsesToolChoice1 PickOpenAiResponsesToolChoice1() => OpenAiResponsesToolChoice1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OpenAiResponsesToolChoice1' but the value was {ToString()}."); /// @@ -116,8 +116,8 @@ public bool TryPickOpenAiResponsesToolChoice2( /// /// /// - public global::OpenRouter.OpenAiResponsesToolChoice2 PickOpenAiResponsesToolChoice2() => IsOpenAiResponsesToolChoice2 - ? OpenAiResponsesToolChoice2!.Value + public global::OpenRouter.OpenAiResponsesToolChoice2 PickOpenAiResponsesToolChoice2() => OpenAiResponsesToolChoice2 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OpenAiResponsesToolChoice2' but the value was {ToString()}."); /// @@ -153,8 +153,8 @@ public bool TryPickOpenAiResponsesToolChoice3( /// /// /// - public global::OpenRouter.OpenAiResponsesToolChoice3 PickOpenAiResponsesToolChoice3() => IsOpenAiResponsesToolChoice3 - ? OpenAiResponsesToolChoice3! + public global::OpenRouter.OpenAiResponsesToolChoice3 PickOpenAiResponsesToolChoice3() => OpenAiResponsesToolChoice3 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OpenAiResponsesToolChoice3' but the value was {ToString()}."); /// @@ -190,8 +190,8 @@ public bool TryPickOpenAiResponsesToolChoice4( /// /// /// - public global::OpenRouter.OpenAiResponsesToolChoice4 PickOpenAiResponsesToolChoice4() => IsOpenAiResponsesToolChoice4 - ? OpenAiResponsesToolChoice4! + public global::OpenRouter.OpenAiResponsesToolChoice4 PickOpenAiResponsesToolChoice4() => OpenAiResponsesToolChoice4 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OpenAiResponsesToolChoice4' but the value was {ToString()}."); /// @@ -227,8 +227,8 @@ public bool TryPickToolChoiceAllowed( /// /// /// - public global::OpenRouter.ToolChoiceAllowed PickToolChoiceAllowed() => IsToolChoiceAllowed - ? ToolChoiceAllowed! + public global::OpenRouter.ToolChoiceAllowed PickToolChoiceAllowed() => ToolChoiceAllowed is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ToolChoiceAllowed' but the value was {ToString()}."); /// @@ -264,8 +264,8 @@ public bool TryPickOpenAiResponsesToolChoice6( /// /// /// - public global::OpenRouter.OpenAiResponsesToolChoice6 PickOpenAiResponsesToolChoice6() => IsOpenAiResponsesToolChoice6 - ? OpenAiResponsesToolChoice6! + public global::OpenRouter.OpenAiResponsesToolChoice6 PickOpenAiResponsesToolChoice6() => OpenAiResponsesToolChoice6 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OpenAiResponsesToolChoice6' but the value was {ToString()}."); /// @@ -301,8 +301,8 @@ public bool TryPickOpenAiResponsesToolChoice7( /// /// /// - public global::OpenRouter.OpenAiResponsesToolChoice7 PickOpenAiResponsesToolChoice7() => IsOpenAiResponsesToolChoice7 - ? OpenAiResponsesToolChoice7! + public global::OpenRouter.OpenAiResponsesToolChoice7 PickOpenAiResponsesToolChoice7() => OpenAiResponsesToolChoice7 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OpenAiResponsesToolChoice7' but the value was {ToString()}."); /// /// @@ -567,37 +567,37 @@ public bool Validate() Validate(); } - if (IsOpenAiResponsesToolChoice0 && openAiResponsesToolChoice0 != null) + if (OpenAiResponsesToolChoice0 is { } __value0 && openAiResponsesToolChoice0 != null) { - return openAiResponsesToolChoice0(OpenAiResponsesToolChoice0!); + return openAiResponsesToolChoice0(__value0); } - else if (IsOpenAiResponsesToolChoice1 && openAiResponsesToolChoice1 != null) + else if (OpenAiResponsesToolChoice1 is { } __value1 && openAiResponsesToolChoice1 != null) { - return openAiResponsesToolChoice1(OpenAiResponsesToolChoice1!); + return openAiResponsesToolChoice1(__value1); } - else if (IsOpenAiResponsesToolChoice2 && openAiResponsesToolChoice2 != null) + else if (OpenAiResponsesToolChoice2 is { } __value2 && openAiResponsesToolChoice2 != null) { - return openAiResponsesToolChoice2(OpenAiResponsesToolChoice2!); + return openAiResponsesToolChoice2(__value2); } - else if (IsOpenAiResponsesToolChoice3 && openAiResponsesToolChoice3 != null) + else if (OpenAiResponsesToolChoice3 is { } __value3 && openAiResponsesToolChoice3 != null) { - return openAiResponsesToolChoice3(OpenAiResponsesToolChoice3!); + return openAiResponsesToolChoice3(__value3); } - else if (IsOpenAiResponsesToolChoice4 && openAiResponsesToolChoice4 != null) + else if (OpenAiResponsesToolChoice4 is { } __value4 && openAiResponsesToolChoice4 != null) { - return openAiResponsesToolChoice4(OpenAiResponsesToolChoice4!); + return openAiResponsesToolChoice4(__value4); } - else if (IsToolChoiceAllowed && toolChoiceAllowed != null) + else if (ToolChoiceAllowed is { } __value5 && toolChoiceAllowed != null) { - return toolChoiceAllowed(ToolChoiceAllowed!); + return toolChoiceAllowed(__value5); } - else if (IsOpenAiResponsesToolChoice6 && openAiResponsesToolChoice6 != null) + else if (OpenAiResponsesToolChoice6 is { } __value6 && openAiResponsesToolChoice6 != null) { - return openAiResponsesToolChoice6(OpenAiResponsesToolChoice6!); + return openAiResponsesToolChoice6(__value6); } - else if (IsOpenAiResponsesToolChoice7 && openAiResponsesToolChoice7 != null) + else if (OpenAiResponsesToolChoice7 is { } __value7 && openAiResponsesToolChoice7 != null) { - return openAiResponsesToolChoice7(OpenAiResponsesToolChoice7!); + return openAiResponsesToolChoice7(__value7); } return default(TResult); @@ -629,37 +629,37 @@ public void Match( Validate(); } - if (IsOpenAiResponsesToolChoice0) + if (OpenAiResponsesToolChoice0 is { } __value0) { - openAiResponsesToolChoice0?.Invoke(OpenAiResponsesToolChoice0!); + openAiResponsesToolChoice0?.Invoke(__value0); } - else if (IsOpenAiResponsesToolChoice1) + else if (OpenAiResponsesToolChoice1 is { } __value1) { - openAiResponsesToolChoice1?.Invoke(OpenAiResponsesToolChoice1!); + openAiResponsesToolChoice1?.Invoke(__value1); } - else if (IsOpenAiResponsesToolChoice2) + else if (OpenAiResponsesToolChoice2 is { } __value2) { - openAiResponsesToolChoice2?.Invoke(OpenAiResponsesToolChoice2!); + openAiResponsesToolChoice2?.Invoke(__value2); } - else if (IsOpenAiResponsesToolChoice3) + else if (OpenAiResponsesToolChoice3 is { } __value3) { - openAiResponsesToolChoice3?.Invoke(OpenAiResponsesToolChoice3!); + openAiResponsesToolChoice3?.Invoke(__value3); } - else if (IsOpenAiResponsesToolChoice4) + else if (OpenAiResponsesToolChoice4 is { } __value4) { - openAiResponsesToolChoice4?.Invoke(OpenAiResponsesToolChoice4!); + openAiResponsesToolChoice4?.Invoke(__value4); } - else if (IsToolChoiceAllowed) + else if (ToolChoiceAllowed is { } __value5) { - toolChoiceAllowed?.Invoke(ToolChoiceAllowed!); + toolChoiceAllowed?.Invoke(__value5); } - else if (IsOpenAiResponsesToolChoice6) + else if (OpenAiResponsesToolChoice6 is { } __value6) { - openAiResponsesToolChoice6?.Invoke(OpenAiResponsesToolChoice6!); + openAiResponsesToolChoice6?.Invoke(__value6); } - else if (IsOpenAiResponsesToolChoice7) + else if (OpenAiResponsesToolChoice7 is { } __value7) { - openAiResponsesToolChoice7?.Invoke(OpenAiResponsesToolChoice7!); + openAiResponsesToolChoice7?.Invoke(__value7); } } @@ -682,37 +682,37 @@ public void Switch( Validate(); } - if (IsOpenAiResponsesToolChoice0) + if (OpenAiResponsesToolChoice0 is { } __value0) { - openAiResponsesToolChoice0?.Invoke(OpenAiResponsesToolChoice0!); + openAiResponsesToolChoice0?.Invoke(__value0); } - else if (IsOpenAiResponsesToolChoice1) + else if (OpenAiResponsesToolChoice1 is { } __value1) { - openAiResponsesToolChoice1?.Invoke(OpenAiResponsesToolChoice1!); + openAiResponsesToolChoice1?.Invoke(__value1); } - else if (IsOpenAiResponsesToolChoice2) + else if (OpenAiResponsesToolChoice2 is { } __value2) { - openAiResponsesToolChoice2?.Invoke(OpenAiResponsesToolChoice2!); + openAiResponsesToolChoice2?.Invoke(__value2); } - else if (IsOpenAiResponsesToolChoice3) + else if (OpenAiResponsesToolChoice3 is { } __value3) { - openAiResponsesToolChoice3?.Invoke(OpenAiResponsesToolChoice3!); + openAiResponsesToolChoice3?.Invoke(__value3); } - else if (IsOpenAiResponsesToolChoice4) + else if (OpenAiResponsesToolChoice4 is { } __value4) { - openAiResponsesToolChoice4?.Invoke(OpenAiResponsesToolChoice4!); + openAiResponsesToolChoice4?.Invoke(__value4); } - else if (IsToolChoiceAllowed) + else if (ToolChoiceAllowed is { } __value5) { - toolChoiceAllowed?.Invoke(ToolChoiceAllowed!); + toolChoiceAllowed?.Invoke(__value5); } - else if (IsOpenAiResponsesToolChoice6) + else if (OpenAiResponsesToolChoice6 is { } __value6) { - openAiResponsesToolChoice6?.Invoke(OpenAiResponsesToolChoice6!); + openAiResponsesToolChoice6?.Invoke(__value6); } - else if (IsOpenAiResponsesToolChoice7) + else if (OpenAiResponsesToolChoice7 is { } __value7) { - openAiResponsesToolChoice7?.Invoke(OpenAiResponsesToolChoice7!); + openAiResponsesToolChoice7?.Invoke(__value7); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.OpenAiResponseCustomToolCallOutputOutput.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.OpenAiResponseCustomToolCallOutputOutput.g.cs index c629d7ec..8c7ff6af 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.OpenAiResponseCustomToolCallOutputOutput.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.OpenAiResponseCustomToolCallOutputOutput.g.cs @@ -42,8 +42,8 @@ public bool TryPickOpenAiResponseCustomToolCallOutputOutputVariant1( /// /// /// - public string PickOpenAiResponseCustomToolCallOutputOutputVariant1() => IsOpenAiResponseCustomToolCallOutputOutputVariant1 - ? OpenAiResponseCustomToolCallOutputOutputVariant1! + public string PickOpenAiResponseCustomToolCallOutputOutputVariant1() => OpenAiResponseCustomToolCallOutputOutputVariant1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OpenAiResponseCustomToolCallOutputOutputVariant1' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickOpenAiResponseCustomToolCallOutputOutput1( /// /// /// - public global::System.Collections.Generic.IList PickOpenAiResponseCustomToolCallOutputOutput1() => IsOpenAiResponseCustomToolCallOutputOutput1 - ? OpenAiResponseCustomToolCallOutputOutput1! + public global::System.Collections.Generic.IList PickOpenAiResponseCustomToolCallOutputOutput1() => OpenAiResponseCustomToolCallOutputOutput1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OpenAiResponseCustomToolCallOutputOutput1' but the value was {ToString()}."); /// /// @@ -154,13 +154,13 @@ public bool Validate() Validate(); } - if (IsOpenAiResponseCustomToolCallOutputOutputVariant1 && openAiResponseCustomToolCallOutputOutputVariant1 != null) + if (OpenAiResponseCustomToolCallOutputOutputVariant1 is { } __value0 && openAiResponseCustomToolCallOutputOutputVariant1 != null) { - return openAiResponseCustomToolCallOutputOutputVariant1(OpenAiResponseCustomToolCallOutputOutputVariant1!); + return openAiResponseCustomToolCallOutputOutputVariant1(__value0); } - else if (IsOpenAiResponseCustomToolCallOutputOutput1 && openAiResponseCustomToolCallOutputOutput1 != null) + else if (OpenAiResponseCustomToolCallOutputOutput1 is { } __value1 && openAiResponseCustomToolCallOutputOutput1 != null) { - return openAiResponseCustomToolCallOutputOutput1(OpenAiResponseCustomToolCallOutputOutput1!); + return openAiResponseCustomToolCallOutputOutput1(__value1); } return default(TResult); @@ -180,13 +180,13 @@ public void Match( Validate(); } - if (IsOpenAiResponseCustomToolCallOutputOutputVariant1) + if (OpenAiResponseCustomToolCallOutputOutputVariant1 is { } __value0) { - openAiResponseCustomToolCallOutputOutputVariant1?.Invoke(OpenAiResponseCustomToolCallOutputOutputVariant1!); + openAiResponseCustomToolCallOutputOutputVariant1?.Invoke(__value0); } - else if (IsOpenAiResponseCustomToolCallOutputOutput1) + else if (OpenAiResponseCustomToolCallOutputOutput1 is { } __value1) { - openAiResponseCustomToolCallOutputOutput1?.Invoke(OpenAiResponseCustomToolCallOutputOutput1!); + openAiResponseCustomToolCallOutputOutput1?.Invoke(__value1); } } @@ -203,13 +203,13 @@ public void Switch( Validate(); } - if (IsOpenAiResponseCustomToolCallOutputOutputVariant1) + if (OpenAiResponseCustomToolCallOutputOutputVariant1 is { } __value0) { - openAiResponseCustomToolCallOutputOutputVariant1?.Invoke(OpenAiResponseCustomToolCallOutputOutputVariant1!); + openAiResponseCustomToolCallOutputOutputVariant1?.Invoke(__value0); } - else if (IsOpenAiResponseCustomToolCallOutputOutput1) + else if (OpenAiResponseCustomToolCallOutputOutput1 is { } __value1) { - openAiResponseCustomToolCallOutputOutput1?.Invoke(OpenAiResponseCustomToolCallOutputOutput1!); + openAiResponseCustomToolCallOutputOutput1?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.OpenAiResponseCustomToolCallOutputOutputOneOf1Items.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.OpenAiResponseCustomToolCallOutputOutputOneOf1Items.g.cs index c22e8903..75090b26 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.OpenAiResponseCustomToolCallOutputOutputOneOf1Items.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.OpenAiResponseCustomToolCallOutputOutputOneOf1Items.g.cs @@ -47,8 +47,8 @@ public bool TryPickInputFile( /// /// /// - public global::OpenRouter.OpenAiResponseCustomToolCallOutputOutputOneOf1ItemsVariant1 PickInputFile() => IsInputFile - ? InputFile! + public global::OpenRouter.OpenAiResponseCustomToolCallOutputOutputOneOf1ItemsVariant1 PickInputFile() => InputFile is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'InputFile' but the value was {ToString()}."); /// @@ -84,8 +84,8 @@ public bool TryPickInputImage( /// /// /// - public global::OpenRouter.OpenAiResponseCustomToolCallOutputOutputOneOf1ItemsVariant2 PickInputImage() => IsInputImage - ? InputImage! + public global::OpenRouter.OpenAiResponseCustomToolCallOutputOutputOneOf1ItemsVariant2 PickInputImage() => InputImage is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'InputImage' but the value was {ToString()}."); /// @@ -121,8 +121,8 @@ public bool TryPickInputText( /// /// /// - public global::OpenRouter.OpenAiResponseCustomToolCallOutputOutputOneOf1ItemsVariant3 PickInputText() => IsInputText - ? InputText! + public global::OpenRouter.OpenAiResponseCustomToolCallOutputOutputOneOf1ItemsVariant3 PickInputText() => InputText is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'InputText' but the value was {ToString()}."); /// /// @@ -250,17 +250,17 @@ public bool Validate() Validate(); } - if (IsInputFile && inputFile != null) + if (InputFile is { } __value0 && inputFile != null) { - return inputFile(InputFile!); + return inputFile(__value0); } - else if (IsInputImage && inputImage != null) + else if (InputImage is { } __value1 && inputImage != null) { - return inputImage(InputImage!); + return inputImage(__value1); } - else if (IsInputText && inputText != null) + else if (InputText is { } __value2 && inputText != null) { - return inputText(InputText!); + return inputText(__value2); } return default(TResult); @@ -282,17 +282,17 @@ public void Match( Validate(); } - if (IsInputFile) + if (InputFile is { } __value0) { - inputFile?.Invoke(InputFile!); + inputFile?.Invoke(__value0); } - else if (IsInputImage) + else if (InputImage is { } __value1) { - inputImage?.Invoke(InputImage!); + inputImage?.Invoke(__value1); } - else if (IsInputText) + else if (InputText is { } __value2) { - inputText?.Invoke(InputText!); + inputText?.Invoke(__value2); } } @@ -310,17 +310,17 @@ public void Switch( Validate(); } - if (IsInputFile) + if (InputFile is { } __value0) { - inputFile?.Invoke(InputFile!); + inputFile?.Invoke(__value0); } - else if (IsInputImage) + else if (InputImage is { } __value1) { - inputImage?.Invoke(InputImage!); + inputImage?.Invoke(__value1); } - else if (IsInputText) + else if (InputText is { } __value2) { - inputText?.Invoke(InputText!); + inputText?.Invoke(__value2); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.OpenAiResponseFunctionToolCallOutputOutput.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.OpenAiResponseFunctionToolCallOutputOutput.g.cs index 99ad8af4..ab5150b2 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.OpenAiResponseFunctionToolCallOutputOutput.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.OpenAiResponseFunctionToolCallOutputOutput.g.cs @@ -42,8 +42,8 @@ public bool TryPickOpenAiResponseFunctionToolCallOutputOutputVariant1( /// /// /// - public string PickOpenAiResponseFunctionToolCallOutputOutputVariant1() => IsOpenAiResponseFunctionToolCallOutputOutputVariant1 - ? OpenAiResponseFunctionToolCallOutputOutputVariant1! + public string PickOpenAiResponseFunctionToolCallOutputOutputVariant1() => OpenAiResponseFunctionToolCallOutputOutputVariant1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OpenAiResponseFunctionToolCallOutputOutputVariant1' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickOpenAiResponseFunctionToolCallOutputOutput1( /// /// /// - public global::System.Collections.Generic.IList PickOpenAiResponseFunctionToolCallOutputOutput1() => IsOpenAiResponseFunctionToolCallOutputOutput1 - ? OpenAiResponseFunctionToolCallOutputOutput1! + public global::System.Collections.Generic.IList PickOpenAiResponseFunctionToolCallOutputOutput1() => OpenAiResponseFunctionToolCallOutputOutput1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OpenAiResponseFunctionToolCallOutputOutput1' but the value was {ToString()}."); /// /// @@ -154,13 +154,13 @@ public bool Validate() Validate(); } - if (IsOpenAiResponseFunctionToolCallOutputOutputVariant1 && openAiResponseFunctionToolCallOutputOutputVariant1 != null) + if (OpenAiResponseFunctionToolCallOutputOutputVariant1 is { } __value0 && openAiResponseFunctionToolCallOutputOutputVariant1 != null) { - return openAiResponseFunctionToolCallOutputOutputVariant1(OpenAiResponseFunctionToolCallOutputOutputVariant1!); + return openAiResponseFunctionToolCallOutputOutputVariant1(__value0); } - else if (IsOpenAiResponseFunctionToolCallOutputOutput1 && openAiResponseFunctionToolCallOutputOutput1 != null) + else if (OpenAiResponseFunctionToolCallOutputOutput1 is { } __value1 && openAiResponseFunctionToolCallOutputOutput1 != null) { - return openAiResponseFunctionToolCallOutputOutput1(OpenAiResponseFunctionToolCallOutputOutput1!); + return openAiResponseFunctionToolCallOutputOutput1(__value1); } return default(TResult); @@ -180,13 +180,13 @@ public void Match( Validate(); } - if (IsOpenAiResponseFunctionToolCallOutputOutputVariant1) + if (OpenAiResponseFunctionToolCallOutputOutputVariant1 is { } __value0) { - openAiResponseFunctionToolCallOutputOutputVariant1?.Invoke(OpenAiResponseFunctionToolCallOutputOutputVariant1!); + openAiResponseFunctionToolCallOutputOutputVariant1?.Invoke(__value0); } - else if (IsOpenAiResponseFunctionToolCallOutputOutput1) + else if (OpenAiResponseFunctionToolCallOutputOutput1 is { } __value1) { - openAiResponseFunctionToolCallOutputOutput1?.Invoke(OpenAiResponseFunctionToolCallOutputOutput1!); + openAiResponseFunctionToolCallOutputOutput1?.Invoke(__value1); } } @@ -203,13 +203,13 @@ public void Switch( Validate(); } - if (IsOpenAiResponseFunctionToolCallOutputOutputVariant1) + if (OpenAiResponseFunctionToolCallOutputOutputVariant1 is { } __value0) { - openAiResponseFunctionToolCallOutputOutputVariant1?.Invoke(OpenAiResponseFunctionToolCallOutputOutputVariant1!); + openAiResponseFunctionToolCallOutputOutputVariant1?.Invoke(__value0); } - else if (IsOpenAiResponseFunctionToolCallOutputOutput1) + else if (OpenAiResponseFunctionToolCallOutputOutput1 is { } __value1) { - openAiResponseFunctionToolCallOutputOutput1?.Invoke(OpenAiResponseFunctionToolCallOutputOutput1!); + openAiResponseFunctionToolCallOutputOutput1?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.OpenAiResponseFunctionToolCallOutputOutputOneOf1Items.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.OpenAiResponseFunctionToolCallOutputOutputOneOf1Items.g.cs index 864d59bc..72a6da8e 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.OpenAiResponseFunctionToolCallOutputOutputOneOf1Items.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.OpenAiResponseFunctionToolCallOutputOutputOneOf1Items.g.cs @@ -47,8 +47,8 @@ public bool TryPickInputFile( /// /// /// - public global::OpenRouter.OpenAiResponseFunctionToolCallOutputOutputOneOf1ItemsVariant1 PickInputFile() => IsInputFile - ? InputFile! + public global::OpenRouter.OpenAiResponseFunctionToolCallOutputOutputOneOf1ItemsVariant1 PickInputFile() => InputFile is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'InputFile' but the value was {ToString()}."); /// @@ -84,8 +84,8 @@ public bool TryPickInputImage( /// /// /// - public global::OpenRouter.OpenAiResponseFunctionToolCallOutputOutputOneOf1ItemsVariant2 PickInputImage() => IsInputImage - ? InputImage! + public global::OpenRouter.OpenAiResponseFunctionToolCallOutputOutputOneOf1ItemsVariant2 PickInputImage() => InputImage is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'InputImage' but the value was {ToString()}."); /// @@ -121,8 +121,8 @@ public bool TryPickInputText( /// /// /// - public global::OpenRouter.OpenAiResponseFunctionToolCallOutputOutputOneOf1ItemsVariant3 PickInputText() => IsInputText - ? InputText! + public global::OpenRouter.OpenAiResponseFunctionToolCallOutputOutputOneOf1ItemsVariant3 PickInputText() => InputText is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'InputText' but the value was {ToString()}."); /// /// @@ -250,17 +250,17 @@ public bool Validate() Validate(); } - if (IsInputFile && inputFile != null) + if (InputFile is { } __value0 && inputFile != null) { - return inputFile(InputFile!); + return inputFile(__value0); } - else if (IsInputImage && inputImage != null) + else if (InputImage is { } __value1 && inputImage != null) { - return inputImage(InputImage!); + return inputImage(__value1); } - else if (IsInputText && inputText != null) + else if (InputText is { } __value2 && inputText != null) { - return inputText(InputText!); + return inputText(__value2); } return default(TResult); @@ -282,17 +282,17 @@ public void Match( Validate(); } - if (IsInputFile) + if (InputFile is { } __value0) { - inputFile?.Invoke(InputFile!); + inputFile?.Invoke(__value0); } - else if (IsInputImage) + else if (InputImage is { } __value1) { - inputImage?.Invoke(InputImage!); + inputImage?.Invoke(__value1); } - else if (IsInputText) + else if (InputText is { } __value2) { - inputText?.Invoke(InputText!); + inputText?.Invoke(__value2); } } @@ -310,17 +310,17 @@ public void Switch( Validate(); } - if (IsInputFile) + if (InputFile is { } __value0) { - inputFile?.Invoke(InputFile!); + inputFile?.Invoke(__value0); } - else if (IsInputImage) + else if (InputImage is { } __value1) { - inputImage?.Invoke(InputImage!); + inputImage?.Invoke(__value1); } - else if (IsInputText) + else if (InputText is { } __value2) { - inputText?.Invoke(InputText!); + inputText?.Invoke(__value2); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.OpenAiResponseInputMessageItemContentItems.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.OpenAiResponseInputMessageItemContentItems.g.cs index db324f7a..68e85c56 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.OpenAiResponseInputMessageItemContentItems.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.OpenAiResponseInputMessageItemContentItems.g.cs @@ -47,8 +47,8 @@ public bool TryPickInputAudio( /// /// /// - public global::OpenRouter.OpenAiResponseInputMessageItemContentItemsVariant1 PickInputAudio() => IsInputAudio - ? InputAudio! + public global::OpenRouter.OpenAiResponseInputMessageItemContentItemsVariant1 PickInputAudio() => InputAudio is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'InputAudio' but the value was {ToString()}."); /// @@ -84,8 +84,8 @@ public bool TryPickInputFile( /// /// /// - public global::OpenRouter.OpenAiResponseInputMessageItemContentItemsVariant2 PickInputFile() => IsInputFile - ? InputFile! + public global::OpenRouter.OpenAiResponseInputMessageItemContentItemsVariant2 PickInputFile() => InputFile is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'InputFile' but the value was {ToString()}."); /// @@ -121,8 +121,8 @@ public bool TryPickInputImage( /// /// /// - public global::OpenRouter.OpenAiResponseInputMessageItemContentItemsVariant3 PickInputImage() => IsInputImage - ? InputImage! + public global::OpenRouter.OpenAiResponseInputMessageItemContentItemsVariant3 PickInputImage() => InputImage is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'InputImage' but the value was {ToString()}."); /// @@ -158,8 +158,8 @@ public bool TryPickInputText( /// /// /// - public global::OpenRouter.OpenAiResponseInputMessageItemContentItemsVariant4 PickInputText() => IsInputText - ? InputText! + public global::OpenRouter.OpenAiResponseInputMessageItemContentItemsVariant4 PickInputText() => InputText is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'InputText' but the value was {ToString()}."); /// /// @@ -315,21 +315,21 @@ public bool Validate() Validate(); } - if (IsInputAudio && inputAudio != null) + if (InputAudio is { } __value0 && inputAudio != null) { - return inputAudio(InputAudio!); + return inputAudio(__value0); } - else if (IsInputFile && inputFile != null) + else if (InputFile is { } __value1 && inputFile != null) { - return inputFile(InputFile!); + return inputFile(__value1); } - else if (IsInputImage && inputImage != null) + else if (InputImage is { } __value2 && inputImage != null) { - return inputImage(InputImage!); + return inputImage(__value2); } - else if (IsInputText && inputText != null) + else if (InputText is { } __value3 && inputText != null) { - return inputText(InputText!); + return inputText(__value3); } return default(TResult); @@ -353,21 +353,21 @@ public void Match( Validate(); } - if (IsInputAudio) + if (InputAudio is { } __value0) { - inputAudio?.Invoke(InputAudio!); + inputAudio?.Invoke(__value0); } - else if (IsInputFile) + else if (InputFile is { } __value1) { - inputFile?.Invoke(InputFile!); + inputFile?.Invoke(__value1); } - else if (IsInputImage) + else if (InputImage is { } __value2) { - inputImage?.Invoke(InputImage!); + inputImage?.Invoke(__value2); } - else if (IsInputText) + else if (InputText is { } __value3) { - inputText?.Invoke(InputText!); + inputText?.Invoke(__value3); } } @@ -386,21 +386,21 @@ public void Switch( Validate(); } - if (IsInputAudio) + if (InputAudio is { } __value0) { - inputAudio?.Invoke(InputAudio!); + inputAudio?.Invoke(__value0); } - else if (IsInputFile) + else if (InputFile is { } __value1) { - inputFile?.Invoke(InputFile!); + inputFile?.Invoke(__value1); } - else if (IsInputImage) + else if (InputImage is { } __value2) { - inputImage?.Invoke(InputImage!); + inputImage?.Invoke(__value2); } - else if (IsInputText) + else if (InputText is { } __value3) { - inputText?.Invoke(InputText!); + inputText?.Invoke(__value3); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.OpenAiResponseInputMessageItemRole.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.OpenAiResponseInputMessageItemRole.g.cs index 52b5ec40..2c885a66 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.OpenAiResponseInputMessageItemRole.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.OpenAiResponseInputMessageItemRole.g.cs @@ -42,8 +42,8 @@ public bool TryPickOpenAiResponseInputMessageItemRole0( /// /// /// - public global::OpenRouter.OpenAiResponseInputMessageItemRole0 PickOpenAiResponseInputMessageItemRole0() => IsOpenAiResponseInputMessageItemRole0 - ? OpenAiResponseInputMessageItemRole0!.Value + public global::OpenRouter.OpenAiResponseInputMessageItemRole0 PickOpenAiResponseInputMessageItemRole0() => OpenAiResponseInputMessageItemRole0 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OpenAiResponseInputMessageItemRole0' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickOpenAiResponseInputMessageItemRole1( /// /// /// - public global::OpenRouter.OpenAiResponseInputMessageItemRole1 PickOpenAiResponseInputMessageItemRole1() => IsOpenAiResponseInputMessageItemRole1 - ? OpenAiResponseInputMessageItemRole1!.Value + public global::OpenRouter.OpenAiResponseInputMessageItemRole1 PickOpenAiResponseInputMessageItemRole1() => OpenAiResponseInputMessageItemRole1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OpenAiResponseInputMessageItemRole1' but the value was {ToString()}."); /// @@ -116,8 +116,8 @@ public bool TryPickOpenAiResponseInputMessageItemRole2( /// /// /// - public global::OpenRouter.OpenAiResponseInputMessageItemRole2 PickOpenAiResponseInputMessageItemRole2() => IsOpenAiResponseInputMessageItemRole2 - ? OpenAiResponseInputMessageItemRole2!.Value + public global::OpenRouter.OpenAiResponseInputMessageItemRole2 PickOpenAiResponseInputMessageItemRole2() => OpenAiResponseInputMessageItemRole2 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OpenAiResponseInputMessageItemRole2' but the value was {ToString()}."); /// /// @@ -242,17 +242,17 @@ public bool Validate() Validate(); } - if (IsOpenAiResponseInputMessageItemRole0 && openAiResponseInputMessageItemRole0 != null) + if (OpenAiResponseInputMessageItemRole0 is { } __value0 && openAiResponseInputMessageItemRole0 != null) { - return openAiResponseInputMessageItemRole0(OpenAiResponseInputMessageItemRole0!); + return openAiResponseInputMessageItemRole0(__value0); } - else if (IsOpenAiResponseInputMessageItemRole1 && openAiResponseInputMessageItemRole1 != null) + else if (OpenAiResponseInputMessageItemRole1 is { } __value1 && openAiResponseInputMessageItemRole1 != null) { - return openAiResponseInputMessageItemRole1(OpenAiResponseInputMessageItemRole1!); + return openAiResponseInputMessageItemRole1(__value1); } - else if (IsOpenAiResponseInputMessageItemRole2 && openAiResponseInputMessageItemRole2 != null) + else if (OpenAiResponseInputMessageItemRole2 is { } __value2 && openAiResponseInputMessageItemRole2 != null) { - return openAiResponseInputMessageItemRole2(OpenAiResponseInputMessageItemRole2!); + return openAiResponseInputMessageItemRole2(__value2); } return default(TResult); @@ -274,17 +274,17 @@ public void Match( Validate(); } - if (IsOpenAiResponseInputMessageItemRole0) + if (OpenAiResponseInputMessageItemRole0 is { } __value0) { - openAiResponseInputMessageItemRole0?.Invoke(OpenAiResponseInputMessageItemRole0!); + openAiResponseInputMessageItemRole0?.Invoke(__value0); } - else if (IsOpenAiResponseInputMessageItemRole1) + else if (OpenAiResponseInputMessageItemRole1 is { } __value1) { - openAiResponseInputMessageItemRole1?.Invoke(OpenAiResponseInputMessageItemRole1!); + openAiResponseInputMessageItemRole1?.Invoke(__value1); } - else if (IsOpenAiResponseInputMessageItemRole2) + else if (OpenAiResponseInputMessageItemRole2 is { } __value2) { - openAiResponseInputMessageItemRole2?.Invoke(OpenAiResponseInputMessageItemRole2!); + openAiResponseInputMessageItemRole2?.Invoke(__value2); } } @@ -302,17 +302,17 @@ public void Switch( Validate(); } - if (IsOpenAiResponseInputMessageItemRole0) + if (OpenAiResponseInputMessageItemRole0 is { } __value0) { - openAiResponseInputMessageItemRole0?.Invoke(OpenAiResponseInputMessageItemRole0!); + openAiResponseInputMessageItemRole0?.Invoke(__value0); } - else if (IsOpenAiResponseInputMessageItemRole1) + else if (OpenAiResponseInputMessageItemRole1 is { } __value1) { - openAiResponseInputMessageItemRole1?.Invoke(OpenAiResponseInputMessageItemRole1!); + openAiResponseInputMessageItemRole1?.Invoke(__value1); } - else if (IsOpenAiResponseInputMessageItemRole2) + else if (OpenAiResponseInputMessageItemRole2 is { } __value2) { - openAiResponseInputMessageItemRole2?.Invoke(OpenAiResponseInputMessageItemRole2!); + openAiResponseInputMessageItemRole2?.Invoke(__value2); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.OpenAiResponsesToolChoiceOneOf4Type.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.OpenAiResponsesToolChoiceOneOf4Type.g.cs index 9fbeed2f..6ffb78a0 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.OpenAiResponsesToolChoiceOneOf4Type.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.OpenAiResponsesToolChoiceOneOf4Type.g.cs @@ -42,8 +42,8 @@ public bool TryPickOpenAiResponsesToolChoiceOneOf4Type0( /// /// /// - public global::OpenRouter.OpenAiResponsesToolChoiceOneOf4Type0 PickOpenAiResponsesToolChoiceOneOf4Type0() => IsOpenAiResponsesToolChoiceOneOf4Type0 - ? OpenAiResponsesToolChoiceOneOf4Type0!.Value + public global::OpenRouter.OpenAiResponsesToolChoiceOneOf4Type0 PickOpenAiResponsesToolChoiceOneOf4Type0() => OpenAiResponsesToolChoiceOneOf4Type0 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OpenAiResponsesToolChoiceOneOf4Type0' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickOpenAiResponsesToolChoiceOneOf4Type1( /// /// /// - public global::OpenRouter.OpenAiResponsesToolChoiceOneOf4Type1 PickOpenAiResponsesToolChoiceOneOf4Type1() => IsOpenAiResponsesToolChoiceOneOf4Type1 - ? OpenAiResponsesToolChoiceOneOf4Type1!.Value + public global::OpenRouter.OpenAiResponsesToolChoiceOneOf4Type1 PickOpenAiResponsesToolChoiceOneOf4Type1() => OpenAiResponsesToolChoiceOneOf4Type1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OpenAiResponsesToolChoiceOneOf4Type1' but the value was {ToString()}."); /// /// @@ -177,13 +177,13 @@ public bool Validate() Validate(); } - if (IsOpenAiResponsesToolChoiceOneOf4Type0 && openAiResponsesToolChoiceOneOf4Type0 != null) + if (OpenAiResponsesToolChoiceOneOf4Type0 is { } __value0 && openAiResponsesToolChoiceOneOf4Type0 != null) { - return openAiResponsesToolChoiceOneOf4Type0(OpenAiResponsesToolChoiceOneOf4Type0!); + return openAiResponsesToolChoiceOneOf4Type0(__value0); } - else if (IsOpenAiResponsesToolChoiceOneOf4Type1 && openAiResponsesToolChoiceOneOf4Type1 != null) + else if (OpenAiResponsesToolChoiceOneOf4Type1 is { } __value1 && openAiResponsesToolChoiceOneOf4Type1 != null) { - return openAiResponsesToolChoiceOneOf4Type1(OpenAiResponsesToolChoiceOneOf4Type1!); + return openAiResponsesToolChoiceOneOf4Type1(__value1); } return default(TResult); @@ -203,13 +203,13 @@ public void Match( Validate(); } - if (IsOpenAiResponsesToolChoiceOneOf4Type0) + if (OpenAiResponsesToolChoiceOneOf4Type0 is { } __value0) { - openAiResponsesToolChoiceOneOf4Type0?.Invoke(OpenAiResponsesToolChoiceOneOf4Type0!); + openAiResponsesToolChoiceOneOf4Type0?.Invoke(__value0); } - else if (IsOpenAiResponsesToolChoiceOneOf4Type1) + else if (OpenAiResponsesToolChoiceOneOf4Type1 is { } __value1) { - openAiResponsesToolChoiceOneOf4Type1?.Invoke(OpenAiResponsesToolChoiceOneOf4Type1!); + openAiResponsesToolChoiceOneOf4Type1?.Invoke(__value1); } } @@ -226,13 +226,13 @@ public void Switch( Validate(); } - if (IsOpenAiResponsesToolChoiceOneOf4Type0) + if (OpenAiResponsesToolChoiceOneOf4Type0 is { } __value0) { - openAiResponsesToolChoiceOneOf4Type0?.Invoke(OpenAiResponsesToolChoiceOneOf4Type0!); + openAiResponsesToolChoiceOneOf4Type0?.Invoke(__value0); } - else if (IsOpenAiResponsesToolChoiceOneOf4Type1) + else if (OpenAiResponsesToolChoiceOneOf4Type1 is { } __value1) { - openAiResponsesToolChoiceOneOf4Type1?.Invoke(OpenAiResponsesToolChoiceOneOf4Type1!); + openAiResponsesToolChoiceOneOf4Type1?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.OpenResponsesResultToolsItems.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.OpenResponsesResultToolsItems.g.cs index 6f1c3aed..56aac8e8 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.OpenResponsesResultToolsItems.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.OpenResponsesResultToolsItems.g.cs @@ -42,8 +42,8 @@ public bool TryPickOpenResponsesResultToolsItems0( /// /// /// - public global::OpenRouter.OpenResponsesResultToolsItems0 PickOpenResponsesResultToolsItems0() => IsOpenResponsesResultToolsItems0 - ? OpenResponsesResultToolsItems0! + public global::OpenRouter.OpenResponsesResultToolsItems0 PickOpenResponsesResultToolsItems0() => OpenResponsesResultToolsItems0 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OpenResponsesResultToolsItems0' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickPreviewWebSearchServerTool( /// /// /// - public global::OpenRouter.PreviewWebSearchServerTool PickPreviewWebSearchServerTool() => IsPreviewWebSearchServerTool - ? PreviewWebSearchServerTool! + public global::OpenRouter.PreviewWebSearchServerTool PickPreviewWebSearchServerTool() => PreviewWebSearchServerTool is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'PreviewWebSearchServerTool' but the value was {ToString()}."); /// @@ -116,8 +116,8 @@ public bool TryPickPreview20250311WebSearchServerTool( /// /// /// - public global::OpenRouter.Preview20250311WebSearchServerTool PickPreview20250311WebSearchServerTool() => IsPreview20250311WebSearchServerTool - ? Preview20250311WebSearchServerTool! + public global::OpenRouter.Preview20250311WebSearchServerTool PickPreview20250311WebSearchServerTool() => Preview20250311WebSearchServerTool is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Preview20250311WebSearchServerTool' but the value was {ToString()}."); /// @@ -153,8 +153,8 @@ public bool TryPickLegacyWebSearchServerTool( /// /// /// - public global::OpenRouter.LegacyWebSearchServerTool PickLegacyWebSearchServerTool() => IsLegacyWebSearchServerTool - ? LegacyWebSearchServerTool! + public global::OpenRouter.LegacyWebSearchServerTool PickLegacyWebSearchServerTool() => LegacyWebSearchServerTool is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'LegacyWebSearchServerTool' but the value was {ToString()}."); /// @@ -190,8 +190,8 @@ public bool TryPickWebSearchServerTool( /// /// /// - public global::OpenRouter.WebSearchServerTool PickWebSearchServerTool() => IsWebSearchServerTool - ? WebSearchServerTool! + public global::OpenRouter.WebSearchServerTool PickWebSearchServerTool() => WebSearchServerTool is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'WebSearchServerTool' but the value was {ToString()}."); /// @@ -227,8 +227,8 @@ public bool TryPickFileSearchServerTool( /// /// /// - public global::OpenRouter.FileSearchServerTool PickFileSearchServerTool() => IsFileSearchServerTool - ? FileSearchServerTool! + public global::OpenRouter.FileSearchServerTool PickFileSearchServerTool() => FileSearchServerTool is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'FileSearchServerTool' but the value was {ToString()}."); /// @@ -264,8 +264,8 @@ public bool TryPickComputerUseServerTool( /// /// /// - public global::OpenRouter.ComputerUseServerTool PickComputerUseServerTool() => IsComputerUseServerTool - ? ComputerUseServerTool! + public global::OpenRouter.ComputerUseServerTool PickComputerUseServerTool() => ComputerUseServerTool is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ComputerUseServerTool' but the value was {ToString()}."); /// @@ -301,8 +301,8 @@ public bool TryPickCodeInterpreterServerTool( /// /// /// - public global::OpenRouter.CodeInterpreterServerTool PickCodeInterpreterServerTool() => IsCodeInterpreterServerTool - ? CodeInterpreterServerTool! + public global::OpenRouter.CodeInterpreterServerTool PickCodeInterpreterServerTool() => CodeInterpreterServerTool is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'CodeInterpreterServerTool' but the value was {ToString()}."); /// @@ -338,8 +338,8 @@ public bool TryPickMcpServerTool( /// /// /// - public global::OpenRouter.McpServerTool PickMcpServerTool() => IsMcpServerTool - ? McpServerTool! + public global::OpenRouter.McpServerTool PickMcpServerTool() => McpServerTool is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'McpServerTool' but the value was {ToString()}."); /// @@ -375,8 +375,8 @@ public bool TryPickImageGenerationServerTool( /// /// /// - public global::OpenRouter.ImageGenerationServerTool PickImageGenerationServerTool() => IsImageGenerationServerTool - ? ImageGenerationServerTool! + public global::OpenRouter.ImageGenerationServerTool PickImageGenerationServerTool() => ImageGenerationServerTool is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ImageGenerationServerTool' but the value was {ToString()}."); /// @@ -412,8 +412,8 @@ public bool TryPickCodexLocalShellTool( /// /// /// - public global::OpenRouter.CodexLocalShellTool PickCodexLocalShellTool() => IsCodexLocalShellTool - ? CodexLocalShellTool! + public global::OpenRouter.CodexLocalShellTool PickCodexLocalShellTool() => CodexLocalShellTool is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'CodexLocalShellTool' but the value was {ToString()}."); /// @@ -449,8 +449,8 @@ public bool TryPickShellServerTool( /// /// /// - public global::OpenRouter.ShellServerTool PickShellServerTool() => IsShellServerTool - ? ShellServerTool! + public global::OpenRouter.ShellServerTool PickShellServerTool() => ShellServerTool is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ShellServerTool' but the value was {ToString()}."); /// @@ -486,8 +486,8 @@ public bool TryPickApplyPatchServerTool( /// /// /// - public global::OpenRouter.ApplyPatchServerTool PickApplyPatchServerTool() => IsApplyPatchServerTool - ? ApplyPatchServerTool! + public global::OpenRouter.ApplyPatchServerTool PickApplyPatchServerTool() => ApplyPatchServerTool is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ApplyPatchServerTool' but the value was {ToString()}."); /// @@ -523,8 +523,8 @@ public bool TryPickCustomTool( /// /// /// - public global::OpenRouter.CustomTool PickCustomTool() => IsCustomTool - ? CustomTool! + public global::OpenRouter.CustomTool PickCustomTool() => CustomTool is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'CustomTool' but the value was {ToString()}."); /// @@ -560,8 +560,8 @@ public bool TryPickNamespaceTool( /// /// /// - public global::OpenRouter.NamespaceTool PickNamespaceTool() => IsNamespaceTool - ? NamespaceTool! + public global::OpenRouter.NamespaceTool PickNamespaceTool() => NamespaceTool is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'NamespaceTool' but the value was {ToString()}."); /// /// @@ -1022,65 +1022,65 @@ public bool Validate() Validate(); } - if (IsOpenResponsesResultToolsItems0 && openResponsesResultToolsItems0 != null) + if (OpenResponsesResultToolsItems0 is { } __value0 && openResponsesResultToolsItems0 != null) { - return openResponsesResultToolsItems0(OpenResponsesResultToolsItems0!); + return openResponsesResultToolsItems0(__value0); } - else if (IsPreviewWebSearchServerTool && previewWebSearchServerTool != null) + else if (PreviewWebSearchServerTool is { } __value1 && previewWebSearchServerTool != null) { - return previewWebSearchServerTool(PreviewWebSearchServerTool!); + return previewWebSearchServerTool(__value1); } - else if (IsPreview20250311WebSearchServerTool && preview20250311WebSearchServerTool != null) + else if (Preview20250311WebSearchServerTool is { } __value2 && preview20250311WebSearchServerTool != null) { - return preview20250311WebSearchServerTool(Preview20250311WebSearchServerTool!); + return preview20250311WebSearchServerTool(__value2); } - else if (IsLegacyWebSearchServerTool && legacyWebSearchServerTool != null) + else if (LegacyWebSearchServerTool is { } __value3 && legacyWebSearchServerTool != null) { - return legacyWebSearchServerTool(LegacyWebSearchServerTool!); + return legacyWebSearchServerTool(__value3); } - else if (IsWebSearchServerTool && webSearchServerTool != null) + else if (WebSearchServerTool is { } __value4 && webSearchServerTool != null) { - return webSearchServerTool(WebSearchServerTool!); + return webSearchServerTool(__value4); } - else if (IsFileSearchServerTool && fileSearchServerTool != null) + else if (FileSearchServerTool is { } __value5 && fileSearchServerTool != null) { - return fileSearchServerTool(FileSearchServerTool!); + return fileSearchServerTool(__value5); } - else if (IsComputerUseServerTool && computerUseServerTool != null) + else if (ComputerUseServerTool is { } __value6 && computerUseServerTool != null) { - return computerUseServerTool(ComputerUseServerTool!); + return computerUseServerTool(__value6); } - else if (IsCodeInterpreterServerTool && codeInterpreterServerTool != null) + else if (CodeInterpreterServerTool is { } __value7 && codeInterpreterServerTool != null) { - return codeInterpreterServerTool(CodeInterpreterServerTool!); + return codeInterpreterServerTool(__value7); } - else if (IsMcpServerTool && mcpServerTool != null) + else if (McpServerTool is { } __value8 && mcpServerTool != null) { - return mcpServerTool(McpServerTool!); + return mcpServerTool(__value8); } - else if (IsImageGenerationServerTool && imageGenerationServerTool != null) + else if (ImageGenerationServerTool is { } __value9 && imageGenerationServerTool != null) { - return imageGenerationServerTool(ImageGenerationServerTool!); + return imageGenerationServerTool(__value9); } - else if (IsCodexLocalShellTool && codexLocalShellTool != null) + else if (CodexLocalShellTool is { } __value10 && codexLocalShellTool != null) { - return codexLocalShellTool(CodexLocalShellTool!); + return codexLocalShellTool(__value10); } - else if (IsShellServerTool && shellServerTool != null) + else if (ShellServerTool is { } __value11 && shellServerTool != null) { - return shellServerTool(ShellServerTool!); + return shellServerTool(__value11); } - else if (IsApplyPatchServerTool && applyPatchServerTool != null) + else if (ApplyPatchServerTool is { } __value12 && applyPatchServerTool != null) { - return applyPatchServerTool(ApplyPatchServerTool!); + return applyPatchServerTool(__value12); } - else if (IsCustomTool && customTool != null) + else if (CustomTool is { } __value13 && customTool != null) { - return customTool(CustomTool!); + return customTool(__value13); } - else if (IsNamespaceTool && namespaceTool != null) + else if (NamespaceTool is { } __value14 && namespaceTool != null) { - return namespaceTool(NamespaceTool!); + return namespaceTool(__value14); } return default(TResult); @@ -1126,65 +1126,65 @@ public void Match( Validate(); } - if (IsOpenResponsesResultToolsItems0) + if (OpenResponsesResultToolsItems0 is { } __value0) { - openResponsesResultToolsItems0?.Invoke(OpenResponsesResultToolsItems0!); + openResponsesResultToolsItems0?.Invoke(__value0); } - else if (IsPreviewWebSearchServerTool) + else if (PreviewWebSearchServerTool is { } __value1) { - previewWebSearchServerTool?.Invoke(PreviewWebSearchServerTool!); + previewWebSearchServerTool?.Invoke(__value1); } - else if (IsPreview20250311WebSearchServerTool) + else if (Preview20250311WebSearchServerTool is { } __value2) { - preview20250311WebSearchServerTool?.Invoke(Preview20250311WebSearchServerTool!); + preview20250311WebSearchServerTool?.Invoke(__value2); } - else if (IsLegacyWebSearchServerTool) + else if (LegacyWebSearchServerTool is { } __value3) { - legacyWebSearchServerTool?.Invoke(LegacyWebSearchServerTool!); + legacyWebSearchServerTool?.Invoke(__value3); } - else if (IsWebSearchServerTool) + else if (WebSearchServerTool is { } __value4) { - webSearchServerTool?.Invoke(WebSearchServerTool!); + webSearchServerTool?.Invoke(__value4); } - else if (IsFileSearchServerTool) + else if (FileSearchServerTool is { } __value5) { - fileSearchServerTool?.Invoke(FileSearchServerTool!); + fileSearchServerTool?.Invoke(__value5); } - else if (IsComputerUseServerTool) + else if (ComputerUseServerTool is { } __value6) { - computerUseServerTool?.Invoke(ComputerUseServerTool!); + computerUseServerTool?.Invoke(__value6); } - else if (IsCodeInterpreterServerTool) + else if (CodeInterpreterServerTool is { } __value7) { - codeInterpreterServerTool?.Invoke(CodeInterpreterServerTool!); + codeInterpreterServerTool?.Invoke(__value7); } - else if (IsMcpServerTool) + else if (McpServerTool is { } __value8) { - mcpServerTool?.Invoke(McpServerTool!); + mcpServerTool?.Invoke(__value8); } - else if (IsImageGenerationServerTool) + else if (ImageGenerationServerTool is { } __value9) { - imageGenerationServerTool?.Invoke(ImageGenerationServerTool!); + imageGenerationServerTool?.Invoke(__value9); } - else if (IsCodexLocalShellTool) + else if (CodexLocalShellTool is { } __value10) { - codexLocalShellTool?.Invoke(CodexLocalShellTool!); + codexLocalShellTool?.Invoke(__value10); } - else if (IsShellServerTool) + else if (ShellServerTool is { } __value11) { - shellServerTool?.Invoke(ShellServerTool!); + shellServerTool?.Invoke(__value11); } - else if (IsApplyPatchServerTool) + else if (ApplyPatchServerTool is { } __value12) { - applyPatchServerTool?.Invoke(ApplyPatchServerTool!); + applyPatchServerTool?.Invoke(__value12); } - else if (IsCustomTool) + else if (CustomTool is { } __value13) { - customTool?.Invoke(CustomTool!); + customTool?.Invoke(__value13); } - else if (IsNamespaceTool) + else if (NamespaceTool is { } __value14) { - namespaceTool?.Invoke(NamespaceTool!); + namespaceTool?.Invoke(__value14); } } @@ -1214,65 +1214,65 @@ public void Switch( Validate(); } - if (IsOpenResponsesResultToolsItems0) + if (OpenResponsesResultToolsItems0 is { } __value0) { - openResponsesResultToolsItems0?.Invoke(OpenResponsesResultToolsItems0!); + openResponsesResultToolsItems0?.Invoke(__value0); } - else if (IsPreviewWebSearchServerTool) + else if (PreviewWebSearchServerTool is { } __value1) { - previewWebSearchServerTool?.Invoke(PreviewWebSearchServerTool!); + previewWebSearchServerTool?.Invoke(__value1); } - else if (IsPreview20250311WebSearchServerTool) + else if (Preview20250311WebSearchServerTool is { } __value2) { - preview20250311WebSearchServerTool?.Invoke(Preview20250311WebSearchServerTool!); + preview20250311WebSearchServerTool?.Invoke(__value2); } - else if (IsLegacyWebSearchServerTool) + else if (LegacyWebSearchServerTool is { } __value3) { - legacyWebSearchServerTool?.Invoke(LegacyWebSearchServerTool!); + legacyWebSearchServerTool?.Invoke(__value3); } - else if (IsWebSearchServerTool) + else if (WebSearchServerTool is { } __value4) { - webSearchServerTool?.Invoke(WebSearchServerTool!); + webSearchServerTool?.Invoke(__value4); } - else if (IsFileSearchServerTool) + else if (FileSearchServerTool is { } __value5) { - fileSearchServerTool?.Invoke(FileSearchServerTool!); + fileSearchServerTool?.Invoke(__value5); } - else if (IsComputerUseServerTool) + else if (ComputerUseServerTool is { } __value6) { - computerUseServerTool?.Invoke(ComputerUseServerTool!); + computerUseServerTool?.Invoke(__value6); } - else if (IsCodeInterpreterServerTool) + else if (CodeInterpreterServerTool is { } __value7) { - codeInterpreterServerTool?.Invoke(CodeInterpreterServerTool!); + codeInterpreterServerTool?.Invoke(__value7); } - else if (IsMcpServerTool) + else if (McpServerTool is { } __value8) { - mcpServerTool?.Invoke(McpServerTool!); + mcpServerTool?.Invoke(__value8); } - else if (IsImageGenerationServerTool) + else if (ImageGenerationServerTool is { } __value9) { - imageGenerationServerTool?.Invoke(ImageGenerationServerTool!); + imageGenerationServerTool?.Invoke(__value9); } - else if (IsCodexLocalShellTool) + else if (CodexLocalShellTool is { } __value10) { - codexLocalShellTool?.Invoke(CodexLocalShellTool!); + codexLocalShellTool?.Invoke(__value10); } - else if (IsShellServerTool) + else if (ShellServerTool is { } __value11) { - shellServerTool?.Invoke(ShellServerTool!); + shellServerTool?.Invoke(__value11); } - else if (IsApplyPatchServerTool) + else if (ApplyPatchServerTool is { } __value12) { - applyPatchServerTool?.Invoke(ApplyPatchServerTool!); + applyPatchServerTool?.Invoke(__value12); } - else if (IsCustomTool) + else if (CustomTool is { } __value13) { - customTool?.Invoke(CustomTool!); + customTool?.Invoke(__value13); } - else if (IsNamespaceTool) + else if (NamespaceTool is { } __value14) { - namespaceTool?.Invoke(NamespaceTool!); + namespaceTool?.Invoke(__value14); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.OrAnthropicContentBlockDiscriminatorMappingWebSearchToolResultContent.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.OrAnthropicContentBlockDiscriminatorMappingWebSearchToolResultContent.g.cs index e0ab5818..c0a1d18b 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.OrAnthropicContentBlockDiscriminatorMappingWebSearchToolResultContent.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.OrAnthropicContentBlockDiscriminatorMappingWebSearchToolResultContent.g.cs @@ -42,8 +42,8 @@ public bool TryPickOrAnthropicContentBlockDiscriminatorMappingWebSearchToolResul /// /// /// - public global::System.Collections.Generic.IList PickOrAnthropicContentBlockDiscriminatorMappingWebSearchToolResultContent0() => IsOrAnthropicContentBlockDiscriminatorMappingWebSearchToolResultContent0 - ? OrAnthropicContentBlockDiscriminatorMappingWebSearchToolResultContent0! + public global::System.Collections.Generic.IList PickOrAnthropicContentBlockDiscriminatorMappingWebSearchToolResultContent0() => OrAnthropicContentBlockDiscriminatorMappingWebSearchToolResultContent0 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OrAnthropicContentBlockDiscriminatorMappingWebSearchToolResultContent0' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickAnthropicWebSearchToolResultError( /// /// /// - public global::OpenRouter.AnthropicWebSearchToolResultError PickAnthropicWebSearchToolResultError() => IsAnthropicWebSearchToolResultError - ? AnthropicWebSearchToolResultError! + public global::OpenRouter.AnthropicWebSearchToolResultError PickAnthropicWebSearchToolResultError() => AnthropicWebSearchToolResultError is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'AnthropicWebSearchToolResultError' but the value was {ToString()}."); /// /// @@ -154,13 +154,13 @@ public bool Validate() Validate(); } - if (IsOrAnthropicContentBlockDiscriminatorMappingWebSearchToolResultContent0 && orAnthropicContentBlockDiscriminatorMappingWebSearchToolResultContent0 != null) + if (OrAnthropicContentBlockDiscriminatorMappingWebSearchToolResultContent0 is { } __value0 && orAnthropicContentBlockDiscriminatorMappingWebSearchToolResultContent0 != null) { - return orAnthropicContentBlockDiscriminatorMappingWebSearchToolResultContent0(OrAnthropicContentBlockDiscriminatorMappingWebSearchToolResultContent0!); + return orAnthropicContentBlockDiscriminatorMappingWebSearchToolResultContent0(__value0); } - else if (IsAnthropicWebSearchToolResultError && anthropicWebSearchToolResultError != null) + else if (AnthropicWebSearchToolResultError is { } __value1 && anthropicWebSearchToolResultError != null) { - return anthropicWebSearchToolResultError(AnthropicWebSearchToolResultError!); + return anthropicWebSearchToolResultError(__value1); } return default(TResult); @@ -180,13 +180,13 @@ public void Match( Validate(); } - if (IsOrAnthropicContentBlockDiscriminatorMappingWebSearchToolResultContent0) + if (OrAnthropicContentBlockDiscriminatorMappingWebSearchToolResultContent0 is { } __value0) { - orAnthropicContentBlockDiscriminatorMappingWebSearchToolResultContent0?.Invoke(OrAnthropicContentBlockDiscriminatorMappingWebSearchToolResultContent0!); + orAnthropicContentBlockDiscriminatorMappingWebSearchToolResultContent0?.Invoke(__value0); } - else if (IsAnthropicWebSearchToolResultError) + else if (AnthropicWebSearchToolResultError is { } __value1) { - anthropicWebSearchToolResultError?.Invoke(AnthropicWebSearchToolResultError!); + anthropicWebSearchToolResultError?.Invoke(__value1); } } @@ -203,13 +203,13 @@ public void Switch( Validate(); } - if (IsOrAnthropicContentBlockDiscriminatorMappingWebSearchToolResultContent0) + if (OrAnthropicContentBlockDiscriminatorMappingWebSearchToolResultContent0 is { } __value0) { - orAnthropicContentBlockDiscriminatorMappingWebSearchToolResultContent0?.Invoke(OrAnthropicContentBlockDiscriminatorMappingWebSearchToolResultContent0!); + orAnthropicContentBlockDiscriminatorMappingWebSearchToolResultContent0?.Invoke(__value0); } - else if (IsAnthropicWebSearchToolResultError) + else if (AnthropicWebSearchToolResultError is { } __value1) { - anthropicWebSearchToolResultError?.Invoke(AnthropicWebSearchToolResultError!); + anthropicWebSearchToolResultError?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.OrAnthropicNullableCaller.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.OrAnthropicNullableCaller.g.cs index beb14425..cc8256a2 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.OrAnthropicNullableCaller.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.OrAnthropicNullableCaller.g.cs @@ -47,8 +47,8 @@ public bool TryPickCodeExecution20250825( /// /// /// - public global::OpenRouter.OrAnthropicNullableCallerVariant1 PickCodeExecution20250825() => IsCodeExecution20250825 - ? CodeExecution20250825! + public global::OpenRouter.OrAnthropicNullableCallerVariant1 PickCodeExecution20250825() => CodeExecution20250825 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'CodeExecution20250825' but the value was {ToString()}."); /// @@ -84,8 +84,8 @@ public bool TryPickCodeExecution20260120( /// /// /// - public global::OpenRouter.OrAnthropicNullableCallerVariant2 PickCodeExecution20260120() => IsCodeExecution20260120 - ? CodeExecution20260120! + public global::OpenRouter.OrAnthropicNullableCallerVariant2 PickCodeExecution20260120() => CodeExecution20260120 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'CodeExecution20260120' but the value was {ToString()}."); /// @@ -121,8 +121,8 @@ public bool TryPickDirect( /// /// /// - public global::OpenRouter.OrAnthropicNullableCallerVariant3 PickDirect() => IsDirect - ? Direct! + public global::OpenRouter.OrAnthropicNullableCallerVariant3 PickDirect() => Direct is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Direct' but the value was {ToString()}."); /// /// @@ -250,17 +250,17 @@ public bool Validate() Validate(); } - if (IsCodeExecution20250825 && codeExecution20250825 != null) + if (CodeExecution20250825 is { } __value0 && codeExecution20250825 != null) { - return codeExecution20250825(CodeExecution20250825!); + return codeExecution20250825(__value0); } - else if (IsCodeExecution20260120 && codeExecution20260120 != null) + else if (CodeExecution20260120 is { } __value1 && codeExecution20260120 != null) { - return codeExecution20260120(CodeExecution20260120!); + return codeExecution20260120(__value1); } - else if (IsDirect && direct != null) + else if (Direct is { } __value2 && direct != null) { - return direct(Direct!); + return direct(__value2); } return default(TResult); @@ -282,17 +282,17 @@ public void Match( Validate(); } - if (IsCodeExecution20250825) + if (CodeExecution20250825 is { } __value0) { - codeExecution20250825?.Invoke(CodeExecution20250825!); + codeExecution20250825?.Invoke(__value0); } - else if (IsCodeExecution20260120) + else if (CodeExecution20260120 is { } __value1) { - codeExecution20260120?.Invoke(CodeExecution20260120!); + codeExecution20260120?.Invoke(__value1); } - else if (IsDirect) + else if (Direct is { } __value2) { - direct?.Invoke(Direct!); + direct?.Invoke(__value2); } } @@ -310,17 +310,17 @@ public void Switch( Validate(); } - if (IsCodeExecution20250825) + if (CodeExecution20250825 is { } __value0) { - codeExecution20250825?.Invoke(CodeExecution20250825!); + codeExecution20250825?.Invoke(__value0); } - else if (IsCodeExecution20260120) + else if (CodeExecution20260120 is { } __value1) { - codeExecution20260120?.Invoke(CodeExecution20260120!); + codeExecution20260120?.Invoke(__value1); } - else if (IsDirect) + else if (Direct is { } __value2) { - direct?.Invoke(Direct!); + direct?.Invoke(__value2); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.OutputCodeInterpreterCallItemOutputsItems.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.OutputCodeInterpreterCallItemOutputsItems.g.cs index c8002712..9a185f99 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.OutputCodeInterpreterCallItemOutputsItems.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.OutputCodeInterpreterCallItemOutputsItems.g.cs @@ -42,8 +42,8 @@ public bool TryPickOutputCodeInterpreterCallItemOutputsItems0( /// /// /// - public global::OpenRouter.OutputCodeInterpreterCallItemOutputsItems0 PickOutputCodeInterpreterCallItemOutputsItems0() => IsOutputCodeInterpreterCallItemOutputsItems0 - ? OutputCodeInterpreterCallItemOutputsItems0! + public global::OpenRouter.OutputCodeInterpreterCallItemOutputsItems0 PickOutputCodeInterpreterCallItemOutputsItems0() => OutputCodeInterpreterCallItemOutputsItems0 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OutputCodeInterpreterCallItemOutputsItems0' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickOutputCodeInterpreterCallItemOutputsItems1( /// /// /// - public global::OpenRouter.OutputCodeInterpreterCallItemOutputsItems1 PickOutputCodeInterpreterCallItemOutputsItems1() => IsOutputCodeInterpreterCallItemOutputsItems1 - ? OutputCodeInterpreterCallItemOutputsItems1! + public global::OpenRouter.OutputCodeInterpreterCallItemOutputsItems1 PickOutputCodeInterpreterCallItemOutputsItems1() => OutputCodeInterpreterCallItemOutputsItems1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OutputCodeInterpreterCallItemOutputsItems1' but the value was {ToString()}."); /// /// @@ -177,13 +177,13 @@ public bool Validate() Validate(); } - if (IsOutputCodeInterpreterCallItemOutputsItems0 && outputCodeInterpreterCallItemOutputsItems0 != null) + if (OutputCodeInterpreterCallItemOutputsItems0 is { } __value0 && outputCodeInterpreterCallItemOutputsItems0 != null) { - return outputCodeInterpreterCallItemOutputsItems0(OutputCodeInterpreterCallItemOutputsItems0!); + return outputCodeInterpreterCallItemOutputsItems0(__value0); } - else if (IsOutputCodeInterpreterCallItemOutputsItems1 && outputCodeInterpreterCallItemOutputsItems1 != null) + else if (OutputCodeInterpreterCallItemOutputsItems1 is { } __value1 && outputCodeInterpreterCallItemOutputsItems1 != null) { - return outputCodeInterpreterCallItemOutputsItems1(OutputCodeInterpreterCallItemOutputsItems1!); + return outputCodeInterpreterCallItemOutputsItems1(__value1); } return default(TResult); @@ -203,13 +203,13 @@ public void Match( Validate(); } - if (IsOutputCodeInterpreterCallItemOutputsItems0) + if (OutputCodeInterpreterCallItemOutputsItems0 is { } __value0) { - outputCodeInterpreterCallItemOutputsItems0?.Invoke(OutputCodeInterpreterCallItemOutputsItems0!); + outputCodeInterpreterCallItemOutputsItems0?.Invoke(__value0); } - else if (IsOutputCodeInterpreterCallItemOutputsItems1) + else if (OutputCodeInterpreterCallItemOutputsItems1 is { } __value1) { - outputCodeInterpreterCallItemOutputsItems1?.Invoke(OutputCodeInterpreterCallItemOutputsItems1!); + outputCodeInterpreterCallItemOutputsItems1?.Invoke(__value1); } } @@ -226,13 +226,13 @@ public void Switch( Validate(); } - if (IsOutputCodeInterpreterCallItemOutputsItems0) + if (OutputCodeInterpreterCallItemOutputsItems0 is { } __value0) { - outputCodeInterpreterCallItemOutputsItems0?.Invoke(OutputCodeInterpreterCallItemOutputsItems0!); + outputCodeInterpreterCallItemOutputsItems0?.Invoke(__value0); } - else if (IsOutputCodeInterpreterCallItemOutputsItems1) + else if (OutputCodeInterpreterCallItemOutputsItems1 is { } __value1) { - outputCodeInterpreterCallItemOutputsItems1?.Invoke(OutputCodeInterpreterCallItemOutputsItems1!); + outputCodeInterpreterCallItemOutputsItems1?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.OutputFunctionCallItemStatus.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.OutputFunctionCallItemStatus.g.cs index fd80d2e5..af8f4c43 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.OutputFunctionCallItemStatus.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.OutputFunctionCallItemStatus.g.cs @@ -42,8 +42,8 @@ public bool TryPickOutputFunctionCallItemStatus0( /// /// /// - public global::OpenRouter.OutputFunctionCallItemStatus0 PickOutputFunctionCallItemStatus0() => IsOutputFunctionCallItemStatus0 - ? OutputFunctionCallItemStatus0!.Value + public global::OpenRouter.OutputFunctionCallItemStatus0 PickOutputFunctionCallItemStatus0() => OutputFunctionCallItemStatus0 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OutputFunctionCallItemStatus0' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickOutputFunctionCallItemStatus1( /// /// /// - public global::OpenRouter.OutputFunctionCallItemStatus1 PickOutputFunctionCallItemStatus1() => IsOutputFunctionCallItemStatus1 - ? OutputFunctionCallItemStatus1!.Value + public global::OpenRouter.OutputFunctionCallItemStatus1 PickOutputFunctionCallItemStatus1() => OutputFunctionCallItemStatus1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OutputFunctionCallItemStatus1' but the value was {ToString()}."); /// @@ -116,8 +116,8 @@ public bool TryPickOutputFunctionCallItemStatus2( /// /// /// - public global::OpenRouter.OutputFunctionCallItemStatus2 PickOutputFunctionCallItemStatus2() => IsOutputFunctionCallItemStatus2 - ? OutputFunctionCallItemStatus2!.Value + public global::OpenRouter.OutputFunctionCallItemStatus2 PickOutputFunctionCallItemStatus2() => OutputFunctionCallItemStatus2 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OutputFunctionCallItemStatus2' but the value was {ToString()}."); /// /// @@ -242,17 +242,17 @@ public bool Validate() Validate(); } - if (IsOutputFunctionCallItemStatus0 && outputFunctionCallItemStatus0 != null) + if (OutputFunctionCallItemStatus0 is { } __value0 && outputFunctionCallItemStatus0 != null) { - return outputFunctionCallItemStatus0(OutputFunctionCallItemStatus0!); + return outputFunctionCallItemStatus0(__value0); } - else if (IsOutputFunctionCallItemStatus1 && outputFunctionCallItemStatus1 != null) + else if (OutputFunctionCallItemStatus1 is { } __value1 && outputFunctionCallItemStatus1 != null) { - return outputFunctionCallItemStatus1(OutputFunctionCallItemStatus1!); + return outputFunctionCallItemStatus1(__value1); } - else if (IsOutputFunctionCallItemStatus2 && outputFunctionCallItemStatus2 != null) + else if (OutputFunctionCallItemStatus2 is { } __value2 && outputFunctionCallItemStatus2 != null) { - return outputFunctionCallItemStatus2(OutputFunctionCallItemStatus2!); + return outputFunctionCallItemStatus2(__value2); } return default(TResult); @@ -274,17 +274,17 @@ public void Match( Validate(); } - if (IsOutputFunctionCallItemStatus0) + if (OutputFunctionCallItemStatus0 is { } __value0) { - outputFunctionCallItemStatus0?.Invoke(OutputFunctionCallItemStatus0!); + outputFunctionCallItemStatus0?.Invoke(__value0); } - else if (IsOutputFunctionCallItemStatus1) + else if (OutputFunctionCallItemStatus1 is { } __value1) { - outputFunctionCallItemStatus1?.Invoke(OutputFunctionCallItemStatus1!); + outputFunctionCallItemStatus1?.Invoke(__value1); } - else if (IsOutputFunctionCallItemStatus2) + else if (OutputFunctionCallItemStatus2 is { } __value2) { - outputFunctionCallItemStatus2?.Invoke(OutputFunctionCallItemStatus2!); + outputFunctionCallItemStatus2?.Invoke(__value2); } } @@ -302,17 +302,17 @@ public void Switch( Validate(); } - if (IsOutputFunctionCallItemStatus0) + if (OutputFunctionCallItemStatus0 is { } __value0) { - outputFunctionCallItemStatus0?.Invoke(OutputFunctionCallItemStatus0!); + outputFunctionCallItemStatus0?.Invoke(__value0); } - else if (IsOutputFunctionCallItemStatus1) + else if (OutputFunctionCallItemStatus1 is { } __value1) { - outputFunctionCallItemStatus1?.Invoke(OutputFunctionCallItemStatus1!); + outputFunctionCallItemStatus1?.Invoke(__value1); } - else if (IsOutputFunctionCallItemStatus2) + else if (OutputFunctionCallItemStatus2 is { } __value2) { - outputFunctionCallItemStatus2?.Invoke(OutputFunctionCallItemStatus2!); + outputFunctionCallItemStatus2?.Invoke(__value2); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.OutputItems.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.OutputItems.g.cs index fb07995e..7cc3e27f 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.OutputItems.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.OutputItems.g.cs @@ -47,8 +47,8 @@ public bool TryPickApplyPatchCall( /// /// /// - public global::OpenRouter.OutputItemsVariant1 PickApplyPatchCall() => IsApplyPatchCall - ? ApplyPatchCall! + public global::OpenRouter.OutputItemsVariant1 PickApplyPatchCall() => ApplyPatchCall is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ApplyPatchCall' but the value was {ToString()}."); /// @@ -84,8 +84,8 @@ public bool TryPickCodeInterpreterCall( /// /// /// - public global::OpenRouter.OutputItemsVariant2 PickCodeInterpreterCall() => IsCodeInterpreterCall - ? CodeInterpreterCall! + public global::OpenRouter.OutputItemsVariant2 PickCodeInterpreterCall() => CodeInterpreterCall is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'CodeInterpreterCall' but the value was {ToString()}."); /// @@ -121,8 +121,8 @@ public bool TryPickComputerCall( /// /// /// - public global::OpenRouter.OutputItemsVariant3 PickComputerCall() => IsComputerCall - ? ComputerCall! + public global::OpenRouter.OutputItemsVariant3 PickComputerCall() => ComputerCall is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ComputerCall' but the value was {ToString()}."); /// @@ -158,8 +158,8 @@ public bool TryPickCustomToolCall( /// /// /// - public global::OpenRouter.OutputItemsVariant4 PickCustomToolCall() => IsCustomToolCall - ? CustomToolCall! + public global::OpenRouter.OutputItemsVariant4 PickCustomToolCall() => CustomToolCall is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'CustomToolCall' but the value was {ToString()}."); /// @@ -195,8 +195,8 @@ public bool TryPickFileSearchCall( /// /// /// - public global::OpenRouter.OutputItemsVariant5 PickFileSearchCall() => IsFileSearchCall - ? FileSearchCall! + public global::OpenRouter.OutputItemsVariant5 PickFileSearchCall() => FileSearchCall is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'FileSearchCall' but the value was {ToString()}."); /// @@ -232,8 +232,8 @@ public bool TryPickFunctionCall( /// /// /// - public global::OpenRouter.OutputItemsVariant6 PickFunctionCall() => IsFunctionCall - ? FunctionCall! + public global::OpenRouter.OutputItemsVariant6 PickFunctionCall() => FunctionCall is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'FunctionCall' but the value was {ToString()}."); /// @@ -269,8 +269,8 @@ public bool TryPickImageGenerationCall( /// /// /// - public global::OpenRouter.OutputItemsVariant7 PickImageGenerationCall() => IsImageGenerationCall - ? ImageGenerationCall! + public global::OpenRouter.OutputItemsVariant7 PickImageGenerationCall() => ImageGenerationCall is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ImageGenerationCall' but the value was {ToString()}."); /// @@ -306,8 +306,8 @@ public bool TryPickMessage( /// /// /// - public global::OpenRouter.OutputItemsVariant8 PickMessage() => IsMessage - ? Message! + public global::OpenRouter.OutputItemsVariant8 PickMessage() => Message is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Message' but the value was {ToString()}."); /// @@ -343,8 +343,8 @@ public bool TryPickOpenrouterAdvisor( /// /// /// - public global::OpenRouter.OutputItemsVariant9 PickOpenrouterAdvisor() => IsOpenrouterAdvisor - ? OpenrouterAdvisor! + public global::OpenRouter.OutputItemsVariant9 PickOpenrouterAdvisor() => OpenrouterAdvisor is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OpenrouterAdvisor' but the value was {ToString()}."); /// @@ -380,8 +380,8 @@ public bool TryPickOpenrouterApplyPatch( /// /// /// - public global::OpenRouter.OutputItemsVariant10 PickOpenrouterApplyPatch() => IsOpenrouterApplyPatch - ? OpenrouterApplyPatch! + public global::OpenRouter.OutputItemsVariant10 PickOpenrouterApplyPatch() => OpenrouterApplyPatch is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OpenrouterApplyPatch' but the value was {ToString()}."); /// @@ -417,8 +417,8 @@ public bool TryPickOpenrouterBash( /// /// /// - public global::OpenRouter.OutputItemsVariant11 PickOpenrouterBash() => IsOpenrouterBash - ? OpenrouterBash! + public global::OpenRouter.OutputItemsVariant11 PickOpenrouterBash() => OpenrouterBash is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OpenrouterBash' but the value was {ToString()}."); /// @@ -454,8 +454,8 @@ public bool TryPickOpenrouterBrowserUse( /// /// /// - public global::OpenRouter.OutputItemsVariant12 PickOpenrouterBrowserUse() => IsOpenrouterBrowserUse - ? OpenrouterBrowserUse! + public global::OpenRouter.OutputItemsVariant12 PickOpenrouterBrowserUse() => OpenrouterBrowserUse is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OpenrouterBrowserUse' but the value was {ToString()}."); /// @@ -491,8 +491,8 @@ public bool TryPickOpenrouterCodeInterpreter( /// /// /// - public global::OpenRouter.OutputItemsVariant13 PickOpenrouterCodeInterpreter() => IsOpenrouterCodeInterpreter - ? OpenrouterCodeInterpreter! + public global::OpenRouter.OutputItemsVariant13 PickOpenrouterCodeInterpreter() => OpenrouterCodeInterpreter is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OpenrouterCodeInterpreter' but the value was {ToString()}."); /// @@ -528,8 +528,8 @@ public bool TryPickOpenrouterDatetime( /// /// /// - public global::OpenRouter.OutputItemsVariant14 PickOpenrouterDatetime() => IsOpenrouterDatetime - ? OpenrouterDatetime! + public global::OpenRouter.OutputItemsVariant14 PickOpenrouterDatetime() => OpenrouterDatetime is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OpenrouterDatetime' but the value was {ToString()}."); /// @@ -565,8 +565,8 @@ public bool TryPickOpenrouterExperimentalSearchModels( /// /// /// - public global::OpenRouter.OutputItemsVariant15 PickOpenrouterExperimentalSearchModels() => IsOpenrouterExperimentalSearchModels - ? OpenrouterExperimentalSearchModels! + public global::OpenRouter.OutputItemsVariant15 PickOpenrouterExperimentalSearchModels() => OpenrouterExperimentalSearchModels is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OpenrouterExperimentalSearchModels' but the value was {ToString()}."); /// @@ -602,8 +602,8 @@ public bool TryPickOpenrouterFileSearch( /// /// /// - public global::OpenRouter.OutputItemsVariant16 PickOpenrouterFileSearch() => IsOpenrouterFileSearch - ? OpenrouterFileSearch! + public global::OpenRouter.OutputItemsVariant16 PickOpenrouterFileSearch() => OpenrouterFileSearch is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OpenrouterFileSearch' but the value was {ToString()}."); /// @@ -639,8 +639,8 @@ public bool TryPickOpenrouterFiles( /// /// /// - public global::OpenRouter.OutputItemsVariant17 PickOpenrouterFiles() => IsOpenrouterFiles - ? OpenrouterFiles! + public global::OpenRouter.OutputItemsVariant17 PickOpenrouterFiles() => OpenrouterFiles is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OpenrouterFiles' but the value was {ToString()}."); /// @@ -676,8 +676,8 @@ public bool TryPickOpenrouterFusion( /// /// /// - public global::OpenRouter.OutputItemsVariant18 PickOpenrouterFusion() => IsOpenrouterFusion - ? OpenrouterFusion! + public global::OpenRouter.OutputItemsVariant18 PickOpenrouterFusion() => OpenrouterFusion is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OpenrouterFusion' but the value was {ToString()}."); /// @@ -713,8 +713,8 @@ public bool TryPickOpenrouterImageGeneration( /// /// /// - public global::OpenRouter.OutputItemsVariant19 PickOpenrouterImageGeneration() => IsOpenrouterImageGeneration - ? OpenrouterImageGeneration! + public global::OpenRouter.OutputItemsVariant19 PickOpenrouterImageGeneration() => OpenrouterImageGeneration is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OpenrouterImageGeneration' but the value was {ToString()}."); /// @@ -750,8 +750,8 @@ public bool TryPickOpenrouterMcp( /// /// /// - public global::OpenRouter.OutputItemsVariant20 PickOpenrouterMcp() => IsOpenrouterMcp - ? OpenrouterMcp! + public global::OpenRouter.OutputItemsVariant20 PickOpenrouterMcp() => OpenrouterMcp is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OpenrouterMcp' but the value was {ToString()}."); /// @@ -787,8 +787,8 @@ public bool TryPickOpenrouterMemory( /// /// /// - public global::OpenRouter.OutputItemsVariant21 PickOpenrouterMemory() => IsOpenrouterMemory - ? OpenrouterMemory! + public global::OpenRouter.OutputItemsVariant21 PickOpenrouterMemory() => OpenrouterMemory is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OpenrouterMemory' but the value was {ToString()}."); /// @@ -824,8 +824,8 @@ public bool TryPickOpenrouterSubagent( /// /// /// - public global::OpenRouter.OutputItemsVariant22 PickOpenrouterSubagent() => IsOpenrouterSubagent - ? OpenrouterSubagent! + public global::OpenRouter.OutputItemsVariant22 PickOpenrouterSubagent() => OpenrouterSubagent is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OpenrouterSubagent' but the value was {ToString()}."); /// @@ -861,8 +861,8 @@ public bool TryPickOpenrouterTextEditor( /// /// /// - public global::OpenRouter.OutputItemsVariant23 PickOpenrouterTextEditor() => IsOpenrouterTextEditor - ? OpenrouterTextEditor! + public global::OpenRouter.OutputItemsVariant23 PickOpenrouterTextEditor() => OpenrouterTextEditor is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OpenrouterTextEditor' but the value was {ToString()}."); /// @@ -898,8 +898,8 @@ public bool TryPickOpenrouterToolSearch( /// /// /// - public global::OpenRouter.OutputItemsVariant24 PickOpenrouterToolSearch() => IsOpenrouterToolSearch - ? OpenrouterToolSearch! + public global::OpenRouter.OutputItemsVariant24 PickOpenrouterToolSearch() => OpenrouterToolSearch is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OpenrouterToolSearch' but the value was {ToString()}."); /// @@ -935,8 +935,8 @@ public bool TryPickOpenrouterWebFetch( /// /// /// - public global::OpenRouter.OutputItemsVariant25 PickOpenrouterWebFetch() => IsOpenrouterWebFetch - ? OpenrouterWebFetch! + public global::OpenRouter.OutputItemsVariant25 PickOpenrouterWebFetch() => OpenrouterWebFetch is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OpenrouterWebFetch' but the value was {ToString()}."); /// @@ -972,8 +972,8 @@ public bool TryPickOpenrouterWebSearch( /// /// /// - public global::OpenRouter.OutputItemsVariant26 PickOpenrouterWebSearch() => IsOpenrouterWebSearch - ? OpenrouterWebSearch! + public global::OpenRouter.OutputItemsVariant26 PickOpenrouterWebSearch() => OpenrouterWebSearch is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OpenrouterWebSearch' but the value was {ToString()}."); /// @@ -1009,8 +1009,8 @@ public bool TryPickReasoning( /// /// /// - public global::OpenRouter.OutputItemsVariant27 PickReasoning() => IsReasoning - ? Reasoning! + public global::OpenRouter.OutputItemsVariant27 PickReasoning() => Reasoning is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Reasoning' but the value was {ToString()}."); /// @@ -1046,8 +1046,8 @@ public bool TryPickShellCall( /// /// /// - public global::OpenRouter.OutputItemsVariant28 PickShellCall() => IsShellCall - ? ShellCall! + public global::OpenRouter.OutputItemsVariant28 PickShellCall() => ShellCall is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ShellCall' but the value was {ToString()}."); /// @@ -1083,8 +1083,8 @@ public bool TryPickShellCallOutput( /// /// /// - public global::OpenRouter.OutputItemsVariant29 PickShellCallOutput() => IsShellCallOutput - ? ShellCallOutput! + public global::OpenRouter.OutputItemsVariant29 PickShellCallOutput() => ShellCallOutput is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ShellCallOutput' but the value was {ToString()}."); /// @@ -1120,8 +1120,8 @@ public bool TryPickWebSearchCall( /// /// /// - public global::OpenRouter.OutputItemsVariant30 PickWebSearchCall() => IsWebSearchCall - ? WebSearchCall! + public global::OpenRouter.OutputItemsVariant30 PickWebSearchCall() => WebSearchCall is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'WebSearchCall' but the value was {ToString()}."); /// /// @@ -2005,125 +2005,125 @@ public bool Validate() Validate(); } - if (IsApplyPatchCall && applyPatchCall != null) + if (ApplyPatchCall is { } __value0 && applyPatchCall != null) { - return applyPatchCall(ApplyPatchCall!); + return applyPatchCall(__value0); } - else if (IsCodeInterpreterCall && codeInterpreterCall != null) + else if (CodeInterpreterCall is { } __value1 && codeInterpreterCall != null) { - return codeInterpreterCall(CodeInterpreterCall!); + return codeInterpreterCall(__value1); } - else if (IsComputerCall && computerCall != null) + else if (ComputerCall is { } __value2 && computerCall != null) { - return computerCall(ComputerCall!); + return computerCall(__value2); } - else if (IsCustomToolCall && customToolCall != null) + else if (CustomToolCall is { } __value3 && customToolCall != null) { - return customToolCall(CustomToolCall!); + return customToolCall(__value3); } - else if (IsFileSearchCall && fileSearchCall != null) + else if (FileSearchCall is { } __value4 && fileSearchCall != null) { - return fileSearchCall(FileSearchCall!); + return fileSearchCall(__value4); } - else if (IsFunctionCall && functionCall != null) + else if (FunctionCall is { } __value5 && functionCall != null) { - return functionCall(FunctionCall!); + return functionCall(__value5); } - else if (IsImageGenerationCall && imageGenerationCall != null) + else if (ImageGenerationCall is { } __value6 && imageGenerationCall != null) { - return imageGenerationCall(ImageGenerationCall!); + return imageGenerationCall(__value6); } - else if (IsMessage && message != null) + else if (Message is { } __value7 && message != null) { - return message(Message!); + return message(__value7); } - else if (IsOpenrouterAdvisor && openrouterAdvisor != null) + else if (OpenrouterAdvisor is { } __value8 && openrouterAdvisor != null) { - return openrouterAdvisor(OpenrouterAdvisor!); + return openrouterAdvisor(__value8); } - else if (IsOpenrouterApplyPatch && openrouterApplyPatch != null) + else if (OpenrouterApplyPatch is { } __value9 && openrouterApplyPatch != null) { - return openrouterApplyPatch(OpenrouterApplyPatch!); + return openrouterApplyPatch(__value9); } - else if (IsOpenrouterBash && openrouterBash != null) + else if (OpenrouterBash is { } __value10 && openrouterBash != null) { - return openrouterBash(OpenrouterBash!); + return openrouterBash(__value10); } - else if (IsOpenrouterBrowserUse && openrouterBrowserUse != null) + else if (OpenrouterBrowserUse is { } __value11 && openrouterBrowserUse != null) { - return openrouterBrowserUse(OpenrouterBrowserUse!); + return openrouterBrowserUse(__value11); } - else if (IsOpenrouterCodeInterpreter && openrouterCodeInterpreter != null) + else if (OpenrouterCodeInterpreter is { } __value12 && openrouterCodeInterpreter != null) { - return openrouterCodeInterpreter(OpenrouterCodeInterpreter!); + return openrouterCodeInterpreter(__value12); } - else if (IsOpenrouterDatetime && openrouterDatetime != null) + else if (OpenrouterDatetime is { } __value13 && openrouterDatetime != null) { - return openrouterDatetime(OpenrouterDatetime!); + return openrouterDatetime(__value13); } - else if (IsOpenrouterExperimentalSearchModels && openrouterExperimentalSearchModels != null) + else if (OpenrouterExperimentalSearchModels is { } __value14 && openrouterExperimentalSearchModels != null) { - return openrouterExperimentalSearchModels(OpenrouterExperimentalSearchModels!); + return openrouterExperimentalSearchModels(__value14); } - else if (IsOpenrouterFileSearch && openrouterFileSearch != null) + else if (OpenrouterFileSearch is { } __value15 && openrouterFileSearch != null) { - return openrouterFileSearch(OpenrouterFileSearch!); + return openrouterFileSearch(__value15); } - else if (IsOpenrouterFiles && openrouterFiles != null) + else if (OpenrouterFiles is { } __value16 && openrouterFiles != null) { - return openrouterFiles(OpenrouterFiles!); + return openrouterFiles(__value16); } - else if (IsOpenrouterFusion && openrouterFusion != null) + else if (OpenrouterFusion is { } __value17 && openrouterFusion != null) { - return openrouterFusion(OpenrouterFusion!); + return openrouterFusion(__value17); } - else if (IsOpenrouterImageGeneration && openrouterImageGeneration != null) + else if (OpenrouterImageGeneration is { } __value18 && openrouterImageGeneration != null) { - return openrouterImageGeneration(OpenrouterImageGeneration!); + return openrouterImageGeneration(__value18); } - else if (IsOpenrouterMcp && openrouterMcp != null) + else if (OpenrouterMcp is { } __value19 && openrouterMcp != null) { - return openrouterMcp(OpenrouterMcp!); + return openrouterMcp(__value19); } - else if (IsOpenrouterMemory && openrouterMemory != null) + else if (OpenrouterMemory is { } __value20 && openrouterMemory != null) { - return openrouterMemory(OpenrouterMemory!); + return openrouterMemory(__value20); } - else if (IsOpenrouterSubagent && openrouterSubagent != null) + else if (OpenrouterSubagent is { } __value21 && openrouterSubagent != null) { - return openrouterSubagent(OpenrouterSubagent!); + return openrouterSubagent(__value21); } - else if (IsOpenrouterTextEditor && openrouterTextEditor != null) + else if (OpenrouterTextEditor is { } __value22 && openrouterTextEditor != null) { - return openrouterTextEditor(OpenrouterTextEditor!); + return openrouterTextEditor(__value22); } - else if (IsOpenrouterToolSearch && openrouterToolSearch != null) + else if (OpenrouterToolSearch is { } __value23 && openrouterToolSearch != null) { - return openrouterToolSearch(OpenrouterToolSearch!); + return openrouterToolSearch(__value23); } - else if (IsOpenrouterWebFetch && openrouterWebFetch != null) + else if (OpenrouterWebFetch is { } __value24 && openrouterWebFetch != null) { - return openrouterWebFetch(OpenrouterWebFetch!); + return openrouterWebFetch(__value24); } - else if (IsOpenrouterWebSearch && openrouterWebSearch != null) + else if (OpenrouterWebSearch is { } __value25 && openrouterWebSearch != null) { - return openrouterWebSearch(OpenrouterWebSearch!); + return openrouterWebSearch(__value25); } - else if (IsReasoning && reasoning != null) + else if (Reasoning is { } __value26 && reasoning != null) { - return reasoning(Reasoning!); + return reasoning(__value26); } - else if (IsShellCall && shellCall != null) + else if (ShellCall is { } __value27 && shellCall != null) { - return shellCall(ShellCall!); + return shellCall(__value27); } - else if (IsShellCallOutput && shellCallOutput != null) + else if (ShellCallOutput is { } __value28 && shellCallOutput != null) { - return shellCallOutput(ShellCallOutput!); + return shellCallOutput(__value28); } - else if (IsWebSearchCall && webSearchCall != null) + else if (WebSearchCall is { } __value29 && webSearchCall != null) { - return webSearchCall(WebSearchCall!); + return webSearchCall(__value29); } return default(TResult); @@ -2199,125 +2199,125 @@ public void Match( Validate(); } - if (IsApplyPatchCall) + if (ApplyPatchCall is { } __value0) { - applyPatchCall?.Invoke(ApplyPatchCall!); + applyPatchCall?.Invoke(__value0); } - else if (IsCodeInterpreterCall) + else if (CodeInterpreterCall is { } __value1) { - codeInterpreterCall?.Invoke(CodeInterpreterCall!); + codeInterpreterCall?.Invoke(__value1); } - else if (IsComputerCall) + else if (ComputerCall is { } __value2) { - computerCall?.Invoke(ComputerCall!); + computerCall?.Invoke(__value2); } - else if (IsCustomToolCall) + else if (CustomToolCall is { } __value3) { - customToolCall?.Invoke(CustomToolCall!); + customToolCall?.Invoke(__value3); } - else if (IsFileSearchCall) + else if (FileSearchCall is { } __value4) { - fileSearchCall?.Invoke(FileSearchCall!); + fileSearchCall?.Invoke(__value4); } - else if (IsFunctionCall) + else if (FunctionCall is { } __value5) { - functionCall?.Invoke(FunctionCall!); + functionCall?.Invoke(__value5); } - else if (IsImageGenerationCall) + else if (ImageGenerationCall is { } __value6) { - imageGenerationCall?.Invoke(ImageGenerationCall!); + imageGenerationCall?.Invoke(__value6); } - else if (IsMessage) + else if (Message is { } __value7) { - message?.Invoke(Message!); + message?.Invoke(__value7); } - else if (IsOpenrouterAdvisor) + else if (OpenrouterAdvisor is { } __value8) { - openrouterAdvisor?.Invoke(OpenrouterAdvisor!); + openrouterAdvisor?.Invoke(__value8); } - else if (IsOpenrouterApplyPatch) + else if (OpenrouterApplyPatch is { } __value9) { - openrouterApplyPatch?.Invoke(OpenrouterApplyPatch!); + openrouterApplyPatch?.Invoke(__value9); } - else if (IsOpenrouterBash) + else if (OpenrouterBash is { } __value10) { - openrouterBash?.Invoke(OpenrouterBash!); + openrouterBash?.Invoke(__value10); } - else if (IsOpenrouterBrowserUse) + else if (OpenrouterBrowserUse is { } __value11) { - openrouterBrowserUse?.Invoke(OpenrouterBrowserUse!); + openrouterBrowserUse?.Invoke(__value11); } - else if (IsOpenrouterCodeInterpreter) + else if (OpenrouterCodeInterpreter is { } __value12) { - openrouterCodeInterpreter?.Invoke(OpenrouterCodeInterpreter!); + openrouterCodeInterpreter?.Invoke(__value12); } - else if (IsOpenrouterDatetime) + else if (OpenrouterDatetime is { } __value13) { - openrouterDatetime?.Invoke(OpenrouterDatetime!); + openrouterDatetime?.Invoke(__value13); } - else if (IsOpenrouterExperimentalSearchModels) + else if (OpenrouterExperimentalSearchModels is { } __value14) { - openrouterExperimentalSearchModels?.Invoke(OpenrouterExperimentalSearchModels!); + openrouterExperimentalSearchModels?.Invoke(__value14); } - else if (IsOpenrouterFileSearch) + else if (OpenrouterFileSearch is { } __value15) { - openrouterFileSearch?.Invoke(OpenrouterFileSearch!); + openrouterFileSearch?.Invoke(__value15); } - else if (IsOpenrouterFiles) + else if (OpenrouterFiles is { } __value16) { - openrouterFiles?.Invoke(OpenrouterFiles!); + openrouterFiles?.Invoke(__value16); } - else if (IsOpenrouterFusion) + else if (OpenrouterFusion is { } __value17) { - openrouterFusion?.Invoke(OpenrouterFusion!); + openrouterFusion?.Invoke(__value17); } - else if (IsOpenrouterImageGeneration) + else if (OpenrouterImageGeneration is { } __value18) { - openrouterImageGeneration?.Invoke(OpenrouterImageGeneration!); + openrouterImageGeneration?.Invoke(__value18); } - else if (IsOpenrouterMcp) + else if (OpenrouterMcp is { } __value19) { - openrouterMcp?.Invoke(OpenrouterMcp!); + openrouterMcp?.Invoke(__value19); } - else if (IsOpenrouterMemory) + else if (OpenrouterMemory is { } __value20) { - openrouterMemory?.Invoke(OpenrouterMemory!); + openrouterMemory?.Invoke(__value20); } - else if (IsOpenrouterSubagent) + else if (OpenrouterSubagent is { } __value21) { - openrouterSubagent?.Invoke(OpenrouterSubagent!); + openrouterSubagent?.Invoke(__value21); } - else if (IsOpenrouterTextEditor) + else if (OpenrouterTextEditor is { } __value22) { - openrouterTextEditor?.Invoke(OpenrouterTextEditor!); + openrouterTextEditor?.Invoke(__value22); } - else if (IsOpenrouterToolSearch) + else if (OpenrouterToolSearch is { } __value23) { - openrouterToolSearch?.Invoke(OpenrouterToolSearch!); + openrouterToolSearch?.Invoke(__value23); } - else if (IsOpenrouterWebFetch) + else if (OpenrouterWebFetch is { } __value24) { - openrouterWebFetch?.Invoke(OpenrouterWebFetch!); + openrouterWebFetch?.Invoke(__value24); } - else if (IsOpenrouterWebSearch) + else if (OpenrouterWebSearch is { } __value25) { - openrouterWebSearch?.Invoke(OpenrouterWebSearch!); + openrouterWebSearch?.Invoke(__value25); } - else if (IsReasoning) + else if (Reasoning is { } __value26) { - reasoning?.Invoke(Reasoning!); + reasoning?.Invoke(__value26); } - else if (IsShellCall) + else if (ShellCall is { } __value27) { - shellCall?.Invoke(ShellCall!); + shellCall?.Invoke(__value27); } - else if (IsShellCallOutput) + else if (ShellCallOutput is { } __value28) { - shellCallOutput?.Invoke(ShellCallOutput!); + shellCallOutput?.Invoke(__value28); } - else if (IsWebSearchCall) + else if (WebSearchCall is { } __value29) { - webSearchCall?.Invoke(WebSearchCall!); + webSearchCall?.Invoke(__value29); } } @@ -2362,125 +2362,125 @@ public void Switch( Validate(); } - if (IsApplyPatchCall) + if (ApplyPatchCall is { } __value0) { - applyPatchCall?.Invoke(ApplyPatchCall!); + applyPatchCall?.Invoke(__value0); } - else if (IsCodeInterpreterCall) + else if (CodeInterpreterCall is { } __value1) { - codeInterpreterCall?.Invoke(CodeInterpreterCall!); + codeInterpreterCall?.Invoke(__value1); } - else if (IsComputerCall) + else if (ComputerCall is { } __value2) { - computerCall?.Invoke(ComputerCall!); + computerCall?.Invoke(__value2); } - else if (IsCustomToolCall) + else if (CustomToolCall is { } __value3) { - customToolCall?.Invoke(CustomToolCall!); + customToolCall?.Invoke(__value3); } - else if (IsFileSearchCall) + else if (FileSearchCall is { } __value4) { - fileSearchCall?.Invoke(FileSearchCall!); + fileSearchCall?.Invoke(__value4); } - else if (IsFunctionCall) + else if (FunctionCall is { } __value5) { - functionCall?.Invoke(FunctionCall!); + functionCall?.Invoke(__value5); } - else if (IsImageGenerationCall) + else if (ImageGenerationCall is { } __value6) { - imageGenerationCall?.Invoke(ImageGenerationCall!); + imageGenerationCall?.Invoke(__value6); } - else if (IsMessage) + else if (Message is { } __value7) { - message?.Invoke(Message!); + message?.Invoke(__value7); } - else if (IsOpenrouterAdvisor) + else if (OpenrouterAdvisor is { } __value8) { - openrouterAdvisor?.Invoke(OpenrouterAdvisor!); + openrouterAdvisor?.Invoke(__value8); } - else if (IsOpenrouterApplyPatch) + else if (OpenrouterApplyPatch is { } __value9) { - openrouterApplyPatch?.Invoke(OpenrouterApplyPatch!); + openrouterApplyPatch?.Invoke(__value9); } - else if (IsOpenrouterBash) + else if (OpenrouterBash is { } __value10) { - openrouterBash?.Invoke(OpenrouterBash!); + openrouterBash?.Invoke(__value10); } - else if (IsOpenrouterBrowserUse) + else if (OpenrouterBrowserUse is { } __value11) { - openrouterBrowserUse?.Invoke(OpenrouterBrowserUse!); + openrouterBrowserUse?.Invoke(__value11); } - else if (IsOpenrouterCodeInterpreter) + else if (OpenrouterCodeInterpreter is { } __value12) { - openrouterCodeInterpreter?.Invoke(OpenrouterCodeInterpreter!); + openrouterCodeInterpreter?.Invoke(__value12); } - else if (IsOpenrouterDatetime) + else if (OpenrouterDatetime is { } __value13) { - openrouterDatetime?.Invoke(OpenrouterDatetime!); + openrouterDatetime?.Invoke(__value13); } - else if (IsOpenrouterExperimentalSearchModels) + else if (OpenrouterExperimentalSearchModels is { } __value14) { - openrouterExperimentalSearchModels?.Invoke(OpenrouterExperimentalSearchModels!); + openrouterExperimentalSearchModels?.Invoke(__value14); } - else if (IsOpenrouterFileSearch) + else if (OpenrouterFileSearch is { } __value15) { - openrouterFileSearch?.Invoke(OpenrouterFileSearch!); + openrouterFileSearch?.Invoke(__value15); } - else if (IsOpenrouterFiles) + else if (OpenrouterFiles is { } __value16) { - openrouterFiles?.Invoke(OpenrouterFiles!); + openrouterFiles?.Invoke(__value16); } - else if (IsOpenrouterFusion) + else if (OpenrouterFusion is { } __value17) { - openrouterFusion?.Invoke(OpenrouterFusion!); + openrouterFusion?.Invoke(__value17); } - else if (IsOpenrouterImageGeneration) + else if (OpenrouterImageGeneration is { } __value18) { - openrouterImageGeneration?.Invoke(OpenrouterImageGeneration!); + openrouterImageGeneration?.Invoke(__value18); } - else if (IsOpenrouterMcp) + else if (OpenrouterMcp is { } __value19) { - openrouterMcp?.Invoke(OpenrouterMcp!); + openrouterMcp?.Invoke(__value19); } - else if (IsOpenrouterMemory) + else if (OpenrouterMemory is { } __value20) { - openrouterMemory?.Invoke(OpenrouterMemory!); + openrouterMemory?.Invoke(__value20); } - else if (IsOpenrouterSubagent) + else if (OpenrouterSubagent is { } __value21) { - openrouterSubagent?.Invoke(OpenrouterSubagent!); + openrouterSubagent?.Invoke(__value21); } - else if (IsOpenrouterTextEditor) + else if (OpenrouterTextEditor is { } __value22) { - openrouterTextEditor?.Invoke(OpenrouterTextEditor!); + openrouterTextEditor?.Invoke(__value22); } - else if (IsOpenrouterToolSearch) + else if (OpenrouterToolSearch is { } __value23) { - openrouterToolSearch?.Invoke(OpenrouterToolSearch!); + openrouterToolSearch?.Invoke(__value23); } - else if (IsOpenrouterWebFetch) + else if (OpenrouterWebFetch is { } __value24) { - openrouterWebFetch?.Invoke(OpenrouterWebFetch!); + openrouterWebFetch?.Invoke(__value24); } - else if (IsOpenrouterWebSearch) + else if (OpenrouterWebSearch is { } __value25) { - openrouterWebSearch?.Invoke(OpenrouterWebSearch!); + openrouterWebSearch?.Invoke(__value25); } - else if (IsReasoning) + else if (Reasoning is { } __value26) { - reasoning?.Invoke(Reasoning!); + reasoning?.Invoke(__value26); } - else if (IsShellCall) + else if (ShellCall is { } __value27) { - shellCall?.Invoke(ShellCall!); + shellCall?.Invoke(__value27); } - else if (IsShellCallOutput) + else if (ShellCallOutput is { } __value28) { - shellCallOutput?.Invoke(ShellCallOutput!); + shellCallOutput?.Invoke(__value28); } - else if (IsWebSearchCall) + else if (WebSearchCall is { } __value29) { - webSearchCall?.Invoke(WebSearchCall!); + webSearchCall?.Invoke(__value29); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.OutputMessageContentItems.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.OutputMessageContentItems.g.cs index af4ab844..11155238 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.OutputMessageContentItems.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.OutputMessageContentItems.g.cs @@ -42,8 +42,8 @@ public bool TryPickResponseOutputText( /// /// /// - public global::OpenRouter.ResponseOutputText PickResponseOutputText() => IsResponseOutputText - ? ResponseOutputText! + public global::OpenRouter.ResponseOutputText PickResponseOutputText() => ResponseOutputText is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ResponseOutputText' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickOpenAIResponsesRefusalContent( /// /// /// - public global::OpenRouter.OpenAIResponsesRefusalContent PickOpenAIResponsesRefusalContent() => IsOpenAIResponsesRefusalContent - ? OpenAIResponsesRefusalContent! + public global::OpenRouter.OpenAIResponsesRefusalContent PickOpenAIResponsesRefusalContent() => OpenAIResponsesRefusalContent is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OpenAIResponsesRefusalContent' but the value was {ToString()}."); /// /// @@ -177,13 +177,13 @@ public bool Validate() Validate(); } - if (IsResponseOutputText && responseOutputText != null) + if (ResponseOutputText is { } __value0 && responseOutputText != null) { - return responseOutputText(ResponseOutputText!); + return responseOutputText(__value0); } - else if (IsOpenAIResponsesRefusalContent && openAIResponsesRefusalContent != null) + else if (OpenAIResponsesRefusalContent is { } __value1 && openAIResponsesRefusalContent != null) { - return openAIResponsesRefusalContent(OpenAIResponsesRefusalContent!); + return openAIResponsesRefusalContent(__value1); } return default(TResult); @@ -203,13 +203,13 @@ public void Match( Validate(); } - if (IsResponseOutputText) + if (ResponseOutputText is { } __value0) { - responseOutputText?.Invoke(ResponseOutputText!); + responseOutputText?.Invoke(__value0); } - else if (IsOpenAIResponsesRefusalContent) + else if (OpenAIResponsesRefusalContent is { } __value1) { - openAIResponsesRefusalContent?.Invoke(OpenAIResponsesRefusalContent!); + openAIResponsesRefusalContent?.Invoke(__value1); } } @@ -226,13 +226,13 @@ public void Switch( Validate(); } - if (IsResponseOutputText) + if (ResponseOutputText is { } __value0) { - responseOutputText?.Invoke(ResponseOutputText!); + responseOutputText?.Invoke(__value0); } - else if (IsOpenAIResponsesRefusalContent) + else if (OpenAIResponsesRefusalContent is { } __value1) { - openAIResponsesRefusalContent?.Invoke(OpenAIResponsesRefusalContent!); + openAIResponsesRefusalContent?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.OutputMessageItemContentItems.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.OutputMessageItemContentItems.g.cs index 07fc6f77..4a306e5d 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.OutputMessageItemContentItems.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.OutputMessageItemContentItems.g.cs @@ -42,8 +42,8 @@ public bool TryPickResponseOutputText( /// /// /// - public global::OpenRouter.ResponseOutputText PickResponseOutputText() => IsResponseOutputText - ? ResponseOutputText! + public global::OpenRouter.ResponseOutputText PickResponseOutputText() => ResponseOutputText is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ResponseOutputText' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickOpenAIResponsesRefusalContent( /// /// /// - public global::OpenRouter.OpenAIResponsesRefusalContent PickOpenAIResponsesRefusalContent() => IsOpenAIResponsesRefusalContent - ? OpenAIResponsesRefusalContent! + public global::OpenRouter.OpenAIResponsesRefusalContent PickOpenAIResponsesRefusalContent() => OpenAIResponsesRefusalContent is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OpenAIResponsesRefusalContent' but the value was {ToString()}."); /// /// @@ -177,13 +177,13 @@ public bool Validate() Validate(); } - if (IsResponseOutputText && responseOutputText != null) + if (ResponseOutputText is { } __value0 && responseOutputText != null) { - return responseOutputText(ResponseOutputText!); + return responseOutputText(__value0); } - else if (IsOpenAIResponsesRefusalContent && openAIResponsesRefusalContent != null) + else if (OpenAIResponsesRefusalContent is { } __value1 && openAIResponsesRefusalContent != null) { - return openAIResponsesRefusalContent(OpenAIResponsesRefusalContent!); + return openAIResponsesRefusalContent(__value1); } return default(TResult); @@ -203,13 +203,13 @@ public void Match( Validate(); } - if (IsResponseOutputText) + if (ResponseOutputText is { } __value0) { - responseOutputText?.Invoke(ResponseOutputText!); + responseOutputText?.Invoke(__value0); } - else if (IsOpenAIResponsesRefusalContent) + else if (OpenAIResponsesRefusalContent is { } __value1) { - openAIResponsesRefusalContent?.Invoke(OpenAIResponsesRefusalContent!); + openAIResponsesRefusalContent?.Invoke(__value1); } } @@ -226,13 +226,13 @@ public void Switch( Validate(); } - if (IsResponseOutputText) + if (ResponseOutputText is { } __value0) { - responseOutputText?.Invoke(ResponseOutputText!); + responseOutputText?.Invoke(__value0); } - else if (IsOpenAIResponsesRefusalContent) + else if (OpenAIResponsesRefusalContent is { } __value1) { - openAIResponsesRefusalContent?.Invoke(OpenAIResponsesRefusalContent!); + openAIResponsesRefusalContent?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.OutputMessageItemPhase.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.OutputMessageItemPhase.g.cs index 4fbbb085..81a964d4 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.OutputMessageItemPhase.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.OutputMessageItemPhase.g.cs @@ -42,8 +42,8 @@ public bool TryPickOutputMessageItemPhase0( /// /// /// - public global::OpenRouter.OutputMessageItemPhase0 PickOutputMessageItemPhase0() => IsOutputMessageItemPhase0 - ? OutputMessageItemPhase0!.Value + public global::OpenRouter.OutputMessageItemPhase0 PickOutputMessageItemPhase0() => OutputMessageItemPhase0 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OutputMessageItemPhase0' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickOutputMessageItemPhase1( /// /// /// - public global::OpenRouter.OutputMessageItemPhase1 PickOutputMessageItemPhase1() => IsOutputMessageItemPhase1 - ? OutputMessageItemPhase1!.Value + public global::OpenRouter.OutputMessageItemPhase1 PickOutputMessageItemPhase1() => OutputMessageItemPhase1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OutputMessageItemPhase1' but the value was {ToString()}."); /// /// @@ -177,13 +177,13 @@ public bool Validate() Validate(); } - if (IsOutputMessageItemPhase0 && outputMessageItemPhase0 != null) + if (OutputMessageItemPhase0 is { } __value0 && outputMessageItemPhase0 != null) { - return outputMessageItemPhase0(OutputMessageItemPhase0!); + return outputMessageItemPhase0(__value0); } - else if (IsOutputMessageItemPhase1 && outputMessageItemPhase1 != null) + else if (OutputMessageItemPhase1 is { } __value1 && outputMessageItemPhase1 != null) { - return outputMessageItemPhase1(OutputMessageItemPhase1!); + return outputMessageItemPhase1(__value1); } return default(TResult); @@ -203,13 +203,13 @@ public void Match( Validate(); } - if (IsOutputMessageItemPhase0) + if (OutputMessageItemPhase0 is { } __value0) { - outputMessageItemPhase0?.Invoke(OutputMessageItemPhase0!); + outputMessageItemPhase0?.Invoke(__value0); } - else if (IsOutputMessageItemPhase1) + else if (OutputMessageItemPhase1 is { } __value1) { - outputMessageItemPhase1?.Invoke(OutputMessageItemPhase1!); + outputMessageItemPhase1?.Invoke(__value1); } } @@ -226,13 +226,13 @@ public void Switch( Validate(); } - if (IsOutputMessageItemPhase0) + if (OutputMessageItemPhase0 is { } __value0) { - outputMessageItemPhase0?.Invoke(OutputMessageItemPhase0!); + outputMessageItemPhase0?.Invoke(__value0); } - else if (IsOutputMessageItemPhase1) + else if (OutputMessageItemPhase1 is { } __value1) { - outputMessageItemPhase1?.Invoke(OutputMessageItemPhase1!); + outputMessageItemPhase1?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.OutputMessageItemStatus.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.OutputMessageItemStatus.g.cs index 6c604733..7c35c74b 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.OutputMessageItemStatus.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.OutputMessageItemStatus.g.cs @@ -42,8 +42,8 @@ public bool TryPickOutputMessageItemStatus0( /// /// /// - public global::OpenRouter.OutputMessageItemStatus0 PickOutputMessageItemStatus0() => IsOutputMessageItemStatus0 - ? OutputMessageItemStatus0!.Value + public global::OpenRouter.OutputMessageItemStatus0 PickOutputMessageItemStatus0() => OutputMessageItemStatus0 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OutputMessageItemStatus0' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickOutputMessageItemStatus1( /// /// /// - public global::OpenRouter.OutputMessageItemStatus1 PickOutputMessageItemStatus1() => IsOutputMessageItemStatus1 - ? OutputMessageItemStatus1!.Value + public global::OpenRouter.OutputMessageItemStatus1 PickOutputMessageItemStatus1() => OutputMessageItemStatus1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OutputMessageItemStatus1' but the value was {ToString()}."); /// @@ -116,8 +116,8 @@ public bool TryPickOutputMessageItemStatus2( /// /// /// - public global::OpenRouter.OutputMessageItemStatus2 PickOutputMessageItemStatus2() => IsOutputMessageItemStatus2 - ? OutputMessageItemStatus2!.Value + public global::OpenRouter.OutputMessageItemStatus2 PickOutputMessageItemStatus2() => OutputMessageItemStatus2 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OutputMessageItemStatus2' but the value was {ToString()}."); /// /// @@ -242,17 +242,17 @@ public bool Validate() Validate(); } - if (IsOutputMessageItemStatus0 && outputMessageItemStatus0 != null) + if (OutputMessageItemStatus0 is { } __value0 && outputMessageItemStatus0 != null) { - return outputMessageItemStatus0(OutputMessageItemStatus0!); + return outputMessageItemStatus0(__value0); } - else if (IsOutputMessageItemStatus1 && outputMessageItemStatus1 != null) + else if (OutputMessageItemStatus1 is { } __value1 && outputMessageItemStatus1 != null) { - return outputMessageItemStatus1(OutputMessageItemStatus1!); + return outputMessageItemStatus1(__value1); } - else if (IsOutputMessageItemStatus2 && outputMessageItemStatus2 != null) + else if (OutputMessageItemStatus2 is { } __value2 && outputMessageItemStatus2 != null) { - return outputMessageItemStatus2(OutputMessageItemStatus2!); + return outputMessageItemStatus2(__value2); } return default(TResult); @@ -274,17 +274,17 @@ public void Match( Validate(); } - if (IsOutputMessageItemStatus0) + if (OutputMessageItemStatus0 is { } __value0) { - outputMessageItemStatus0?.Invoke(OutputMessageItemStatus0!); + outputMessageItemStatus0?.Invoke(__value0); } - else if (IsOutputMessageItemStatus1) + else if (OutputMessageItemStatus1 is { } __value1) { - outputMessageItemStatus1?.Invoke(OutputMessageItemStatus1!); + outputMessageItemStatus1?.Invoke(__value1); } - else if (IsOutputMessageItemStatus2) + else if (OutputMessageItemStatus2 is { } __value2) { - outputMessageItemStatus2?.Invoke(OutputMessageItemStatus2!); + outputMessageItemStatus2?.Invoke(__value2); } } @@ -302,17 +302,17 @@ public void Switch( Validate(); } - if (IsOutputMessageItemStatus0) + if (OutputMessageItemStatus0 is { } __value0) { - outputMessageItemStatus0?.Invoke(OutputMessageItemStatus0!); + outputMessageItemStatus0?.Invoke(__value0); } - else if (IsOutputMessageItemStatus1) + else if (OutputMessageItemStatus1 is { } __value1) { - outputMessageItemStatus1?.Invoke(OutputMessageItemStatus1!); + outputMessageItemStatus1?.Invoke(__value1); } - else if (IsOutputMessageItemStatus2) + else if (OutputMessageItemStatus2 is { } __value2) { - outputMessageItemStatus2?.Invoke(OutputMessageItemStatus2!); + outputMessageItemStatus2?.Invoke(__value2); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.OutputMessagePhase.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.OutputMessagePhase.g.cs index 8cbea666..c2285088 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.OutputMessagePhase.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.OutputMessagePhase.g.cs @@ -42,8 +42,8 @@ public bool TryPickOutputMessagePhase0( /// /// /// - public global::OpenRouter.OutputMessagePhase0 PickOutputMessagePhase0() => IsOutputMessagePhase0 - ? OutputMessagePhase0!.Value + public global::OpenRouter.OutputMessagePhase0 PickOutputMessagePhase0() => OutputMessagePhase0 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OutputMessagePhase0' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickOutputMessagePhase1( /// /// /// - public global::OpenRouter.OutputMessagePhase1 PickOutputMessagePhase1() => IsOutputMessagePhase1 - ? OutputMessagePhase1!.Value + public global::OpenRouter.OutputMessagePhase1 PickOutputMessagePhase1() => OutputMessagePhase1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OutputMessagePhase1' but the value was {ToString()}."); /// /// @@ -177,13 +177,13 @@ public bool Validate() Validate(); } - if (IsOutputMessagePhase0 && outputMessagePhase0 != null) + if (OutputMessagePhase0 is { } __value0 && outputMessagePhase0 != null) { - return outputMessagePhase0(OutputMessagePhase0!); + return outputMessagePhase0(__value0); } - else if (IsOutputMessagePhase1 && outputMessagePhase1 != null) + else if (OutputMessagePhase1 is { } __value1 && outputMessagePhase1 != null) { - return outputMessagePhase1(OutputMessagePhase1!); + return outputMessagePhase1(__value1); } return default(TResult); @@ -203,13 +203,13 @@ public void Match( Validate(); } - if (IsOutputMessagePhase0) + if (OutputMessagePhase0 is { } __value0) { - outputMessagePhase0?.Invoke(OutputMessagePhase0!); + outputMessagePhase0?.Invoke(__value0); } - else if (IsOutputMessagePhase1) + else if (OutputMessagePhase1 is { } __value1) { - outputMessagePhase1?.Invoke(OutputMessagePhase1!); + outputMessagePhase1?.Invoke(__value1); } } @@ -226,13 +226,13 @@ public void Switch( Validate(); } - if (IsOutputMessagePhase0) + if (OutputMessagePhase0 is { } __value0) { - outputMessagePhase0?.Invoke(OutputMessagePhase0!); + outputMessagePhase0?.Invoke(__value0); } - else if (IsOutputMessagePhase1) + else if (OutputMessagePhase1 is { } __value1) { - outputMessagePhase1?.Invoke(OutputMessagePhase1!); + outputMessagePhase1?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.OutputMessageStatus.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.OutputMessageStatus.g.cs index 257d6f2d..50686d87 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.OutputMessageStatus.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.OutputMessageStatus.g.cs @@ -42,8 +42,8 @@ public bool TryPickOutputMessageStatus0( /// /// /// - public global::OpenRouter.OutputMessageStatus0 PickOutputMessageStatus0() => IsOutputMessageStatus0 - ? OutputMessageStatus0!.Value + public global::OpenRouter.OutputMessageStatus0 PickOutputMessageStatus0() => OutputMessageStatus0 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OutputMessageStatus0' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickOutputMessageStatus1( /// /// /// - public global::OpenRouter.OutputMessageStatus1 PickOutputMessageStatus1() => IsOutputMessageStatus1 - ? OutputMessageStatus1!.Value + public global::OpenRouter.OutputMessageStatus1 PickOutputMessageStatus1() => OutputMessageStatus1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OutputMessageStatus1' but the value was {ToString()}."); /// @@ -116,8 +116,8 @@ public bool TryPickOutputMessageStatus2( /// /// /// - public global::OpenRouter.OutputMessageStatus2 PickOutputMessageStatus2() => IsOutputMessageStatus2 - ? OutputMessageStatus2!.Value + public global::OpenRouter.OutputMessageStatus2 PickOutputMessageStatus2() => OutputMessageStatus2 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OutputMessageStatus2' but the value was {ToString()}."); /// /// @@ -242,17 +242,17 @@ public bool Validate() Validate(); } - if (IsOutputMessageStatus0 && outputMessageStatus0 != null) + if (OutputMessageStatus0 is { } __value0 && outputMessageStatus0 != null) { - return outputMessageStatus0(OutputMessageStatus0!); + return outputMessageStatus0(__value0); } - else if (IsOutputMessageStatus1 && outputMessageStatus1 != null) + else if (OutputMessageStatus1 is { } __value1 && outputMessageStatus1 != null) { - return outputMessageStatus1(OutputMessageStatus1!); + return outputMessageStatus1(__value1); } - else if (IsOutputMessageStatus2 && outputMessageStatus2 != null) + else if (OutputMessageStatus2 is { } __value2 && outputMessageStatus2 != null) { - return outputMessageStatus2(OutputMessageStatus2!); + return outputMessageStatus2(__value2); } return default(TResult); @@ -274,17 +274,17 @@ public void Match( Validate(); } - if (IsOutputMessageStatus0) + if (OutputMessageStatus0 is { } __value0) { - outputMessageStatus0?.Invoke(OutputMessageStatus0!); + outputMessageStatus0?.Invoke(__value0); } - else if (IsOutputMessageStatus1) + else if (OutputMessageStatus1 is { } __value1) { - outputMessageStatus1?.Invoke(OutputMessageStatus1!); + outputMessageStatus1?.Invoke(__value1); } - else if (IsOutputMessageStatus2) + else if (OutputMessageStatus2 is { } __value2) { - outputMessageStatus2?.Invoke(OutputMessageStatus2!); + outputMessageStatus2?.Invoke(__value2); } } @@ -302,17 +302,17 @@ public void Switch( Validate(); } - if (IsOutputMessageStatus0) + if (OutputMessageStatus0 is { } __value0) { - outputMessageStatus0?.Invoke(OutputMessageStatus0!); + outputMessageStatus0?.Invoke(__value0); } - else if (IsOutputMessageStatus1) + else if (OutputMessageStatus1 is { } __value1) { - outputMessageStatus1?.Invoke(OutputMessageStatus1!); + outputMessageStatus1?.Invoke(__value1); } - else if (IsOutputMessageStatus2) + else if (OutputMessageStatus2 is { } __value2) { - outputMessageStatus2?.Invoke(OutputMessageStatus2!); + outputMessageStatus2?.Invoke(__value2); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.OutputReasoningItemStatus.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.OutputReasoningItemStatus.g.cs index d62da297..999639b6 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.OutputReasoningItemStatus.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.OutputReasoningItemStatus.g.cs @@ -42,8 +42,8 @@ public bool TryPickOutputReasoningItemStatus0( /// /// /// - public global::OpenRouter.OutputReasoningItemStatus0 PickOutputReasoningItemStatus0() => IsOutputReasoningItemStatus0 - ? OutputReasoningItemStatus0!.Value + public global::OpenRouter.OutputReasoningItemStatus0 PickOutputReasoningItemStatus0() => OutputReasoningItemStatus0 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OutputReasoningItemStatus0' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickOutputReasoningItemStatus1( /// /// /// - public global::OpenRouter.OutputReasoningItemStatus1 PickOutputReasoningItemStatus1() => IsOutputReasoningItemStatus1 - ? OutputReasoningItemStatus1!.Value + public global::OpenRouter.OutputReasoningItemStatus1 PickOutputReasoningItemStatus1() => OutputReasoningItemStatus1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OutputReasoningItemStatus1' but the value was {ToString()}."); /// @@ -116,8 +116,8 @@ public bool TryPickOutputReasoningItemStatus2( /// /// /// - public global::OpenRouter.OutputReasoningItemStatus2 PickOutputReasoningItemStatus2() => IsOutputReasoningItemStatus2 - ? OutputReasoningItemStatus2!.Value + public global::OpenRouter.OutputReasoningItemStatus2 PickOutputReasoningItemStatus2() => OutputReasoningItemStatus2 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OutputReasoningItemStatus2' but the value was {ToString()}."); /// /// @@ -242,17 +242,17 @@ public bool Validate() Validate(); } - if (IsOutputReasoningItemStatus0 && outputReasoningItemStatus0 != null) + if (OutputReasoningItemStatus0 is { } __value0 && outputReasoningItemStatus0 != null) { - return outputReasoningItemStatus0(OutputReasoningItemStatus0!); + return outputReasoningItemStatus0(__value0); } - else if (IsOutputReasoningItemStatus1 && outputReasoningItemStatus1 != null) + else if (OutputReasoningItemStatus1 is { } __value1 && outputReasoningItemStatus1 != null) { - return outputReasoningItemStatus1(OutputReasoningItemStatus1!); + return outputReasoningItemStatus1(__value1); } - else if (IsOutputReasoningItemStatus2 && outputReasoningItemStatus2 != null) + else if (OutputReasoningItemStatus2 is { } __value2 && outputReasoningItemStatus2 != null) { - return outputReasoningItemStatus2(OutputReasoningItemStatus2!); + return outputReasoningItemStatus2(__value2); } return default(TResult); @@ -274,17 +274,17 @@ public void Match( Validate(); } - if (IsOutputReasoningItemStatus0) + if (OutputReasoningItemStatus0 is { } __value0) { - outputReasoningItemStatus0?.Invoke(OutputReasoningItemStatus0!); + outputReasoningItemStatus0?.Invoke(__value0); } - else if (IsOutputReasoningItemStatus1) + else if (OutputReasoningItemStatus1 is { } __value1) { - outputReasoningItemStatus1?.Invoke(OutputReasoningItemStatus1!); + outputReasoningItemStatus1?.Invoke(__value1); } - else if (IsOutputReasoningItemStatus2) + else if (OutputReasoningItemStatus2 is { } __value2) { - outputReasoningItemStatus2?.Invoke(OutputReasoningItemStatus2!); + outputReasoningItemStatus2?.Invoke(__value2); } } @@ -302,17 +302,17 @@ public void Switch( Validate(); } - if (IsOutputReasoningItemStatus0) + if (OutputReasoningItemStatus0 is { } __value0) { - outputReasoningItemStatus0?.Invoke(OutputReasoningItemStatus0!); + outputReasoningItemStatus0?.Invoke(__value0); } - else if (IsOutputReasoningItemStatus1) + else if (OutputReasoningItemStatus1 is { } __value1) { - outputReasoningItemStatus1?.Invoke(OutputReasoningItemStatus1!); + outputReasoningItemStatus1?.Invoke(__value1); } - else if (IsOutputReasoningItemStatus2) + else if (OutputReasoningItemStatus2 is { } __value2) { - outputReasoningItemStatus2?.Invoke(OutputReasoningItemStatus2!); + outputReasoningItemStatus2?.Invoke(__value2); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.OutputShellCallOutputItemOutputItemsOutcome.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.OutputShellCallOutputItemOutputItemsOutcome.g.cs index 9f50482a..0249344b 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.OutputShellCallOutputItemOutputItemsOutcome.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.OutputShellCallOutputItemOutputItemsOutcome.g.cs @@ -42,8 +42,8 @@ public bool TryPickOutputShellCallOutputItemOutputItemsOutcome0( /// /// /// - public global::OpenRouter.OutputShellCallOutputItemOutputItemsOutcome0 PickOutputShellCallOutputItemOutputItemsOutcome0() => IsOutputShellCallOutputItemOutputItemsOutcome0 - ? OutputShellCallOutputItemOutputItemsOutcome0! + public global::OpenRouter.OutputShellCallOutputItemOutputItemsOutcome0 PickOutputShellCallOutputItemOutputItemsOutcome0() => OutputShellCallOutputItemOutputItemsOutcome0 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OutputShellCallOutputItemOutputItemsOutcome0' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickOutputShellCallOutputItemOutputItemsOutcome1( /// /// /// - public global::OpenRouter.OutputShellCallOutputItemOutputItemsOutcome1 PickOutputShellCallOutputItemOutputItemsOutcome1() => IsOutputShellCallOutputItemOutputItemsOutcome1 - ? OutputShellCallOutputItemOutputItemsOutcome1! + public global::OpenRouter.OutputShellCallOutputItemOutputItemsOutcome1 PickOutputShellCallOutputItemOutputItemsOutcome1() => OutputShellCallOutputItemOutputItemsOutcome1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OutputShellCallOutputItemOutputItemsOutcome1' but the value was {ToString()}."); /// /// @@ -177,13 +177,13 @@ public bool Validate() Validate(); } - if (IsOutputShellCallOutputItemOutputItemsOutcome0 && outputShellCallOutputItemOutputItemsOutcome0 != null) + if (OutputShellCallOutputItemOutputItemsOutcome0 is { } __value0 && outputShellCallOutputItemOutputItemsOutcome0 != null) { - return outputShellCallOutputItemOutputItemsOutcome0(OutputShellCallOutputItemOutputItemsOutcome0!); + return outputShellCallOutputItemOutputItemsOutcome0(__value0); } - else if (IsOutputShellCallOutputItemOutputItemsOutcome1 && outputShellCallOutputItemOutputItemsOutcome1 != null) + else if (OutputShellCallOutputItemOutputItemsOutcome1 is { } __value1 && outputShellCallOutputItemOutputItemsOutcome1 != null) { - return outputShellCallOutputItemOutputItemsOutcome1(OutputShellCallOutputItemOutputItemsOutcome1!); + return outputShellCallOutputItemOutputItemsOutcome1(__value1); } return default(TResult); @@ -203,13 +203,13 @@ public void Match( Validate(); } - if (IsOutputShellCallOutputItemOutputItemsOutcome0) + if (OutputShellCallOutputItemOutputItemsOutcome0 is { } __value0) { - outputShellCallOutputItemOutputItemsOutcome0?.Invoke(OutputShellCallOutputItemOutputItemsOutcome0!); + outputShellCallOutputItemOutputItemsOutcome0?.Invoke(__value0); } - else if (IsOutputShellCallOutputItemOutputItemsOutcome1) + else if (OutputShellCallOutputItemOutputItemsOutcome1 is { } __value1) { - outputShellCallOutputItemOutputItemsOutcome1?.Invoke(OutputShellCallOutputItemOutputItemsOutcome1!); + outputShellCallOutputItemOutputItemsOutcome1?.Invoke(__value1); } } @@ -226,13 +226,13 @@ public void Switch( Validate(); } - if (IsOutputShellCallOutputItemOutputItemsOutcome0) + if (OutputShellCallOutputItemOutputItemsOutcome0 is { } __value0) { - outputShellCallOutputItemOutputItemsOutcome0?.Invoke(OutputShellCallOutputItemOutputItemsOutcome0!); + outputShellCallOutputItemOutputItemsOutcome0?.Invoke(__value0); } - else if (IsOutputShellCallOutputItemOutputItemsOutcome1) + else if (OutputShellCallOutputItemOutputItemsOutcome1 is { } __value1) { - outputShellCallOutputItemOutputItemsOutcome1?.Invoke(OutputShellCallOutputItemOutputItemsOutcome1!); + outputShellCallOutputItemOutputItemsOutcome1?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.OutputWebSearchCallItemAction.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.OutputWebSearchCallItemAction.g.cs index a1e5cb65..d3ec8354 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.OutputWebSearchCallItemAction.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.OutputWebSearchCallItemAction.g.cs @@ -42,8 +42,8 @@ public bool TryPickOutputWebSearchCallItemAction0( /// /// /// - public global::OpenRouter.OutputWebSearchCallItemAction0 PickOutputWebSearchCallItemAction0() => IsOutputWebSearchCallItemAction0 - ? OutputWebSearchCallItemAction0! + public global::OpenRouter.OutputWebSearchCallItemAction0 PickOutputWebSearchCallItemAction0() => OutputWebSearchCallItemAction0 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OutputWebSearchCallItemAction0' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickOutputWebSearchCallItemAction1( /// /// /// - public global::OpenRouter.OutputWebSearchCallItemAction1 PickOutputWebSearchCallItemAction1() => IsOutputWebSearchCallItemAction1 - ? OutputWebSearchCallItemAction1! + public global::OpenRouter.OutputWebSearchCallItemAction1 PickOutputWebSearchCallItemAction1() => OutputWebSearchCallItemAction1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OutputWebSearchCallItemAction1' but the value was {ToString()}."); /// @@ -116,8 +116,8 @@ public bool TryPickOutputWebSearchCallItemAction2( /// /// /// - public global::OpenRouter.OutputWebSearchCallItemAction2 PickOutputWebSearchCallItemAction2() => IsOutputWebSearchCallItemAction2 - ? OutputWebSearchCallItemAction2! + public global::OpenRouter.OutputWebSearchCallItemAction2 PickOutputWebSearchCallItemAction2() => OutputWebSearchCallItemAction2 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OutputWebSearchCallItemAction2' but the value was {ToString()}."); /// /// @@ -242,17 +242,17 @@ public bool Validate() Validate(); } - if (IsOutputWebSearchCallItemAction0 && outputWebSearchCallItemAction0 != null) + if (OutputWebSearchCallItemAction0 is { } __value0 && outputWebSearchCallItemAction0 != null) { - return outputWebSearchCallItemAction0(OutputWebSearchCallItemAction0!); + return outputWebSearchCallItemAction0(__value0); } - else if (IsOutputWebSearchCallItemAction1 && outputWebSearchCallItemAction1 != null) + else if (OutputWebSearchCallItemAction1 is { } __value1 && outputWebSearchCallItemAction1 != null) { - return outputWebSearchCallItemAction1(OutputWebSearchCallItemAction1!); + return outputWebSearchCallItemAction1(__value1); } - else if (IsOutputWebSearchCallItemAction2 && outputWebSearchCallItemAction2 != null) + else if (OutputWebSearchCallItemAction2 is { } __value2 && outputWebSearchCallItemAction2 != null) { - return outputWebSearchCallItemAction2(OutputWebSearchCallItemAction2!); + return outputWebSearchCallItemAction2(__value2); } return default(TResult); @@ -274,17 +274,17 @@ public void Match( Validate(); } - if (IsOutputWebSearchCallItemAction0) + if (OutputWebSearchCallItemAction0 is { } __value0) { - outputWebSearchCallItemAction0?.Invoke(OutputWebSearchCallItemAction0!); + outputWebSearchCallItemAction0?.Invoke(__value0); } - else if (IsOutputWebSearchCallItemAction1) + else if (OutputWebSearchCallItemAction1 is { } __value1) { - outputWebSearchCallItemAction1?.Invoke(OutputWebSearchCallItemAction1!); + outputWebSearchCallItemAction1?.Invoke(__value1); } - else if (IsOutputWebSearchCallItemAction2) + else if (OutputWebSearchCallItemAction2 is { } __value2) { - outputWebSearchCallItemAction2?.Invoke(OutputWebSearchCallItemAction2!); + outputWebSearchCallItemAction2?.Invoke(__value2); } } @@ -302,17 +302,17 @@ public void Switch( Validate(); } - if (IsOutputWebSearchCallItemAction0) + if (OutputWebSearchCallItemAction0 is { } __value0) { - outputWebSearchCallItemAction0?.Invoke(OutputWebSearchCallItemAction0!); + outputWebSearchCallItemAction0?.Invoke(__value0); } - else if (IsOutputWebSearchCallItemAction1) + else if (OutputWebSearchCallItemAction1 is { } __value1) { - outputWebSearchCallItemAction1?.Invoke(OutputWebSearchCallItemAction1!); + outputWebSearchCallItemAction1?.Invoke(__value1); } - else if (IsOutputWebSearchCallItemAction2) + else if (OutputWebSearchCallItemAction2 is { } __value2) { - outputWebSearchCallItemAction2?.Invoke(OutputWebSearchCallItemAction2!); + outputWebSearchCallItemAction2?.Invoke(__value2); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.PDFParserEngine.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.PDFParserEngine.g.cs index a0f4e578..fdd20f7b 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.PDFParserEngine.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.PDFParserEngine.g.cs @@ -42,8 +42,8 @@ public bool TryPickPdfParserEngine0( /// /// /// - public global::OpenRouter.PdfParserEngine0 PickPdfParserEngine0() => IsPdfParserEngine0 - ? PdfParserEngine0!.Value + public global::OpenRouter.PdfParserEngine0 PickPdfParserEngine0() => PdfParserEngine0 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'PdfParserEngine0' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickPdfParserEngine1( /// /// /// - public global::OpenRouter.PdfParserEngine1 PickPdfParserEngine1() => IsPdfParserEngine1 - ? PdfParserEngine1!.Value + public global::OpenRouter.PdfParserEngine1 PickPdfParserEngine1() => PdfParserEngine1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'PdfParserEngine1' but the value was {ToString()}."); /// /// @@ -177,13 +177,13 @@ public bool Validate() Validate(); } - if (IsPdfParserEngine0 && pdfParserEngine0 != null) + if (PdfParserEngine0 is { } __value0 && pdfParserEngine0 != null) { - return pdfParserEngine0(PdfParserEngine0!); + return pdfParserEngine0(__value0); } - else if (IsPdfParserEngine1 && pdfParserEngine1 != null) + else if (PdfParserEngine1 is { } __value1 && pdfParserEngine1 != null) { - return pdfParserEngine1(PdfParserEngine1!); + return pdfParserEngine1(__value1); } return default(TResult); @@ -203,13 +203,13 @@ public void Match( Validate(); } - if (IsPdfParserEngine0) + if (PdfParserEngine0 is { } __value0) { - pdfParserEngine0?.Invoke(PdfParserEngine0!); + pdfParserEngine0?.Invoke(__value0); } - else if (IsPdfParserEngine1) + else if (PdfParserEngine1 is { } __value1) { - pdfParserEngine1?.Invoke(PdfParserEngine1!); + pdfParserEngine1?.Invoke(__value1); } } @@ -226,13 +226,13 @@ public void Switch( Validate(); } - if (IsPdfParserEngine0) + if (PdfParserEngine0 is { } __value0) { - pdfParserEngine0?.Invoke(PdfParserEngine0!); + pdfParserEngine0?.Invoke(__value0); } - else if (IsPdfParserEngine1) + else if (PdfParserEngine1 is { } __value1) { - pdfParserEngine1?.Invoke(PdfParserEngine1!); + pdfParserEngine1?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.PredictionContent.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.PredictionContent.g.cs index a074f24f..a7475c30 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.PredictionContent.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.PredictionContent.g.cs @@ -42,8 +42,8 @@ public bool TryPickPredictionContentVariant1( /// /// /// - public string PickPredictionContentVariant1() => IsPredictionContentVariant1 - ? PredictionContentVariant1! + public string PickPredictionContentVariant1() => PredictionContentVariant1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'PredictionContentVariant1' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickPredictionContent1( /// /// /// - public global::System.Collections.Generic.IList PickPredictionContent1() => IsPredictionContent1 - ? PredictionContent1! + public global::System.Collections.Generic.IList PickPredictionContent1() => PredictionContent1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'PredictionContent1' but the value was {ToString()}."); /// /// @@ -154,13 +154,13 @@ public bool Validate() Validate(); } - if (IsPredictionContentVariant1 && predictionContentVariant1 != null) + if (PredictionContentVariant1 is { } __value0 && predictionContentVariant1 != null) { - return predictionContentVariant1(PredictionContentVariant1!); + return predictionContentVariant1(__value0); } - else if (IsPredictionContent1 && predictionContent1 != null) + else if (PredictionContent1 is { } __value1 && predictionContent1 != null) { - return predictionContent1(PredictionContent1!); + return predictionContent1(__value1); } return default(TResult); @@ -180,13 +180,13 @@ public void Match( Validate(); } - if (IsPredictionContentVariant1) + if (PredictionContentVariant1 is { } __value0) { - predictionContentVariant1?.Invoke(PredictionContentVariant1!); + predictionContentVariant1?.Invoke(__value0); } - else if (IsPredictionContent1) + else if (PredictionContent1 is { } __value1) { - predictionContent1?.Invoke(PredictionContent1!); + predictionContent1?.Invoke(__value1); } } @@ -203,13 +203,13 @@ public void Switch( Validate(); } - if (IsPredictionContentVariant1) + if (PredictionContentVariant1 is { } __value0) { - predictionContentVariant1?.Invoke(PredictionContentVariant1!); + predictionContentVariant1?.Invoke(__value0); } - else if (IsPredictionContent1) + else if (PredictionContent1 is { } __value1) { - predictionContent1?.Invoke(PredictionContent1!); + predictionContent1?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.PreferredMaxLatency.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.PreferredMaxLatency.g.cs index 2eb49ffb..45e28215 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.PreferredMaxLatency.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.PreferredMaxLatency.g.cs @@ -42,8 +42,8 @@ public bool TryPickPreferredMaxLatencyVariant1( /// /// /// - public double PickPreferredMaxLatencyVariant1() => IsPreferredMaxLatencyVariant1 - ? PreferredMaxLatencyVariant1!.Value + public double PickPreferredMaxLatencyVariant1() => PreferredMaxLatencyVariant1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'PreferredMaxLatencyVariant1' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickPercentileLatencyCutoffs( /// /// /// - public global::OpenRouter.PercentileLatencyCutoffs PickPercentileLatencyCutoffs() => IsPercentileLatencyCutoffs - ? PercentileLatencyCutoffs! + public global::OpenRouter.PercentileLatencyCutoffs PickPercentileLatencyCutoffs() => PercentileLatencyCutoffs is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'PercentileLatencyCutoffs' but the value was {ToString()}."); /// /// @@ -177,13 +177,13 @@ public bool Validate() Validate(); } - if (IsPreferredMaxLatencyVariant1 && preferredMaxLatencyVariant1 != null) + if (PreferredMaxLatencyVariant1 is { } __value0 && preferredMaxLatencyVariant1 != null) { - return preferredMaxLatencyVariant1(PreferredMaxLatencyVariant1!); + return preferredMaxLatencyVariant1(__value0); } - else if (IsPercentileLatencyCutoffs && percentileLatencyCutoffs != null) + else if (PercentileLatencyCutoffs is { } __value1 && percentileLatencyCutoffs != null) { - return percentileLatencyCutoffs(PercentileLatencyCutoffs!); + return percentileLatencyCutoffs(__value1); } return default(TResult); @@ -203,13 +203,13 @@ public void Match( Validate(); } - if (IsPreferredMaxLatencyVariant1) + if (PreferredMaxLatencyVariant1 is { } __value0) { - preferredMaxLatencyVariant1?.Invoke(PreferredMaxLatencyVariant1!); + preferredMaxLatencyVariant1?.Invoke(__value0); } - else if (IsPercentileLatencyCutoffs) + else if (PercentileLatencyCutoffs is { } __value1) { - percentileLatencyCutoffs?.Invoke(PercentileLatencyCutoffs!); + percentileLatencyCutoffs?.Invoke(__value1); } } @@ -226,13 +226,13 @@ public void Switch( Validate(); } - if (IsPreferredMaxLatencyVariant1) + if (PreferredMaxLatencyVariant1 is { } __value0) { - preferredMaxLatencyVariant1?.Invoke(PreferredMaxLatencyVariant1!); + preferredMaxLatencyVariant1?.Invoke(__value0); } - else if (IsPercentileLatencyCutoffs) + else if (PercentileLatencyCutoffs is { } __value1) { - percentileLatencyCutoffs?.Invoke(PercentileLatencyCutoffs!); + percentileLatencyCutoffs?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.PreferredMinThroughput.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.PreferredMinThroughput.g.cs index 56023e42..74737cc3 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.PreferredMinThroughput.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.PreferredMinThroughput.g.cs @@ -42,8 +42,8 @@ public bool TryPickPreferredMinThroughputVariant1( /// /// /// - public double PickPreferredMinThroughputVariant1() => IsPreferredMinThroughputVariant1 - ? PreferredMinThroughputVariant1!.Value + public double PickPreferredMinThroughputVariant1() => PreferredMinThroughputVariant1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'PreferredMinThroughputVariant1' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickPercentileThroughputCutoffs( /// /// /// - public global::OpenRouter.PercentileThroughputCutoffs PickPercentileThroughputCutoffs() => IsPercentileThroughputCutoffs - ? PercentileThroughputCutoffs! + public global::OpenRouter.PercentileThroughputCutoffs PickPercentileThroughputCutoffs() => PercentileThroughputCutoffs is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'PercentileThroughputCutoffs' but the value was {ToString()}."); /// /// @@ -177,13 +177,13 @@ public bool Validate() Validate(); } - if (IsPreferredMinThroughputVariant1 && preferredMinThroughputVariant1 != null) + if (PreferredMinThroughputVariant1 is { } __value0 && preferredMinThroughputVariant1 != null) { - return preferredMinThroughputVariant1(PreferredMinThroughputVariant1!); + return preferredMinThroughputVariant1(__value0); } - else if (IsPercentileThroughputCutoffs && percentileThroughputCutoffs != null) + else if (PercentileThroughputCutoffs is { } __value1 && percentileThroughputCutoffs != null) { - return percentileThroughputCutoffs(PercentileThroughputCutoffs!); + return percentileThroughputCutoffs(__value1); } return default(TResult); @@ -203,13 +203,13 @@ public void Match( Validate(); } - if (IsPreferredMinThroughputVariant1) + if (PreferredMinThroughputVariant1 is { } __value0) { - preferredMinThroughputVariant1?.Invoke(PreferredMinThroughputVariant1!); + preferredMinThroughputVariant1?.Invoke(__value0); } - else if (IsPercentileThroughputCutoffs) + else if (PercentileThroughputCutoffs is { } __value1) { - percentileThroughputCutoffs?.Invoke(PercentileThroughputCutoffs!); + percentileThroughputCutoffs?.Invoke(__value1); } } @@ -226,13 +226,13 @@ public void Switch( Validate(); } - if (IsPreferredMinThroughputVariant1) + if (PreferredMinThroughputVariant1 is { } __value0) { - preferredMinThroughputVariant1?.Invoke(PreferredMinThroughputVariant1!); + preferredMinThroughputVariant1?.Invoke(__value0); } - else if (IsPercentileThroughputCutoffs) + else if (PercentileThroughputCutoffs is { } __value1) { - percentileThroughputCutoffs?.Invoke(PercentileThroughputCutoffs!); + percentileThroughputCutoffs?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.ProviderPreferencesIgnoreItems.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.ProviderPreferencesIgnoreItems.g.cs index c97eb112..ae54e9cc 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.ProviderPreferencesIgnoreItems.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.ProviderPreferencesIgnoreItems.g.cs @@ -42,8 +42,8 @@ public bool TryPickProviderName( /// /// /// - public global::OpenRouter.ProviderName PickProviderName() => IsProviderName - ? ProviderName!.Value + public global::OpenRouter.ProviderName PickProviderName() => ProviderName is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ProviderName' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickProviderPreferencesIgnoreItemsVariant2( /// /// /// - public string PickProviderPreferencesIgnoreItemsVariant2() => IsProviderPreferencesIgnoreItemsVariant2 - ? ProviderPreferencesIgnoreItemsVariant2! + public string PickProviderPreferencesIgnoreItemsVariant2() => ProviderPreferencesIgnoreItemsVariant2 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ProviderPreferencesIgnoreItemsVariant2' but the value was {ToString()}."); /// /// @@ -177,13 +177,13 @@ public bool Validate() Validate(); } - if (IsProviderName && providerName != null) + if (ProviderName is { } __value0 && providerName != null) { - return providerName(ProviderName!); + return providerName(__value0); } - else if (IsProviderPreferencesIgnoreItemsVariant2 && providerPreferencesIgnoreItemsVariant2 != null) + else if (ProviderPreferencesIgnoreItemsVariant2 is { } __value1 && providerPreferencesIgnoreItemsVariant2 != null) { - return providerPreferencesIgnoreItemsVariant2(ProviderPreferencesIgnoreItemsVariant2!); + return providerPreferencesIgnoreItemsVariant2(__value1); } return default(TResult); @@ -203,13 +203,13 @@ public void Match( Validate(); } - if (IsProviderName) + if (ProviderName is { } __value0) { - providerName?.Invoke(ProviderName!); + providerName?.Invoke(__value0); } - else if (IsProviderPreferencesIgnoreItemsVariant2) + else if (ProviderPreferencesIgnoreItemsVariant2 is { } __value1) { - providerPreferencesIgnoreItemsVariant2?.Invoke(ProviderPreferencesIgnoreItemsVariant2!); + providerPreferencesIgnoreItemsVariant2?.Invoke(__value1); } } @@ -226,13 +226,13 @@ public void Switch( Validate(); } - if (IsProviderName) + if (ProviderName is { } __value0) { - providerName?.Invoke(ProviderName!); + providerName?.Invoke(__value0); } - else if (IsProviderPreferencesIgnoreItemsVariant2) + else if (ProviderPreferencesIgnoreItemsVariant2 is { } __value1) { - providerPreferencesIgnoreItemsVariant2?.Invoke(ProviderPreferencesIgnoreItemsVariant2!); + providerPreferencesIgnoreItemsVariant2?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.ProviderPreferencesOnlyItems.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.ProviderPreferencesOnlyItems.g.cs index f6d5872c..c65f264d 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.ProviderPreferencesOnlyItems.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.ProviderPreferencesOnlyItems.g.cs @@ -42,8 +42,8 @@ public bool TryPickProviderName( /// /// /// - public global::OpenRouter.ProviderName PickProviderName() => IsProviderName - ? ProviderName!.Value + public global::OpenRouter.ProviderName PickProviderName() => ProviderName is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ProviderName' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickProviderPreferencesOnlyItemsVariant2( /// /// /// - public string PickProviderPreferencesOnlyItemsVariant2() => IsProviderPreferencesOnlyItemsVariant2 - ? ProviderPreferencesOnlyItemsVariant2! + public string PickProviderPreferencesOnlyItemsVariant2() => ProviderPreferencesOnlyItemsVariant2 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ProviderPreferencesOnlyItemsVariant2' but the value was {ToString()}."); /// /// @@ -177,13 +177,13 @@ public bool Validate() Validate(); } - if (IsProviderName && providerName != null) + if (ProviderName is { } __value0 && providerName != null) { - return providerName(ProviderName!); + return providerName(__value0); } - else if (IsProviderPreferencesOnlyItemsVariant2 && providerPreferencesOnlyItemsVariant2 != null) + else if (ProviderPreferencesOnlyItemsVariant2 is { } __value1 && providerPreferencesOnlyItemsVariant2 != null) { - return providerPreferencesOnlyItemsVariant2(ProviderPreferencesOnlyItemsVariant2!); + return providerPreferencesOnlyItemsVariant2(__value1); } return default(TResult); @@ -203,13 +203,13 @@ public void Match( Validate(); } - if (IsProviderName) + if (ProviderName is { } __value0) { - providerName?.Invoke(ProviderName!); + providerName?.Invoke(__value0); } - else if (IsProviderPreferencesOnlyItemsVariant2) + else if (ProviderPreferencesOnlyItemsVariant2 is { } __value1) { - providerPreferencesOnlyItemsVariant2?.Invoke(ProviderPreferencesOnlyItemsVariant2!); + providerPreferencesOnlyItemsVariant2?.Invoke(__value1); } } @@ -226,13 +226,13 @@ public void Switch( Validate(); } - if (IsProviderName) + if (ProviderName is { } __value0) { - providerName?.Invoke(ProviderName!); + providerName?.Invoke(__value0); } - else if (IsProviderPreferencesOnlyItemsVariant2) + else if (ProviderPreferencesOnlyItemsVariant2 is { } __value1) { - providerPreferencesOnlyItemsVariant2?.Invoke(ProviderPreferencesOnlyItemsVariant2!); + providerPreferencesOnlyItemsVariant2?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.ProviderPreferencesOrderItems.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.ProviderPreferencesOrderItems.g.cs index 872a9434..98806868 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.ProviderPreferencesOrderItems.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.ProviderPreferencesOrderItems.g.cs @@ -42,8 +42,8 @@ public bool TryPickProviderName( /// /// /// - public global::OpenRouter.ProviderName PickProviderName() => IsProviderName - ? ProviderName!.Value + public global::OpenRouter.ProviderName PickProviderName() => ProviderName is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ProviderName' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickProviderPreferencesOrderItemsVariant2( /// /// /// - public string PickProviderPreferencesOrderItemsVariant2() => IsProviderPreferencesOrderItemsVariant2 - ? ProviderPreferencesOrderItemsVariant2! + public string PickProviderPreferencesOrderItemsVariant2() => ProviderPreferencesOrderItemsVariant2 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ProviderPreferencesOrderItemsVariant2' but the value was {ToString()}."); /// /// @@ -177,13 +177,13 @@ public bool Validate() Validate(); } - if (IsProviderName && providerName != null) + if (ProviderName is { } __value0 && providerName != null) { - return providerName(ProviderName!); + return providerName(__value0); } - else if (IsProviderPreferencesOrderItemsVariant2 && providerPreferencesOrderItemsVariant2 != null) + else if (ProviderPreferencesOrderItemsVariant2 is { } __value1 && providerPreferencesOrderItemsVariant2 != null) { - return providerPreferencesOrderItemsVariant2(ProviderPreferencesOrderItemsVariant2!); + return providerPreferencesOrderItemsVariant2(__value1); } return default(TResult); @@ -203,13 +203,13 @@ public void Match( Validate(); } - if (IsProviderName) + if (ProviderName is { } __value0) { - providerName?.Invoke(ProviderName!); + providerName?.Invoke(__value0); } - else if (IsProviderPreferencesOrderItemsVariant2) + else if (ProviderPreferencesOrderItemsVariant2 is { } __value1) { - providerPreferencesOrderItemsVariant2?.Invoke(ProviderPreferencesOrderItemsVariant2!); + providerPreferencesOrderItemsVariant2?.Invoke(__value1); } } @@ -226,13 +226,13 @@ public void Switch( Validate(); } - if (IsProviderName) + if (ProviderName is { } __value0) { - providerName?.Invoke(ProviderName!); + providerName?.Invoke(__value0); } - else if (IsProviderPreferencesOrderItemsVariant2) + else if (ProviderPreferencesOrderItemsVariant2 is { } __value1) { - providerPreferencesOrderItemsVariant2?.Invoke(ProviderPreferencesOrderItemsVariant2!); + providerPreferencesOrderItemsVariant2?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.ProviderPreferencesSort.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.ProviderPreferencesSort.g.cs index 339734f1..b3fc4650 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.ProviderPreferencesSort.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.ProviderPreferencesSort.g.cs @@ -42,8 +42,8 @@ public bool TryPickProviderSort( /// /// /// - public global::OpenRouter.ProviderSort PickProviderSort() => IsProviderSort - ? ProviderSort!.Value + public global::OpenRouter.ProviderSort PickProviderSort() => ProviderSort is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ProviderSort' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickProviderSortConfig( /// /// /// - public global::OpenRouter.ProviderSortConfig PickProviderSortConfig() => IsProviderSortConfig - ? ProviderSortConfig! + public global::OpenRouter.ProviderSortConfig PickProviderSortConfig() => ProviderSortConfig is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ProviderSortConfig' but the value was {ToString()}."); /// /// @@ -177,13 +177,13 @@ public bool Validate() Validate(); } - if (IsProviderSort && providerSort != null) + if (ProviderSort is { } __value0 && providerSort != null) { - return providerSort(ProviderSort!); + return providerSort(__value0); } - else if (IsProviderSortConfig && providerSortConfig != null) + else if (ProviderSortConfig is { } __value1 && providerSortConfig != null) { - return providerSortConfig(ProviderSortConfig!); + return providerSortConfig(__value1); } return default(TResult); @@ -203,13 +203,13 @@ public void Match( Validate(); } - if (IsProviderSort) + if (ProviderSort is { } __value0) { - providerSort?.Invoke(ProviderSort!); + providerSort?.Invoke(__value0); } - else if (IsProviderSortConfig) + else if (ProviderSortConfig is { } __value1) { - providerSortConfig?.Invoke(ProviderSortConfig!); + providerSortConfig?.Invoke(__value1); } } @@ -226,13 +226,13 @@ public void Switch( Validate(); } - if (IsProviderSort) + if (ProviderSort is { } __value0) { - providerSort?.Invoke(ProviderSort!); + providerSort?.Invoke(__value0); } - else if (IsProviderSortConfig) + else if (ProviderSortConfig is { } __value1) { - providerSortConfig?.Invoke(ProviderSortConfig!); + providerSortConfig?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.ReasoningDetailUnion.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.ReasoningDetailUnion.g.cs index 57d88fc6..c68cb225 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.ReasoningDetailUnion.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.ReasoningDetailUnion.g.cs @@ -47,8 +47,8 @@ public bool TryPickReasoningEncrypted( /// /// /// - public global::OpenRouter.ReasoningDetailUnionVariant1 PickReasoningEncrypted() => IsReasoningEncrypted - ? ReasoningEncrypted! + public global::OpenRouter.ReasoningDetailUnionVariant1 PickReasoningEncrypted() => ReasoningEncrypted is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ReasoningEncrypted' but the value was {ToString()}."); /// @@ -84,8 +84,8 @@ public bool TryPickReasoningServerToolCall( /// /// /// - public global::OpenRouter.ReasoningDetailUnionVariant2 PickReasoningServerToolCall() => IsReasoningServerToolCall - ? ReasoningServerToolCall! + public global::OpenRouter.ReasoningDetailUnionVariant2 PickReasoningServerToolCall() => ReasoningServerToolCall is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ReasoningServerToolCall' but the value was {ToString()}."); /// @@ -121,8 +121,8 @@ public bool TryPickReasoningSummary( /// /// /// - public global::OpenRouter.ReasoningDetailUnionVariant3 PickReasoningSummary() => IsReasoningSummary - ? ReasoningSummary! + public global::OpenRouter.ReasoningDetailUnionVariant3 PickReasoningSummary() => ReasoningSummary is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ReasoningSummary' but the value was {ToString()}."); /// @@ -158,8 +158,8 @@ public bool TryPickReasoningText( /// /// /// - public global::OpenRouter.ReasoningDetailUnionVariant4 PickReasoningText() => IsReasoningText - ? ReasoningText! + public global::OpenRouter.ReasoningDetailUnionVariant4 PickReasoningText() => ReasoningText is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ReasoningText' but the value was {ToString()}."); /// /// @@ -315,21 +315,21 @@ public bool Validate() Validate(); } - if (IsReasoningEncrypted && reasoningEncrypted != null) + if (ReasoningEncrypted is { } __value0 && reasoningEncrypted != null) { - return reasoningEncrypted(ReasoningEncrypted!); + return reasoningEncrypted(__value0); } - else if (IsReasoningServerToolCall && reasoningServerToolCall != null) + else if (ReasoningServerToolCall is { } __value1 && reasoningServerToolCall != null) { - return reasoningServerToolCall(ReasoningServerToolCall!); + return reasoningServerToolCall(__value1); } - else if (IsReasoningSummary && reasoningSummary != null) + else if (ReasoningSummary is { } __value2 && reasoningSummary != null) { - return reasoningSummary(ReasoningSummary!); + return reasoningSummary(__value2); } - else if (IsReasoningText && reasoningText != null) + else if (ReasoningText is { } __value3 && reasoningText != null) { - return reasoningText(ReasoningText!); + return reasoningText(__value3); } return default(TResult); @@ -353,21 +353,21 @@ public void Match( Validate(); } - if (IsReasoningEncrypted) + if (ReasoningEncrypted is { } __value0) { - reasoningEncrypted?.Invoke(ReasoningEncrypted!); + reasoningEncrypted?.Invoke(__value0); } - else if (IsReasoningServerToolCall) + else if (ReasoningServerToolCall is { } __value1) { - reasoningServerToolCall?.Invoke(ReasoningServerToolCall!); + reasoningServerToolCall?.Invoke(__value1); } - else if (IsReasoningSummary) + else if (ReasoningSummary is { } __value2) { - reasoningSummary?.Invoke(ReasoningSummary!); + reasoningSummary?.Invoke(__value2); } - else if (IsReasoningText) + else if (ReasoningText is { } __value3) { - reasoningText?.Invoke(ReasoningText!); + reasoningText?.Invoke(__value3); } } @@ -386,21 +386,21 @@ public void Switch( Validate(); } - if (IsReasoningEncrypted) + if (ReasoningEncrypted is { } __value0) { - reasoningEncrypted?.Invoke(ReasoningEncrypted!); + reasoningEncrypted?.Invoke(__value0); } - else if (IsReasoningServerToolCall) + else if (ReasoningServerToolCall is { } __value1) { - reasoningServerToolCall?.Invoke(ReasoningServerToolCall!); + reasoningServerToolCall?.Invoke(__value1); } - else if (IsReasoningSummary) + else if (ReasoningSummary is { } __value2) { - reasoningSummary?.Invoke(ReasoningSummary!); + reasoningSummary?.Invoke(__value2); } - else if (IsReasoningText) + else if (ReasoningText is { } __value3) { - reasoningText?.Invoke(ReasoningText!); + reasoningText?.Invoke(__value3); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.ReasoningItemStatus.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.ReasoningItemStatus.g.cs index 7f1544c7..88300d9d 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.ReasoningItemStatus.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.ReasoningItemStatus.g.cs @@ -42,8 +42,8 @@ public bool TryPickReasoningItemStatus0( /// /// /// - public global::OpenRouter.ReasoningItemStatus0 PickReasoningItemStatus0() => IsReasoningItemStatus0 - ? ReasoningItemStatus0!.Value + public global::OpenRouter.ReasoningItemStatus0 PickReasoningItemStatus0() => ReasoningItemStatus0 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ReasoningItemStatus0' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickReasoningItemStatus1( /// /// /// - public global::OpenRouter.ReasoningItemStatus1 PickReasoningItemStatus1() => IsReasoningItemStatus1 - ? ReasoningItemStatus1!.Value + public global::OpenRouter.ReasoningItemStatus1 PickReasoningItemStatus1() => ReasoningItemStatus1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ReasoningItemStatus1' but the value was {ToString()}."); /// @@ -116,8 +116,8 @@ public bool TryPickReasoningItemStatus2( /// /// /// - public global::OpenRouter.ReasoningItemStatus2 PickReasoningItemStatus2() => IsReasoningItemStatus2 - ? ReasoningItemStatus2!.Value + public global::OpenRouter.ReasoningItemStatus2 PickReasoningItemStatus2() => ReasoningItemStatus2 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ReasoningItemStatus2' but the value was {ToString()}."); /// /// @@ -242,17 +242,17 @@ public bool Validate() Validate(); } - if (IsReasoningItemStatus0 && reasoningItemStatus0 != null) + if (ReasoningItemStatus0 is { } __value0 && reasoningItemStatus0 != null) { - return reasoningItemStatus0(ReasoningItemStatus0!); + return reasoningItemStatus0(__value0); } - else if (IsReasoningItemStatus1 && reasoningItemStatus1 != null) + else if (ReasoningItemStatus1 is { } __value1 && reasoningItemStatus1 != null) { - return reasoningItemStatus1(ReasoningItemStatus1!); + return reasoningItemStatus1(__value1); } - else if (IsReasoningItemStatus2 && reasoningItemStatus2 != null) + else if (ReasoningItemStatus2 is { } __value2 && reasoningItemStatus2 != null) { - return reasoningItemStatus2(ReasoningItemStatus2!); + return reasoningItemStatus2(__value2); } return default(TResult); @@ -274,17 +274,17 @@ public void Match( Validate(); } - if (IsReasoningItemStatus0) + if (ReasoningItemStatus0 is { } __value0) { - reasoningItemStatus0?.Invoke(ReasoningItemStatus0!); + reasoningItemStatus0?.Invoke(__value0); } - else if (IsReasoningItemStatus1) + else if (ReasoningItemStatus1 is { } __value1) { - reasoningItemStatus1?.Invoke(ReasoningItemStatus1!); + reasoningItemStatus1?.Invoke(__value1); } - else if (IsReasoningItemStatus2) + else if (ReasoningItemStatus2 is { } __value2) { - reasoningItemStatus2?.Invoke(ReasoningItemStatus2!); + reasoningItemStatus2?.Invoke(__value2); } } @@ -302,17 +302,17 @@ public void Switch( Validate(); } - if (IsReasoningItemStatus0) + if (ReasoningItemStatus0 is { } __value0) { - reasoningItemStatus0?.Invoke(ReasoningItemStatus0!); + reasoningItemStatus0?.Invoke(__value0); } - else if (IsReasoningItemStatus1) + else if (ReasoningItemStatus1 is { } __value1) { - reasoningItemStatus1?.Invoke(ReasoningItemStatus1!); + reasoningItemStatus1?.Invoke(__value1); } - else if (IsReasoningItemStatus2) + else if (ReasoningItemStatus2 is { } __value2) { - reasoningItemStatus2?.Invoke(ReasoningItemStatus2!); + reasoningItemStatus2?.Invoke(__value2); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.RerankPostRequestBodyContentApplicationJsonSchemaDocumentsItems.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.RerankPostRequestBodyContentApplicationJsonSchemaDocumentsItems.g.cs index ce729a27..5bce9915 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.RerankPostRequestBodyContentApplicationJsonSchemaDocumentsItems.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.RerankPostRequestBodyContentApplicationJsonSchemaDocumentsItems.g.cs @@ -42,8 +42,8 @@ public bool TryPickRerankPostRequestBodyContentApplicationJsonSchemaDocumentsIte /// /// /// - public string PickRerankPostRequestBodyContentApplicationJsonSchemaDocumentsItemsVariant1() => IsRerankPostRequestBodyContentApplicationJsonSchemaDocumentsItemsVariant1 - ? RerankPostRequestBodyContentApplicationJsonSchemaDocumentsItemsVariant1! + public string PickRerankPostRequestBodyContentApplicationJsonSchemaDocumentsItemsVariant1() => RerankPostRequestBodyContentApplicationJsonSchemaDocumentsItemsVariant1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'RerankPostRequestBodyContentApplicationJsonSchemaDocumentsItemsVariant1' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickRerankPostRequestBodyContentApplicationJsonSchemaDocumentsIte /// /// /// - public global::OpenRouter.RerankPostRequestBodyContentApplicationJsonSchemaDocumentsItems1 PickRerankPostRequestBodyContentApplicationJsonSchemaDocumentsItems1() => IsRerankPostRequestBodyContentApplicationJsonSchemaDocumentsItems1 - ? RerankPostRequestBodyContentApplicationJsonSchemaDocumentsItems1! + public global::OpenRouter.RerankPostRequestBodyContentApplicationJsonSchemaDocumentsItems1 PickRerankPostRequestBodyContentApplicationJsonSchemaDocumentsItems1() => RerankPostRequestBodyContentApplicationJsonSchemaDocumentsItems1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'RerankPostRequestBodyContentApplicationJsonSchemaDocumentsItems1' but the value was {ToString()}."); /// /// @@ -177,13 +177,13 @@ public bool Validate() Validate(); } - if (IsRerankPostRequestBodyContentApplicationJsonSchemaDocumentsItemsVariant1 && rerankPostRequestBodyContentApplicationJsonSchemaDocumentsItemsVariant1 != null) + if (RerankPostRequestBodyContentApplicationJsonSchemaDocumentsItemsVariant1 is { } __value0 && rerankPostRequestBodyContentApplicationJsonSchemaDocumentsItemsVariant1 != null) { - return rerankPostRequestBodyContentApplicationJsonSchemaDocumentsItemsVariant1(RerankPostRequestBodyContentApplicationJsonSchemaDocumentsItemsVariant1!); + return rerankPostRequestBodyContentApplicationJsonSchemaDocumentsItemsVariant1(__value0); } - else if (IsRerankPostRequestBodyContentApplicationJsonSchemaDocumentsItems1 && rerankPostRequestBodyContentApplicationJsonSchemaDocumentsItems1 != null) + else if (RerankPostRequestBodyContentApplicationJsonSchemaDocumentsItems1 is { } __value1 && rerankPostRequestBodyContentApplicationJsonSchemaDocumentsItems1 != null) { - return rerankPostRequestBodyContentApplicationJsonSchemaDocumentsItems1(RerankPostRequestBodyContentApplicationJsonSchemaDocumentsItems1!); + return rerankPostRequestBodyContentApplicationJsonSchemaDocumentsItems1(__value1); } return default(TResult); @@ -203,13 +203,13 @@ public void Match( Validate(); } - if (IsRerankPostRequestBodyContentApplicationJsonSchemaDocumentsItemsVariant1) + if (RerankPostRequestBodyContentApplicationJsonSchemaDocumentsItemsVariant1 is { } __value0) { - rerankPostRequestBodyContentApplicationJsonSchemaDocumentsItemsVariant1?.Invoke(RerankPostRequestBodyContentApplicationJsonSchemaDocumentsItemsVariant1!); + rerankPostRequestBodyContentApplicationJsonSchemaDocumentsItemsVariant1?.Invoke(__value0); } - else if (IsRerankPostRequestBodyContentApplicationJsonSchemaDocumentsItems1) + else if (RerankPostRequestBodyContentApplicationJsonSchemaDocumentsItems1 is { } __value1) { - rerankPostRequestBodyContentApplicationJsonSchemaDocumentsItems1?.Invoke(RerankPostRequestBodyContentApplicationJsonSchemaDocumentsItems1!); + rerankPostRequestBodyContentApplicationJsonSchemaDocumentsItems1?.Invoke(__value1); } } @@ -226,13 +226,13 @@ public void Switch( Validate(); } - if (IsRerankPostRequestBodyContentApplicationJsonSchemaDocumentsItemsVariant1) + if (RerankPostRequestBodyContentApplicationJsonSchemaDocumentsItemsVariant1 is { } __value0) { - rerankPostRequestBodyContentApplicationJsonSchemaDocumentsItemsVariant1?.Invoke(RerankPostRequestBodyContentApplicationJsonSchemaDocumentsItemsVariant1!); + rerankPostRequestBodyContentApplicationJsonSchemaDocumentsItemsVariant1?.Invoke(__value0); } - else if (IsRerankPostRequestBodyContentApplicationJsonSchemaDocumentsItems1) + else if (RerankPostRequestBodyContentApplicationJsonSchemaDocumentsItems1 is { } __value1) { - rerankPostRequestBodyContentApplicationJsonSchemaDocumentsItems1?.Invoke(RerankPostRequestBodyContentApplicationJsonSchemaDocumentsItems1!); + rerankPostRequestBodyContentApplicationJsonSchemaDocumentsItems1?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.RerankPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItems.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.RerankPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItems.g.cs index df0092d0..c2956cfa 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.RerankPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItems.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.RerankPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItems.g.cs @@ -42,8 +42,8 @@ public bool TryPickProviderName( /// /// /// - public global::OpenRouter.ProviderName PickProviderName() => IsProviderName - ? ProviderName!.Value + public global::OpenRouter.ProviderName PickProviderName() => ProviderName is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ProviderName' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickRerankPostRequestBodyContentApplicationJsonSchemaProviderIgno /// /// /// - public string PickRerankPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItemsVariant2() => IsRerankPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItemsVariant2 - ? RerankPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItemsVariant2! + public string PickRerankPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItemsVariant2() => RerankPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItemsVariant2 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'RerankPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItemsVariant2' but the value was {ToString()}."); /// /// @@ -177,13 +177,13 @@ public bool Validate() Validate(); } - if (IsProviderName && providerName != null) + if (ProviderName is { } __value0 && providerName != null) { - return providerName(ProviderName!); + return providerName(__value0); } - else if (IsRerankPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItemsVariant2 && rerankPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItemsVariant2 != null) + else if (RerankPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItemsVariant2 is { } __value1 && rerankPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItemsVariant2 != null) { - return rerankPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItemsVariant2(RerankPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItemsVariant2!); + return rerankPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItemsVariant2(__value1); } return default(TResult); @@ -203,13 +203,13 @@ public void Match( Validate(); } - if (IsProviderName) + if (ProviderName is { } __value0) { - providerName?.Invoke(ProviderName!); + providerName?.Invoke(__value0); } - else if (IsRerankPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItemsVariant2) + else if (RerankPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItemsVariant2 is { } __value1) { - rerankPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItemsVariant2?.Invoke(RerankPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItemsVariant2!); + rerankPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItemsVariant2?.Invoke(__value1); } } @@ -226,13 +226,13 @@ public void Switch( Validate(); } - if (IsProviderName) + if (ProviderName is { } __value0) { - providerName?.Invoke(ProviderName!); + providerName?.Invoke(__value0); } - else if (IsRerankPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItemsVariant2) + else if (RerankPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItemsVariant2 is { } __value1) { - rerankPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItemsVariant2?.Invoke(RerankPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItemsVariant2!); + rerankPostRequestBodyContentApplicationJsonSchemaProviderIgnoreItemsVariant2?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.RerankPostRequestBodyContentApplicationJsonSchemaProviderOnlyItems.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.RerankPostRequestBodyContentApplicationJsonSchemaProviderOnlyItems.g.cs index c2b1feb9..9ab7da94 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.RerankPostRequestBodyContentApplicationJsonSchemaProviderOnlyItems.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.RerankPostRequestBodyContentApplicationJsonSchemaProviderOnlyItems.g.cs @@ -42,8 +42,8 @@ public bool TryPickProviderName( /// /// /// - public global::OpenRouter.ProviderName PickProviderName() => IsProviderName - ? ProviderName!.Value + public global::OpenRouter.ProviderName PickProviderName() => ProviderName is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ProviderName' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickRerankPostRequestBodyContentApplicationJsonSchemaProviderOnly /// /// /// - public string PickRerankPostRequestBodyContentApplicationJsonSchemaProviderOnlyItemsVariant2() => IsRerankPostRequestBodyContentApplicationJsonSchemaProviderOnlyItemsVariant2 - ? RerankPostRequestBodyContentApplicationJsonSchemaProviderOnlyItemsVariant2! + public string PickRerankPostRequestBodyContentApplicationJsonSchemaProviderOnlyItemsVariant2() => RerankPostRequestBodyContentApplicationJsonSchemaProviderOnlyItemsVariant2 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'RerankPostRequestBodyContentApplicationJsonSchemaProviderOnlyItemsVariant2' but the value was {ToString()}."); /// /// @@ -177,13 +177,13 @@ public bool Validate() Validate(); } - if (IsProviderName && providerName != null) + if (ProviderName is { } __value0 && providerName != null) { - return providerName(ProviderName!); + return providerName(__value0); } - else if (IsRerankPostRequestBodyContentApplicationJsonSchemaProviderOnlyItemsVariant2 && rerankPostRequestBodyContentApplicationJsonSchemaProviderOnlyItemsVariant2 != null) + else if (RerankPostRequestBodyContentApplicationJsonSchemaProviderOnlyItemsVariant2 is { } __value1 && rerankPostRequestBodyContentApplicationJsonSchemaProviderOnlyItemsVariant2 != null) { - return rerankPostRequestBodyContentApplicationJsonSchemaProviderOnlyItemsVariant2(RerankPostRequestBodyContentApplicationJsonSchemaProviderOnlyItemsVariant2!); + return rerankPostRequestBodyContentApplicationJsonSchemaProviderOnlyItemsVariant2(__value1); } return default(TResult); @@ -203,13 +203,13 @@ public void Match( Validate(); } - if (IsProviderName) + if (ProviderName is { } __value0) { - providerName?.Invoke(ProviderName!); + providerName?.Invoke(__value0); } - else if (IsRerankPostRequestBodyContentApplicationJsonSchemaProviderOnlyItemsVariant2) + else if (RerankPostRequestBodyContentApplicationJsonSchemaProviderOnlyItemsVariant2 is { } __value1) { - rerankPostRequestBodyContentApplicationJsonSchemaProviderOnlyItemsVariant2?.Invoke(RerankPostRequestBodyContentApplicationJsonSchemaProviderOnlyItemsVariant2!); + rerankPostRequestBodyContentApplicationJsonSchemaProviderOnlyItemsVariant2?.Invoke(__value1); } } @@ -226,13 +226,13 @@ public void Switch( Validate(); } - if (IsProviderName) + if (ProviderName is { } __value0) { - providerName?.Invoke(ProviderName!); + providerName?.Invoke(__value0); } - else if (IsRerankPostRequestBodyContentApplicationJsonSchemaProviderOnlyItemsVariant2) + else if (RerankPostRequestBodyContentApplicationJsonSchemaProviderOnlyItemsVariant2 is { } __value1) { - rerankPostRequestBodyContentApplicationJsonSchemaProviderOnlyItemsVariant2?.Invoke(RerankPostRequestBodyContentApplicationJsonSchemaProviderOnlyItemsVariant2!); + rerankPostRequestBodyContentApplicationJsonSchemaProviderOnlyItemsVariant2?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.RerankPostRequestBodyContentApplicationJsonSchemaProviderOrderItems.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.RerankPostRequestBodyContentApplicationJsonSchemaProviderOrderItems.g.cs index 2a53a628..45102134 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.RerankPostRequestBodyContentApplicationJsonSchemaProviderOrderItems.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.RerankPostRequestBodyContentApplicationJsonSchemaProviderOrderItems.g.cs @@ -42,8 +42,8 @@ public bool TryPickProviderName( /// /// /// - public global::OpenRouter.ProviderName PickProviderName() => IsProviderName - ? ProviderName!.Value + public global::OpenRouter.ProviderName PickProviderName() => ProviderName is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ProviderName' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickRerankPostRequestBodyContentApplicationJsonSchemaProviderOrde /// /// /// - public string PickRerankPostRequestBodyContentApplicationJsonSchemaProviderOrderItemsVariant2() => IsRerankPostRequestBodyContentApplicationJsonSchemaProviderOrderItemsVariant2 - ? RerankPostRequestBodyContentApplicationJsonSchemaProviderOrderItemsVariant2! + public string PickRerankPostRequestBodyContentApplicationJsonSchemaProviderOrderItemsVariant2() => RerankPostRequestBodyContentApplicationJsonSchemaProviderOrderItemsVariant2 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'RerankPostRequestBodyContentApplicationJsonSchemaProviderOrderItemsVariant2' but the value was {ToString()}."); /// /// @@ -177,13 +177,13 @@ public bool Validate() Validate(); } - if (IsProviderName && providerName != null) + if (ProviderName is { } __value0 && providerName != null) { - return providerName(ProviderName!); + return providerName(__value0); } - else if (IsRerankPostRequestBodyContentApplicationJsonSchemaProviderOrderItemsVariant2 && rerankPostRequestBodyContentApplicationJsonSchemaProviderOrderItemsVariant2 != null) + else if (RerankPostRequestBodyContentApplicationJsonSchemaProviderOrderItemsVariant2 is { } __value1 && rerankPostRequestBodyContentApplicationJsonSchemaProviderOrderItemsVariant2 != null) { - return rerankPostRequestBodyContentApplicationJsonSchemaProviderOrderItemsVariant2(RerankPostRequestBodyContentApplicationJsonSchemaProviderOrderItemsVariant2!); + return rerankPostRequestBodyContentApplicationJsonSchemaProviderOrderItemsVariant2(__value1); } return default(TResult); @@ -203,13 +203,13 @@ public void Match( Validate(); } - if (IsProviderName) + if (ProviderName is { } __value0) { - providerName?.Invoke(ProviderName!); + providerName?.Invoke(__value0); } - else if (IsRerankPostRequestBodyContentApplicationJsonSchemaProviderOrderItemsVariant2) + else if (RerankPostRequestBodyContentApplicationJsonSchemaProviderOrderItemsVariant2 is { } __value1) { - rerankPostRequestBodyContentApplicationJsonSchemaProviderOrderItemsVariant2?.Invoke(RerankPostRequestBodyContentApplicationJsonSchemaProviderOrderItemsVariant2!); + rerankPostRequestBodyContentApplicationJsonSchemaProviderOrderItemsVariant2?.Invoke(__value1); } } @@ -226,13 +226,13 @@ public void Switch( Validate(); } - if (IsProviderName) + if (ProviderName is { } __value0) { - providerName?.Invoke(ProviderName!); + providerName?.Invoke(__value0); } - else if (IsRerankPostRequestBodyContentApplicationJsonSchemaProviderOrderItemsVariant2) + else if (RerankPostRequestBodyContentApplicationJsonSchemaProviderOrderItemsVariant2 is { } __value1) { - rerankPostRequestBodyContentApplicationJsonSchemaProviderOrderItemsVariant2?.Invoke(RerankPostRequestBodyContentApplicationJsonSchemaProviderOrderItemsVariant2!); + rerankPostRequestBodyContentApplicationJsonSchemaProviderOrderItemsVariant2?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.RerankPostRequestBodyContentApplicationJsonSchemaProviderSort.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.RerankPostRequestBodyContentApplicationJsonSchemaProviderSort.g.cs index c0d96a3b..71a70aba 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.RerankPostRequestBodyContentApplicationJsonSchemaProviderSort.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.RerankPostRequestBodyContentApplicationJsonSchemaProviderSort.g.cs @@ -42,8 +42,8 @@ public bool TryPickProviderSort( /// /// /// - public global::OpenRouter.ProviderSort PickProviderSort() => IsProviderSort - ? ProviderSort!.Value + public global::OpenRouter.ProviderSort PickProviderSort() => ProviderSort is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ProviderSort' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickProviderSortConfig( /// /// /// - public global::OpenRouter.ProviderSortConfig PickProviderSortConfig() => IsProviderSortConfig - ? ProviderSortConfig! + public global::OpenRouter.ProviderSortConfig PickProviderSortConfig() => ProviderSortConfig is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ProviderSortConfig' but the value was {ToString()}."); /// /// @@ -177,13 +177,13 @@ public bool Validate() Validate(); } - if (IsProviderSort && providerSort != null) + if (ProviderSort is { } __value0 && providerSort != null) { - return providerSort(ProviderSort!); + return providerSort(__value0); } - else if (IsProviderSortConfig && providerSortConfig != null) + else if (ProviderSortConfig is { } __value1 && providerSortConfig != null) { - return providerSortConfig(ProviderSortConfig!); + return providerSortConfig(__value1); } return default(TResult); @@ -203,13 +203,13 @@ public void Match( Validate(); } - if (IsProviderSort) + if (ProviderSort is { } __value0) { - providerSort?.Invoke(ProviderSort!); + providerSort?.Invoke(__value0); } - else if (IsProviderSortConfig) + else if (ProviderSortConfig is { } __value1) { - providerSortConfig?.Invoke(ProviderSortConfig!); + providerSortConfig?.Invoke(__value1); } } @@ -226,13 +226,13 @@ public void Switch( Validate(); } - if (IsProviderSort) + if (ProviderSort is { } __value0) { - providerSort?.Invoke(ProviderSort!); + providerSort?.Invoke(__value0); } - else if (IsProviderSortConfig) + else if (ProviderSortConfig is { } __value1) { - providerSortConfig?.Invoke(ProviderSortConfig!); + providerSortConfig?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.ResponsesRequestPluginsItems.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.ResponsesRequestPluginsItems.g.cs index 3e06cc33..7d68aaf0 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.ResponsesRequestPluginsItems.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.ResponsesRequestPluginsItems.g.cs @@ -47,8 +47,8 @@ public bool TryPickAutoBetaRouter( /// /// /// - public global::OpenRouter.ResponsesRequestPluginsItemsVariant1 PickAutoBetaRouter() => IsAutoBetaRouter - ? AutoBetaRouter! + public global::OpenRouter.ResponsesRequestPluginsItemsVariant1 PickAutoBetaRouter() => AutoBetaRouter is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'AutoBetaRouter' but the value was {ToString()}."); /// @@ -84,8 +84,8 @@ public bool TryPickAutoRouter( /// /// /// - public global::OpenRouter.ResponsesRequestPluginsItemsVariant2 PickAutoRouter() => IsAutoRouter - ? AutoRouter! + public global::OpenRouter.ResponsesRequestPluginsItemsVariant2 PickAutoRouter() => AutoRouter is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'AutoRouter' but the value was {ToString()}."); /// @@ -121,8 +121,8 @@ public bool TryPickContextCompression( /// /// /// - public global::OpenRouter.ResponsesRequestPluginsItemsVariant3 PickContextCompression() => IsContextCompression - ? ContextCompression! + public global::OpenRouter.ResponsesRequestPluginsItemsVariant3 PickContextCompression() => ContextCompression is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ContextCompression' but the value was {ToString()}."); /// @@ -158,8 +158,8 @@ public bool TryPickFileParser( /// /// /// - public global::OpenRouter.ResponsesRequestPluginsItemsVariant4 PickFileParser() => IsFileParser - ? FileParser! + public global::OpenRouter.ResponsesRequestPluginsItemsVariant4 PickFileParser() => FileParser is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'FileParser' but the value was {ToString()}."); /// @@ -195,8 +195,8 @@ public bool TryPickFusion( /// /// /// - public global::OpenRouter.ResponsesRequestPluginsItemsVariant5 PickFusion() => IsFusion - ? Fusion! + public global::OpenRouter.ResponsesRequestPluginsItemsVariant5 PickFusion() => Fusion is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Fusion' but the value was {ToString()}."); /// @@ -232,8 +232,8 @@ public bool TryPickModeration( /// /// /// - public global::OpenRouter.ResponsesRequestPluginsItemsVariant6 PickModeration() => IsModeration - ? Moderation! + public global::OpenRouter.ResponsesRequestPluginsItemsVariant6 PickModeration() => Moderation is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Moderation' but the value was {ToString()}."); /// @@ -269,8 +269,8 @@ public bool TryPickParetoRouter( /// /// /// - public global::OpenRouter.ResponsesRequestPluginsItemsVariant7 PickParetoRouter() => IsParetoRouter - ? ParetoRouter! + public global::OpenRouter.ResponsesRequestPluginsItemsVariant7 PickParetoRouter() => ParetoRouter is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ParetoRouter' but the value was {ToString()}."); /// @@ -306,8 +306,8 @@ public bool TryPickResponseHealing( /// /// /// - public global::OpenRouter.ResponsesRequestPluginsItemsVariant8 PickResponseHealing() => IsResponseHealing - ? ResponseHealing! + public global::OpenRouter.ResponsesRequestPluginsItemsVariant8 PickResponseHealing() => ResponseHealing is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ResponseHealing' but the value was {ToString()}."); /// @@ -343,8 +343,8 @@ public bool TryPickWeb( /// /// /// - public global::OpenRouter.ResponsesRequestPluginsItemsVariant9 PickWeb() => IsWeb - ? Web! + public global::OpenRouter.ResponsesRequestPluginsItemsVariant9 PickWeb() => Web is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Web' but the value was {ToString()}."); /// @@ -380,8 +380,8 @@ public bool TryPickWebFetch( /// /// /// - public global::OpenRouter.ResponsesRequestPluginsItemsVariant10 PickWebFetch() => IsWebFetch - ? WebFetch! + public global::OpenRouter.ResponsesRequestPluginsItemsVariant10 PickWebFetch() => WebFetch is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'WebFetch' but the value was {ToString()}."); /// /// @@ -705,45 +705,45 @@ public bool Validate() Validate(); } - if (IsAutoBetaRouter && autoBetaRouter != null) + if (AutoBetaRouter is { } __value0 && autoBetaRouter != null) { - return autoBetaRouter(AutoBetaRouter!); + return autoBetaRouter(__value0); } - else if (IsAutoRouter && autoRouter != null) + else if (AutoRouter is { } __value1 && autoRouter != null) { - return autoRouter(AutoRouter!); + return autoRouter(__value1); } - else if (IsContextCompression && contextCompression != null) + else if (ContextCompression is { } __value2 && contextCompression != null) { - return contextCompression(ContextCompression!); + return contextCompression(__value2); } - else if (IsFileParser && fileParser != null) + else if (FileParser is { } __value3 && fileParser != null) { - return fileParser(FileParser!); + return fileParser(__value3); } - else if (IsFusion && fusion != null) + else if (Fusion is { } __value4 && fusion != null) { - return fusion(Fusion!); + return fusion(__value4); } - else if (IsModeration && moderation != null) + else if (Moderation is { } __value5 && moderation != null) { - return moderation(Moderation!); + return moderation(__value5); } - else if (IsParetoRouter && paretoRouter != null) + else if (ParetoRouter is { } __value6 && paretoRouter != null) { - return paretoRouter(ParetoRouter!); + return paretoRouter(__value6); } - else if (IsResponseHealing && responseHealing != null) + else if (ResponseHealing is { } __value7 && responseHealing != null) { - return responseHealing(ResponseHealing!); + return responseHealing(__value7); } - else if (IsWeb && web != null) + else if (Web is { } __value8 && web != null) { - return web(Web!); + return web(__value8); } - else if (IsWebFetch && webFetch != null) + else if (WebFetch is { } __value9 && webFetch != null) { - return webFetch(WebFetch!); + return webFetch(__value9); } return default(TResult); @@ -779,45 +779,45 @@ public void Match( Validate(); } - if (IsAutoBetaRouter) + if (AutoBetaRouter is { } __value0) { - autoBetaRouter?.Invoke(AutoBetaRouter!); + autoBetaRouter?.Invoke(__value0); } - else if (IsAutoRouter) + else if (AutoRouter is { } __value1) { - autoRouter?.Invoke(AutoRouter!); + autoRouter?.Invoke(__value1); } - else if (IsContextCompression) + else if (ContextCompression is { } __value2) { - contextCompression?.Invoke(ContextCompression!); + contextCompression?.Invoke(__value2); } - else if (IsFileParser) + else if (FileParser is { } __value3) { - fileParser?.Invoke(FileParser!); + fileParser?.Invoke(__value3); } - else if (IsFusion) + else if (Fusion is { } __value4) { - fusion?.Invoke(Fusion!); + fusion?.Invoke(__value4); } - else if (IsModeration) + else if (Moderation is { } __value5) { - moderation?.Invoke(Moderation!); + moderation?.Invoke(__value5); } - else if (IsParetoRouter) + else if (ParetoRouter is { } __value6) { - paretoRouter?.Invoke(ParetoRouter!); + paretoRouter?.Invoke(__value6); } - else if (IsResponseHealing) + else if (ResponseHealing is { } __value7) { - responseHealing?.Invoke(ResponseHealing!); + responseHealing?.Invoke(__value7); } - else if (IsWeb) + else if (Web is { } __value8) { - web?.Invoke(Web!); + web?.Invoke(__value8); } - else if (IsWebFetch) + else if (WebFetch is { } __value9) { - webFetch?.Invoke(WebFetch!); + webFetch?.Invoke(__value9); } } @@ -842,45 +842,45 @@ public void Switch( Validate(); } - if (IsAutoBetaRouter) + if (AutoBetaRouter is { } __value0) { - autoBetaRouter?.Invoke(AutoBetaRouter!); + autoBetaRouter?.Invoke(__value0); } - else if (IsAutoRouter) + else if (AutoRouter is { } __value1) { - autoRouter?.Invoke(AutoRouter!); + autoRouter?.Invoke(__value1); } - else if (IsContextCompression) + else if (ContextCompression is { } __value2) { - contextCompression?.Invoke(ContextCompression!); + contextCompression?.Invoke(__value2); } - else if (IsFileParser) + else if (FileParser is { } __value3) { - fileParser?.Invoke(FileParser!); + fileParser?.Invoke(__value3); } - else if (IsFusion) + else if (Fusion is { } __value4) { - fusion?.Invoke(Fusion!); + fusion?.Invoke(__value4); } - else if (IsModeration) + else if (Moderation is { } __value5) { - moderation?.Invoke(Moderation!); + moderation?.Invoke(__value5); } - else if (IsParetoRouter) + else if (ParetoRouter is { } __value6) { - paretoRouter?.Invoke(ParetoRouter!); + paretoRouter?.Invoke(__value6); } - else if (IsResponseHealing) + else if (ResponseHealing is { } __value7) { - responseHealing?.Invoke(ResponseHealing!); + responseHealing?.Invoke(__value7); } - else if (IsWeb) + else if (Web is { } __value8) { - web?.Invoke(Web!); + web?.Invoke(__value8); } - else if (IsWebFetch) + else if (WebFetch is { } __value9) { - webFetch?.Invoke(WebFetch!); + webFetch?.Invoke(__value9); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParameters.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParameters.g.cs index 5c01baf0..d3aa49aa 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParameters.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParameters.g.cs @@ -42,8 +42,8 @@ public bool TryPickResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsIt /// /// /// - public string PickResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant1() => IsResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant1 - ? ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant1! + public string PickResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant1() => ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant1' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsIt /// /// /// - public double PickResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant2() => IsResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant2 - ? ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant2!.Value + public double PickResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant2() => ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant2 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant2' but the value was {ToString()}."); /// @@ -116,8 +116,8 @@ public bool TryPickResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsIt /// /// /// - public bool PickResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant3() => IsResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant3 - ? ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant3!.Value + public bool PickResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant3() => ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant3 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant3' but the value was {ToString()}."); /// @@ -153,8 +153,8 @@ public bool TryPickResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsIt /// /// /// - public global::System.Collections.Generic.IList PickResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParameters3() => IsResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParameters3 - ? ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParameters3! + public global::System.Collections.Generic.IList PickResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParameters3() => ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParameters3 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParameters3' but the value was {ToString()}."); /// @@ -190,8 +190,8 @@ public bool TryPickResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsIt /// /// /// - public global::OpenRouter.ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParameters4 PickResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParameters4() => IsResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParameters4 - ? ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParameters4! + public global::OpenRouter.ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParameters4 PickResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParameters4() => ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParameters4 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParameters4' but the value was {ToString()}."); /// /// @@ -349,25 +349,25 @@ public bool Validate() Validate(); } - if (IsResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant1 && responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant1 != null) + if (ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant1 is { } __value0 && responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant1 != null) { - return responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant1(ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant1!); + return responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant1(__value0); } - else if (IsResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant2 && responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant2 != null) + else if (ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant2 is { } __value1 && responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant2 != null) { - return responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant2(ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant2!); + return responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant2(__value1); } - else if (IsResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant3 && responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant3 != null) + else if (ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant3 is { } __value2 && responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant3 != null) { - return responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant3(ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant3!); + return responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant3(__value2); } - else if (IsResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParameters3 && responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParameters3 != null) + else if (ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParameters3 is { } __value3 && responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParameters3 != null) { - return responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParameters3(ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParameters3!); + return responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParameters3(__value3); } - else if (IsResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParameters4 && responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParameters4 != null) + else if (ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParameters4 is { } __value4 && responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParameters4 != null) { - return responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParameters4(ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParameters4!); + return responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParameters4(__value4); } return default(TResult); @@ -393,25 +393,25 @@ public void Match( Validate(); } - if (IsResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant1) + if (ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant1 is { } __value0) { - responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant1?.Invoke(ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant1!); + responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant1?.Invoke(__value0); } - else if (IsResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant2) + else if (ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant2 is { } __value1) { - responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant2?.Invoke(ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant2!); + responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant2?.Invoke(__value1); } - else if (IsResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant3) + else if (ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant3 is { } __value2) { - responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant3?.Invoke(ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant3!); + responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant3?.Invoke(__value2); } - else if (IsResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParameters3) + else if (ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParameters3 is { } __value3) { - responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParameters3?.Invoke(ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParameters3!); + responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParameters3?.Invoke(__value3); } - else if (IsResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParameters4) + else if (ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParameters4 is { } __value4) { - responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParameters4?.Invoke(ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParameters4!); + responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParameters4?.Invoke(__value4); } } @@ -431,25 +431,25 @@ public void Switch( Validate(); } - if (IsResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant1) + if (ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant1 is { } __value0) { - responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant1?.Invoke(ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant1!); + responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant1?.Invoke(__value0); } - else if (IsResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant2) + else if (ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant2 is { } __value1) { - responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant2?.Invoke(ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant2!); + responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant2?.Invoke(__value1); } - else if (IsResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant3) + else if (ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant3 is { } __value2) { - responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant3?.Invoke(ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant3!); + responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersVariant3?.Invoke(__value2); } - else if (IsResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParameters3) + else if (ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParameters3 is { } __value3) { - responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParameters3?.Invoke(ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParameters3!); + responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParameters3?.Invoke(__value3); } - else if (IsResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParameters4) + else if (ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParameters4 is { } __value4) { - responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParameters4?.Invoke(ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParameters4!); + responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParameters4?.Invoke(__value4); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3Items.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3Items.g.cs index a2434ae6..1bef8ba3 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3Items.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3Items.g.cs @@ -42,8 +42,8 @@ public bool TryPickResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsIt /// /// /// - public string PickResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant1() => IsResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant1 - ? ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant1! + public string PickResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant1() => ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant1' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsIt /// /// /// - public double PickResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant2() => IsResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant2 - ? ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant2!.Value + public double PickResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant2() => ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant2 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant2' but the value was {ToString()}."); /// @@ -116,8 +116,8 @@ public bool TryPickResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsIt /// /// /// - public bool PickResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant3() => IsResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant3 - ? ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant3!.Value + public bool PickResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant3() => ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant3 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant3' but the value was {ToString()}."); /// /// @@ -242,17 +242,17 @@ public bool Validate() Validate(); } - if (IsResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant1 && responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant1 != null) + if (ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant1 is { } __value0 && responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant1 != null) { - return responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant1(ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant1!); + return responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant1(__value0); } - else if (IsResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant2 && responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant2 != null) + else if (ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant2 is { } __value1 && responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant2 != null) { - return responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant2(ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant2!); + return responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant2(__value1); } - else if (IsResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant3 && responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant3 != null) + else if (ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant3 is { } __value2 && responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant3 != null) { - return responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant3(ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant3!); + return responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant3(__value2); } return default(TResult); @@ -274,17 +274,17 @@ public void Match( Validate(); } - if (IsResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant1) + if (ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant1 is { } __value0) { - responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant1?.Invoke(ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant1!); + responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant1?.Invoke(__value0); } - else if (IsResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant2) + else if (ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant2 is { } __value1) { - responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant2?.Invoke(ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant2!); + responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant2?.Invoke(__value1); } - else if (IsResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant3) + else if (ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant3 is { } __value2) { - responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant3?.Invoke(ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant3!); + responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant3?.Invoke(__value2); } } @@ -302,17 +302,17 @@ public void Switch( Validate(); } - if (IsResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant1) + if (ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant1 is { } __value0) { - responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant1?.Invoke(ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant1!); + responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant1?.Invoke(__value0); } - else if (IsResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant2) + else if (ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant2 is { } __value1) { - responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant2?.Invoke(ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant2!); + responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant2?.Invoke(__value1); } - else if (IsResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant3) + else if (ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant3 is { } __value2) { - responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant3?.Invoke(ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant3!); + responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf3ItemsVariant3?.Invoke(__value2); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4.g.cs index 2c3f77c7..6ebd6212 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4.g.cs @@ -42,8 +42,8 @@ public bool TryPickResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsIt /// /// /// - public string PickResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant1() => IsResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant1 - ? ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant1! + public string PickResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant1() => ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant1' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsIt /// /// /// - public double PickResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant2() => IsResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant2 - ? ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant2!.Value + public double PickResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant2() => ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant2 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant2' but the value was {ToString()}."); /// @@ -116,8 +116,8 @@ public bool TryPickResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsIt /// /// /// - public bool PickResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant3() => IsResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant3 - ? ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant3!.Value + public bool PickResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant3() => ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant3 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant3' but the value was {ToString()}."); /// /// @@ -242,17 +242,17 @@ public bool Validate() Validate(); } - if (IsResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant1 && responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant1 != null) + if (ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant1 is { } __value0 && responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant1 != null) { - return responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant1(ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant1!); + return responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant1(__value0); } - else if (IsResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant2 && responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant2 != null) + else if (ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant2 is { } __value1 && responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant2 != null) { - return responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant2(ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant2!); + return responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant2(__value1); } - else if (IsResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant3 && responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant3 != null) + else if (ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant3 is { } __value2 && responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant3 != null) { - return responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant3(ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant3!); + return responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant3(__value2); } return default(TResult); @@ -274,17 +274,17 @@ public void Match( Validate(); } - if (IsResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant1) + if (ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant1 is { } __value0) { - responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant1?.Invoke(ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant1!); + responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant1?.Invoke(__value0); } - else if (IsResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant2) + else if (ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant2 is { } __value1) { - responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant2?.Invoke(ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant2!); + responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant2?.Invoke(__value1); } - else if (IsResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant3) + else if (ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant3 is { } __value2) { - responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant3?.Invoke(ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant3!); + responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant3?.Invoke(__value2); } } @@ -302,17 +302,17 @@ public void Switch( Validate(); } - if (IsResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant1) + if (ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant1 is { } __value0) { - responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant1?.Invoke(ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant1!); + responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant1?.Invoke(__value0); } - else if (IsResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant2) + else if (ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant2 is { } __value1) { - responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant2?.Invoke(ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant2!); + responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant2?.Invoke(__value1); } - else if (IsResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant3) + else if (ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant3 is { } __value2) { - responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant3?.Invoke(ResponsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant3!); + responsesRequestPluginsItemsDiscriminatorMappingFusionToolsItemsParametersOneOf4Variant3?.Invoke(__value2); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.ResponsesRequestToolsItems.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.ResponsesRequestToolsItems.g.cs index d787193c..54bae36a 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.ResponsesRequestToolsItems.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.ResponsesRequestToolsItems.g.cs @@ -42,8 +42,8 @@ public bool TryPickResponsesRequestToolsItems0( /// /// /// - public global::OpenRouter.ResponsesRequestToolsItems0 PickResponsesRequestToolsItems0() => IsResponsesRequestToolsItems0 - ? ResponsesRequestToolsItems0! + public global::OpenRouter.ResponsesRequestToolsItems0 PickResponsesRequestToolsItems0() => ResponsesRequestToolsItems0 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ResponsesRequestToolsItems0' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickPreviewWebSearchServerTool( /// /// /// - public global::OpenRouter.PreviewWebSearchServerTool PickPreviewWebSearchServerTool() => IsPreviewWebSearchServerTool - ? PreviewWebSearchServerTool! + public global::OpenRouter.PreviewWebSearchServerTool PickPreviewWebSearchServerTool() => PreviewWebSearchServerTool is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'PreviewWebSearchServerTool' but the value was {ToString()}."); /// @@ -116,8 +116,8 @@ public bool TryPickPreview20250311WebSearchServerTool( /// /// /// - public global::OpenRouter.Preview20250311WebSearchServerTool PickPreview20250311WebSearchServerTool() => IsPreview20250311WebSearchServerTool - ? Preview20250311WebSearchServerTool! + public global::OpenRouter.Preview20250311WebSearchServerTool PickPreview20250311WebSearchServerTool() => Preview20250311WebSearchServerTool is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Preview20250311WebSearchServerTool' but the value was {ToString()}."); /// @@ -153,8 +153,8 @@ public bool TryPickLegacyWebSearchServerTool( /// /// /// - public global::OpenRouter.LegacyWebSearchServerTool PickLegacyWebSearchServerTool() => IsLegacyWebSearchServerTool - ? LegacyWebSearchServerTool! + public global::OpenRouter.LegacyWebSearchServerTool PickLegacyWebSearchServerTool() => LegacyWebSearchServerTool is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'LegacyWebSearchServerTool' but the value was {ToString()}."); /// @@ -190,8 +190,8 @@ public bool TryPickWebSearchServerTool( /// /// /// - public global::OpenRouter.WebSearchServerTool PickWebSearchServerTool() => IsWebSearchServerTool - ? WebSearchServerTool! + public global::OpenRouter.WebSearchServerTool PickWebSearchServerTool() => WebSearchServerTool is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'WebSearchServerTool' but the value was {ToString()}."); /// @@ -227,8 +227,8 @@ public bool TryPickFileSearchServerTool( /// /// /// - public global::OpenRouter.FileSearchServerTool PickFileSearchServerTool() => IsFileSearchServerTool - ? FileSearchServerTool! + public global::OpenRouter.FileSearchServerTool PickFileSearchServerTool() => FileSearchServerTool is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'FileSearchServerTool' but the value was {ToString()}."); /// @@ -264,8 +264,8 @@ public bool TryPickComputerUseServerTool( /// /// /// - public global::OpenRouter.ComputerUseServerTool PickComputerUseServerTool() => IsComputerUseServerTool - ? ComputerUseServerTool! + public global::OpenRouter.ComputerUseServerTool PickComputerUseServerTool() => ComputerUseServerTool is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ComputerUseServerTool' but the value was {ToString()}."); /// @@ -301,8 +301,8 @@ public bool TryPickCodeInterpreterServerTool( /// /// /// - public global::OpenRouter.CodeInterpreterServerTool PickCodeInterpreterServerTool() => IsCodeInterpreterServerTool - ? CodeInterpreterServerTool! + public global::OpenRouter.CodeInterpreterServerTool PickCodeInterpreterServerTool() => CodeInterpreterServerTool is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'CodeInterpreterServerTool' but the value was {ToString()}."); /// @@ -338,8 +338,8 @@ public bool TryPickMcpServerTool( /// /// /// - public global::OpenRouter.McpServerTool PickMcpServerTool() => IsMcpServerTool - ? McpServerTool! + public global::OpenRouter.McpServerTool PickMcpServerTool() => McpServerTool is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'McpServerTool' but the value was {ToString()}."); /// @@ -375,8 +375,8 @@ public bool TryPickImageGenerationServerTool( /// /// /// - public global::OpenRouter.ImageGenerationServerTool PickImageGenerationServerTool() => IsImageGenerationServerTool - ? ImageGenerationServerTool! + public global::OpenRouter.ImageGenerationServerTool PickImageGenerationServerTool() => ImageGenerationServerTool is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ImageGenerationServerTool' but the value was {ToString()}."); /// @@ -412,8 +412,8 @@ public bool TryPickCodexLocalShellTool( /// /// /// - public global::OpenRouter.CodexLocalShellTool PickCodexLocalShellTool() => IsCodexLocalShellTool - ? CodexLocalShellTool! + public global::OpenRouter.CodexLocalShellTool PickCodexLocalShellTool() => CodexLocalShellTool is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'CodexLocalShellTool' but the value was {ToString()}."); /// @@ -449,8 +449,8 @@ public bool TryPickShellServerTool( /// /// /// - public global::OpenRouter.ShellServerTool PickShellServerTool() => IsShellServerTool - ? ShellServerTool! + public global::OpenRouter.ShellServerTool PickShellServerTool() => ShellServerTool is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ShellServerTool' but the value was {ToString()}."); /// @@ -486,8 +486,8 @@ public bool TryPickApplyPatchServerTool( /// /// /// - public global::OpenRouter.ApplyPatchServerTool PickApplyPatchServerTool() => IsApplyPatchServerTool - ? ApplyPatchServerTool! + public global::OpenRouter.ApplyPatchServerTool PickApplyPatchServerTool() => ApplyPatchServerTool is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ApplyPatchServerTool' but the value was {ToString()}."); /// @@ -523,8 +523,8 @@ public bool TryPickCustomTool( /// /// /// - public global::OpenRouter.CustomTool PickCustomTool() => IsCustomTool - ? CustomTool! + public global::OpenRouter.CustomTool PickCustomTool() => CustomTool is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'CustomTool' but the value was {ToString()}."); /// @@ -560,8 +560,8 @@ public bool TryPickNamespaceTool( /// /// /// - public global::OpenRouter.NamespaceTool PickNamespaceTool() => IsNamespaceTool - ? NamespaceTool! + public global::OpenRouter.NamespaceTool PickNamespaceTool() => NamespaceTool is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'NamespaceTool' but the value was {ToString()}."); /// @@ -597,8 +597,8 @@ public bool TryPickAdvisorServerToolOpenRouter( /// /// /// - public global::OpenRouter.AdvisorServerToolOpenRouter PickAdvisorServerToolOpenRouter() => IsAdvisorServerToolOpenRouter - ? AdvisorServerToolOpenRouter! + public global::OpenRouter.AdvisorServerToolOpenRouter PickAdvisorServerToolOpenRouter() => AdvisorServerToolOpenRouter is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'AdvisorServerToolOpenRouter' but the value was {ToString()}."); /// @@ -634,8 +634,8 @@ public bool TryPickSubagentServerToolOpenRouter( /// /// /// - public global::OpenRouter.SubagentServerToolOpenRouter PickSubagentServerToolOpenRouter() => IsSubagentServerToolOpenRouter - ? SubagentServerToolOpenRouter! + public global::OpenRouter.SubagentServerToolOpenRouter PickSubagentServerToolOpenRouter() => SubagentServerToolOpenRouter is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'SubagentServerToolOpenRouter' but the value was {ToString()}."); /// @@ -671,8 +671,8 @@ public bool TryPickDatetimeServerTool( /// /// /// - public global::OpenRouter.DatetimeServerTool PickDatetimeServerTool() => IsDatetimeServerTool - ? DatetimeServerTool! + public global::OpenRouter.DatetimeServerTool PickDatetimeServerTool() => DatetimeServerTool is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'DatetimeServerTool' but the value was {ToString()}."); /// @@ -708,8 +708,8 @@ public bool TryPickFilesServerTool( /// /// /// - public global::OpenRouter.FilesServerTool PickFilesServerTool() => IsFilesServerTool - ? FilesServerTool! + public global::OpenRouter.FilesServerTool PickFilesServerTool() => FilesServerTool is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'FilesServerTool' but the value was {ToString()}."); /// @@ -745,8 +745,8 @@ public bool TryPickFusionServerToolOpenRouter( /// /// /// - public global::OpenRouter.FusionServerToolOpenRouter PickFusionServerToolOpenRouter() => IsFusionServerToolOpenRouter - ? FusionServerToolOpenRouter! + public global::OpenRouter.FusionServerToolOpenRouter PickFusionServerToolOpenRouter() => FusionServerToolOpenRouter is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'FusionServerToolOpenRouter' but the value was {ToString()}."); /// @@ -782,8 +782,8 @@ public bool TryPickImageGenerationServerToolOpenRouter( /// /// /// - public global::OpenRouter.ImageGenerationServerToolOpenRouter PickImageGenerationServerToolOpenRouter() => IsImageGenerationServerToolOpenRouter - ? ImageGenerationServerToolOpenRouter! + public global::OpenRouter.ImageGenerationServerToolOpenRouter PickImageGenerationServerToolOpenRouter() => ImageGenerationServerToolOpenRouter is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ImageGenerationServerToolOpenRouter' but the value was {ToString()}."); /// @@ -819,8 +819,8 @@ public bool TryPickSearchModelsServerToolOpenRouter( /// /// /// - public global::OpenRouter.SearchModelsServerToolOpenRouter PickSearchModelsServerToolOpenRouter() => IsSearchModelsServerToolOpenRouter - ? SearchModelsServerToolOpenRouter! + public global::OpenRouter.SearchModelsServerToolOpenRouter PickSearchModelsServerToolOpenRouter() => SearchModelsServerToolOpenRouter is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'SearchModelsServerToolOpenRouter' but the value was {ToString()}."); /// @@ -856,8 +856,8 @@ public bool TryPickWebFetchServerTool( /// /// /// - public global::OpenRouter.WebFetchServerTool PickWebFetchServerTool() => IsWebFetchServerTool - ? WebFetchServerTool! + public global::OpenRouter.WebFetchServerTool PickWebFetchServerTool() => WebFetchServerTool is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'WebFetchServerTool' but the value was {ToString()}."); /// @@ -893,8 +893,8 @@ public bool TryPickWebSearchServerToolOpenRouter( /// /// /// - public global::OpenRouter.WebSearchServerToolOpenRouter PickWebSearchServerToolOpenRouter() => IsWebSearchServerToolOpenRouter - ? WebSearchServerToolOpenRouter! + public global::OpenRouter.WebSearchServerToolOpenRouter PickWebSearchServerToolOpenRouter() => WebSearchServerToolOpenRouter is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'WebSearchServerToolOpenRouter' but the value was {ToString()}."); /// @@ -930,8 +930,8 @@ public bool TryPickApplyPatchServerToolOpenRouter( /// /// /// - public global::OpenRouter.ApplyPatchServerToolOpenRouter PickApplyPatchServerToolOpenRouter() => IsApplyPatchServerToolOpenRouter - ? ApplyPatchServerToolOpenRouter! + public global::OpenRouter.ApplyPatchServerToolOpenRouter PickApplyPatchServerToolOpenRouter() => ApplyPatchServerToolOpenRouter is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ApplyPatchServerToolOpenRouter' but the value was {ToString()}."); /// @@ -967,8 +967,8 @@ public bool TryPickBashServerTool( /// /// /// - public global::OpenRouter.BashServerTool PickBashServerTool() => IsBashServerTool - ? BashServerTool! + public global::OpenRouter.BashServerTool PickBashServerTool() => BashServerTool is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'BashServerTool' but the value was {ToString()}."); /// @@ -1004,8 +1004,8 @@ public bool TryPickShellServerToolOpenRouter( /// /// /// - public global::OpenRouter.ShellServerToolOpenRouter PickShellServerToolOpenRouter() => IsShellServerToolOpenRouter - ? ShellServerToolOpenRouter! + public global::OpenRouter.ShellServerToolOpenRouter PickShellServerToolOpenRouter() => ShellServerToolOpenRouter is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ShellServerToolOpenRouter' but the value was {ToString()}."); /// /// @@ -1802,113 +1802,113 @@ public bool Validate() Validate(); } - if (IsResponsesRequestToolsItems0 && responsesRequestToolsItems0 != null) + if (ResponsesRequestToolsItems0 is { } __value0 && responsesRequestToolsItems0 != null) { - return responsesRequestToolsItems0(ResponsesRequestToolsItems0!); + return responsesRequestToolsItems0(__value0); } - else if (IsPreviewWebSearchServerTool && previewWebSearchServerTool != null) + else if (PreviewWebSearchServerTool is { } __value1 && previewWebSearchServerTool != null) { - return previewWebSearchServerTool(PreviewWebSearchServerTool!); + return previewWebSearchServerTool(__value1); } - else if (IsPreview20250311WebSearchServerTool && preview20250311WebSearchServerTool != null) + else if (Preview20250311WebSearchServerTool is { } __value2 && preview20250311WebSearchServerTool != null) { - return preview20250311WebSearchServerTool(Preview20250311WebSearchServerTool!); + return preview20250311WebSearchServerTool(__value2); } - else if (IsLegacyWebSearchServerTool && legacyWebSearchServerTool != null) + else if (LegacyWebSearchServerTool is { } __value3 && legacyWebSearchServerTool != null) { - return legacyWebSearchServerTool(LegacyWebSearchServerTool!); + return legacyWebSearchServerTool(__value3); } - else if (IsWebSearchServerTool && webSearchServerTool != null) + else if (WebSearchServerTool is { } __value4 && webSearchServerTool != null) { - return webSearchServerTool(WebSearchServerTool!); + return webSearchServerTool(__value4); } - else if (IsFileSearchServerTool && fileSearchServerTool != null) + else if (FileSearchServerTool is { } __value5 && fileSearchServerTool != null) { - return fileSearchServerTool(FileSearchServerTool!); + return fileSearchServerTool(__value5); } - else if (IsComputerUseServerTool && computerUseServerTool != null) + else if (ComputerUseServerTool is { } __value6 && computerUseServerTool != null) { - return computerUseServerTool(ComputerUseServerTool!); + return computerUseServerTool(__value6); } - else if (IsCodeInterpreterServerTool && codeInterpreterServerTool != null) + else if (CodeInterpreterServerTool is { } __value7 && codeInterpreterServerTool != null) { - return codeInterpreterServerTool(CodeInterpreterServerTool!); + return codeInterpreterServerTool(__value7); } - else if (IsMcpServerTool && mcpServerTool != null) + else if (McpServerTool is { } __value8 && mcpServerTool != null) { - return mcpServerTool(McpServerTool!); + return mcpServerTool(__value8); } - else if (IsImageGenerationServerTool && imageGenerationServerTool != null) + else if (ImageGenerationServerTool is { } __value9 && imageGenerationServerTool != null) { - return imageGenerationServerTool(ImageGenerationServerTool!); + return imageGenerationServerTool(__value9); } - else if (IsCodexLocalShellTool && codexLocalShellTool != null) + else if (CodexLocalShellTool is { } __value10 && codexLocalShellTool != null) { - return codexLocalShellTool(CodexLocalShellTool!); + return codexLocalShellTool(__value10); } - else if (IsShellServerTool && shellServerTool != null) + else if (ShellServerTool is { } __value11 && shellServerTool != null) { - return shellServerTool(ShellServerTool!); + return shellServerTool(__value11); } - else if (IsApplyPatchServerTool && applyPatchServerTool != null) + else if (ApplyPatchServerTool is { } __value12 && applyPatchServerTool != null) { - return applyPatchServerTool(ApplyPatchServerTool!); + return applyPatchServerTool(__value12); } - else if (IsCustomTool && customTool != null) + else if (CustomTool is { } __value13 && customTool != null) { - return customTool(CustomTool!); + return customTool(__value13); } - else if (IsNamespaceTool && namespaceTool != null) + else if (NamespaceTool is { } __value14 && namespaceTool != null) { - return namespaceTool(NamespaceTool!); + return namespaceTool(__value14); } - else if (IsAdvisorServerToolOpenRouter && advisorServerToolOpenRouter != null) + else if (AdvisorServerToolOpenRouter is { } __value15 && advisorServerToolOpenRouter != null) { - return advisorServerToolOpenRouter(AdvisorServerToolOpenRouter!); + return advisorServerToolOpenRouter(__value15); } - else if (IsSubagentServerToolOpenRouter && subagentServerToolOpenRouter != null) + else if (SubagentServerToolOpenRouter is { } __value16 && subagentServerToolOpenRouter != null) { - return subagentServerToolOpenRouter(SubagentServerToolOpenRouter!); + return subagentServerToolOpenRouter(__value16); } - else if (IsDatetimeServerTool && datetimeServerTool != null) + else if (DatetimeServerTool is { } __value17 && datetimeServerTool != null) { - return datetimeServerTool(DatetimeServerTool!); + return datetimeServerTool(__value17); } - else if (IsFilesServerTool && filesServerTool != null) + else if (FilesServerTool is { } __value18 && filesServerTool != null) { - return filesServerTool(FilesServerTool!); + return filesServerTool(__value18); } - else if (IsFusionServerToolOpenRouter && fusionServerToolOpenRouter != null) + else if (FusionServerToolOpenRouter is { } __value19 && fusionServerToolOpenRouter != null) { - return fusionServerToolOpenRouter(FusionServerToolOpenRouter!); + return fusionServerToolOpenRouter(__value19); } - else if (IsImageGenerationServerToolOpenRouter && imageGenerationServerToolOpenRouter != null) + else if (ImageGenerationServerToolOpenRouter is { } __value20 && imageGenerationServerToolOpenRouter != null) { - return imageGenerationServerToolOpenRouter(ImageGenerationServerToolOpenRouter!); + return imageGenerationServerToolOpenRouter(__value20); } - else if (IsSearchModelsServerToolOpenRouter && searchModelsServerToolOpenRouter != null) + else if (SearchModelsServerToolOpenRouter is { } __value21 && searchModelsServerToolOpenRouter != null) { - return searchModelsServerToolOpenRouter(SearchModelsServerToolOpenRouter!); + return searchModelsServerToolOpenRouter(__value21); } - else if (IsWebFetchServerTool && webFetchServerTool != null) + else if (WebFetchServerTool is { } __value22 && webFetchServerTool != null) { - return webFetchServerTool(WebFetchServerTool!); + return webFetchServerTool(__value22); } - else if (IsWebSearchServerToolOpenRouter && webSearchServerToolOpenRouter != null) + else if (WebSearchServerToolOpenRouter is { } __value23 && webSearchServerToolOpenRouter != null) { - return webSearchServerToolOpenRouter(WebSearchServerToolOpenRouter!); + return webSearchServerToolOpenRouter(__value23); } - else if (IsApplyPatchServerToolOpenRouter && applyPatchServerToolOpenRouter != null) + else if (ApplyPatchServerToolOpenRouter is { } __value24 && applyPatchServerToolOpenRouter != null) { - return applyPatchServerToolOpenRouter(ApplyPatchServerToolOpenRouter!); + return applyPatchServerToolOpenRouter(__value24); } - else if (IsBashServerTool && bashServerTool != null) + else if (BashServerTool is { } __value25 && bashServerTool != null) { - return bashServerTool(BashServerTool!); + return bashServerTool(__value25); } - else if (IsShellServerToolOpenRouter && shellServerToolOpenRouter != null) + else if (ShellServerToolOpenRouter is { } __value26 && shellServerToolOpenRouter != null) { - return shellServerToolOpenRouter(ShellServerToolOpenRouter!); + return shellServerToolOpenRouter(__value26); } return default(TResult); @@ -1978,113 +1978,113 @@ public void Match( Validate(); } - if (IsResponsesRequestToolsItems0) + if (ResponsesRequestToolsItems0 is { } __value0) { - responsesRequestToolsItems0?.Invoke(ResponsesRequestToolsItems0!); + responsesRequestToolsItems0?.Invoke(__value0); } - else if (IsPreviewWebSearchServerTool) + else if (PreviewWebSearchServerTool is { } __value1) { - previewWebSearchServerTool?.Invoke(PreviewWebSearchServerTool!); + previewWebSearchServerTool?.Invoke(__value1); } - else if (IsPreview20250311WebSearchServerTool) + else if (Preview20250311WebSearchServerTool is { } __value2) { - preview20250311WebSearchServerTool?.Invoke(Preview20250311WebSearchServerTool!); + preview20250311WebSearchServerTool?.Invoke(__value2); } - else if (IsLegacyWebSearchServerTool) + else if (LegacyWebSearchServerTool is { } __value3) { - legacyWebSearchServerTool?.Invoke(LegacyWebSearchServerTool!); + legacyWebSearchServerTool?.Invoke(__value3); } - else if (IsWebSearchServerTool) + else if (WebSearchServerTool is { } __value4) { - webSearchServerTool?.Invoke(WebSearchServerTool!); + webSearchServerTool?.Invoke(__value4); } - else if (IsFileSearchServerTool) + else if (FileSearchServerTool is { } __value5) { - fileSearchServerTool?.Invoke(FileSearchServerTool!); + fileSearchServerTool?.Invoke(__value5); } - else if (IsComputerUseServerTool) + else if (ComputerUseServerTool is { } __value6) { - computerUseServerTool?.Invoke(ComputerUseServerTool!); + computerUseServerTool?.Invoke(__value6); } - else if (IsCodeInterpreterServerTool) + else if (CodeInterpreterServerTool is { } __value7) { - codeInterpreterServerTool?.Invoke(CodeInterpreterServerTool!); + codeInterpreterServerTool?.Invoke(__value7); } - else if (IsMcpServerTool) + else if (McpServerTool is { } __value8) { - mcpServerTool?.Invoke(McpServerTool!); + mcpServerTool?.Invoke(__value8); } - else if (IsImageGenerationServerTool) + else if (ImageGenerationServerTool is { } __value9) { - imageGenerationServerTool?.Invoke(ImageGenerationServerTool!); + imageGenerationServerTool?.Invoke(__value9); } - else if (IsCodexLocalShellTool) + else if (CodexLocalShellTool is { } __value10) { - codexLocalShellTool?.Invoke(CodexLocalShellTool!); + codexLocalShellTool?.Invoke(__value10); } - else if (IsShellServerTool) + else if (ShellServerTool is { } __value11) { - shellServerTool?.Invoke(ShellServerTool!); + shellServerTool?.Invoke(__value11); } - else if (IsApplyPatchServerTool) + else if (ApplyPatchServerTool is { } __value12) { - applyPatchServerTool?.Invoke(ApplyPatchServerTool!); + applyPatchServerTool?.Invoke(__value12); } - else if (IsCustomTool) + else if (CustomTool is { } __value13) { - customTool?.Invoke(CustomTool!); + customTool?.Invoke(__value13); } - else if (IsNamespaceTool) + else if (NamespaceTool is { } __value14) { - namespaceTool?.Invoke(NamespaceTool!); + namespaceTool?.Invoke(__value14); } - else if (IsAdvisorServerToolOpenRouter) + else if (AdvisorServerToolOpenRouter is { } __value15) { - advisorServerToolOpenRouter?.Invoke(AdvisorServerToolOpenRouter!); + advisorServerToolOpenRouter?.Invoke(__value15); } - else if (IsSubagentServerToolOpenRouter) + else if (SubagentServerToolOpenRouter is { } __value16) { - subagentServerToolOpenRouter?.Invoke(SubagentServerToolOpenRouter!); + subagentServerToolOpenRouter?.Invoke(__value16); } - else if (IsDatetimeServerTool) + else if (DatetimeServerTool is { } __value17) { - datetimeServerTool?.Invoke(DatetimeServerTool!); + datetimeServerTool?.Invoke(__value17); } - else if (IsFilesServerTool) + else if (FilesServerTool is { } __value18) { - filesServerTool?.Invoke(FilesServerTool!); + filesServerTool?.Invoke(__value18); } - else if (IsFusionServerToolOpenRouter) + else if (FusionServerToolOpenRouter is { } __value19) { - fusionServerToolOpenRouter?.Invoke(FusionServerToolOpenRouter!); + fusionServerToolOpenRouter?.Invoke(__value19); } - else if (IsImageGenerationServerToolOpenRouter) + else if (ImageGenerationServerToolOpenRouter is { } __value20) { - imageGenerationServerToolOpenRouter?.Invoke(ImageGenerationServerToolOpenRouter!); + imageGenerationServerToolOpenRouter?.Invoke(__value20); } - else if (IsSearchModelsServerToolOpenRouter) + else if (SearchModelsServerToolOpenRouter is { } __value21) { - searchModelsServerToolOpenRouter?.Invoke(SearchModelsServerToolOpenRouter!); + searchModelsServerToolOpenRouter?.Invoke(__value21); } - else if (IsWebFetchServerTool) + else if (WebFetchServerTool is { } __value22) { - webFetchServerTool?.Invoke(WebFetchServerTool!); + webFetchServerTool?.Invoke(__value22); } - else if (IsWebSearchServerToolOpenRouter) + else if (WebSearchServerToolOpenRouter is { } __value23) { - webSearchServerToolOpenRouter?.Invoke(WebSearchServerToolOpenRouter!); + webSearchServerToolOpenRouter?.Invoke(__value23); } - else if (IsApplyPatchServerToolOpenRouter) + else if (ApplyPatchServerToolOpenRouter is { } __value24) { - applyPatchServerToolOpenRouter?.Invoke(ApplyPatchServerToolOpenRouter!); + applyPatchServerToolOpenRouter?.Invoke(__value24); } - else if (IsBashServerTool) + else if (BashServerTool is { } __value25) { - bashServerTool?.Invoke(BashServerTool!); + bashServerTool?.Invoke(__value25); } - else if (IsShellServerToolOpenRouter) + else if (ShellServerToolOpenRouter is { } __value26) { - shellServerToolOpenRouter?.Invoke(ShellServerToolOpenRouter!); + shellServerToolOpenRouter?.Invoke(__value26); } } @@ -2126,113 +2126,113 @@ public void Switch( Validate(); } - if (IsResponsesRequestToolsItems0) + if (ResponsesRequestToolsItems0 is { } __value0) { - responsesRequestToolsItems0?.Invoke(ResponsesRequestToolsItems0!); + responsesRequestToolsItems0?.Invoke(__value0); } - else if (IsPreviewWebSearchServerTool) + else if (PreviewWebSearchServerTool is { } __value1) { - previewWebSearchServerTool?.Invoke(PreviewWebSearchServerTool!); + previewWebSearchServerTool?.Invoke(__value1); } - else if (IsPreview20250311WebSearchServerTool) + else if (Preview20250311WebSearchServerTool is { } __value2) { - preview20250311WebSearchServerTool?.Invoke(Preview20250311WebSearchServerTool!); + preview20250311WebSearchServerTool?.Invoke(__value2); } - else if (IsLegacyWebSearchServerTool) + else if (LegacyWebSearchServerTool is { } __value3) { - legacyWebSearchServerTool?.Invoke(LegacyWebSearchServerTool!); + legacyWebSearchServerTool?.Invoke(__value3); } - else if (IsWebSearchServerTool) + else if (WebSearchServerTool is { } __value4) { - webSearchServerTool?.Invoke(WebSearchServerTool!); + webSearchServerTool?.Invoke(__value4); } - else if (IsFileSearchServerTool) + else if (FileSearchServerTool is { } __value5) { - fileSearchServerTool?.Invoke(FileSearchServerTool!); + fileSearchServerTool?.Invoke(__value5); } - else if (IsComputerUseServerTool) + else if (ComputerUseServerTool is { } __value6) { - computerUseServerTool?.Invoke(ComputerUseServerTool!); + computerUseServerTool?.Invoke(__value6); } - else if (IsCodeInterpreterServerTool) + else if (CodeInterpreterServerTool is { } __value7) { - codeInterpreterServerTool?.Invoke(CodeInterpreterServerTool!); + codeInterpreterServerTool?.Invoke(__value7); } - else if (IsMcpServerTool) + else if (McpServerTool is { } __value8) { - mcpServerTool?.Invoke(McpServerTool!); + mcpServerTool?.Invoke(__value8); } - else if (IsImageGenerationServerTool) + else if (ImageGenerationServerTool is { } __value9) { - imageGenerationServerTool?.Invoke(ImageGenerationServerTool!); + imageGenerationServerTool?.Invoke(__value9); } - else if (IsCodexLocalShellTool) + else if (CodexLocalShellTool is { } __value10) { - codexLocalShellTool?.Invoke(CodexLocalShellTool!); + codexLocalShellTool?.Invoke(__value10); } - else if (IsShellServerTool) + else if (ShellServerTool is { } __value11) { - shellServerTool?.Invoke(ShellServerTool!); + shellServerTool?.Invoke(__value11); } - else if (IsApplyPatchServerTool) + else if (ApplyPatchServerTool is { } __value12) { - applyPatchServerTool?.Invoke(ApplyPatchServerTool!); + applyPatchServerTool?.Invoke(__value12); } - else if (IsCustomTool) + else if (CustomTool is { } __value13) { - customTool?.Invoke(CustomTool!); + customTool?.Invoke(__value13); } - else if (IsNamespaceTool) + else if (NamespaceTool is { } __value14) { - namespaceTool?.Invoke(NamespaceTool!); + namespaceTool?.Invoke(__value14); } - else if (IsAdvisorServerToolOpenRouter) + else if (AdvisorServerToolOpenRouter is { } __value15) { - advisorServerToolOpenRouter?.Invoke(AdvisorServerToolOpenRouter!); + advisorServerToolOpenRouter?.Invoke(__value15); } - else if (IsSubagentServerToolOpenRouter) + else if (SubagentServerToolOpenRouter is { } __value16) { - subagentServerToolOpenRouter?.Invoke(SubagentServerToolOpenRouter!); + subagentServerToolOpenRouter?.Invoke(__value16); } - else if (IsDatetimeServerTool) + else if (DatetimeServerTool is { } __value17) { - datetimeServerTool?.Invoke(DatetimeServerTool!); + datetimeServerTool?.Invoke(__value17); } - else if (IsFilesServerTool) + else if (FilesServerTool is { } __value18) { - filesServerTool?.Invoke(FilesServerTool!); + filesServerTool?.Invoke(__value18); } - else if (IsFusionServerToolOpenRouter) + else if (FusionServerToolOpenRouter is { } __value19) { - fusionServerToolOpenRouter?.Invoke(FusionServerToolOpenRouter!); + fusionServerToolOpenRouter?.Invoke(__value19); } - else if (IsImageGenerationServerToolOpenRouter) + else if (ImageGenerationServerToolOpenRouter is { } __value20) { - imageGenerationServerToolOpenRouter?.Invoke(ImageGenerationServerToolOpenRouter!); + imageGenerationServerToolOpenRouter?.Invoke(__value20); } - else if (IsSearchModelsServerToolOpenRouter) + else if (SearchModelsServerToolOpenRouter is { } __value21) { - searchModelsServerToolOpenRouter?.Invoke(SearchModelsServerToolOpenRouter!); + searchModelsServerToolOpenRouter?.Invoke(__value21); } - else if (IsWebFetchServerTool) + else if (WebFetchServerTool is { } __value22) { - webFetchServerTool?.Invoke(WebFetchServerTool!); + webFetchServerTool?.Invoke(__value22); } - else if (IsWebSearchServerToolOpenRouter) + else if (WebSearchServerToolOpenRouter is { } __value23) { - webSearchServerToolOpenRouter?.Invoke(WebSearchServerToolOpenRouter!); + webSearchServerToolOpenRouter?.Invoke(__value23); } - else if (IsApplyPatchServerToolOpenRouter) + else if (ApplyPatchServerToolOpenRouter is { } __value24) { - applyPatchServerToolOpenRouter?.Invoke(ApplyPatchServerToolOpenRouter!); + applyPatchServerToolOpenRouter?.Invoke(__value24); } - else if (IsBashServerTool) + else if (BashServerTool is { } __value25) { - bashServerTool?.Invoke(BashServerTool!); + bashServerTool?.Invoke(__value25); } - else if (IsShellServerToolOpenRouter) + else if (ShellServerToolOpenRouter is { } __value26) { - shellServerToolOpenRouter?.Invoke(ShellServerToolOpenRouter!); + shellServerToolOpenRouter?.Invoke(__value26); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.ShellServerToolEnvironment.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.ShellServerToolEnvironment.g.cs index b630a4f5..e0783c91 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.ShellServerToolEnvironment.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.ShellServerToolEnvironment.g.cs @@ -47,8 +47,8 @@ public bool TryPickContainerAuto( /// /// /// - public global::OpenRouter.ShellServerToolEnvironmentVariant1 PickContainerAuto() => IsContainerAuto - ? ContainerAuto! + public global::OpenRouter.ShellServerToolEnvironmentVariant1 PickContainerAuto() => ContainerAuto is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ContainerAuto' but the value was {ToString()}."); /// @@ -84,8 +84,8 @@ public bool TryPickContainerReference( /// /// /// - public global::OpenRouter.ShellServerToolEnvironmentVariant2 PickContainerReference() => IsContainerReference - ? ContainerReference! + public global::OpenRouter.ShellServerToolEnvironmentVariant2 PickContainerReference() => ContainerReference is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ContainerReference' but the value was {ToString()}."); /// /// @@ -185,13 +185,13 @@ public bool Validate() Validate(); } - if (IsContainerAuto && containerAuto != null) + if (ContainerAuto is { } __value0 && containerAuto != null) { - return containerAuto(ContainerAuto!); + return containerAuto(__value0); } - else if (IsContainerReference && containerReference != null) + else if (ContainerReference is { } __value1 && containerReference != null) { - return containerReference(ContainerReference!); + return containerReference(__value1); } return default(TResult); @@ -211,13 +211,13 @@ public void Match( Validate(); } - if (IsContainerAuto) + if (ContainerAuto is { } __value0) { - containerAuto?.Invoke(ContainerAuto!); + containerAuto?.Invoke(__value0); } - else if (IsContainerReference) + else if (ContainerReference is { } __value1) { - containerReference?.Invoke(ContainerReference!); + containerReference?.Invoke(__value1); } } @@ -234,13 +234,13 @@ public void Switch( Validate(); } - if (IsContainerAuto) + if (ContainerAuto is { } __value0) { - containerAuto?.Invoke(ContainerAuto!); + containerAuto?.Invoke(__value0); } - else if (IsContainerReference) + else if (ContainerReference is { } __value1) { - containerReference?.Invoke(ContainerReference!); + containerReference?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.StopServerToolsWhenCondition.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.StopServerToolsWhenCondition.g.cs index f8fa6a7c..e01d740d 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.StopServerToolsWhenCondition.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.StopServerToolsWhenCondition.g.cs @@ -47,8 +47,8 @@ public bool TryPickFinishReasonIs( /// /// /// - public global::OpenRouter.StopServerToolsWhenConditionVariant1 PickFinishReasonIs() => IsFinishReasonIs - ? FinishReasonIs! + public global::OpenRouter.StopServerToolsWhenConditionVariant1 PickFinishReasonIs() => FinishReasonIs is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'FinishReasonIs' but the value was {ToString()}."); /// @@ -84,8 +84,8 @@ public bool TryPickHasToolCall( /// /// /// - public global::OpenRouter.StopServerToolsWhenConditionVariant2 PickHasToolCall() => IsHasToolCall - ? HasToolCall! + public global::OpenRouter.StopServerToolsWhenConditionVariant2 PickHasToolCall() => HasToolCall is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'HasToolCall' but the value was {ToString()}."); /// @@ -121,8 +121,8 @@ public bool TryPickMaxCost( /// /// /// - public global::OpenRouter.StopServerToolsWhenConditionVariant3 PickMaxCost() => IsMaxCost - ? MaxCost! + public global::OpenRouter.StopServerToolsWhenConditionVariant3 PickMaxCost() => MaxCost is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'MaxCost' but the value was {ToString()}."); /// @@ -158,8 +158,8 @@ public bool TryPickMaxTokensUsed( /// /// /// - public global::OpenRouter.StopServerToolsWhenConditionVariant4 PickMaxTokensUsed() => IsMaxTokensUsed - ? MaxTokensUsed! + public global::OpenRouter.StopServerToolsWhenConditionVariant4 PickMaxTokensUsed() => MaxTokensUsed is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'MaxTokensUsed' but the value was {ToString()}."); /// @@ -195,8 +195,8 @@ public bool TryPickStepCountIs( /// /// /// - public global::OpenRouter.StopServerToolsWhenConditionVariant5 PickStepCountIs() => IsStepCountIs - ? StepCountIs! + public global::OpenRouter.StopServerToolsWhenConditionVariant5 PickStepCountIs() => StepCountIs is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'StepCountIs' but the value was {ToString()}."); /// /// @@ -380,25 +380,25 @@ public bool Validate() Validate(); } - if (IsFinishReasonIs && finishReasonIs != null) + if (FinishReasonIs is { } __value0 && finishReasonIs != null) { - return finishReasonIs(FinishReasonIs!); + return finishReasonIs(__value0); } - else if (IsHasToolCall && hasToolCall != null) + else if (HasToolCall is { } __value1 && hasToolCall != null) { - return hasToolCall(HasToolCall!); + return hasToolCall(__value1); } - else if (IsMaxCost && maxCost != null) + else if (MaxCost is { } __value2 && maxCost != null) { - return maxCost(MaxCost!); + return maxCost(__value2); } - else if (IsMaxTokensUsed && maxTokensUsed != null) + else if (MaxTokensUsed is { } __value3 && maxTokensUsed != null) { - return maxTokensUsed(MaxTokensUsed!); + return maxTokensUsed(__value3); } - else if (IsStepCountIs && stepCountIs != null) + else if (StepCountIs is { } __value4 && stepCountIs != null) { - return stepCountIs(StepCountIs!); + return stepCountIs(__value4); } return default(TResult); @@ -424,25 +424,25 @@ public void Match( Validate(); } - if (IsFinishReasonIs) + if (FinishReasonIs is { } __value0) { - finishReasonIs?.Invoke(FinishReasonIs!); + finishReasonIs?.Invoke(__value0); } - else if (IsHasToolCall) + else if (HasToolCall is { } __value1) { - hasToolCall?.Invoke(HasToolCall!); + hasToolCall?.Invoke(__value1); } - else if (IsMaxCost) + else if (MaxCost is { } __value2) { - maxCost?.Invoke(MaxCost!); + maxCost?.Invoke(__value2); } - else if (IsMaxTokensUsed) + else if (MaxTokensUsed is { } __value3) { - maxTokensUsed?.Invoke(MaxTokensUsed!); + maxTokensUsed?.Invoke(__value3); } - else if (IsStepCountIs) + else if (StepCountIs is { } __value4) { - stepCountIs?.Invoke(StepCountIs!); + stepCountIs?.Invoke(__value4); } } @@ -462,25 +462,25 @@ public void Switch( Validate(); } - if (IsFinishReasonIs) + if (FinishReasonIs is { } __value0) { - finishReasonIs?.Invoke(FinishReasonIs!); + finishReasonIs?.Invoke(__value0); } - else if (IsHasToolCall) + else if (HasToolCall is { } __value1) { - hasToolCall?.Invoke(HasToolCall!); + hasToolCall?.Invoke(__value1); } - else if (IsMaxCost) + else if (MaxCost is { } __value2) { - maxCost?.Invoke(MaxCost!); + maxCost?.Invoke(__value2); } - else if (IsMaxTokensUsed) + else if (MaxTokensUsed is { } __value3) { - maxTokensUsed?.Invoke(MaxTokensUsed!); + maxTokensUsed?.Invoke(__value3); } - else if (IsStepCountIs) + else if (StepCountIs is { } __value4) { - stepCountIs?.Invoke(StepCountIs!); + stepCountIs?.Invoke(__value4); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.StoredPromptTemplateVariables.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.StoredPromptTemplateVariables.g.cs index 92efe649..debbbe5d 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.StoredPromptTemplateVariables.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.StoredPromptTemplateVariables.g.cs @@ -42,8 +42,8 @@ public bool TryPickStoredPromptTemplateVariablesVariant1( /// /// /// - public string PickStoredPromptTemplateVariablesVariant1() => IsStoredPromptTemplateVariablesVariant1 - ? StoredPromptTemplateVariablesVariant1! + public string PickStoredPromptTemplateVariablesVariant1() => StoredPromptTemplateVariablesVariant1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'StoredPromptTemplateVariablesVariant1' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickInputText( /// /// /// - public global::OpenRouter.InputText PickInputText() => IsInputText - ? InputText! + public global::OpenRouter.InputText PickInputText() => InputText is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'InputText' but the value was {ToString()}."); /// @@ -116,8 +116,8 @@ public bool TryPickInputImage( /// /// /// - public global::OpenRouter.InputImage PickInputImage() => IsInputImage - ? InputImage! + public global::OpenRouter.InputImage PickInputImage() => InputImage is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'InputImage' but the value was {ToString()}."); /// @@ -153,8 +153,8 @@ public bool TryPickInputFile( /// /// /// - public global::OpenRouter.InputFile PickInputFile() => IsInputFile - ? InputFile! + public global::OpenRouter.InputFile PickInputFile() => InputFile is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'InputFile' but the value was {ToString()}."); /// /// @@ -307,21 +307,21 @@ public bool Validate() Validate(); } - if (IsStoredPromptTemplateVariablesVariant1 && storedPromptTemplateVariablesVariant1 != null) + if (StoredPromptTemplateVariablesVariant1 is { } __value0 && storedPromptTemplateVariablesVariant1 != null) { - return storedPromptTemplateVariablesVariant1(StoredPromptTemplateVariablesVariant1!); + return storedPromptTemplateVariablesVariant1(__value0); } - else if (IsInputText && inputText != null) + else if (InputText is { } __value1 && inputText != null) { - return inputText(InputText!); + return inputText(__value1); } - else if (IsInputImage && inputImage != null) + else if (InputImage is { } __value2 && inputImage != null) { - return inputImage(InputImage!); + return inputImage(__value2); } - else if (IsInputFile && inputFile != null) + else if (InputFile is { } __value3 && inputFile != null) { - return inputFile(InputFile!); + return inputFile(__value3); } return default(TResult); @@ -345,21 +345,21 @@ public void Match( Validate(); } - if (IsStoredPromptTemplateVariablesVariant1) + if (StoredPromptTemplateVariablesVariant1 is { } __value0) { - storedPromptTemplateVariablesVariant1?.Invoke(StoredPromptTemplateVariablesVariant1!); + storedPromptTemplateVariablesVariant1?.Invoke(__value0); } - else if (IsInputText) + else if (InputText is { } __value1) { - inputText?.Invoke(InputText!); + inputText?.Invoke(__value1); } - else if (IsInputImage) + else if (InputImage is { } __value2) { - inputImage?.Invoke(InputImage!); + inputImage?.Invoke(__value2); } - else if (IsInputFile) + else if (InputFile is { } __value3) { - inputFile?.Invoke(InputFile!); + inputFile?.Invoke(__value3); } } @@ -378,21 +378,21 @@ public void Switch( Validate(); } - if (IsStoredPromptTemplateVariablesVariant1) + if (StoredPromptTemplateVariablesVariant1 is { } __value0) { - storedPromptTemplateVariablesVariant1?.Invoke(StoredPromptTemplateVariablesVariant1!); + storedPromptTemplateVariablesVariant1?.Invoke(__value0); } - else if (IsInputText) + else if (InputText is { } __value1) { - inputText?.Invoke(InputText!); + inputText?.Invoke(__value1); } - else if (IsInputImage) + else if (InputImage is { } __value2) { - inputImage?.Invoke(InputImage!); + inputImage?.Invoke(__value2); } - else if (IsInputFile) + else if (InputFile is { } __value3) { - inputFile?.Invoke(InputFile!); + inputFile?.Invoke(__value3); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.ToolChoiceAllowedMode.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.ToolChoiceAllowedMode.g.cs index af39ff3e..ab2bcbdd 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.ToolChoiceAllowedMode.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.ToolChoiceAllowedMode.g.cs @@ -42,8 +42,8 @@ public bool TryPickToolChoiceAllowedMode0( /// /// /// - public global::OpenRouter.ToolChoiceAllowedMode0 PickToolChoiceAllowedMode0() => IsToolChoiceAllowedMode0 - ? ToolChoiceAllowedMode0!.Value + public global::OpenRouter.ToolChoiceAllowedMode0 PickToolChoiceAllowedMode0() => ToolChoiceAllowedMode0 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ToolChoiceAllowedMode0' but the value was {ToString()}."); /// @@ -79,8 +79,8 @@ public bool TryPickToolChoiceAllowedMode1( /// /// /// - public global::OpenRouter.ToolChoiceAllowedMode1 PickToolChoiceAllowedMode1() => IsToolChoiceAllowedMode1 - ? ToolChoiceAllowedMode1!.Value + public global::OpenRouter.ToolChoiceAllowedMode1 PickToolChoiceAllowedMode1() => ToolChoiceAllowedMode1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ToolChoiceAllowedMode1' but the value was {ToString()}."); /// /// @@ -177,13 +177,13 @@ public bool Validate() Validate(); } - if (IsToolChoiceAllowedMode0 && toolChoiceAllowedMode0 != null) + if (ToolChoiceAllowedMode0 is { } __value0 && toolChoiceAllowedMode0 != null) { - return toolChoiceAllowedMode0(ToolChoiceAllowedMode0!); + return toolChoiceAllowedMode0(__value0); } - else if (IsToolChoiceAllowedMode1 && toolChoiceAllowedMode1 != null) + else if (ToolChoiceAllowedMode1 is { } __value1 && toolChoiceAllowedMode1 != null) { - return toolChoiceAllowedMode1(ToolChoiceAllowedMode1!); + return toolChoiceAllowedMode1(__value1); } return default(TResult); @@ -203,13 +203,13 @@ public void Match( Validate(); } - if (IsToolChoiceAllowedMode0) + if (ToolChoiceAllowedMode0 is { } __value0) { - toolChoiceAllowedMode0?.Invoke(ToolChoiceAllowedMode0!); + toolChoiceAllowedMode0?.Invoke(__value0); } - else if (IsToolChoiceAllowedMode1) + else if (ToolChoiceAllowedMode1 is { } __value1) { - toolChoiceAllowedMode1?.Invoke(ToolChoiceAllowedMode1!); + toolChoiceAllowedMode1?.Invoke(__value1); } } @@ -226,13 +226,13 @@ public void Switch( Validate(); } - if (IsToolChoiceAllowedMode0) + if (ToolChoiceAllowedMode0 is { } __value0) { - toolChoiceAllowedMode0?.Invoke(ToolChoiceAllowedMode0!); + toolChoiceAllowedMode0?.Invoke(__value0); } - else if (IsToolChoiceAllowedMode1) + else if (ToolChoiceAllowedMode1 is { } __value1) { - toolChoiceAllowedMode1?.Invoke(ToolChoiceAllowedMode1!); + toolChoiceAllowedMode1?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.UnifiedBenchmarksResponseDataItems.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.UnifiedBenchmarksResponseDataItems.g.cs index 4a1f064f..a6864a9a 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.UnifiedBenchmarksResponseDataItems.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.UnifiedBenchmarksResponseDataItems.g.cs @@ -47,8 +47,8 @@ public bool TryPickArtificialAnalysis( /// /// /// - public global::OpenRouter.UnifiedBenchmarksResponseDataItemsVariant1 PickArtificialAnalysis() => IsArtificialAnalysis - ? ArtificialAnalysis! + public global::OpenRouter.UnifiedBenchmarksResponseDataItemsVariant1 PickArtificialAnalysis() => ArtificialAnalysis is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'ArtificialAnalysis' but the value was {ToString()}."); /// @@ -84,8 +84,8 @@ public bool TryPickDesignArena( /// /// /// - public global::OpenRouter.UnifiedBenchmarksResponseDataItemsVariant2 PickDesignArena() => IsDesignArena - ? DesignArena! + public global::OpenRouter.UnifiedBenchmarksResponseDataItemsVariant2 PickDesignArena() => DesignArena is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'DesignArena' but the value was {ToString()}."); /// /// @@ -185,13 +185,13 @@ public bool Validate() Validate(); } - if (IsArtificialAnalysis && artificialAnalysis != null) + if (ArtificialAnalysis is { } __value0 && artificialAnalysis != null) { - return artificialAnalysis(ArtificialAnalysis!); + return artificialAnalysis(__value0); } - else if (IsDesignArena && designArena != null) + else if (DesignArena is { } __value1 && designArena != null) { - return designArena(DesignArena!); + return designArena(__value1); } return default(TResult); @@ -211,13 +211,13 @@ public void Match( Validate(); } - if (IsArtificialAnalysis) + if (ArtificialAnalysis is { } __value0) { - artificialAnalysis?.Invoke(ArtificialAnalysis!); + artificialAnalysis?.Invoke(__value0); } - else if (IsDesignArena) + else if (DesignArena is { } __value1) { - designArena?.Invoke(DesignArena!); + designArena?.Invoke(__value1); } } @@ -234,13 +234,13 @@ public void Switch( Validate(); } - if (IsArtificialAnalysis) + if (ArtificialAnalysis is { } __value0) { - artificialAnalysis?.Invoke(ArtificialAnalysis!); + artificialAnalysis?.Invoke(__value0); } - else if (IsDesignArena) + else if (DesignArena is { } __value1) { - designArena?.Invoke(DesignArena!); + designArena?.Invoke(__value1); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.Models.UpdateObservabilityDestinationResponseData.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.Models.UpdateObservabilityDestinationResponseData.g.cs index a8c82804..60d44689 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.Models.UpdateObservabilityDestinationResponseData.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.Models.UpdateObservabilityDestinationResponseData.g.cs @@ -47,8 +47,8 @@ public bool TryPickArize( /// /// /// - public global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant1 PickArize() => IsArize - ? Arize! + public global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant1 PickArize() => Arize is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Arize' but the value was {ToString()}."); /// @@ -84,8 +84,8 @@ public bool TryPickBraintrust( /// /// /// - public global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant2 PickBraintrust() => IsBraintrust - ? Braintrust! + public global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant2 PickBraintrust() => Braintrust is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Braintrust' but the value was {ToString()}."); /// @@ -121,8 +121,8 @@ public bool TryPickClickhouse( /// /// /// - public global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant3 PickClickhouse() => IsClickhouse - ? Clickhouse! + public global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant3 PickClickhouse() => Clickhouse is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Clickhouse' but the value was {ToString()}."); /// @@ -158,8 +158,8 @@ public bool TryPickDatadog( /// /// /// - public global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant4 PickDatadog() => IsDatadog - ? Datadog! + public global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant4 PickDatadog() => Datadog is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Datadog' but the value was {ToString()}."); /// @@ -195,8 +195,8 @@ public bool TryPickGrafana( /// /// /// - public global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant5 PickGrafana() => IsGrafana - ? Grafana! + public global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant5 PickGrafana() => Grafana is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Grafana' but the value was {ToString()}."); /// @@ -232,8 +232,8 @@ public bool TryPickLangfuse( /// /// /// - public global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant6 PickLangfuse() => IsLangfuse - ? Langfuse! + public global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant6 PickLangfuse() => Langfuse is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Langfuse' but the value was {ToString()}."); /// @@ -269,8 +269,8 @@ public bool TryPickLangsmith( /// /// /// - public global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant7 PickLangsmith() => IsLangsmith - ? Langsmith! + public global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant7 PickLangsmith() => Langsmith is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Langsmith' but the value was {ToString()}."); /// @@ -306,8 +306,8 @@ public bool TryPickNewrelic( /// /// /// - public global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant8 PickNewrelic() => IsNewrelic - ? Newrelic! + public global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant8 PickNewrelic() => Newrelic is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Newrelic' but the value was {ToString()}."); /// @@ -343,8 +343,8 @@ public bool TryPickOpik( /// /// /// - public global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant9 PickOpik() => IsOpik - ? Opik! + public global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant9 PickOpik() => Opik is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Opik' but the value was {ToString()}."); /// @@ -380,8 +380,8 @@ public bool TryPickOtelCollector( /// /// /// - public global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant10 PickOtelCollector() => IsOtelCollector - ? OtelCollector! + public global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant10 PickOtelCollector() => OtelCollector is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'OtelCollector' but the value was {ToString()}."); /// @@ -417,8 +417,8 @@ public bool TryPickPosthog( /// /// /// - public global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant11 PickPosthog() => IsPosthog - ? Posthog! + public global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant11 PickPosthog() => Posthog is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Posthog' but the value was {ToString()}."); /// @@ -454,8 +454,8 @@ public bool TryPickRamp( /// /// /// - public global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant12 PickRamp() => IsRamp - ? Ramp! + public global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant12 PickRamp() => Ramp is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Ramp' but the value was {ToString()}."); /// @@ -491,8 +491,8 @@ public bool TryPickS3( /// /// /// - public global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant13 PickS3() => IsS3 - ? S3! + public global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant13 PickS3() => S3 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'S3' but the value was {ToString()}."); /// @@ -528,8 +528,8 @@ public bool TryPickSentry( /// /// /// - public global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant14 PickSentry() => IsSentry - ? Sentry! + public global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant14 PickSentry() => Sentry is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Sentry' but the value was {ToString()}."); /// @@ -565,8 +565,8 @@ public bool TryPickSnowflake( /// /// /// - public global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant15 PickSnowflake() => IsSnowflake - ? Snowflake! + public global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant15 PickSnowflake() => Snowflake is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Snowflake' but the value was {ToString()}."); /// @@ -602,8 +602,8 @@ public bool TryPickWeave( /// /// /// - public global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant16 PickWeave() => IsWeave - ? Weave! + public global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant16 PickWeave() => Weave is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Weave' but the value was {ToString()}."); /// @@ -639,8 +639,8 @@ public bool TryPickWebhook( /// /// /// - public global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant17 PickWebhook() => IsWebhook - ? Webhook! + public global::OpenRouter.UpdateObservabilityDestinationResponseDataVariant17 PickWebhook() => Webhook is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Webhook' but the value was {ToString()}."); /// /// @@ -1160,73 +1160,73 @@ public bool Validate() Validate(); } - if (IsArize && arize != null) + if (Arize is { } __value0 && arize != null) { - return arize(Arize!); + return arize(__value0); } - else if (IsBraintrust && braintrust != null) + else if (Braintrust is { } __value1 && braintrust != null) { - return braintrust(Braintrust!); + return braintrust(__value1); } - else if (IsClickhouse && clickhouse != null) + else if (Clickhouse is { } __value2 && clickhouse != null) { - return clickhouse(Clickhouse!); + return clickhouse(__value2); } - else if (IsDatadog && datadog != null) + else if (Datadog is { } __value3 && datadog != null) { - return datadog(Datadog!); + return datadog(__value3); } - else if (IsGrafana && grafana != null) + else if (Grafana is { } __value4 && grafana != null) { - return grafana(Grafana!); + return grafana(__value4); } - else if (IsLangfuse && langfuse != null) + else if (Langfuse is { } __value5 && langfuse != null) { - return langfuse(Langfuse!); + return langfuse(__value5); } - else if (IsLangsmith && langsmith != null) + else if (Langsmith is { } __value6 && langsmith != null) { - return langsmith(Langsmith!); + return langsmith(__value6); } - else if (IsNewrelic && newrelic != null) + else if (Newrelic is { } __value7 && newrelic != null) { - return newrelic(Newrelic!); + return newrelic(__value7); } - else if (IsOpik && opik != null) + else if (Opik is { } __value8 && opik != null) { - return opik(Opik!); + return opik(__value8); } - else if (IsOtelCollector && otelCollector != null) + else if (OtelCollector is { } __value9 && otelCollector != null) { - return otelCollector(OtelCollector!); + return otelCollector(__value9); } - else if (IsPosthog && posthog != null) + else if (Posthog is { } __value10 && posthog != null) { - return posthog(Posthog!); + return posthog(__value10); } - else if (IsRamp && ramp != null) + else if (Ramp is { } __value11 && ramp != null) { - return ramp(Ramp!); + return ramp(__value11); } - else if (IsS3 && s3 != null) + else if (S3 is { } __value12 && s3 != null) { - return s3(S3!); + return s3(__value12); } - else if (IsSentry && sentry != null) + else if (Sentry is { } __value13 && sentry != null) { - return sentry(Sentry!); + return sentry(__value13); } - else if (IsSnowflake && snowflake != null) + else if (Snowflake is { } __value14 && snowflake != null) { - return snowflake(Snowflake!); + return snowflake(__value14); } - else if (IsWeave && weave != null) + else if (Weave is { } __value15 && weave != null) { - return weave(Weave!); + return weave(__value15); } - else if (IsWebhook && webhook != null) + else if (Webhook is { } __value16 && webhook != null) { - return webhook(Webhook!); + return webhook(__value16); } return default(TResult); @@ -1276,73 +1276,73 @@ public void Match( Validate(); } - if (IsArize) + if (Arize is { } __value0) { - arize?.Invoke(Arize!); + arize?.Invoke(__value0); } - else if (IsBraintrust) + else if (Braintrust is { } __value1) { - braintrust?.Invoke(Braintrust!); + braintrust?.Invoke(__value1); } - else if (IsClickhouse) + else if (Clickhouse is { } __value2) { - clickhouse?.Invoke(Clickhouse!); + clickhouse?.Invoke(__value2); } - else if (IsDatadog) + else if (Datadog is { } __value3) { - datadog?.Invoke(Datadog!); + datadog?.Invoke(__value3); } - else if (IsGrafana) + else if (Grafana is { } __value4) { - grafana?.Invoke(Grafana!); + grafana?.Invoke(__value4); } - else if (IsLangfuse) + else if (Langfuse is { } __value5) { - langfuse?.Invoke(Langfuse!); + langfuse?.Invoke(__value5); } - else if (IsLangsmith) + else if (Langsmith is { } __value6) { - langsmith?.Invoke(Langsmith!); + langsmith?.Invoke(__value6); } - else if (IsNewrelic) + else if (Newrelic is { } __value7) { - newrelic?.Invoke(Newrelic!); + newrelic?.Invoke(__value7); } - else if (IsOpik) + else if (Opik is { } __value8) { - opik?.Invoke(Opik!); + opik?.Invoke(__value8); } - else if (IsOtelCollector) + else if (OtelCollector is { } __value9) { - otelCollector?.Invoke(OtelCollector!); + otelCollector?.Invoke(__value9); } - else if (IsPosthog) + else if (Posthog is { } __value10) { - posthog?.Invoke(Posthog!); + posthog?.Invoke(__value10); } - else if (IsRamp) + else if (Ramp is { } __value11) { - ramp?.Invoke(Ramp!); + ramp?.Invoke(__value11); } - else if (IsS3) + else if (S3 is { } __value12) { - s3?.Invoke(S3!); + s3?.Invoke(__value12); } - else if (IsSentry) + else if (Sentry is { } __value13) { - sentry?.Invoke(Sentry!); + sentry?.Invoke(__value13); } - else if (IsSnowflake) + else if (Snowflake is { } __value14) { - snowflake?.Invoke(Snowflake!); + snowflake?.Invoke(__value14); } - else if (IsWeave) + else if (Weave is { } __value15) { - weave?.Invoke(Weave!); + weave?.Invoke(__value15); } - else if (IsWebhook) + else if (Webhook is { } __value16) { - webhook?.Invoke(Webhook!); + webhook?.Invoke(__value16); } } @@ -1374,73 +1374,73 @@ public void Switch( Validate(); } - if (IsArize) + if (Arize is { } __value0) { - arize?.Invoke(Arize!); + arize?.Invoke(__value0); } - else if (IsBraintrust) + else if (Braintrust is { } __value1) { - braintrust?.Invoke(Braintrust!); + braintrust?.Invoke(__value1); } - else if (IsClickhouse) + else if (Clickhouse is { } __value2) { - clickhouse?.Invoke(Clickhouse!); + clickhouse?.Invoke(__value2); } - else if (IsDatadog) + else if (Datadog is { } __value3) { - datadog?.Invoke(Datadog!); + datadog?.Invoke(__value3); } - else if (IsGrafana) + else if (Grafana is { } __value4) { - grafana?.Invoke(Grafana!); + grafana?.Invoke(__value4); } - else if (IsLangfuse) + else if (Langfuse is { } __value5) { - langfuse?.Invoke(Langfuse!); + langfuse?.Invoke(__value5); } - else if (IsLangsmith) + else if (Langsmith is { } __value6) { - langsmith?.Invoke(Langsmith!); + langsmith?.Invoke(__value6); } - else if (IsNewrelic) + else if (Newrelic is { } __value7) { - newrelic?.Invoke(Newrelic!); + newrelic?.Invoke(__value7); } - else if (IsOpik) + else if (Opik is { } __value8) { - opik?.Invoke(Opik!); + opik?.Invoke(__value8); } - else if (IsOtelCollector) + else if (OtelCollector is { } __value9) { - otelCollector?.Invoke(OtelCollector!); + otelCollector?.Invoke(__value9); } - else if (IsPosthog) + else if (Posthog is { } __value10) { - posthog?.Invoke(Posthog!); + posthog?.Invoke(__value10); } - else if (IsRamp) + else if (Ramp is { } __value11) { - ramp?.Invoke(Ramp!); + ramp?.Invoke(__value11); } - else if (IsS3) + else if (S3 is { } __value12) { - s3?.Invoke(S3!); + s3?.Invoke(__value12); } - else if (IsSentry) + else if (Sentry is { } __value13) { - sentry?.Invoke(Sentry!); + sentry?.Invoke(__value13); } - else if (IsSnowflake) + else if (Snowflake is { } __value14) { - snowflake?.Invoke(Snowflake!); + snowflake?.Invoke(__value14); } - else if (IsWeave) + else if (Weave is { } __value15) { - weave?.Invoke(Weave!); + weave?.Invoke(__value15); } - else if (IsWebhook) + else if (Webhook is { } __value16) { - webhook?.Invoke(Webhook!); + webhook?.Invoke(__value16); } } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.ModelsClient.GetModel.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.ModelsClient.GetModel.g.cs index 401ce5d2..ddef0451 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.ModelsClient.GetModel.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.ModelsClient.GetModel.g.cs @@ -155,8 +155,8 @@ partial void ProcessGetModelResponseContent( PrepareGetModelRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - author: author!, - slug: slug!); + author: author, + slug: slug); global::OpenRouter.AutoSDKHttpRequestOptions.StampAuthorizationOverride(__httpRequest); @@ -180,7 +180,7 @@ partial void ProcessGetModelResponseContent( pathTemplate: "$\"/model/{author}/{slug}\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -214,7 +214,7 @@ partial void ProcessGetModelResponseContent( pathTemplate: "$\"/model/{author}/{slug}\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -255,7 +255,7 @@ partial void ProcessGetModelResponseContent( pathTemplate: "$\"/model/{author}/{slug}\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -303,7 +303,7 @@ partial void ProcessGetModelResponseContent( pathTemplate: "$\"/model/{author}/{slug}\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -325,7 +325,7 @@ partial void ProcessGetModelResponseContent( pathTemplate: "$\"/model/{author}/{slug}\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.ModelsClient.GetModels.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.ModelsClient.GetModels.g.cs index 6a215828..796f55c3 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.ModelsClient.GetModels.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.ModelsClient.GetModels.g.cs @@ -500,7 +500,7 @@ partial void ProcessGetModelsResponseContent( pathTemplate: "\"/models\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -534,7 +534,7 @@ partial void ProcessGetModelsResponseContent( pathTemplate: "\"/models\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -575,7 +575,7 @@ partial void ProcessGetModelsResponseContent( pathTemplate: "\"/models\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -623,7 +623,7 @@ partial void ProcessGetModelsResponseContent( pathTemplate: "\"/models\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -645,7 +645,7 @@ partial void ProcessGetModelsResponseContent( pathTemplate: "\"/models\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.ModelsClient.ListModelsCount.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.ModelsClient.ListModelsCount.g.cs index 9514af9a..218094aa 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.ModelsClient.ListModelsCount.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.ModelsClient.ListModelsCount.g.cs @@ -172,7 +172,7 @@ partial void ProcessListModelsCountResponseContent( pathTemplate: "\"/models/count\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -206,7 +206,7 @@ partial void ProcessListModelsCountResponseContent( pathTemplate: "\"/models/count\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -247,7 +247,7 @@ partial void ProcessListModelsCountResponseContent( pathTemplate: "\"/models/count\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -295,7 +295,7 @@ partial void ProcessListModelsCountResponseContent( pathTemplate: "\"/models/count\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -317,7 +317,7 @@ partial void ProcessListModelsCountResponseContent( pathTemplate: "\"/models/count\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.ModelsClient.ListModelsUser.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.ModelsClient.ListModelsUser.g.cs index c91f6b3e..c83c9e35 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.ModelsClient.ListModelsUser.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.ModelsClient.ListModelsUser.g.cs @@ -190,7 +190,7 @@ partial void ProcessListModelsUserResponseContent( pathTemplate: "\"/models/user\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -224,7 +224,7 @@ partial void ProcessListModelsUserResponseContent( pathTemplate: "\"/models/user\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -265,7 +265,7 @@ partial void ProcessListModelsUserResponseContent( pathTemplate: "\"/models/user\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -313,7 +313,7 @@ partial void ProcessListModelsUserResponseContent( pathTemplate: "\"/models/user\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -335,7 +335,7 @@ partial void ProcessListModelsUserResponseContent( pathTemplate: "\"/models/user\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.OAuthClient.CreateAuthKeysCode.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.OAuthClient.CreateAuthKeysCode.g.cs index 9b3802d2..8b015d15 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.OAuthClient.CreateAuthKeysCode.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.OAuthClient.CreateAuthKeysCode.g.cs @@ -182,7 +182,7 @@ partial void ProcessCreateAuthKeysCodeResponseContent( pathTemplate: "\"/auth/keys/code\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -216,7 +216,7 @@ partial void ProcessCreateAuthKeysCodeResponseContent( pathTemplate: "\"/auth/keys/code\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -257,7 +257,7 @@ partial void ProcessCreateAuthKeysCodeResponseContent( pathTemplate: "\"/auth/keys/code\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -305,7 +305,7 @@ partial void ProcessCreateAuthKeysCodeResponseContent( pathTemplate: "\"/auth/keys/code\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -327,7 +327,7 @@ partial void ProcessCreateAuthKeysCodeResponseContent( pathTemplate: "\"/auth/keys/code\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.OAuthClient.ExchangeAuthCodeForAPIKey.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.OAuthClient.ExchangeAuthCodeForAPIKey.g.cs index 67a231c1..6a23d5b0 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.OAuthClient.ExchangeAuthCodeForAPIKey.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.OAuthClient.ExchangeAuthCodeForAPIKey.g.cs @@ -182,7 +182,7 @@ partial void ProcessExchangeAuthCodeForAPIKeyResponseContent( pathTemplate: "\"/auth/keys\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -216,7 +216,7 @@ partial void ProcessExchangeAuthCodeForAPIKeyResponseContent( pathTemplate: "\"/auth/keys\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -257,7 +257,7 @@ partial void ProcessExchangeAuthCodeForAPIKeyResponseContent( pathTemplate: "\"/auth/keys\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -305,7 +305,7 @@ partial void ProcessExchangeAuthCodeForAPIKeyResponseContent( pathTemplate: "\"/auth/keys\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -327,7 +327,7 @@ partial void ProcessExchangeAuthCodeForAPIKeyResponseContent( pathTemplate: "\"/auth/keys\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.ObservabilityClient.CreateObservabilityDestination.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.ObservabilityClient.CreateObservabilityDestination.g.cs index 0180302e..f03c86e0 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.ObservabilityClient.CreateObservabilityDestination.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.ObservabilityClient.CreateObservabilityDestination.g.cs @@ -182,7 +182,7 @@ partial void ProcessCreateObservabilityDestinationResponseContent( pathTemplate: "\"/observability/destinations\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -216,7 +216,7 @@ partial void ProcessCreateObservabilityDestinationResponseContent( pathTemplate: "\"/observability/destinations\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -257,7 +257,7 @@ partial void ProcessCreateObservabilityDestinationResponseContent( pathTemplate: "\"/observability/destinations\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -305,7 +305,7 @@ partial void ProcessCreateObservabilityDestinationResponseContent( pathTemplate: "\"/observability/destinations\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -327,7 +327,7 @@ partial void ProcessCreateObservabilityDestinationResponseContent( pathTemplate: "\"/observability/destinations\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.ObservabilityClient.DeleteObservabilityDestination.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.ObservabilityClient.DeleteObservabilityDestination.g.cs index a740f765..d04c353e 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.ObservabilityClient.DeleteObservabilityDestination.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.ObservabilityClient.DeleteObservabilityDestination.g.cs @@ -147,7 +147,7 @@ partial void ProcessDeleteObservabilityDestinationResponseContent( PrepareDeleteObservabilityDestinationRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - id: id!); + id: id); global::OpenRouter.AutoSDKHttpRequestOptions.StampAuthorizationOverride(__httpRequest); @@ -171,7 +171,7 @@ partial void ProcessDeleteObservabilityDestinationResponseContent( pathTemplate: "$\"/observability/destinations/{id}\"", httpMethod: "DELETE", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -205,7 +205,7 @@ partial void ProcessDeleteObservabilityDestinationResponseContent( pathTemplate: "$\"/observability/destinations/{id}\"", httpMethod: "DELETE", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -246,7 +246,7 @@ partial void ProcessDeleteObservabilityDestinationResponseContent( pathTemplate: "$\"/observability/destinations/{id}\"", httpMethod: "DELETE", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -294,7 +294,7 @@ partial void ProcessDeleteObservabilityDestinationResponseContent( pathTemplate: "$\"/observability/destinations/{id}\"", httpMethod: "DELETE", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -316,7 +316,7 @@ partial void ProcessDeleteObservabilityDestinationResponseContent( pathTemplate: "$\"/observability/destinations/{id}\"", httpMethod: "DELETE", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.ObservabilityClient.GetObservabilityDestination.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.ObservabilityClient.GetObservabilityDestination.g.cs index 3dfaaaa3..a315cee3 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.ObservabilityClient.GetObservabilityDestination.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.ObservabilityClient.GetObservabilityDestination.g.cs @@ -147,7 +147,7 @@ partial void ProcessGetObservabilityDestinationResponseContent( PrepareGetObservabilityDestinationRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - id: id!); + id: id); global::OpenRouter.AutoSDKHttpRequestOptions.StampAuthorizationOverride(__httpRequest); @@ -171,7 +171,7 @@ partial void ProcessGetObservabilityDestinationResponseContent( pathTemplate: "$\"/observability/destinations/{id}\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -205,7 +205,7 @@ partial void ProcessGetObservabilityDestinationResponseContent( pathTemplate: "$\"/observability/destinations/{id}\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -246,7 +246,7 @@ partial void ProcessGetObservabilityDestinationResponseContent( pathTemplate: "$\"/observability/destinations/{id}\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -294,7 +294,7 @@ partial void ProcessGetObservabilityDestinationResponseContent( pathTemplate: "$\"/observability/destinations/{id}\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -316,7 +316,7 @@ partial void ProcessGetObservabilityDestinationResponseContent( pathTemplate: "$\"/observability/destinations/{id}\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.ObservabilityClient.ListObservabilityDestinations.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.ObservabilityClient.ListObservabilityDestinations.g.cs index c8497a95..b6f33eb5 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.ObservabilityClient.ListObservabilityDestinations.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.ObservabilityClient.ListObservabilityDestinations.g.cs @@ -202,7 +202,7 @@ partial void ProcessListObservabilityDestinationsResponseContent( pathTemplate: "\"/observability/destinations\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -236,7 +236,7 @@ partial void ProcessListObservabilityDestinationsResponseContent( pathTemplate: "\"/observability/destinations\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -277,7 +277,7 @@ partial void ProcessListObservabilityDestinationsResponseContent( pathTemplate: "\"/observability/destinations\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -325,7 +325,7 @@ partial void ProcessListObservabilityDestinationsResponseContent( pathTemplate: "\"/observability/destinations\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -347,7 +347,7 @@ partial void ProcessListObservabilityDestinationsResponseContent( pathTemplate: "\"/observability/destinations\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.ObservabilityClient.UpdateObservabilityDestination.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.ObservabilityClient.UpdateObservabilityDestination.g.cs index 1a932381..eae0acb4 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.ObservabilityClient.UpdateObservabilityDestination.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.ObservabilityClient.UpdateObservabilityDestination.g.cs @@ -166,7 +166,7 @@ partial void ProcessUpdateObservabilityDestinationResponseContent( PrepareUpdateObservabilityDestinationRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - id: id!, + id: id, request: request); global::OpenRouter.AutoSDKHttpRequestOptions.StampAuthorizationOverride(__httpRequest); @@ -191,7 +191,7 @@ partial void ProcessUpdateObservabilityDestinationResponseContent( pathTemplate: "$\"/observability/destinations/{id}\"", httpMethod: "PATCH", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -225,7 +225,7 @@ partial void ProcessUpdateObservabilityDestinationResponseContent( pathTemplate: "$\"/observability/destinations/{id}\"", httpMethod: "PATCH", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -266,7 +266,7 @@ partial void ProcessUpdateObservabilityDestinationResponseContent( pathTemplate: "$\"/observability/destinations/{id}\"", httpMethod: "PATCH", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -314,7 +314,7 @@ partial void ProcessUpdateObservabilityDestinationResponseContent( pathTemplate: "$\"/observability/destinations/{id}\"", httpMethod: "PATCH", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -336,7 +336,7 @@ partial void ProcessUpdateObservabilityDestinationResponseContent( pathTemplate: "$\"/observability/destinations/{id}\"", httpMethod: "PATCH", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.OrganizationClient.ListOrganizationMembers.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.OrganizationClient.ListOrganizationMembers.g.cs index 6e8b3568..f2fc6ddd 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.OrganizationClient.ListOrganizationMembers.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.OrganizationClient.ListOrganizationMembers.g.cs @@ -192,7 +192,7 @@ partial void ProcessListOrganizationMembersResponseContent( pathTemplate: "\"/organization/members\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -226,7 +226,7 @@ partial void ProcessListOrganizationMembersResponseContent( pathTemplate: "\"/organization/members\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -267,7 +267,7 @@ partial void ProcessListOrganizationMembersResponseContent( pathTemplate: "\"/organization/members\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -315,7 +315,7 @@ partial void ProcessListOrganizationMembersResponseContent( pathTemplate: "\"/organization/members\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -337,7 +337,7 @@ partial void ProcessListOrganizationMembersResponseContent( pathTemplate: "\"/organization/members\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.PresetsClient.CreatePresetsChatCompletions.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.PresetsClient.CreatePresetsChatCompletions.g.cs index ca245962..be488b2f 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.PresetsClient.CreatePresetsChatCompletions.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.PresetsClient.CreatePresetsChatCompletions.g.cs @@ -166,7 +166,7 @@ partial void ProcessCreatePresetsChatCompletionsResponseContent( PrepareCreatePresetsChatCompletionsRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - slug: slug!, + slug: slug, request: request); global::OpenRouter.AutoSDKHttpRequestOptions.StampAuthorizationOverride(__httpRequest); @@ -191,7 +191,7 @@ partial void ProcessCreatePresetsChatCompletionsResponseContent( pathTemplate: "$\"/presets/{slug}/chat/completions\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -225,7 +225,7 @@ partial void ProcessCreatePresetsChatCompletionsResponseContent( pathTemplate: "$\"/presets/{slug}/chat/completions\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -266,7 +266,7 @@ partial void ProcessCreatePresetsChatCompletionsResponseContent( pathTemplate: "$\"/presets/{slug}/chat/completions\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -314,7 +314,7 @@ partial void ProcessCreatePresetsChatCompletionsResponseContent( pathTemplate: "$\"/presets/{slug}/chat/completions\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -336,7 +336,7 @@ partial void ProcessCreatePresetsChatCompletionsResponseContent( pathTemplate: "$\"/presets/{slug}/chat/completions\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.PresetsClient.CreatePresetsMessages.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.PresetsClient.CreatePresetsMessages.g.cs index 109c929e..e6fe90bf 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.PresetsClient.CreatePresetsMessages.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.PresetsClient.CreatePresetsMessages.g.cs @@ -166,7 +166,7 @@ partial void ProcessCreatePresetsMessagesResponseContent( PrepareCreatePresetsMessagesRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - slug: slug!, + slug: slug, request: request); global::OpenRouter.AutoSDKHttpRequestOptions.StampAuthorizationOverride(__httpRequest); @@ -191,7 +191,7 @@ partial void ProcessCreatePresetsMessagesResponseContent( pathTemplate: "$\"/presets/{slug}/messages\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -225,7 +225,7 @@ partial void ProcessCreatePresetsMessagesResponseContent( pathTemplate: "$\"/presets/{slug}/messages\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -266,7 +266,7 @@ partial void ProcessCreatePresetsMessagesResponseContent( pathTemplate: "$\"/presets/{slug}/messages\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -314,7 +314,7 @@ partial void ProcessCreatePresetsMessagesResponseContent( pathTemplate: "$\"/presets/{slug}/messages\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -336,7 +336,7 @@ partial void ProcessCreatePresetsMessagesResponseContent( pathTemplate: "$\"/presets/{slug}/messages\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.PresetsClient.CreatePresetsResponses.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.PresetsClient.CreatePresetsResponses.g.cs index 17d979a8..09747751 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.PresetsClient.CreatePresetsResponses.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.PresetsClient.CreatePresetsResponses.g.cs @@ -166,7 +166,7 @@ partial void ProcessCreatePresetsResponsesResponseContent( PrepareCreatePresetsResponsesRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - slug: slug!, + slug: slug, request: request); global::OpenRouter.AutoSDKHttpRequestOptions.StampAuthorizationOverride(__httpRequest); @@ -191,7 +191,7 @@ partial void ProcessCreatePresetsResponsesResponseContent( pathTemplate: "$\"/presets/{slug}/responses\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -225,7 +225,7 @@ partial void ProcessCreatePresetsResponsesResponseContent( pathTemplate: "$\"/presets/{slug}/responses\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -266,7 +266,7 @@ partial void ProcessCreatePresetsResponsesResponseContent( pathTemplate: "$\"/presets/{slug}/responses\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -314,7 +314,7 @@ partial void ProcessCreatePresetsResponsesResponseContent( pathTemplate: "$\"/presets/{slug}/responses\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -336,7 +336,7 @@ partial void ProcessCreatePresetsResponsesResponseContent( pathTemplate: "$\"/presets/{slug}/responses\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.PresetsClient.GetPreset.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.PresetsClient.GetPreset.g.cs index 3e5f2951..0edf72f1 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.PresetsClient.GetPreset.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.PresetsClient.GetPreset.g.cs @@ -147,7 +147,7 @@ partial void ProcessGetPresetResponseContent( PrepareGetPresetRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - slug: slug!); + slug: slug); global::OpenRouter.AutoSDKHttpRequestOptions.StampAuthorizationOverride(__httpRequest); @@ -171,7 +171,7 @@ partial void ProcessGetPresetResponseContent( pathTemplate: "$\"/presets/{slug}\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -205,7 +205,7 @@ partial void ProcessGetPresetResponseContent( pathTemplate: "$\"/presets/{slug}\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -246,7 +246,7 @@ partial void ProcessGetPresetResponseContent( pathTemplate: "$\"/presets/{slug}\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -294,7 +294,7 @@ partial void ProcessGetPresetResponseContent( pathTemplate: "$\"/presets/{slug}\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -316,7 +316,7 @@ partial void ProcessGetPresetResponseContent( pathTemplate: "$\"/presets/{slug}\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.PresetsClient.GetPresetVersion.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.PresetsClient.GetPresetVersion.g.cs index 0a7038c2..b3016e9c 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.PresetsClient.GetPresetVersion.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.PresetsClient.GetPresetVersion.g.cs @@ -155,8 +155,8 @@ partial void ProcessGetPresetVersionResponseContent( PrepareGetPresetVersionRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - slug: slug!, - version: version!); + slug: slug, + version: version); global::OpenRouter.AutoSDKHttpRequestOptions.StampAuthorizationOverride(__httpRequest); @@ -180,7 +180,7 @@ partial void ProcessGetPresetVersionResponseContent( pathTemplate: "$\"/presets/{slug}/versions/{version}\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -214,7 +214,7 @@ partial void ProcessGetPresetVersionResponseContent( pathTemplate: "$\"/presets/{slug}/versions/{version}\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -255,7 +255,7 @@ partial void ProcessGetPresetVersionResponseContent( pathTemplate: "$\"/presets/{slug}/versions/{version}\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -303,7 +303,7 @@ partial void ProcessGetPresetVersionResponseContent( pathTemplate: "$\"/presets/{slug}/versions/{version}\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -325,7 +325,7 @@ partial void ProcessGetPresetVersionResponseContent( pathTemplate: "$\"/presets/{slug}/versions/{version}\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.PresetsClient.ListPresetVersions.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.PresetsClient.ListPresetVersions.g.cs index 9a38217d..158f3841 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.PresetsClient.ListPresetVersions.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.PresetsClient.ListPresetVersions.g.cs @@ -175,7 +175,7 @@ partial void ProcessListPresetVersionsResponseContent( PrepareListPresetVersionsRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - slug: slug!, + slug: slug, offset: offset, limit: limit); @@ -201,7 +201,7 @@ partial void ProcessListPresetVersionsResponseContent( pathTemplate: "$\"/presets/{slug}/versions\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -235,7 +235,7 @@ partial void ProcessListPresetVersionsResponseContent( pathTemplate: "$\"/presets/{slug}/versions\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -276,7 +276,7 @@ partial void ProcessListPresetVersionsResponseContent( pathTemplate: "$\"/presets/{slug}/versions\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -324,7 +324,7 @@ partial void ProcessListPresetVersionsResponseContent( pathTemplate: "$\"/presets/{slug}/versions\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -346,7 +346,7 @@ partial void ProcessListPresetVersionsResponseContent( pathTemplate: "$\"/presets/{slug}/versions\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.PresetsClient.ListPresets.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.PresetsClient.ListPresets.g.cs index 88091c93..67d1bea3 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.PresetsClient.ListPresets.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.PresetsClient.ListPresets.g.cs @@ -192,7 +192,7 @@ partial void ProcessListPresetsResponseContent( pathTemplate: "\"/presets\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -226,7 +226,7 @@ partial void ProcessListPresetsResponseContent( pathTemplate: "\"/presets\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -267,7 +267,7 @@ partial void ProcessListPresetsResponseContent( pathTemplate: "\"/presets\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -315,7 +315,7 @@ partial void ProcessListPresetsResponseContent( pathTemplate: "\"/presets\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -337,7 +337,7 @@ partial void ProcessListPresetsResponseContent( pathTemplate: "\"/presets\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.ProvidersClient.ListProviders.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.ProvidersClient.ListProviders.g.cs index 16b9e4ba..df45fd7c 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.ProvidersClient.ListProviders.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.ProvidersClient.ListProviders.g.cs @@ -160,7 +160,7 @@ partial void ProcessListProvidersResponseContent( pathTemplate: "\"/providers\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -194,7 +194,7 @@ partial void ProcessListProvidersResponseContent( pathTemplate: "\"/providers\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -235,7 +235,7 @@ partial void ProcessListProvidersResponseContent( pathTemplate: "\"/providers\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -283,7 +283,7 @@ partial void ProcessListProvidersResponseContent( pathTemplate: "\"/providers\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -305,7 +305,7 @@ partial void ProcessListProvidersResponseContent( pathTemplate: "\"/providers\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.RerankClient.CreateRerank.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.RerankClient.CreateRerank.g.cs index e43a695e..eaa5966a 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.RerankClient.CreateRerank.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.RerankClient.CreateRerank.g.cs @@ -182,7 +182,7 @@ partial void ProcessCreateRerankResponseContent( pathTemplate: "\"/rerank\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -216,7 +216,7 @@ partial void ProcessCreateRerankResponseContent( pathTemplate: "\"/rerank\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -257,7 +257,7 @@ partial void ProcessCreateRerankResponseContent( pathTemplate: "\"/rerank\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -305,7 +305,7 @@ partial void ProcessCreateRerankResponseContent( pathTemplate: "\"/rerank\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -327,7 +327,7 @@ partial void ProcessCreateRerankResponseContent( pathTemplate: "\"/rerank\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.SttClient.CreateAudioTranscriptions.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.SttClient.CreateAudioTranscriptions.g.cs index 595f40a9..8921a2b6 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.SttClient.CreateAudioTranscriptions.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.SttClient.CreateAudioTranscriptions.g.cs @@ -182,7 +182,7 @@ partial void ProcessCreateAudioTranscriptionsResponseContent( pathTemplate: "\"/audio/transcriptions\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -216,7 +216,7 @@ partial void ProcessCreateAudioTranscriptionsResponseContent( pathTemplate: "\"/audio/transcriptions\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -257,7 +257,7 @@ partial void ProcessCreateAudioTranscriptionsResponseContent( pathTemplate: "\"/audio/transcriptions\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -305,7 +305,7 @@ partial void ProcessCreateAudioTranscriptionsResponseContent( pathTemplate: "\"/audio/transcriptions\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -327,7 +327,7 @@ partial void ProcessCreateAudioTranscriptionsResponseContent( pathTemplate: "\"/audio/transcriptions\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.TtsClient.CreateAudioSpeech.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.TtsClient.CreateAudioSpeech.g.cs index b427ccae..df8d7fc3 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.TtsClient.CreateAudioSpeech.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.TtsClient.CreateAudioSpeech.g.cs @@ -182,7 +182,7 @@ partial void ProcessCreateAudioSpeechResponseContent( pathTemplate: "\"/audio/speech\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -216,7 +216,7 @@ partial void ProcessCreateAudioSpeechResponseContent( pathTemplate: "\"/audio/speech\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -257,7 +257,7 @@ partial void ProcessCreateAudioSpeechResponseContent( pathTemplate: "\"/audio/speech\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -305,7 +305,7 @@ partial void ProcessCreateAudioSpeechResponseContent( pathTemplate: "\"/audio/speech\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -327,7 +327,7 @@ partial void ProcessCreateAudioSpeechResponseContent( pathTemplate: "\"/audio/speech\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -804,7 +804,7 @@ partial void ProcessCreateAudioSpeechResponseContent( pathTemplate: "\"/audio/speech\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -838,7 +838,7 @@ partial void ProcessCreateAudioSpeechResponseContent( pathTemplate: "\"/audio/speech\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -879,7 +879,7 @@ partial void ProcessCreateAudioSpeechResponseContent( pathTemplate: "\"/audio/speech\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -927,7 +927,7 @@ partial void ProcessCreateAudioSpeechResponseContent( pathTemplate: "\"/audio/speech\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -949,7 +949,7 @@ partial void ProcessCreateAudioSpeechResponseContent( pathTemplate: "\"/audio/speech\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.VideoGenerationClient.CreateVideos.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.VideoGenerationClient.CreateVideos.g.cs index f314af9e..ac74f056 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.VideoGenerationClient.CreateVideos.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.VideoGenerationClient.CreateVideos.g.cs @@ -182,7 +182,7 @@ partial void ProcessCreateVideosResponseContent( pathTemplate: "\"/videos\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -216,7 +216,7 @@ partial void ProcessCreateVideosResponseContent( pathTemplate: "\"/videos\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -257,7 +257,7 @@ partial void ProcessCreateVideosResponseContent( pathTemplate: "\"/videos\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -305,7 +305,7 @@ partial void ProcessCreateVideosResponseContent( pathTemplate: "\"/videos\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -327,7 +327,7 @@ partial void ProcessCreateVideosResponseContent( pathTemplate: "\"/videos\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.VideoGenerationClient.GetVideos.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.VideoGenerationClient.GetVideos.g.cs index 2ea771ca..61f66a8e 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.VideoGenerationClient.GetVideos.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.VideoGenerationClient.GetVideos.g.cs @@ -147,7 +147,7 @@ partial void ProcessGetVideosResponseContent( PrepareGetVideosRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - jobId: jobId!); + jobId: jobId); global::OpenRouter.AutoSDKHttpRequestOptions.StampAuthorizationOverride(__httpRequest); @@ -171,7 +171,7 @@ partial void ProcessGetVideosResponseContent( pathTemplate: "$\"/videos/{jobId}\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -205,7 +205,7 @@ partial void ProcessGetVideosResponseContent( pathTemplate: "$\"/videos/{jobId}\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -246,7 +246,7 @@ partial void ProcessGetVideosResponseContent( pathTemplate: "$\"/videos/{jobId}\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -294,7 +294,7 @@ partial void ProcessGetVideosResponseContent( pathTemplate: "$\"/videos/{jobId}\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -316,7 +316,7 @@ partial void ProcessGetVideosResponseContent( pathTemplate: "$\"/videos/{jobId}\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.VideoGenerationClient.ListVideosContent.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.VideoGenerationClient.ListVideosContent.g.cs index 2de9cb49..9e40b451 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.VideoGenerationClient.ListVideosContent.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.VideoGenerationClient.ListVideosContent.g.cs @@ -162,7 +162,7 @@ partial void ProcessListVideosContentResponseContent( PrepareListVideosContentRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - jobId: jobId!, + jobId: jobId, index: index); global::OpenRouter.AutoSDKHttpRequestOptions.StampAuthorizationOverride(__httpRequest); @@ -187,7 +187,7 @@ partial void ProcessListVideosContentResponseContent( pathTemplate: "$\"/videos/{jobId}/content\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -221,7 +221,7 @@ partial void ProcessListVideosContentResponseContent( pathTemplate: "$\"/videos/{jobId}/content\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -262,7 +262,7 @@ partial void ProcessListVideosContentResponseContent( pathTemplate: "$\"/videos/{jobId}/content\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -310,7 +310,7 @@ partial void ProcessListVideosContentResponseContent( pathTemplate: "$\"/videos/{jobId}/content\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -332,7 +332,7 @@ partial void ProcessListVideosContentResponseContent( pathTemplate: "$\"/videos/{jobId}/content\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -673,7 +673,7 @@ partial void ProcessListVideosContentResponseContent( PrepareListVideosContentRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - jobId: jobId!, + jobId: jobId, index: index); global::OpenRouter.AutoSDKHttpRequestOptions.StampAuthorizationOverride(__httpRequest); @@ -698,7 +698,7 @@ partial void ProcessListVideosContentResponseContent( pathTemplate: "$\"/videos/{jobId}/content\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -732,7 +732,7 @@ partial void ProcessListVideosContentResponseContent( pathTemplate: "$\"/videos/{jobId}/content\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -773,7 +773,7 @@ partial void ProcessListVideosContentResponseContent( pathTemplate: "$\"/videos/{jobId}/content\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -821,7 +821,7 @@ partial void ProcessListVideosContentResponseContent( pathTemplate: "$\"/videos/{jobId}/content\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -843,7 +843,7 @@ partial void ProcessListVideosContentResponseContent( pathTemplate: "$\"/videos/{jobId}/content\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.VideoGenerationClient.ListVideosModels.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.VideoGenerationClient.ListVideosModels.g.cs index 29b49d17..d238cfa3 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.VideoGenerationClient.ListVideosModels.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.VideoGenerationClient.ListVideosModels.g.cs @@ -162,7 +162,7 @@ partial void ProcessListVideosModelsResponseContent( pathTemplate: "\"/videos/models\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -196,7 +196,7 @@ partial void ProcessListVideosModelsResponseContent( pathTemplate: "\"/videos/models\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -237,7 +237,7 @@ partial void ProcessListVideosModelsResponseContent( pathTemplate: "\"/videos/models\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -285,7 +285,7 @@ partial void ProcessListVideosModelsResponseContent( pathTemplate: "\"/videos/models\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -307,7 +307,7 @@ partial void ProcessListVideosModelsResponseContent( pathTemplate: "\"/videos/models\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.WorkspacesClient.BulkAddWorkspaceMembers.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.WorkspacesClient.BulkAddWorkspaceMembers.g.cs index 7ba958da..3e4eb392 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.WorkspacesClient.BulkAddWorkspaceMembers.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.WorkspacesClient.BulkAddWorkspaceMembers.g.cs @@ -166,7 +166,7 @@ partial void ProcessBulkAddWorkspaceMembersResponseContent( PrepareBulkAddWorkspaceMembersRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - id: id!, + id: id, request: request); global::OpenRouter.AutoSDKHttpRequestOptions.StampAuthorizationOverride(__httpRequest); @@ -191,7 +191,7 @@ partial void ProcessBulkAddWorkspaceMembersResponseContent( pathTemplate: "$\"/workspaces/{id}/members/add\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -225,7 +225,7 @@ partial void ProcessBulkAddWorkspaceMembersResponseContent( pathTemplate: "$\"/workspaces/{id}/members/add\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -266,7 +266,7 @@ partial void ProcessBulkAddWorkspaceMembersResponseContent( pathTemplate: "$\"/workspaces/{id}/members/add\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -314,7 +314,7 @@ partial void ProcessBulkAddWorkspaceMembersResponseContent( pathTemplate: "$\"/workspaces/{id}/members/add\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -336,7 +336,7 @@ partial void ProcessBulkAddWorkspaceMembersResponseContent( pathTemplate: "$\"/workspaces/{id}/members/add\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.WorkspacesClient.BulkRemoveWorkspaceMembers.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.WorkspacesClient.BulkRemoveWorkspaceMembers.g.cs index 9c30ba90..85a718b7 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.WorkspacesClient.BulkRemoveWorkspaceMembers.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.WorkspacesClient.BulkRemoveWorkspaceMembers.g.cs @@ -166,7 +166,7 @@ partial void ProcessBulkRemoveWorkspaceMembersResponseContent( PrepareBulkRemoveWorkspaceMembersRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - id: id!, + id: id, request: request); global::OpenRouter.AutoSDKHttpRequestOptions.StampAuthorizationOverride(__httpRequest); @@ -191,7 +191,7 @@ partial void ProcessBulkRemoveWorkspaceMembersResponseContent( pathTemplate: "$\"/workspaces/{id}/members/remove\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -225,7 +225,7 @@ partial void ProcessBulkRemoveWorkspaceMembersResponseContent( pathTemplate: "$\"/workspaces/{id}/members/remove\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -266,7 +266,7 @@ partial void ProcessBulkRemoveWorkspaceMembersResponseContent( pathTemplate: "$\"/workspaces/{id}/members/remove\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -314,7 +314,7 @@ partial void ProcessBulkRemoveWorkspaceMembersResponseContent( pathTemplate: "$\"/workspaces/{id}/members/remove\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -336,7 +336,7 @@ partial void ProcessBulkRemoveWorkspaceMembersResponseContent( pathTemplate: "$\"/workspaces/{id}/members/remove\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.WorkspacesClient.CreateWorkspace.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.WorkspacesClient.CreateWorkspace.g.cs index 5cfff4d9..606edefb 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.WorkspacesClient.CreateWorkspace.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.WorkspacesClient.CreateWorkspace.g.cs @@ -182,7 +182,7 @@ partial void ProcessCreateWorkspaceResponseContent( pathTemplate: "\"/workspaces\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -216,7 +216,7 @@ partial void ProcessCreateWorkspaceResponseContent( pathTemplate: "\"/workspaces\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -257,7 +257,7 @@ partial void ProcessCreateWorkspaceResponseContent( pathTemplate: "\"/workspaces\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -305,7 +305,7 @@ partial void ProcessCreateWorkspaceResponseContent( pathTemplate: "\"/workspaces\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -327,7 +327,7 @@ partial void ProcessCreateWorkspaceResponseContent( pathTemplate: "\"/workspaces\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.WorkspacesClient.DeleteWorkspace.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.WorkspacesClient.DeleteWorkspace.g.cs index 6e5cf616..53efa763 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.WorkspacesClient.DeleteWorkspace.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.WorkspacesClient.DeleteWorkspace.g.cs @@ -147,7 +147,7 @@ partial void ProcessDeleteWorkspaceResponseContent( PrepareDeleteWorkspaceRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - id: id!); + id: id); global::OpenRouter.AutoSDKHttpRequestOptions.StampAuthorizationOverride(__httpRequest); @@ -171,7 +171,7 @@ partial void ProcessDeleteWorkspaceResponseContent( pathTemplate: "$\"/workspaces/{id}\"", httpMethod: "DELETE", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -205,7 +205,7 @@ partial void ProcessDeleteWorkspaceResponseContent( pathTemplate: "$\"/workspaces/{id}\"", httpMethod: "DELETE", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -246,7 +246,7 @@ partial void ProcessDeleteWorkspaceResponseContent( pathTemplate: "$\"/workspaces/{id}\"", httpMethod: "DELETE", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -294,7 +294,7 @@ partial void ProcessDeleteWorkspaceResponseContent( pathTemplate: "$\"/workspaces/{id}\"", httpMethod: "DELETE", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -316,7 +316,7 @@ partial void ProcessDeleteWorkspaceResponseContent( pathTemplate: "$\"/workspaces/{id}\"", httpMethod: "DELETE", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.WorkspacesClient.DeleteWorkspaceBudget.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.WorkspacesClient.DeleteWorkspaceBudget.g.cs index 9d361d60..5673bc88 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.WorkspacesClient.DeleteWorkspaceBudget.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.WorkspacesClient.DeleteWorkspaceBudget.g.cs @@ -159,8 +159,8 @@ partial void ProcessDeleteWorkspaceBudgetResponseContent( PrepareDeleteWorkspaceBudgetRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - id: id!, - interval: interval!); + id: id, + interval: interval); global::OpenRouter.AutoSDKHttpRequestOptions.StampAuthorizationOverride(__httpRequest); @@ -184,7 +184,7 @@ partial void ProcessDeleteWorkspaceBudgetResponseContent( pathTemplate: "$\"/workspaces/{id}/budgets/{(global::System.Uri.EscapeDataString(interval.ToValueString()))}\"", httpMethod: "DELETE", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -218,7 +218,7 @@ partial void ProcessDeleteWorkspaceBudgetResponseContent( pathTemplate: "$\"/workspaces/{id}/budgets/{(global::System.Uri.EscapeDataString(interval.ToValueString()))}\"", httpMethod: "DELETE", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -259,7 +259,7 @@ partial void ProcessDeleteWorkspaceBudgetResponseContent( pathTemplate: "$\"/workspaces/{id}/budgets/{(global::System.Uri.EscapeDataString(interval.ToValueString()))}\"", httpMethod: "DELETE", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -307,7 +307,7 @@ partial void ProcessDeleteWorkspaceBudgetResponseContent( pathTemplate: "$\"/workspaces/{id}/budgets/{(global::System.Uri.EscapeDataString(interval.ToValueString()))}\"", httpMethod: "DELETE", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -329,7 +329,7 @@ partial void ProcessDeleteWorkspaceBudgetResponseContent( pathTemplate: "$\"/workspaces/{id}/budgets/{(global::System.Uri.EscapeDataString(interval.ToValueString()))}\"", httpMethod: "DELETE", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.WorkspacesClient.GetWorkspace.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.WorkspacesClient.GetWorkspace.g.cs index 9220da27..e94e381d 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.WorkspacesClient.GetWorkspace.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.WorkspacesClient.GetWorkspace.g.cs @@ -147,7 +147,7 @@ partial void ProcessGetWorkspaceResponseContent( PrepareGetWorkspaceRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - id: id!); + id: id); global::OpenRouter.AutoSDKHttpRequestOptions.StampAuthorizationOverride(__httpRequest); @@ -171,7 +171,7 @@ partial void ProcessGetWorkspaceResponseContent( pathTemplate: "$\"/workspaces/{id}\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -205,7 +205,7 @@ partial void ProcessGetWorkspaceResponseContent( pathTemplate: "$\"/workspaces/{id}\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -246,7 +246,7 @@ partial void ProcessGetWorkspaceResponseContent( pathTemplate: "$\"/workspaces/{id}\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -294,7 +294,7 @@ partial void ProcessGetWorkspaceResponseContent( pathTemplate: "$\"/workspaces/{id}\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -316,7 +316,7 @@ partial void ProcessGetWorkspaceResponseContent( pathTemplate: "$\"/workspaces/{id}\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.WorkspacesClient.ListWorkspaceBudgets.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.WorkspacesClient.ListWorkspaceBudgets.g.cs index ea626bf1..8d63efec 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.WorkspacesClient.ListWorkspaceBudgets.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.WorkspacesClient.ListWorkspaceBudgets.g.cs @@ -147,7 +147,7 @@ partial void ProcessListWorkspaceBudgetsResponseContent( PrepareListWorkspaceBudgetsRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - id: id!); + id: id); global::OpenRouter.AutoSDKHttpRequestOptions.StampAuthorizationOverride(__httpRequest); @@ -171,7 +171,7 @@ partial void ProcessListWorkspaceBudgetsResponseContent( pathTemplate: "$\"/workspaces/{id}/budgets\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -205,7 +205,7 @@ partial void ProcessListWorkspaceBudgetsResponseContent( pathTemplate: "$\"/workspaces/{id}/budgets\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -246,7 +246,7 @@ partial void ProcessListWorkspaceBudgetsResponseContent( pathTemplate: "$\"/workspaces/{id}/budgets\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -294,7 +294,7 @@ partial void ProcessListWorkspaceBudgetsResponseContent( pathTemplate: "$\"/workspaces/{id}/budgets\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -316,7 +316,7 @@ partial void ProcessListWorkspaceBudgetsResponseContent( pathTemplate: "$\"/workspaces/{id}/budgets\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.WorkspacesClient.ListWorkspaceMembers.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.WorkspacesClient.ListWorkspaceMembers.g.cs index e8041021..b9121087 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.WorkspacesClient.ListWorkspaceMembers.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.WorkspacesClient.ListWorkspaceMembers.g.cs @@ -175,7 +175,7 @@ partial void ProcessListWorkspaceMembersResponseContent( PrepareListWorkspaceMembersRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - id: id!, + id: id, offset: offset, limit: limit); @@ -201,7 +201,7 @@ partial void ProcessListWorkspaceMembersResponseContent( pathTemplate: "$\"/workspaces/{id}/members\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -235,7 +235,7 @@ partial void ProcessListWorkspaceMembersResponseContent( pathTemplate: "$\"/workspaces/{id}/members\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -276,7 +276,7 @@ partial void ProcessListWorkspaceMembersResponseContent( pathTemplate: "$\"/workspaces/{id}/members\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -324,7 +324,7 @@ partial void ProcessListWorkspaceMembersResponseContent( pathTemplate: "$\"/workspaces/{id}/members\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -346,7 +346,7 @@ partial void ProcessListWorkspaceMembersResponseContent( pathTemplate: "$\"/workspaces/{id}/members\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.WorkspacesClient.ListWorkspaces.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.WorkspacesClient.ListWorkspaces.g.cs index c705e259..9bb5ab3a 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.WorkspacesClient.ListWorkspaces.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.WorkspacesClient.ListWorkspaces.g.cs @@ -192,7 +192,7 @@ partial void ProcessListWorkspacesResponseContent( pathTemplate: "\"/workspaces\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -226,7 +226,7 @@ partial void ProcessListWorkspacesResponseContent( pathTemplate: "\"/workspaces\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -267,7 +267,7 @@ partial void ProcessListWorkspacesResponseContent( pathTemplate: "\"/workspaces\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -315,7 +315,7 @@ partial void ProcessListWorkspacesResponseContent( pathTemplate: "\"/workspaces\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -337,7 +337,7 @@ partial void ProcessListWorkspacesResponseContent( pathTemplate: "\"/workspaces\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.WorkspacesClient.UpdateWorkspace.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.WorkspacesClient.UpdateWorkspace.g.cs index 92fbadd6..dfd522b0 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.WorkspacesClient.UpdateWorkspace.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.WorkspacesClient.UpdateWorkspace.g.cs @@ -166,7 +166,7 @@ partial void ProcessUpdateWorkspaceResponseContent( PrepareUpdateWorkspaceRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - id: id!, + id: id, request: request); global::OpenRouter.AutoSDKHttpRequestOptions.StampAuthorizationOverride(__httpRequest); @@ -191,7 +191,7 @@ partial void ProcessUpdateWorkspaceResponseContent( pathTemplate: "$\"/workspaces/{id}\"", httpMethod: "PATCH", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -225,7 +225,7 @@ partial void ProcessUpdateWorkspaceResponseContent( pathTemplate: "$\"/workspaces/{id}\"", httpMethod: "PATCH", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -266,7 +266,7 @@ partial void ProcessUpdateWorkspaceResponseContent( pathTemplate: "$\"/workspaces/{id}\"", httpMethod: "PATCH", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -314,7 +314,7 @@ partial void ProcessUpdateWorkspaceResponseContent( pathTemplate: "$\"/workspaces/{id}\"", httpMethod: "PATCH", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -336,7 +336,7 @@ partial void ProcessUpdateWorkspaceResponseContent( pathTemplate: "$\"/workspaces/{id}\"", httpMethod: "PATCH", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/OpenRouter/Generated/OpenRouter.WorkspacesClient.UpsertWorkspaceBudget.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.WorkspacesClient.UpsertWorkspaceBudget.g.cs index 1a51b431..3415d0f6 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.WorkspacesClient.UpsertWorkspaceBudget.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.WorkspacesClient.UpsertWorkspaceBudget.g.cs @@ -178,8 +178,8 @@ partial void ProcessUpsertWorkspaceBudgetResponseContent( PrepareUpsertWorkspaceBudgetRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - id: id!, - interval: interval!, + id: id, + interval: interval, request: request); global::OpenRouter.AutoSDKHttpRequestOptions.StampAuthorizationOverride(__httpRequest); @@ -204,7 +204,7 @@ partial void ProcessUpsertWorkspaceBudgetResponseContent( pathTemplate: "$\"/workspaces/{id}/budgets/{(global::System.Uri.EscapeDataString(interval.ToValueString()))}\"", httpMethod: "PUT", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -238,7 +238,7 @@ partial void ProcessUpsertWorkspaceBudgetResponseContent( pathTemplate: "$\"/workspaces/{id}/budgets/{(global::System.Uri.EscapeDataString(interval.ToValueString()))}\"", httpMethod: "PUT", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -279,7 +279,7 @@ partial void ProcessUpsertWorkspaceBudgetResponseContent( pathTemplate: "$\"/workspaces/{id}/budgets/{(global::System.Uri.EscapeDataString(interval.ToValueString()))}\"", httpMethod: "PUT", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -327,7 +327,7 @@ partial void ProcessUpsertWorkspaceBudgetResponseContent( pathTemplate: "$\"/workspaces/{id}/budgets/{(global::System.Uri.EscapeDataString(interval.ToValueString()))}\"", httpMethod: "PUT", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -349,7 +349,7 @@ partial void ProcessUpsertWorkspaceBudgetResponseContent( pathTemplate: "$\"/workspaces/{id}/budgets/{(global::System.Uri.EscapeDataString(interval.ToValueString()))}\"", httpMethod: "PUT", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options,