From 6a0c45c7a9d424df8f8a7f4a35ac3bdbcfbf93c4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 24 May 2026 06:28:55 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- ...gentsClient.AgentsCountDeployedAgents.g.cs | 24 ++-- ....AgentsClient.AgentsGetAgentVariables.g.cs | 39 +++-- ...entsClient.AgentsSearchDeployedAgents.g.cs | 24 ++-- ...tta.AgentsClient.AttachArchiveToAgent.g.cs | 39 +++-- ...ta.AgentsClient.AttachCoreMemoryBlock.g.cs | 39 +++-- ...etta.AgentsClient.AttachFolderToAgent.g.cs | 39 +++-- ...ta.AgentsClient.AttachIdentityToAgent.g.cs | 39 +++-- .../Letta.AgentsClient.AttachToolToAgent.g.cs | 39 +++-- .../Letta.AgentsClient.CancelMessage.g.cs | 39 +++-- ...ta.AgentsClient.CloseAllFilesForAgent.g.cs | 39 +++-- .../Letta.AgentsClient.CloseFileForAgent.g.cs | 39 +++-- .../Letta.AgentsClient.CountAgents.g.cs | 39 +++-- .../Letta.AgentsClient.CreateAgent.g.cs | 39 +++-- ....AgentsClient.CreateAgentMessageAsync.g.cs | 39 +++-- .../Letta.AgentsClient.CreatePassage.g.cs | 39 +++-- .../Letta.AgentsClient.DeleteAgent.g.cs | 39 +++-- .../Letta.AgentsClient.DeletePassage.g.cs | 39 +++-- ...a.AgentsClient.DetachArchiveFromAgent.g.cs | 39 +++-- ...ta.AgentsClient.DetachCoreMemoryBlock.g.cs | 39 +++-- ...ta.AgentsClient.DetachFolderFromAgent.g.cs | 39 +++-- ....AgentsClient.DetachIdentityFromAgent.g.cs | 39 +++-- ...etta.AgentsClient.DetachToolFromAgent.g.cs | 39 +++-- .../Letta.AgentsClient.ExportAgent.g.cs | 39 +++-- ...ta.AgentsClient.ExportAgentWithSkills.g.cs | 39 +++-- ...Letta.AgentsClient.GenerateCompletion.g.cs | 63 ++++---- .../Letta.AgentsClient.ImportAgent.g.cs | 117 +++++++-------- .../Letta.AgentsClient.ListAgents.g.cs | 39 +++-- ...tta.AgentsClient.ListCoreMemoryBlocks.g.cs | 39 +++-- .../Letta.AgentsClient.ListFilesForAgent.g.cs | 39 +++-- ...etta.AgentsClient.ListFoldersForAgent.g.cs | 39 +++-- ...Letta.AgentsClient.ListGroupsForAgent.g.cs | 39 +++-- .../Letta.AgentsClient.ListMessages.g.cs | 39 +++-- .../Letta.AgentsClient.ListPassages.g.cs | 39 +++-- .../Letta.AgentsClient.ListToolsForAgent.g.cs | 39 +++-- .../Letta.AgentsClient.ModifyAgent.g.cs | 39 +++-- ...ta.AgentsClient.ModifyApprovalForTool.g.cs | 39 +++-- ...ta.AgentsClient.ModifyCoreMemoryBlock.g.cs | 39 +++-- .../Letta.AgentsClient.OpenFileForAgent.g.cs | 39 +++-- ...etta.AgentsClient.PreviewModelRequest.g.cs | 39 +++-- .../Letta.AgentsClient.RecompileAgent.g.cs | 39 +++-- .../Letta.AgentsClient.ResetMessages.g.cs | 39 +++-- .../Letta.AgentsClient.RetrieveAgent.g.cs | 39 +++-- ....AgentsClient.RetrieveCoreMemoryBlock.g.cs | 39 +++-- .../Letta.AgentsClient.RunToolForAgent.g.cs | 39 +++-- ...tta.AgentsClient.SearchArchivalMemory.g.cs | 39 +++-- .../Letta.AgentsClient.SearchMessages.g.cs | 39 +++-- .../Letta.AgentsClient.SendMessage.g.cs | 39 +++-- .../Letta.AgentsClient.SummarizeMessages.g.cs | 39 +++-- .../Letta.ArchivesClient.CreateArchive.g.cs | 39 +++-- ...ArchivesClient.CreatePassageInArchive.g.cs | 39 +++-- ...rchivesClient.CreatePassagesInArchive.g.cs | 39 +++-- .../Letta.ArchivesClient.DeleteArchive.g.cs | 39 +++-- ...chivesClient.DeletePassageFromArchive.g.cs | 39 +++-- ...a.ArchivesClient.ListAgentsForArchive.g.cs | 39 +++-- .../Letta.ArchivesClient.ListArchives.g.cs | 39 +++-- .../Letta.ArchivesClient.ModifyArchive.g.cs | 39 +++-- .../Letta.ArchivesClient.RetrieveArchive.g.cs | 39 +++-- ...ta.BlocksClient.AttachIdentityToBlock.g.cs | 39 +++-- .../Letta.BlocksClient.CountBlocks.g.cs | 39 +++-- .../Letta.BlocksClient.CreateBlock.g.cs | 39 +++-- .../Letta.BlocksClient.DeleteBlock.g.cs | 39 +++-- ....BlocksClient.DetachIdentityFromBlock.g.cs | 39 +++-- ...Letta.BlocksClient.ListAgentsForBlock.g.cs | 39 +++-- .../Letta.BlocksClient.ListBlocks.g.cs | 39 +++-- .../Letta.BlocksClient.ModifyBlock.g.cs | 39 +++-- .../Letta.BlocksClient.RetrieveBlock.g.cs | 39 +++-- ...Letta.ChatClient.CreateChatCompletion.g.cs | 39 +++-- ...cessTokensCreateClientSideAccessToken.g.cs | 39 +++-- ...cessTokensDeleteClientSideAccessToken.g.cs | 39 +++-- ...ccessTokensListClientSideAccessTokens.g.cs | 39 +++-- ...onversationsClient.CancelConversation.g.cs | 39 +++-- ...nversationsClient.CompactConversation.g.cs | 39 +++-- ...onversationsClient.CreateConversation.g.cs | 39 +++-- ...onversationsClient.DeleteConversation.g.cs | 39 +++-- ....ConversationsClient.ForkConversation.g.cs | 39 +++-- ...ationsClient.ListConversationMessages.g.cs | 39 +++-- ...ConversationsClient.ListConversations.g.cs | 39 +++-- ...lient.PreviewConversationModelRequest.g.cs | 39 +++-- ...ersationsClient.RecompileConversation.g.cs | 39 +++-- ...versationsClient.RetrieveConversation.g.cs | 39 +++-- ...ionsClient.RetrieveConversationStream.g.cs | 39 +++-- ...sationsClient.SendConversationMessage.g.cs | 39 +++-- ...onversationsClient.UpdateConversation.g.cs | 39 +++-- ...ient.DeviceStorageGetDeviceStorageKey.g.cs | 24 ++-- ....EmbeddingsClient.GetTotalStorageSize.g.cs | 39 +++-- ...sClient.EnvironmentsDeleteEnvironment.g.cs | 54 ++++--- ...mentsClient.EnvironmentsGetConnection.g.cs | 39 +++-- ...ntsClient.EnvironmentsListConnections.g.cs | 24 ++-- ...vironmentsClient.EnvironmentsRegister.g.cs | 39 +++-- ...onmentsClient.EnvironmentsSendMessage.g.cs | 69 ++++----- .../Letta/Generated/Letta.Exceptions.g.cs | 134 ++++++++++++++++++ ...FeedsClient.FeedsBackfillSubscription.g.cs | 39 +++-- .../Letta.FeedsClient.FeedsCreateFeed.g.cs | 24 ++-- .../Letta.FeedsClient.FeedsDeleteFeed.g.cs | 24 ++-- ...a.FeedsClient.FeedsDeleteSubscription.g.cs | 24 ++-- .../Letta.FeedsClient.FeedsGetFeed.g.cs | 24 ++-- .../Letta.FeedsClient.FeedsGetMessage.g.cs | 39 +++-- .../Letta.FeedsClient.FeedsListFeeds.g.cs | 24 ++-- .../Letta.FeedsClient.FeedsListMessages.g.cs | 24 ++-- ...dsClient.FeedsListSubscriptionHistory.g.cs | 39 +++-- ...ta.FeedsClient.FeedsListSubscriptions.g.cs | 24 ++-- ...etta.FeedsClient.FeedsPublishMessages.g.cs | 24 ++-- ...Letta.FeedsClient.FeedsSubscribeAgent.g.cs | 39 +++-- ....FeedsClient.FeedsTriggerSubscription.g.cs | 39 +++-- ...tta.FeedsClient.FeedsUnsubscribeAgent.g.cs | 24 ++-- ...lient.FeedsUpdateAllSubscriptionsCron.g.cs | 39 +++-- ...a.FeedsClient.FeedsUpdateSubscription.g.cs | 24 ++-- .../Letta.FoldersClient.CountFolders.g.cs | 39 +++-- .../Letta.FoldersClient.CreateFolder.g.cs | 39 +++-- ...ta.FoldersClient.DeleteFileFromFolder.g.cs | 39 +++-- .../Letta.FoldersClient.DeleteFolder.g.cs | 39 +++-- ...tta.FoldersClient.ListAgentsForFolder.g.cs | 39 +++-- ...etta.FoldersClient.ListFilesForFolder.g.cs | 39 +++-- ...etta.FoldersClient.ListFolderPassages.g.cs | 39 +++-- .../Letta.FoldersClient.ListFolders.g.cs | 39 +++-- .../Letta.FoldersClient.ModifyFolder.g.cs | 39 +++-- .../Letta.FoldersClient.RetrieveFile.g.cs | 39 +++-- .../Letta.FoldersClient.RetrieveFolder.g.cs | 39 +++-- .../Letta.FoldersClient.RetrieveMetadata.g.cs | 39 +++-- ...etta.FoldersClient.UploadFileToFolder.g.cs | 117 +++++++-------- .../Letta.HealthClient.CheckHealth.g.cs | 24 ++-- .../Letta.HealthClient.CheckReadiness.g.cs | 24 ++-- ...ernalAgentsClient.CountInternalAgents.g.cs | 39 +++-- ...sClient.ModifyInternalCoreMemoryBlock.g.cs | 39 +++-- ...ernalBlocksClient.CreateInternalBlock.g.cs | 39 +++-- ...ernalBlocksClient.DeleteInternalBlock.g.cs | 39 +++-- ...ocksClient.ListAgentsForInternalBlock.g.cs | 39 +++-- ...ternalBlocksClient.ListInternalBlocks.g.cs | 39 +++-- ...a.InternalRunsClient.ListInternalRuns.g.cs | 39 +++-- ...tesClient.CreateInternalTemplateAgent.g.cs | 39 +++-- ...tesClient.CreateInternalTemplateBlock.g.cs | 39 +++-- ...ent.CreateInternalTemplateBlocksBatch.g.cs | 39 +++-- ...tesClient.CreateInternalTemplateGroup.g.cs | 39 +++-- ...ernalTemplatesClient.DeleteDeployment.g.cs | 39 +++-- ...emplatesClient.ListDeploymentEntities.g.cs | 39 +++-- .../Generated/Letta.JobsClient.CancelJob.g.cs | 39 +++-- .../Generated/Letta.JobsClient.DeleteJob.g.cs | 39 +++-- .../Generated/Letta.JobsClient.ListJobs.g.cs | 39 +++-- .../Letta.JobsClient.RetrieveJob.g.cs | 39 +++-- ....McpServersClient.McpConnectMcpServer.g.cs | 39 +++-- ...a.McpServersClient.McpCreateMcpServer.g.cs | 39 +++-- ...a.McpServersClient.McpDeleteMcpServer.g.cs | 39 +++-- ...ta.McpServersClient.McpListMcpServers.g.cs | 39 +++-- ...erversClient.McpListToolsForMcpServer.g.cs | 39 +++-- ...erversClient.McpRefreshMcpServerTools.g.cs | 39 +++-- ...McpServersClient.McpRetrieveMcpServer.g.cs | 39 +++-- ...a.McpServersClient.McpRetrieveMcpTool.g.cs | 39 +++-- .../Letta.McpServersClient.McpRunTool.g.cs | 39 +++-- ...a.McpServersClient.McpUpdateMcpServer.g.cs | 39 +++-- ...FilesClient.MemoryFilesGetFileHistory.g.cs | 54 ++++--- ...yFilesClient.MemoryFilesListDirectory.g.cs | 54 ++++--- ...ilesClient.MemoryFilesReadFileContent.g.cs | 54 ++++--- .../Letta.MessagesClient.CancelBatch.g.cs | 39 +++-- .../Letta.MessagesClient.CreateBatch.g.cs | 39 +++-- .../Letta.MessagesClient.ListAllMessages.g.cs | 39 +++-- .../Letta.MessagesClient.ListBatches.g.cs | 39 +++-- ...a.MessagesClient.ListMessagesForBatch.g.cs | 39 +++-- .../Letta.MessagesClient.RetrieveBatch.g.cs | 39 +++-- .../Letta.MessagesClient.RetrieveMessage.g.cs | 39 +++-- ...etta.MessagesClient.SearchAllMessages.g.cs | 39 +++-- ...etta.MetadataClient.MetadataGetStatus.g.cs | 24 ++-- .../Letta.MetadataClient.MetadataGetUser.g.cs | 39 +++-- ...lient.MetadataRetrieveCurrentBalances.g.cs | 24 ++-- ...a.MetadataClient.MetadataSendFeedback.g.cs | 24 ++-- ....MetadataClient.MetadataSendTelemetry.g.cs | 24 ++-- ...etta.ModelsClient.ListEmbeddingModels.g.cs | 39 +++-- .../Letta.ModelsClient.ListModels.g.cs | 39 +++-- ...odelsClient.ModelsListEmbeddingModels.g.cs | 24 ++-- .../Letta.PassagesClient.SearchPassages.g.cs | 39 +++-- ...pelinesClient.PipelinesCountPipelines.g.cs | 24 ++-- ...pelinesClient.PipelinesCreatePipeline.g.cs | 39 +++-- ...pelinesClient.PipelinesDeletePipeline.g.cs | 39 +++-- ....PipelinesClient.PipelinesGetPipeline.g.cs | 39 +++-- ...ient.PipelinesListPipelineSyncHistory.g.cs | 39 +++-- ...ipelinesClient.PipelinesListPipelines.g.cs | 24 ++-- ...elinesClient.PipelinesPreviewPipeline.g.cs | 39 +++-- ...PipelinesClient.PipelinesSyncPipeline.g.cs | 54 ++++--- ...pelinesClient.PipelinesUpdatePipeline.g.cs | 39 +++-- ...PipelinesUpdatePipelineProducerConfig.g.cs | 54 ++++--- ....ProjectsClient.ProjectsCreateProject.g.cs | 24 ++-- ....ProjectsClient.ProjectsDeleteProject.g.cs | 24 ++-- ...a.ProjectsClient.ProjectsListProjects.g.cs | 24 ++-- ...ProvidersClient.CheckExistingProvider.g.cs | 39 +++-- .../Letta.ProvidersClient.CheckProvider.g.cs | 39 +++-- .../Letta.ProvidersClient.CreateProvider.g.cs | 39 +++-- .../Letta.ProvidersClient.DeleteProvider.g.cs | 39 +++-- .../Letta.ProvidersClient.ListProviders.g.cs | 39 +++-- .../Letta.ProvidersClient.ModifyProvider.g.cs | 39 +++-- ...ProvidersClient.RefreshProviderModels.g.cs | 39 +++-- ...etta.ProvidersClient.RetrieveProvider.g.cs | 39 +++-- .../Generated/Letta.RunsClient.DeleteRun.g.cs | 39 +++-- .../Letta.RunsClient.ListMessagesForRun.g.cs | 39 +++-- .../Generated/Letta.RunsClient.ListRuns.g.cs | 39 +++-- .../Letta.RunsClient.ListStepsForRun.g.cs | 39 +++-- ...etta.RunsClient.RetrieveMetricsForRun.g.cs | 39 +++-- .../Letta.RunsClient.RetrieveRun.g.cs | 39 +++-- ...Letta.RunsClient.RetrieveStreamForRun.g.cs | 39 +++-- .../Letta.RunsClient.RetrieveTraceForRun.g.cs | 39 +++-- .../Letta.RunsClient.RetrieveUsageForRun.g.cs | 39 +++-- ...andboxesClient.SandboxesCreateSandbox.g.cs | 54 ++++--- ...andboxesClient.SandboxesListSandboxes.g.cs | 24 ++-- ...boxesClient.SandboxesTerminateSandbox.g.cs | 54 ++++--- ...heduledMessagesDeleteScheduledMessage.g.cs | 24 ++-- ...cheduledMessagesListScheduledMessages.g.cs | 24 ++-- ...duledMessagesRetrieveScheduledMessage.g.cs | 24 ++-- ...ScheduledMessagesScheduleAgentMessage.g.cs | 24 ++-- ...Letta.StepsClient.ListMessagesForStep.g.cs | 39 +++-- .../Letta.StepsClient.ListSteps.g.cs | 39 +++-- ...tta.StepsClient.ModifyFeedbackForStep.g.cs | 39 +++-- ...ta.StepsClient.RetrieveMetricsForStep.g.cs | 39 +++-- .../Letta.StepsClient.RetrieveStep.g.cs | 39 +++-- ...etta.StepsClient.RetrieveTraceForStep.g.cs | 39 +++-- .../Generated/Letta.TagClient.ListTags.g.cs | 39 +++-- ...ent.TemplatesCreateAgentsFromTemplate.g.cs | 39 +++-- ...atesCreateAgentsFromTemplateNoProject.g.cs | 39 +++-- ...mplatesClient.TemplatesCreateTemplate.g.cs | 39 +++-- ...ient.TemplatesCreateTemplateNoProject.g.cs | 39 +++-- ...mplatesClient.TemplatesDeleteTemplate.g.cs | 39 +++-- ...ient.TemplatesDeleteTemplateNoProject.g.cs | 39 +++-- ...TemplatesClient.TemplatesForkTemplate.g.cs | 39 +++-- ...esClient.TemplatesGetTemplateSnapshot.g.cs | 24 ++-- ...platesClient.TemplatesLegacyMigration.g.cs | 54 ++++--- ...sClient.TemplatesListTemplateVersions.g.cs | 39 +++-- ...emplatesClient.TemplatesListTemplates.g.cs | 24 ++-- ...atesClient.TemplatesMigrateDeployment.g.cs | 69 ++++----- ...mplatesClient.TemplatesRenameTemplate.g.cs | 69 ++++----- ...latesClient.TemplatesRollbackTemplate.g.cs | 69 ++++----- ...nt.TemplatesRollbackTemplateNoProject.g.cs | 69 ++++----- ...esClient.TemplatesSaveTemplateVersion.g.cs | 39 +++-- ...TemplatesSaveTemplateVersionNoProject.g.cs | 39 +++-- ...mplatesSetCurrentTemplateFromSnapshot.g.cs | 69 ++++----- ...tesUpdateCurrentTemplateFromAgentFile.g.cs | 69 ++++----- ...CurrentTemplateFromAgentFileNoProject.g.cs | 69 ++++----- ...nt.TemplatesUpdateTemplateDescription.g.cs | 54 ++++--- .../Letta.ToolsClient.AddBaseTools.g.cs | 39 +++-- .../Letta.ToolsClient.AddMcpServer.g.cs | 39 +++-- .../Letta.ToolsClient.AddMcpTool.g.cs | 39 +++-- .../Letta.ToolsClient.ConnectMcpServer.g.cs | 39 +++-- .../Letta.ToolsClient.CountTools.g.cs | 39 +++-- .../Letta.ToolsClient.CreateTool.g.cs | 39 +++-- .../Letta.ToolsClient.DeleteMcpServer.g.cs | 39 +++-- .../Letta.ToolsClient.DeleteTool.g.cs | 39 +++-- .../Letta.ToolsClient.ExecuteMcpTool.g.cs | 39 +++-- .../Letta.ToolsClient.ListMcpServers.g.cs | 39 +++-- ...etta.ToolsClient.ListMcpToolsByServer.g.cs | 39 +++-- .../Letta.ToolsClient.ListTools.g.cs | 39 +++-- .../Letta.ToolsClient.McpOauthCallback.g.cs | 39 +++-- .../Letta.ToolsClient.ModifyTool.g.cs | 39 +++-- ...etta.ToolsClient.ResyncMcpServerTools.g.cs | 39 +++-- .../Letta.ToolsClient.RetrieveTool.g.cs | 39 +++-- .../Letta.ToolsClient.RunToolFromSource.g.cs | 39 +++-- .../Letta.ToolsClient.SearchTools.g.cs | 39 +++-- .../Letta.ToolsClient.TestMcpServer.g.cs | 39 +++-- .../Letta.ToolsClient.UpdateMcpServer.g.cs | 39 +++-- .../Letta.ToolsClient.UpsertTool.g.cs | 39 +++-- 255 files changed, 4482 insertions(+), 5633 deletions(-) diff --git a/src/libs/Letta/Generated/Letta.AgentsClient.AgentsCountDeployedAgents.g.cs b/src/libs/Letta/Generated/Letta.AgentsClient.AgentsCountDeployedAgents.g.cs index 65d51443..365a3a87 100644 --- a/src/libs/Letta/Generated/Letta.AgentsClient.AgentsCountDeployedAgents.g.cs +++ b/src/libs/Letta/Generated/Letta.AgentsClient.AgentsCountDeployedAgents.g.cs @@ -396,17 +396,15 @@ partial void ProcessAgentsCountDeployedAgentsResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -443,17 +441,15 @@ partial void ProcessAgentsCountDeployedAgentsResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.AgentsClient.AgentsGetAgentVariables.g.cs b/src/libs/Letta/Generated/Letta.AgentsClient.AgentsGetAgentVariables.g.cs index 13bde044..542ee1fc 100644 --- a/src/libs/Letta/Generated/Letta.AgentsClient.AgentsGetAgentVariables.g.cs +++ b/src/libs/Letta/Generated/Letta.AgentsClient.AgentsGetAgentVariables.g.cs @@ -366,18 +366,17 @@ partial void ProcessAgentsGetAgentVariablesResponseContent( __exception_404 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -411,17 +410,15 @@ partial void ProcessAgentsGetAgentVariablesResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -458,17 +455,15 @@ partial void ProcessAgentsGetAgentVariablesResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.AgentsClient.AgentsSearchDeployedAgents.g.cs b/src/libs/Letta/Generated/Letta.AgentsClient.AgentsSearchDeployedAgents.g.cs index 1d558515..152d6138 100644 --- a/src/libs/Letta/Generated/Letta.AgentsClient.AgentsSearchDeployedAgents.g.cs +++ b/src/libs/Letta/Generated/Letta.AgentsClient.AgentsSearchDeployedAgents.g.cs @@ -384,17 +384,15 @@ partial void ProcessAgentsSearchDeployedAgentsResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -431,17 +429,15 @@ partial void ProcessAgentsSearchDeployedAgentsResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.AgentsClient.AttachArchiveToAgent.g.cs b/src/libs/Letta/Generated/Letta.AgentsClient.AttachArchiveToAgent.g.cs index 27a11246..3f513b1d 100644 --- a/src/libs/Letta/Generated/Letta.AgentsClient.AttachArchiveToAgent.g.cs +++ b/src/libs/Letta/Generated/Letta.AgentsClient.AttachArchiveToAgent.g.cs @@ -379,18 +379,17 @@ partial void ProcessAttachArchiveToAgentResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -422,17 +421,15 @@ partial void ProcessAttachArchiveToAgentResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -467,17 +464,15 @@ partial void ProcessAttachArchiveToAgentResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.AgentsClient.AttachCoreMemoryBlock.g.cs b/src/libs/Letta/Generated/Letta.AgentsClient.AttachCoreMemoryBlock.g.cs index ac319b1c..44752e98 100644 --- a/src/libs/Letta/Generated/Letta.AgentsClient.AttachCoreMemoryBlock.g.cs +++ b/src/libs/Letta/Generated/Letta.AgentsClient.AttachCoreMemoryBlock.g.cs @@ -383,18 +383,17 @@ partial void ProcessAttachCoreMemoryBlockResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -428,17 +427,15 @@ partial void ProcessAttachCoreMemoryBlockResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -475,17 +472,15 @@ partial void ProcessAttachCoreMemoryBlockResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.AgentsClient.AttachFolderToAgent.g.cs b/src/libs/Letta/Generated/Letta.AgentsClient.AttachFolderToAgent.g.cs index 0ea153f9..e196838d 100644 --- a/src/libs/Letta/Generated/Letta.AgentsClient.AttachFolderToAgent.g.cs +++ b/src/libs/Letta/Generated/Letta.AgentsClient.AttachFolderToAgent.g.cs @@ -383,18 +383,17 @@ partial void ProcessAttachFolderToAgentResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -428,17 +427,15 @@ partial void ProcessAttachFolderToAgentResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -475,17 +472,15 @@ partial void ProcessAttachFolderToAgentResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.AgentsClient.AttachIdentityToAgent.g.cs b/src/libs/Letta/Generated/Letta.AgentsClient.AttachIdentityToAgent.g.cs index 74909dd9..ae2d6bf1 100644 --- a/src/libs/Letta/Generated/Letta.AgentsClient.AttachIdentityToAgent.g.cs +++ b/src/libs/Letta/Generated/Letta.AgentsClient.AttachIdentityToAgent.g.cs @@ -379,18 +379,17 @@ partial void ProcessAttachIdentityToAgentResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -422,17 +421,15 @@ partial void ProcessAttachIdentityToAgentResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -467,17 +464,15 @@ partial void ProcessAttachIdentityToAgentResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.AgentsClient.AttachToolToAgent.g.cs b/src/libs/Letta/Generated/Letta.AgentsClient.AttachToolToAgent.g.cs index a8778d35..733c89e3 100644 --- a/src/libs/Letta/Generated/Letta.AgentsClient.AttachToolToAgent.g.cs +++ b/src/libs/Letta/Generated/Letta.AgentsClient.AttachToolToAgent.g.cs @@ -383,18 +383,17 @@ partial void ProcessAttachToolToAgentResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -428,17 +427,15 @@ partial void ProcessAttachToolToAgentResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -475,17 +472,15 @@ partial void ProcessAttachToolToAgentResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.AgentsClient.CancelMessage.g.cs b/src/libs/Letta/Generated/Letta.AgentsClient.CancelMessage.g.cs index 17b94597..52065ccc 100644 --- a/src/libs/Letta/Generated/Letta.AgentsClient.CancelMessage.g.cs +++ b/src/libs/Letta/Generated/Letta.AgentsClient.CancelMessage.g.cs @@ -392,18 +392,17 @@ partial void ProcessCancelMessageResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -435,17 +434,15 @@ partial void ProcessCancelMessageResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -480,17 +477,15 @@ partial void ProcessCancelMessageResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.AgentsClient.CloseAllFilesForAgent.g.cs b/src/libs/Letta/Generated/Letta.AgentsClient.CloseAllFilesForAgent.g.cs index 10e4991a..41a312fa 100644 --- a/src/libs/Letta/Generated/Letta.AgentsClient.CloseAllFilesForAgent.g.cs +++ b/src/libs/Letta/Generated/Letta.AgentsClient.CloseAllFilesForAgent.g.cs @@ -374,18 +374,17 @@ partial void ProcessCloseAllFilesForAgentResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -419,17 +418,15 @@ partial void ProcessCloseAllFilesForAgentResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -466,17 +463,15 @@ partial void ProcessCloseAllFilesForAgentResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.AgentsClient.CloseFileForAgent.g.cs b/src/libs/Letta/Generated/Letta.AgentsClient.CloseFileForAgent.g.cs index 450fd93b..b491ff09 100644 --- a/src/libs/Letta/Generated/Letta.AgentsClient.CloseFileForAgent.g.cs +++ b/src/libs/Letta/Generated/Letta.AgentsClient.CloseFileForAgent.g.cs @@ -387,18 +387,17 @@ partial void ProcessCloseFileForAgentResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -430,17 +429,15 @@ partial void ProcessCloseFileForAgentResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -475,17 +472,15 @@ partial void ProcessCloseFileForAgentResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.AgentsClient.CountAgents.g.cs b/src/libs/Letta/Generated/Letta.AgentsClient.CountAgents.g.cs index 340ce2bf..96f3603e 100644 --- a/src/libs/Letta/Generated/Letta.AgentsClient.CountAgents.g.cs +++ b/src/libs/Letta/Generated/Letta.AgentsClient.CountAgents.g.cs @@ -517,18 +517,17 @@ partial void ProcessCountAgentsResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -562,17 +561,15 @@ partial void ProcessCountAgentsResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -609,17 +606,15 @@ partial void ProcessCountAgentsResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.AgentsClient.CreateAgent.g.cs b/src/libs/Letta/Generated/Letta.AgentsClient.CreateAgent.g.cs index 4335db1d..8d74fb1a 100644 --- a/src/libs/Letta/Generated/Letta.AgentsClient.CreateAgent.g.cs +++ b/src/libs/Letta/Generated/Letta.AgentsClient.CreateAgent.g.cs @@ -398,18 +398,17 @@ partial void ProcessCreateAgentResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -443,17 +442,15 @@ partial void ProcessCreateAgentResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -490,17 +487,15 @@ partial void ProcessCreateAgentResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.AgentsClient.CreateAgentMessageAsync.g.cs b/src/libs/Letta/Generated/Letta.AgentsClient.CreateAgentMessageAsync.g.cs index 65483ad0..69365fcf 100644 --- a/src/libs/Letta/Generated/Letta.AgentsClient.CreateAgentMessageAsync.g.cs +++ b/src/libs/Letta/Generated/Letta.AgentsClient.CreateAgentMessageAsync.g.cs @@ -402,18 +402,17 @@ partial void ProcessCreateAgentMessageAsyncResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -447,17 +446,15 @@ partial void ProcessCreateAgentMessageAsyncResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -494,17 +491,15 @@ partial void ProcessCreateAgentMessageAsyncResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.AgentsClient.CreatePassage.g.cs b/src/libs/Letta/Generated/Letta.AgentsClient.CreatePassage.g.cs index 3e4ea606..f68591fb 100644 --- a/src/libs/Letta/Generated/Letta.AgentsClient.CreatePassage.g.cs +++ b/src/libs/Letta/Generated/Letta.AgentsClient.CreatePassage.g.cs @@ -390,18 +390,17 @@ partial void ProcessCreatePassageResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -435,17 +434,15 @@ partial void ProcessCreatePassageResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -482,17 +479,15 @@ partial void ProcessCreatePassageResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.AgentsClient.DeleteAgent.g.cs b/src/libs/Letta/Generated/Letta.AgentsClient.DeleteAgent.g.cs index ab05511c..fb92b4f4 100644 --- a/src/libs/Letta/Generated/Letta.AgentsClient.DeleteAgent.g.cs +++ b/src/libs/Letta/Generated/Letta.AgentsClient.DeleteAgent.g.cs @@ -370,18 +370,17 @@ partial void ProcessDeleteAgentResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -413,17 +412,15 @@ partial void ProcessDeleteAgentResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -458,17 +455,15 @@ partial void ProcessDeleteAgentResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.AgentsClient.DeletePassage.g.cs b/src/libs/Letta/Generated/Letta.AgentsClient.DeletePassage.g.cs index 156bf9cd..236de253 100644 --- a/src/libs/Letta/Generated/Letta.AgentsClient.DeletePassage.g.cs +++ b/src/libs/Letta/Generated/Letta.AgentsClient.DeletePassage.g.cs @@ -379,18 +379,17 @@ partial void ProcessDeletePassageResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -422,17 +421,15 @@ partial void ProcessDeletePassageResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -467,17 +464,15 @@ partial void ProcessDeletePassageResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.AgentsClient.DetachArchiveFromAgent.g.cs b/src/libs/Letta/Generated/Letta.AgentsClient.DetachArchiveFromAgent.g.cs index 48eb4aae..3fe73d9c 100644 --- a/src/libs/Letta/Generated/Letta.AgentsClient.DetachArchiveFromAgent.g.cs +++ b/src/libs/Letta/Generated/Letta.AgentsClient.DetachArchiveFromAgent.g.cs @@ -379,18 +379,17 @@ partial void ProcessDetachArchiveFromAgentResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -422,17 +421,15 @@ partial void ProcessDetachArchiveFromAgentResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -467,17 +464,15 @@ partial void ProcessDetachArchiveFromAgentResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.AgentsClient.DetachCoreMemoryBlock.g.cs b/src/libs/Letta/Generated/Letta.AgentsClient.DetachCoreMemoryBlock.g.cs index b5603d7d..63ba9400 100644 --- a/src/libs/Letta/Generated/Letta.AgentsClient.DetachCoreMemoryBlock.g.cs +++ b/src/libs/Letta/Generated/Letta.AgentsClient.DetachCoreMemoryBlock.g.cs @@ -383,18 +383,17 @@ partial void ProcessDetachCoreMemoryBlockResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -428,17 +427,15 @@ partial void ProcessDetachCoreMemoryBlockResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -475,17 +472,15 @@ partial void ProcessDetachCoreMemoryBlockResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.AgentsClient.DetachFolderFromAgent.g.cs b/src/libs/Letta/Generated/Letta.AgentsClient.DetachFolderFromAgent.g.cs index 0fffba7d..f52b948a 100644 --- a/src/libs/Letta/Generated/Letta.AgentsClient.DetachFolderFromAgent.g.cs +++ b/src/libs/Letta/Generated/Letta.AgentsClient.DetachFolderFromAgent.g.cs @@ -383,18 +383,17 @@ partial void ProcessDetachFolderFromAgentResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -428,17 +427,15 @@ partial void ProcessDetachFolderFromAgentResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -475,17 +472,15 @@ partial void ProcessDetachFolderFromAgentResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.AgentsClient.DetachIdentityFromAgent.g.cs b/src/libs/Letta/Generated/Letta.AgentsClient.DetachIdentityFromAgent.g.cs index 8a628f30..4b9d1eb6 100644 --- a/src/libs/Letta/Generated/Letta.AgentsClient.DetachIdentityFromAgent.g.cs +++ b/src/libs/Letta/Generated/Letta.AgentsClient.DetachIdentityFromAgent.g.cs @@ -379,18 +379,17 @@ partial void ProcessDetachIdentityFromAgentResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -422,17 +421,15 @@ partial void ProcessDetachIdentityFromAgentResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -467,17 +464,15 @@ partial void ProcessDetachIdentityFromAgentResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.AgentsClient.DetachToolFromAgent.g.cs b/src/libs/Letta/Generated/Letta.AgentsClient.DetachToolFromAgent.g.cs index 5745f2fc..929d8d36 100644 --- a/src/libs/Letta/Generated/Letta.AgentsClient.DetachToolFromAgent.g.cs +++ b/src/libs/Letta/Generated/Letta.AgentsClient.DetachToolFromAgent.g.cs @@ -383,18 +383,17 @@ partial void ProcessDetachToolFromAgentResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -428,17 +427,15 @@ partial void ProcessDetachToolFromAgentResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -475,17 +472,15 @@ partial void ProcessDetachToolFromAgentResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.AgentsClient.ExportAgent.g.cs b/src/libs/Letta/Generated/Letta.AgentsClient.ExportAgent.g.cs index 86b008eb..afdf690c 100644 --- a/src/libs/Letta/Generated/Letta.AgentsClient.ExportAgent.g.cs +++ b/src/libs/Letta/Generated/Letta.AgentsClient.ExportAgent.g.cs @@ -450,18 +450,17 @@ partial void ProcessExportAgentResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -493,17 +492,15 @@ partial void ProcessExportAgentResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -538,17 +535,15 @@ partial void ProcessExportAgentResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.AgentsClient.ExportAgentWithSkills.g.cs b/src/libs/Letta/Generated/Letta.AgentsClient.ExportAgentWithSkills.g.cs index e6a48ccf..dd9a2369 100644 --- a/src/libs/Letta/Generated/Letta.AgentsClient.ExportAgentWithSkills.g.cs +++ b/src/libs/Letta/Generated/Letta.AgentsClient.ExportAgentWithSkills.g.cs @@ -390,18 +390,17 @@ partial void ProcessExportAgentWithSkillsResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -433,17 +432,15 @@ partial void ProcessExportAgentWithSkillsResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -478,17 +475,15 @@ partial void ProcessExportAgentWithSkillsResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.AgentsClient.GenerateCompletion.g.cs b/src/libs/Letta/Generated/Letta.AgentsClient.GenerateCompletion.g.cs index e81fe514..b0ba1886 100644 --- a/src/libs/Letta/Generated/Letta.AgentsClient.GenerateCompletion.g.cs +++ b/src/libs/Letta/Generated/Letta.AgentsClient.GenerateCompletion.g.cs @@ -416,17 +416,16 @@ partial void ProcessGenerateCompletionResponseContent( __exception_404 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // if ((int)__response.StatusCode == 422) @@ -449,17 +448,16 @@ partial void ProcessGenerateCompletionResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // if ((int)__response.StatusCode == 502) @@ -482,17 +480,16 @@ partial void ProcessGenerateCompletionResponseContent( __exception_502 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_502 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_502, - statusCode: __response.StatusCode) - { - ResponseBody = __content_502, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_502, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -526,17 +523,15 @@ partial void ProcessGenerateCompletionResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -573,17 +568,15 @@ partial void ProcessGenerateCompletionResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.AgentsClient.ImportAgent.g.cs b/src/libs/Letta/Generated/Letta.AgentsClient.ImportAgent.g.cs index fd0efca5..d20013e4 100644 --- a/src/libs/Letta/Generated/Letta.AgentsClient.ImportAgent.g.cs +++ b/src/libs/Letta/Generated/Letta.AgentsClient.ImportAgent.g.cs @@ -537,18 +537,17 @@ request.Filename is null __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -582,17 +581,15 @@ request.Filename is null } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -629,17 +626,15 @@ request.Filename is null { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } @@ -1205,18 +1200,17 @@ request.Filename is null __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -1246,17 +1240,15 @@ request.Filename is null } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -1289,17 +1281,15 @@ request.Filename is null { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } @@ -1802,18 +1792,17 @@ request.Filename is null __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -1847,17 +1836,15 @@ request.Filename is null } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -1894,17 +1881,15 @@ request.Filename is null { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.AgentsClient.ListAgents.g.cs b/src/libs/Letta/Generated/Letta.AgentsClient.ListAgents.g.cs index 5dee6a87..57373ae0 100644 --- a/src/libs/Letta/Generated/Letta.AgentsClient.ListAgents.g.cs +++ b/src/libs/Letta/Generated/Letta.AgentsClient.ListAgents.g.cs @@ -655,18 +655,17 @@ partial void ProcessListAgentsResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -700,17 +699,15 @@ partial void ProcessListAgentsResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -747,17 +744,15 @@ partial void ProcessListAgentsResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.AgentsClient.ListCoreMemoryBlocks.g.cs b/src/libs/Letta/Generated/Letta.AgentsClient.ListCoreMemoryBlocks.g.cs index 3d114a2b..9f304ce9 100644 --- a/src/libs/Letta/Generated/Letta.AgentsClient.ListCoreMemoryBlocks.g.cs +++ b/src/libs/Letta/Generated/Letta.AgentsClient.ListCoreMemoryBlocks.g.cs @@ -448,18 +448,17 @@ partial void ProcessListCoreMemoryBlocksResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -493,17 +492,15 @@ partial void ProcessListCoreMemoryBlocksResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -540,17 +537,15 @@ partial void ProcessListCoreMemoryBlocksResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.AgentsClient.ListFilesForAgent.g.cs b/src/libs/Letta/Generated/Letta.AgentsClient.ListFilesForAgent.g.cs index 8f6a1b13..d9744fb3 100644 --- a/src/libs/Letta/Generated/Letta.AgentsClient.ListFilesForAgent.g.cs +++ b/src/libs/Letta/Generated/Letta.AgentsClient.ListFilesForAgent.g.cs @@ -478,18 +478,17 @@ partial void ProcessListFilesForAgentResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -523,17 +522,15 @@ partial void ProcessListFilesForAgentResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -570,17 +567,15 @@ partial void ProcessListFilesForAgentResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.AgentsClient.ListFoldersForAgent.g.cs b/src/libs/Letta/Generated/Letta.AgentsClient.ListFoldersForAgent.g.cs index c4860555..822a6c66 100644 --- a/src/libs/Letta/Generated/Letta.AgentsClient.ListFoldersForAgent.g.cs +++ b/src/libs/Letta/Generated/Letta.AgentsClient.ListFoldersForAgent.g.cs @@ -448,18 +448,17 @@ partial void ProcessListFoldersForAgentResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -493,17 +492,15 @@ partial void ProcessListFoldersForAgentResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -540,17 +537,15 @@ partial void ProcessListFoldersForAgentResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.AgentsClient.ListGroupsForAgent.g.cs b/src/libs/Letta/Generated/Letta.AgentsClient.ListGroupsForAgent.g.cs index f35e99bf..e1de6d5d 100644 --- a/src/libs/Letta/Generated/Letta.AgentsClient.ListGroupsForAgent.g.cs +++ b/src/libs/Letta/Generated/Letta.AgentsClient.ListGroupsForAgent.g.cs @@ -462,18 +462,17 @@ partial void ProcessListGroupsForAgentResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -507,17 +506,15 @@ partial void ProcessListGroupsForAgentResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -554,17 +551,15 @@ partial void ProcessListGroupsForAgentResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.AgentsClient.ListMessages.g.cs b/src/libs/Letta/Generated/Letta.AgentsClient.ListMessages.g.cs index 3fb2aa80..552b3a48 100644 --- a/src/libs/Letta/Generated/Letta.AgentsClient.ListMessages.g.cs +++ b/src/libs/Letta/Generated/Letta.AgentsClient.ListMessages.g.cs @@ -554,18 +554,17 @@ partial void ProcessListMessagesResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -599,17 +598,15 @@ partial void ProcessListMessagesResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -646,17 +643,15 @@ partial void ProcessListMessagesResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.AgentsClient.ListPassages.g.cs b/src/libs/Letta/Generated/Letta.AgentsClient.ListPassages.g.cs index f0b6d700..672b6697 100644 --- a/src/libs/Letta/Generated/Letta.AgentsClient.ListPassages.g.cs +++ b/src/libs/Letta/Generated/Letta.AgentsClient.ListPassages.g.cs @@ -446,18 +446,17 @@ partial void ProcessListPassagesResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -491,17 +490,15 @@ partial void ProcessListPassagesResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -538,17 +535,15 @@ partial void ProcessListPassagesResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.AgentsClient.ListToolsForAgent.g.cs b/src/libs/Letta/Generated/Letta.AgentsClient.ListToolsForAgent.g.cs index aea6ae3a..56197e03 100644 --- a/src/libs/Letta/Generated/Letta.AgentsClient.ListToolsForAgent.g.cs +++ b/src/libs/Letta/Generated/Letta.AgentsClient.ListToolsForAgent.g.cs @@ -448,18 +448,17 @@ partial void ProcessListToolsForAgentResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -493,17 +492,15 @@ partial void ProcessListToolsForAgentResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -540,17 +537,15 @@ partial void ProcessListToolsForAgentResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.AgentsClient.ModifyAgent.g.cs b/src/libs/Letta/Generated/Letta.AgentsClient.ModifyAgent.g.cs index 71d8445d..937ea150 100644 --- a/src/libs/Letta/Generated/Letta.AgentsClient.ModifyAgent.g.cs +++ b/src/libs/Letta/Generated/Letta.AgentsClient.ModifyAgent.g.cs @@ -392,18 +392,17 @@ partial void ProcessModifyAgentResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -437,17 +436,15 @@ partial void ProcessModifyAgentResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -484,17 +481,15 @@ partial void ProcessModifyAgentResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.AgentsClient.ModifyApprovalForTool.g.cs b/src/libs/Letta/Generated/Letta.AgentsClient.ModifyApprovalForTool.g.cs index fbcb1682..cf46ab43 100644 --- a/src/libs/Letta/Generated/Letta.AgentsClient.ModifyApprovalForTool.g.cs +++ b/src/libs/Letta/Generated/Letta.AgentsClient.ModifyApprovalForTool.g.cs @@ -419,18 +419,17 @@ partial void ProcessModifyApprovalForToolResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -464,17 +463,15 @@ partial void ProcessModifyApprovalForToolResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -511,17 +508,15 @@ partial void ProcessModifyApprovalForToolResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.AgentsClient.ModifyCoreMemoryBlock.g.cs b/src/libs/Letta/Generated/Letta.AgentsClient.ModifyCoreMemoryBlock.g.cs index 389845fe..ff4f145c 100644 --- a/src/libs/Letta/Generated/Letta.AgentsClient.ModifyCoreMemoryBlock.g.cs +++ b/src/libs/Letta/Generated/Letta.AgentsClient.ModifyCoreMemoryBlock.g.cs @@ -399,18 +399,17 @@ partial void ProcessModifyCoreMemoryBlockResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -444,17 +443,15 @@ partial void ProcessModifyCoreMemoryBlockResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -491,17 +488,15 @@ partial void ProcessModifyCoreMemoryBlockResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.AgentsClient.OpenFileForAgent.g.cs b/src/libs/Letta/Generated/Letta.AgentsClient.OpenFileForAgent.g.cs index ec1a513c..3d0f9d15 100644 --- a/src/libs/Letta/Generated/Letta.AgentsClient.OpenFileForAgent.g.cs +++ b/src/libs/Letta/Generated/Letta.AgentsClient.OpenFileForAgent.g.cs @@ -389,18 +389,17 @@ partial void ProcessOpenFileForAgentResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -434,17 +433,15 @@ partial void ProcessOpenFileForAgentResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -481,17 +478,15 @@ partial void ProcessOpenFileForAgentResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.AgentsClient.PreviewModelRequest.g.cs b/src/libs/Letta/Generated/Letta.AgentsClient.PreviewModelRequest.g.cs index 42b13eb0..3e56dabb 100644 --- a/src/libs/Letta/Generated/Letta.AgentsClient.PreviewModelRequest.g.cs +++ b/src/libs/Letta/Generated/Letta.AgentsClient.PreviewModelRequest.g.cs @@ -394,18 +394,17 @@ partial void ProcessPreviewModelRequestResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -437,17 +436,15 @@ partial void ProcessPreviewModelRequestResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -482,17 +479,15 @@ partial void ProcessPreviewModelRequestResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.AgentsClient.RecompileAgent.g.cs b/src/libs/Letta/Generated/Letta.AgentsClient.RecompileAgent.g.cs index 90c95be2..88402aa3 100644 --- a/src/libs/Letta/Generated/Letta.AgentsClient.RecompileAgent.g.cs +++ b/src/libs/Letta/Generated/Letta.AgentsClient.RecompileAgent.g.cs @@ -404,18 +404,17 @@ partial void ProcessRecompileAgentResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -447,17 +446,15 @@ partial void ProcessRecompileAgentResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -492,17 +489,15 @@ partial void ProcessRecompileAgentResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.AgentsClient.ResetMessages.g.cs b/src/libs/Letta/Generated/Letta.AgentsClient.ResetMessages.g.cs index 474f423b..a9f3f6dd 100644 --- a/src/libs/Letta/Generated/Letta.AgentsClient.ResetMessages.g.cs +++ b/src/libs/Letta/Generated/Letta.AgentsClient.ResetMessages.g.cs @@ -390,18 +390,17 @@ partial void ProcessResetMessagesResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -435,17 +434,15 @@ partial void ProcessResetMessagesResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -482,17 +479,15 @@ partial void ProcessResetMessagesResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.AgentsClient.RetrieveAgent.g.cs b/src/libs/Letta/Generated/Letta.AgentsClient.RetrieveAgent.g.cs index 2b25e187..49001803 100644 --- a/src/libs/Letta/Generated/Letta.AgentsClient.RetrieveAgent.g.cs +++ b/src/libs/Letta/Generated/Letta.AgentsClient.RetrieveAgent.g.cs @@ -404,18 +404,17 @@ partial void ProcessRetrieveAgentResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -449,17 +448,15 @@ partial void ProcessRetrieveAgentResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -496,17 +493,15 @@ partial void ProcessRetrieveAgentResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.AgentsClient.RetrieveCoreMemoryBlock.g.cs b/src/libs/Letta/Generated/Letta.AgentsClient.RetrieveCoreMemoryBlock.g.cs index 94473c01..275c7983 100644 --- a/src/libs/Letta/Generated/Letta.AgentsClient.RetrieveCoreMemoryBlock.g.cs +++ b/src/libs/Letta/Generated/Letta.AgentsClient.RetrieveCoreMemoryBlock.g.cs @@ -379,18 +379,17 @@ partial void ProcessRetrieveCoreMemoryBlockResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -424,17 +423,15 @@ partial void ProcessRetrieveCoreMemoryBlockResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -471,17 +468,15 @@ partial void ProcessRetrieveCoreMemoryBlockResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.AgentsClient.RunToolForAgent.g.cs b/src/libs/Letta/Generated/Letta.AgentsClient.RunToolForAgent.g.cs index e9bdd829..5f76da6e 100644 --- a/src/libs/Letta/Generated/Letta.AgentsClient.RunToolForAgent.g.cs +++ b/src/libs/Letta/Generated/Letta.AgentsClient.RunToolForAgent.g.cs @@ -403,18 +403,17 @@ partial void ProcessRunToolForAgentResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -448,17 +447,15 @@ partial void ProcessRunToolForAgentResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -495,17 +492,15 @@ partial void ProcessRunToolForAgentResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.AgentsClient.SearchArchivalMemory.g.cs b/src/libs/Letta/Generated/Letta.AgentsClient.SearchArchivalMemory.g.cs index c99af759..5d70222c 100644 --- a/src/libs/Letta/Generated/Letta.AgentsClient.SearchArchivalMemory.g.cs +++ b/src/libs/Letta/Generated/Letta.AgentsClient.SearchArchivalMemory.g.cs @@ -464,18 +464,17 @@ partial void ProcessSearchArchivalMemoryResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -509,17 +508,15 @@ partial void ProcessSearchArchivalMemoryResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -556,17 +553,15 @@ partial void ProcessSearchArchivalMemoryResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.AgentsClient.SearchMessages.g.cs b/src/libs/Letta/Generated/Letta.AgentsClient.SearchMessages.g.cs index 478c8ec5..70d49608 100644 --- a/src/libs/Letta/Generated/Letta.AgentsClient.SearchMessages.g.cs +++ b/src/libs/Letta/Generated/Letta.AgentsClient.SearchMessages.g.cs @@ -379,18 +379,17 @@ partial void ProcessSearchMessagesResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -424,17 +423,15 @@ partial void ProcessSearchMessagesResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -471,17 +468,15 @@ partial void ProcessSearchMessagesResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.AgentsClient.SendMessage.g.cs b/src/libs/Letta/Generated/Letta.AgentsClient.SendMessage.g.cs index 1032ec00..a66e8b05 100644 --- a/src/libs/Letta/Generated/Letta.AgentsClient.SendMessage.g.cs +++ b/src/libs/Letta/Generated/Letta.AgentsClient.SendMessage.g.cs @@ -414,18 +414,17 @@ partial void ProcessSendMessageResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -459,17 +458,15 @@ partial void ProcessSendMessageResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -506,17 +503,15 @@ partial void ProcessSendMessageResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.AgentsClient.SummarizeMessages.g.cs b/src/libs/Letta/Generated/Letta.AgentsClient.SummarizeMessages.g.cs index 5f871b22..84cc6201 100644 --- a/src/libs/Letta/Generated/Letta.AgentsClient.SummarizeMessages.g.cs +++ b/src/libs/Letta/Generated/Letta.AgentsClient.SummarizeMessages.g.cs @@ -390,18 +390,17 @@ partial void ProcessSummarizeMessagesResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -435,17 +434,15 @@ partial void ProcessSummarizeMessagesResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -482,17 +479,15 @@ partial void ProcessSummarizeMessagesResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.ArchivesClient.CreateArchive.g.cs b/src/libs/Letta/Generated/Letta.ArchivesClient.CreateArchive.g.cs index 4eba9e92..d7ff8ef6 100644 --- a/src/libs/Letta/Generated/Letta.ArchivesClient.CreateArchive.g.cs +++ b/src/libs/Letta/Generated/Letta.ArchivesClient.CreateArchive.g.cs @@ -379,18 +379,17 @@ partial void ProcessCreateArchiveResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -424,17 +423,15 @@ partial void ProcessCreateArchiveResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -471,17 +468,15 @@ partial void ProcessCreateArchiveResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.ArchivesClient.CreatePassageInArchive.g.cs b/src/libs/Letta/Generated/Letta.ArchivesClient.CreatePassageInArchive.g.cs index e6684ed0..fbf34398 100644 --- a/src/libs/Letta/Generated/Letta.ArchivesClient.CreatePassageInArchive.g.cs +++ b/src/libs/Letta/Generated/Letta.ArchivesClient.CreatePassageInArchive.g.cs @@ -392,18 +392,17 @@ partial void ProcessCreatePassageInArchiveResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -437,17 +436,15 @@ partial void ProcessCreatePassageInArchiveResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -484,17 +481,15 @@ partial void ProcessCreatePassageInArchiveResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.ArchivesClient.CreatePassagesInArchive.g.cs b/src/libs/Letta/Generated/Letta.ArchivesClient.CreatePassagesInArchive.g.cs index 00b6f395..d13c59fb 100644 --- a/src/libs/Letta/Generated/Letta.ArchivesClient.CreatePassagesInArchive.g.cs +++ b/src/libs/Letta/Generated/Letta.ArchivesClient.CreatePassagesInArchive.g.cs @@ -392,18 +392,17 @@ partial void ProcessCreatePassagesInArchiveResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -437,17 +436,15 @@ partial void ProcessCreatePassagesInArchiveResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -484,17 +481,15 @@ partial void ProcessCreatePassagesInArchiveResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.ArchivesClient.DeleteArchive.g.cs b/src/libs/Letta/Generated/Letta.ArchivesClient.DeleteArchive.g.cs index b075d7ba..ab6b1f87 100644 --- a/src/libs/Letta/Generated/Letta.ArchivesClient.DeleteArchive.g.cs +++ b/src/libs/Letta/Generated/Letta.ArchivesClient.DeleteArchive.g.cs @@ -363,18 +363,17 @@ await DeleteArchiveAsResponseAsync( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -401,17 +400,15 @@ await DeleteArchiveAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -439,17 +436,15 @@ await DeleteArchiveAsResponseAsync( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.ArchivesClient.DeletePassageFromArchive.g.cs b/src/libs/Letta/Generated/Letta.ArchivesClient.DeletePassageFromArchive.g.cs index 4c156c59..ed7c07f1 100644 --- a/src/libs/Letta/Generated/Letta.ArchivesClient.DeletePassageFromArchive.g.cs +++ b/src/libs/Letta/Generated/Letta.ArchivesClient.DeletePassageFromArchive.g.cs @@ -378,18 +378,17 @@ await DeletePassageFromArchiveAsResponseAsync( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -416,17 +415,15 @@ await DeletePassageFromArchiveAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -454,17 +451,15 @@ await DeletePassageFromArchiveAsResponseAsync( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.ArchivesClient.ListAgentsForArchive.g.cs b/src/libs/Letta/Generated/Letta.ArchivesClient.ListAgentsForArchive.g.cs index 2c392fdc..a972b327 100644 --- a/src/libs/Letta/Generated/Letta.ArchivesClient.ListAgentsForArchive.g.cs +++ b/src/libs/Letta/Generated/Letta.ArchivesClient.ListAgentsForArchive.g.cs @@ -448,18 +448,17 @@ partial void ProcessListAgentsForArchiveResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -493,17 +492,15 @@ partial void ProcessListAgentsForArchiveResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -540,17 +537,15 @@ partial void ProcessListAgentsForArchiveResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.ArchivesClient.ListArchives.g.cs b/src/libs/Letta/Generated/Letta.ArchivesClient.ListArchives.g.cs index 391900d7..c1151e1d 100644 --- a/src/libs/Letta/Generated/Letta.ArchivesClient.ListArchives.g.cs +++ b/src/libs/Letta/Generated/Letta.ArchivesClient.ListArchives.g.cs @@ -463,18 +463,17 @@ partial void ProcessListArchivesResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -508,17 +507,15 @@ partial void ProcessListArchivesResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -555,17 +552,15 @@ partial void ProcessListArchivesResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.ArchivesClient.ModifyArchive.g.cs b/src/libs/Letta/Generated/Letta.ArchivesClient.ModifyArchive.g.cs index 6bf9b29b..9e5264c2 100644 --- a/src/libs/Letta/Generated/Letta.ArchivesClient.ModifyArchive.g.cs +++ b/src/libs/Letta/Generated/Letta.ArchivesClient.ModifyArchive.g.cs @@ -390,18 +390,17 @@ partial void ProcessModifyArchiveResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -435,17 +434,15 @@ partial void ProcessModifyArchiveResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -482,17 +479,15 @@ partial void ProcessModifyArchiveResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.ArchivesClient.RetrieveArchive.g.cs b/src/libs/Letta/Generated/Letta.ArchivesClient.RetrieveArchive.g.cs index 03d01f57..af20783a 100644 --- a/src/libs/Letta/Generated/Letta.ArchivesClient.RetrieveArchive.g.cs +++ b/src/libs/Letta/Generated/Letta.ArchivesClient.RetrieveArchive.g.cs @@ -370,18 +370,17 @@ partial void ProcessRetrieveArchiveResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -415,17 +414,15 @@ partial void ProcessRetrieveArchiveResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -462,17 +459,15 @@ partial void ProcessRetrieveArchiveResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.BlocksClient.AttachIdentityToBlock.g.cs b/src/libs/Letta/Generated/Letta.BlocksClient.AttachIdentityToBlock.g.cs index faebcb27..df60fc8a 100644 --- a/src/libs/Letta/Generated/Letta.BlocksClient.AttachIdentityToBlock.g.cs +++ b/src/libs/Letta/Generated/Letta.BlocksClient.AttachIdentityToBlock.g.cs @@ -379,18 +379,17 @@ partial void ProcessAttachIdentityToBlockResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -424,17 +423,15 @@ partial void ProcessAttachIdentityToBlockResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -471,17 +468,15 @@ partial void ProcessAttachIdentityToBlockResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.BlocksClient.CountBlocks.g.cs b/src/libs/Letta/Generated/Letta.BlocksClient.CountBlocks.g.cs index aa66f1e0..37826331 100644 --- a/src/libs/Letta/Generated/Letta.BlocksClient.CountBlocks.g.cs +++ b/src/libs/Letta/Generated/Letta.BlocksClient.CountBlocks.g.cs @@ -449,18 +449,17 @@ partial void ProcessCountBlocksResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -494,17 +493,15 @@ partial void ProcessCountBlocksResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -541,17 +538,15 @@ partial void ProcessCountBlocksResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.BlocksClient.CreateBlock.g.cs b/src/libs/Letta/Generated/Letta.BlocksClient.CreateBlock.g.cs index 18cb8ac2..04337b97 100644 --- a/src/libs/Letta/Generated/Letta.BlocksClient.CreateBlock.g.cs +++ b/src/libs/Letta/Generated/Letta.BlocksClient.CreateBlock.g.cs @@ -375,18 +375,17 @@ partial void ProcessCreateBlockResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -420,17 +419,15 @@ partial void ProcessCreateBlockResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -467,17 +464,15 @@ partial void ProcessCreateBlockResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.BlocksClient.DeleteBlock.g.cs b/src/libs/Letta/Generated/Letta.BlocksClient.DeleteBlock.g.cs index 30ea5aea..bf39860e 100644 --- a/src/libs/Letta/Generated/Letta.BlocksClient.DeleteBlock.g.cs +++ b/src/libs/Letta/Generated/Letta.BlocksClient.DeleteBlock.g.cs @@ -368,18 +368,17 @@ partial void ProcessDeleteBlockResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -411,17 +410,15 @@ partial void ProcessDeleteBlockResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -456,17 +453,15 @@ partial void ProcessDeleteBlockResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.BlocksClient.DetachIdentityFromBlock.g.cs b/src/libs/Letta/Generated/Letta.BlocksClient.DetachIdentityFromBlock.g.cs index 37ccde9a..1b6bd752 100644 --- a/src/libs/Letta/Generated/Letta.BlocksClient.DetachIdentityFromBlock.g.cs +++ b/src/libs/Letta/Generated/Letta.BlocksClient.DetachIdentityFromBlock.g.cs @@ -379,18 +379,17 @@ partial void ProcessDetachIdentityFromBlockResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -424,17 +423,15 @@ partial void ProcessDetachIdentityFromBlockResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -471,17 +468,15 @@ partial void ProcessDetachIdentityFromBlockResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.BlocksClient.ListAgentsForBlock.g.cs b/src/libs/Letta/Generated/Letta.BlocksClient.ListAgentsForBlock.g.cs index 6f8f7c73..0d015748 100644 --- a/src/libs/Letta/Generated/Letta.BlocksClient.ListAgentsForBlock.g.cs +++ b/src/libs/Letta/Generated/Letta.BlocksClient.ListAgentsForBlock.g.cs @@ -482,18 +482,17 @@ partial void ProcessListAgentsForBlockResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -527,17 +526,15 @@ partial void ProcessListAgentsForBlockResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -574,17 +571,15 @@ partial void ProcessListAgentsForBlockResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.BlocksClient.ListBlocks.g.cs b/src/libs/Letta/Generated/Letta.BlocksClient.ListBlocks.g.cs index e1e06471..63885f6f 100644 --- a/src/libs/Letta/Generated/Letta.BlocksClient.ListBlocks.g.cs +++ b/src/libs/Letta/Generated/Letta.BlocksClient.ListBlocks.g.cs @@ -633,18 +633,17 @@ partial void ProcessListBlocksResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -678,17 +677,15 @@ partial void ProcessListBlocksResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -725,17 +722,15 @@ partial void ProcessListBlocksResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.BlocksClient.ModifyBlock.g.cs b/src/libs/Letta/Generated/Letta.BlocksClient.ModifyBlock.g.cs index 90a328db..2a4ab509 100644 --- a/src/libs/Letta/Generated/Letta.BlocksClient.ModifyBlock.g.cs +++ b/src/libs/Letta/Generated/Letta.BlocksClient.ModifyBlock.g.cs @@ -388,18 +388,17 @@ partial void ProcessModifyBlockResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -433,17 +432,15 @@ partial void ProcessModifyBlockResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -480,17 +477,15 @@ partial void ProcessModifyBlockResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.BlocksClient.RetrieveBlock.g.cs b/src/libs/Letta/Generated/Letta.BlocksClient.RetrieveBlock.g.cs index 52ec2b9e..d256a8be 100644 --- a/src/libs/Letta/Generated/Letta.BlocksClient.RetrieveBlock.g.cs +++ b/src/libs/Letta/Generated/Letta.BlocksClient.RetrieveBlock.g.cs @@ -368,18 +368,17 @@ partial void ProcessRetrieveBlockResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -413,17 +412,15 @@ partial void ProcessRetrieveBlockResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -460,17 +457,15 @@ partial void ProcessRetrieveBlockResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.ChatClient.CreateChatCompletion.g.cs b/src/libs/Letta/Generated/Letta.ChatClient.CreateChatCompletion.g.cs index 8aac72df..94ec57fe 100644 --- a/src/libs/Letta/Generated/Letta.ChatClient.CreateChatCompletion.g.cs +++ b/src/libs/Letta/Generated/Letta.ChatClient.CreateChatCompletion.g.cs @@ -385,18 +385,17 @@ partial void ProcessCreateChatCompletionResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -430,17 +429,15 @@ partial void ProcessCreateChatCompletionResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -477,17 +474,15 @@ partial void ProcessCreateChatCompletionResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.ClientSideAccessTokensClient.ClientSideAccessTokensCreateClientSideAccessToken.g.cs b/src/libs/Letta/Generated/Letta.ClientSideAccessTokensClient.ClientSideAccessTokensCreateClientSideAccessToken.g.cs index a2c859d7..209d2c79 100644 --- a/src/libs/Letta/Generated/Letta.ClientSideAccessTokensClient.ClientSideAccessTokensCreateClientSideAccessToken.g.cs +++ b/src/libs/Letta/Generated/Letta.ClientSideAccessTokensClient.ClientSideAccessTokensCreateClientSideAccessToken.g.cs @@ -377,18 +377,17 @@ partial void ProcessClientSideAccessTokensCreateClientSideAccessTokenResponseCon __exception_400 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -422,17 +421,15 @@ partial void ProcessClientSideAccessTokensCreateClientSideAccessTokenResponseCon } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -469,17 +466,15 @@ partial void ProcessClientSideAccessTokensCreateClientSideAccessTokenResponseCon { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.ClientSideAccessTokensClient.ClientSideAccessTokensDeleteClientSideAccessToken.g.cs b/src/libs/Letta/Generated/Letta.ClientSideAccessTokensClient.ClientSideAccessTokensDeleteClientSideAccessToken.g.cs index e4fcbed9..98b79beb 100644 --- a/src/libs/Letta/Generated/Letta.ClientSideAccessTokensClient.ClientSideAccessTokensDeleteClientSideAccessToken.g.cs +++ b/src/libs/Letta/Generated/Letta.ClientSideAccessTokensClient.ClientSideAccessTokensDeleteClientSideAccessToken.g.cs @@ -386,18 +386,17 @@ partial void ProcessClientSideAccessTokensDeleteClientSideAccessTokenResponseCon __exception_400 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -429,17 +428,15 @@ partial void ProcessClientSideAccessTokensDeleteClientSideAccessTokenResponseCon } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -474,17 +471,15 @@ partial void ProcessClientSideAccessTokensDeleteClientSideAccessTokenResponseCon { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.ClientSideAccessTokensClient.ClientSideAccessTokensListClientSideAccessTokens.g.cs b/src/libs/Letta/Generated/Letta.ClientSideAccessTokensClient.ClientSideAccessTokensListClientSideAccessTokens.g.cs index daa7ea2b..82a69aa9 100644 --- a/src/libs/Letta/Generated/Letta.ClientSideAccessTokensClient.ClientSideAccessTokensListClientSideAccessTokens.g.cs +++ b/src/libs/Letta/Generated/Letta.ClientSideAccessTokensClient.ClientSideAccessTokensListClientSideAccessTokens.g.cs @@ -397,18 +397,17 @@ partial void ProcessClientSideAccessTokensListClientSideAccessTokensResponseCont __exception_400 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -442,17 +441,15 @@ partial void ProcessClientSideAccessTokensListClientSideAccessTokensResponseCont } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -489,17 +486,15 @@ partial void ProcessClientSideAccessTokensListClientSideAccessTokensResponseCont { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.ConversationsClient.CancelConversation.g.cs b/src/libs/Letta/Generated/Letta.ConversationsClient.CancelConversation.g.cs index 7d595b2e..a9ab448c 100644 --- a/src/libs/Letta/Generated/Letta.ConversationsClient.CancelConversation.g.cs +++ b/src/libs/Letta/Generated/Letta.ConversationsClient.CancelConversation.g.cs @@ -394,18 +394,17 @@ partial void ProcessCancelConversationResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -437,17 +436,15 @@ partial void ProcessCancelConversationResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -482,17 +479,15 @@ partial void ProcessCancelConversationResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.ConversationsClient.CompactConversation.g.cs b/src/libs/Letta/Generated/Letta.ConversationsClient.CompactConversation.g.cs index 918df3c0..9aa16845 100644 --- a/src/libs/Letta/Generated/Letta.ConversationsClient.CompactConversation.g.cs +++ b/src/libs/Letta/Generated/Letta.ConversationsClient.CompactConversation.g.cs @@ -400,18 +400,17 @@ partial void ProcessCompactConversationResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -445,17 +444,15 @@ partial void ProcessCompactConversationResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -492,17 +489,15 @@ partial void ProcessCompactConversationResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.ConversationsClient.CreateConversation.g.cs b/src/libs/Letta/Generated/Letta.ConversationsClient.CreateConversation.g.cs index 5c85c3ad..4bdc84bb 100644 --- a/src/libs/Letta/Generated/Letta.ConversationsClient.CreateConversation.g.cs +++ b/src/libs/Letta/Generated/Letta.ConversationsClient.CreateConversation.g.cs @@ -393,18 +393,17 @@ partial void ProcessCreateConversationResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -438,17 +437,15 @@ partial void ProcessCreateConversationResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -485,17 +482,15 @@ partial void ProcessCreateConversationResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.ConversationsClient.DeleteConversation.g.cs b/src/libs/Letta/Generated/Letta.ConversationsClient.DeleteConversation.g.cs index 26606f29..c58ae1f3 100644 --- a/src/libs/Letta/Generated/Letta.ConversationsClient.DeleteConversation.g.cs +++ b/src/libs/Letta/Generated/Letta.ConversationsClient.DeleteConversation.g.cs @@ -376,18 +376,17 @@ partial void ProcessDeleteConversationResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -419,17 +418,15 @@ partial void ProcessDeleteConversationResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -464,17 +461,15 @@ partial void ProcessDeleteConversationResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.ConversationsClient.ForkConversation.g.cs b/src/libs/Letta/Generated/Letta.ConversationsClient.ForkConversation.g.cs index 85e0513c..b6504a39 100644 --- a/src/libs/Letta/Generated/Letta.ConversationsClient.ForkConversation.g.cs +++ b/src/libs/Letta/Generated/Letta.ConversationsClient.ForkConversation.g.cs @@ -398,18 +398,17 @@ partial void ProcessForkConversationResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -443,17 +442,15 @@ partial void ProcessForkConversationResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -490,17 +487,15 @@ partial void ProcessForkConversationResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.ConversationsClient.ListConversationMessages.g.cs b/src/libs/Letta/Generated/Letta.ConversationsClient.ListConversationMessages.g.cs index 510928f2..a0894030 100644 --- a/src/libs/Letta/Generated/Letta.ConversationsClient.ListConversationMessages.g.cs +++ b/src/libs/Letta/Generated/Letta.ConversationsClient.ListConversationMessages.g.cs @@ -514,18 +514,17 @@ partial void ProcessListConversationMessagesResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -559,17 +558,15 @@ partial void ProcessListConversationMessagesResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -606,17 +603,15 @@ partial void ProcessListConversationMessagesResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.ConversationsClient.ListConversations.g.cs b/src/libs/Letta/Generated/Letta.ConversationsClient.ListConversations.g.cs index cd4553b3..6de123cd 100644 --- a/src/libs/Letta/Generated/Letta.ConversationsClient.ListConversations.g.cs +++ b/src/libs/Letta/Generated/Letta.ConversationsClient.ListConversations.g.cs @@ -449,18 +449,17 @@ partial void ProcessListConversationsResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -494,17 +493,15 @@ partial void ProcessListConversationsResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -541,17 +538,15 @@ partial void ProcessListConversationsResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.ConversationsClient.PreviewConversationModelRequest.g.cs b/src/libs/Letta/Generated/Letta.ConversationsClient.PreviewConversationModelRequest.g.cs index d2bb7cd9..20c5e11e 100644 --- a/src/libs/Letta/Generated/Letta.ConversationsClient.PreviewConversationModelRequest.g.cs +++ b/src/libs/Letta/Generated/Letta.ConversationsClient.PreviewConversationModelRequest.g.cs @@ -400,18 +400,17 @@ partial void ProcessPreviewConversationModelRequestResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -443,17 +442,15 @@ partial void ProcessPreviewConversationModelRequestResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -488,17 +485,15 @@ partial void ProcessPreviewConversationModelRequestResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.ConversationsClient.RecompileConversation.g.cs b/src/libs/Letta/Generated/Letta.ConversationsClient.RecompileConversation.g.cs index 0099fdd7..505d4da8 100644 --- a/src/libs/Letta/Generated/Letta.ConversationsClient.RecompileConversation.g.cs +++ b/src/libs/Letta/Generated/Letta.ConversationsClient.RecompileConversation.g.cs @@ -408,18 +408,17 @@ partial void ProcessRecompileConversationResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -451,17 +450,15 @@ partial void ProcessRecompileConversationResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -496,17 +493,15 @@ partial void ProcessRecompileConversationResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.ConversationsClient.RetrieveConversation.g.cs b/src/libs/Letta/Generated/Letta.ConversationsClient.RetrieveConversation.g.cs index 7f1bae27..a4d37fb1 100644 --- a/src/libs/Letta/Generated/Letta.ConversationsClient.RetrieveConversation.g.cs +++ b/src/libs/Letta/Generated/Letta.ConversationsClient.RetrieveConversation.g.cs @@ -370,18 +370,17 @@ partial void ProcessRetrieveConversationResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -415,17 +414,15 @@ partial void ProcessRetrieveConversationResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -462,17 +459,15 @@ partial void ProcessRetrieveConversationResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.ConversationsClient.RetrieveConversationStream.g.cs b/src/libs/Letta/Generated/Letta.ConversationsClient.RetrieveConversationStream.g.cs index c5ec4305..5089cd00 100644 --- a/src/libs/Letta/Generated/Letta.ConversationsClient.RetrieveConversationStream.g.cs +++ b/src/libs/Letta/Generated/Letta.ConversationsClient.RetrieveConversationStream.g.cs @@ -408,18 +408,17 @@ partial void ProcessRetrieveConversationStreamResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -451,17 +450,15 @@ partial void ProcessRetrieveConversationStreamResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -496,17 +493,15 @@ partial void ProcessRetrieveConversationStreamResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.ConversationsClient.SendConversationMessage.g.cs b/src/libs/Letta/Generated/Letta.ConversationsClient.SendConversationMessage.g.cs index 6dae0666..fd132927 100644 --- a/src/libs/Letta/Generated/Letta.ConversationsClient.SendConversationMessage.g.cs +++ b/src/libs/Letta/Generated/Letta.ConversationsClient.SendConversationMessage.g.cs @@ -404,18 +404,17 @@ partial void ProcessSendConversationMessageResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -449,17 +448,15 @@ partial void ProcessSendConversationMessageResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -496,17 +493,15 @@ partial void ProcessSendConversationMessageResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.ConversationsClient.UpdateConversation.g.cs b/src/libs/Letta/Generated/Letta.ConversationsClient.UpdateConversation.g.cs index 27418da4..ee5b553c 100644 --- a/src/libs/Letta/Generated/Letta.ConversationsClient.UpdateConversation.g.cs +++ b/src/libs/Letta/Generated/Letta.ConversationsClient.UpdateConversation.g.cs @@ -390,18 +390,17 @@ partial void ProcessUpdateConversationResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -435,17 +434,15 @@ partial void ProcessUpdateConversationResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -482,17 +479,15 @@ partial void ProcessUpdateConversationResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.DeviceStorageClient.DeviceStorageGetDeviceStorageKey.g.cs b/src/libs/Letta/Generated/Letta.DeviceStorageClient.DeviceStorageGetDeviceStorageKey.g.cs index e3b7a0a4..93440e44 100644 --- a/src/libs/Letta/Generated/Letta.DeviceStorageClient.DeviceStorageGetDeviceStorageKey.g.cs +++ b/src/libs/Letta/Generated/Letta.DeviceStorageClient.DeviceStorageGetDeviceStorageKey.g.cs @@ -376,17 +376,15 @@ partial void ProcessDeviceStorageGetDeviceStorageKeyResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -423,17 +421,15 @@ partial void ProcessDeviceStorageGetDeviceStorageKeyResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.EmbeddingsClient.GetTotalStorageSize.g.cs b/src/libs/Letta/Generated/Letta.EmbeddingsClient.GetTotalStorageSize.g.cs index 10cab28b..946d33c8 100644 --- a/src/libs/Letta/Generated/Letta.EmbeddingsClient.GetTotalStorageSize.g.cs +++ b/src/libs/Letta/Generated/Letta.EmbeddingsClient.GetTotalStorageSize.g.cs @@ -376,18 +376,17 @@ partial void ProcessGetTotalStorageSizeResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -421,17 +420,15 @@ partial void ProcessGetTotalStorageSizeResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -468,17 +465,15 @@ partial void ProcessGetTotalStorageSizeResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.EnvironmentsClient.EnvironmentsDeleteEnvironment.g.cs b/src/libs/Letta/Generated/Letta.EnvironmentsClient.EnvironmentsDeleteEnvironment.g.cs index 84c861dd..9b8de435 100644 --- a/src/libs/Letta/Generated/Letta.EnvironmentsClient.EnvironmentsDeleteEnvironment.g.cs +++ b/src/libs/Letta/Generated/Letta.EnvironmentsClient.EnvironmentsDeleteEnvironment.g.cs @@ -386,18 +386,17 @@ partial void ProcessEnvironmentsDeleteEnvironmentResponseContent( __exception_403 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseObject = __value_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseObject: __value_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // 404 if ((int)__response.StatusCode == 404) @@ -424,18 +423,17 @@ partial void ProcessEnvironmentsDeleteEnvironmentResponseContent( __exception_404 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -469,17 +467,15 @@ partial void ProcessEnvironmentsDeleteEnvironmentResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -516,17 +512,15 @@ partial void ProcessEnvironmentsDeleteEnvironmentResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.EnvironmentsClient.EnvironmentsGetConnection.g.cs b/src/libs/Letta/Generated/Letta.EnvironmentsClient.EnvironmentsGetConnection.g.cs index 44d51aea..664d2f19 100644 --- a/src/libs/Letta/Generated/Letta.EnvironmentsClient.EnvironmentsGetConnection.g.cs +++ b/src/libs/Letta/Generated/Letta.EnvironmentsClient.EnvironmentsGetConnection.g.cs @@ -366,18 +366,17 @@ partial void ProcessEnvironmentsGetConnectionResponseContent( __exception_404 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -411,17 +410,15 @@ partial void ProcessEnvironmentsGetConnectionResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -458,17 +455,15 @@ partial void ProcessEnvironmentsGetConnectionResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.EnvironmentsClient.EnvironmentsListConnections.g.cs b/src/libs/Letta/Generated/Letta.EnvironmentsClient.EnvironmentsListConnections.g.cs index f2ad22ac..35e3c7c7 100644 --- a/src/libs/Letta/Generated/Letta.EnvironmentsClient.EnvironmentsListConnections.g.cs +++ b/src/libs/Letta/Generated/Letta.EnvironmentsClient.EnvironmentsListConnections.g.cs @@ -406,17 +406,15 @@ partial void ProcessEnvironmentsListConnectionsResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -453,17 +451,15 @@ partial void ProcessEnvironmentsListConnectionsResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.EnvironmentsClient.EnvironmentsRegister.g.cs b/src/libs/Letta/Generated/Letta.EnvironmentsClient.EnvironmentsRegister.g.cs index 05de53ff..2fe5b6e4 100644 --- a/src/libs/Letta/Generated/Letta.EnvironmentsClient.EnvironmentsRegister.g.cs +++ b/src/libs/Letta/Generated/Letta.EnvironmentsClient.EnvironmentsRegister.g.cs @@ -377,18 +377,17 @@ partial void ProcessEnvironmentsRegisterResponseContent( __exception_400 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -422,17 +421,15 @@ partial void ProcessEnvironmentsRegisterResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -469,17 +466,15 @@ partial void ProcessEnvironmentsRegisterResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.EnvironmentsClient.EnvironmentsSendMessage.g.cs b/src/libs/Letta/Generated/Letta.EnvironmentsClient.EnvironmentsSendMessage.g.cs index cfa51e4a..9f1f20c9 100644 --- a/src/libs/Letta/Generated/Letta.EnvironmentsClient.EnvironmentsSendMessage.g.cs +++ b/src/libs/Letta/Generated/Letta.EnvironmentsClient.EnvironmentsSendMessage.g.cs @@ -386,18 +386,17 @@ partial void ProcessEnvironmentsSendMessageResponseContent( __exception_400 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // 404 if ((int)__response.StatusCode == 404) @@ -424,18 +423,17 @@ partial void ProcessEnvironmentsSendMessageResponseContent( __exception_404 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // 503 if ((int)__response.StatusCode == 503) @@ -462,18 +460,17 @@ partial void ProcessEnvironmentsSendMessageResponseContent( __exception_503 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_503 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_503, - statusCode: __response.StatusCode) - { - ResponseBody = __content_503, - ResponseObject = __value_503, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_503, + responseObject: __value_503, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -507,17 +504,15 @@ partial void ProcessEnvironmentsSendMessageResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -554,17 +549,15 @@ partial void ProcessEnvironmentsSendMessageResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.Exceptions.g.cs b/src/libs/Letta/Generated/Letta.Exceptions.g.cs index 9acab235..f9cee609 100644 --- a/src/libs/Letta/Generated/Letta.Exceptions.g.cs +++ b/src/libs/Letta/Generated/Letta.Exceptions.g.cs @@ -12,16 +12,19 @@ public partial class ApiException : global::System.Exception /// The HTTP status code of the response. /// public global::System.Net.HttpStatusCode StatusCode { get; } + /// /// The response body as a string, or null if the body could not be read. /// This is always populated for error responses regardless of the ReadResponseAsString setting. /// For success-path failures (e.g. deserialization errors), the client attempts a best-effort read. /// public string? ResponseBody { get; set; } + /// /// The response headers. /// public global::System.Collections.Generic.Dictionary>? ResponseHeaders { get; set; } + /// /// Initializes a new instance of the class. /// @@ -49,6 +52,103 @@ public ApiException(string message, global::System.Exception? innerException, gl { StatusCode = statusCode; } + + /// + /// Constructs an instance whose runtime type matches the response status code when the typed exception hierarchy is enabled. Always returns a plain when the hierarchy is disabled. + /// + /// The HTTP status code of the response. + /// The error message. + /// An inner exception, when one is available. + /// The response headers; consulted for 429 Retry-After parsing when present. + public static global::Letta.ApiException Create( + global::System.Net.HttpStatusCode statusCode, + string message, + global::System.Exception? innerException = null, + global::System.Collections.Generic.IDictionary>? responseHeaders = null) + { + return new global::Letta.ApiException(message, innerException, statusCode); + } + + /// + /// Convenience overload that constructs an with response body and headers populated. + /// + public static global::Letta.ApiException Create( + global::System.Net.HttpStatusCode statusCode, + string message, + global::System.Exception? innerException, + string? responseBody, + global::System.Collections.Generic.Dictionary>? responseHeaders) + { + var exception = global::Letta.ApiException.Create(statusCode, message, innerException, responseHeaders); + exception.ResponseBody = responseBody; + exception.ResponseHeaders = responseHeaders; + return exception; + } + + /// + /// Parses a Retry-After response header (delta-seconds or HTTP-date) into a . + /// Returns null when the header is missing or unparseable. Public so consumer code that observes + /// directly can recover the value without re-implementing the parser. + /// + public static global::System.TimeSpan? TryParseRetryAfter( + global::System.Collections.Generic.IDictionary>? headers) + { + if (headers == null) + { + return null; + } + + global::System.Collections.Generic.IEnumerable? values = null; + foreach (var entry in headers) + { + if (string.Equals(entry.Key, "Retry-After", global::System.StringComparison.OrdinalIgnoreCase)) + { + values = entry.Value; + break; + } + } + + if (values == null) + { + return null; + } + + string? raw = null; + foreach (var value in values) + { + if (!string.IsNullOrWhiteSpace(value)) + { + raw = value.Trim(); + break; + } + } + + if (string.IsNullOrEmpty(raw)) + { + return null; + } + + if (int.TryParse( + raw, + global::System.Globalization.NumberStyles.Integer, + global::System.Globalization.CultureInfo.InvariantCulture, + out var seconds) && seconds >= 0) + { + return global::System.TimeSpan.FromSeconds(seconds); + } + + if (global::System.DateTimeOffset.TryParse( + raw, + global::System.Globalization.CultureInfo.InvariantCulture, + global::System.Globalization.DateTimeStyles.AssumeUniversal | global::System.Globalization.DateTimeStyles.AdjustToUniversal, + out var when)) + { + var delta = when - global::System.DateTimeOffset.UtcNow; + return delta > global::System.TimeSpan.Zero ? delta : global::System.TimeSpan.Zero; + } + + return null; + } } /// @@ -88,5 +188,39 @@ public ApiException(string message, global::System.Net.HttpStatusCode statusCode public ApiException(string message, global::System.Exception? innerException, global::System.Net.HttpStatusCode statusCode) : base(message, innerException, statusCode) { } + + /// + /// Constructs an whose runtime type matches the response status code when the typed exception hierarchy is enabled. + /// + /// The HTTP status code of the response. + /// The error message. + /// An inner exception, when one is available. + /// The response headers; consulted for 429 Retry-After parsing when present. + public static new global::Letta.ApiException Create( + global::System.Net.HttpStatusCode statusCode, + string message, + global::System.Exception? innerException = null, + global::System.Collections.Generic.IDictionary>? responseHeaders = null) + { + return new global::Letta.ApiException(message, innerException, statusCode); + } + + /// + /// Convenience overload that constructs an with response body, object, and headers populated. + /// + public static global::Letta.ApiException Create( + global::System.Net.HttpStatusCode statusCode, + string message, + global::System.Exception? innerException, + string? responseBody, + T? responseObject, + global::System.Collections.Generic.Dictionary>? responseHeaders) + { + var exception = global::Letta.ApiException.Create(statusCode, message, innerException, responseHeaders); + exception.ResponseBody = responseBody; + exception.ResponseObject = responseObject; + exception.ResponseHeaders = responseHeaders; + return exception; + } } } \ No newline at end of file diff --git a/src/libs/Letta/Generated/Letta.FeedsClient.FeedsBackfillSubscription.g.cs b/src/libs/Letta/Generated/Letta.FeedsClient.FeedsBackfillSubscription.g.cs index 304555cb..54d4acc2 100644 --- a/src/libs/Letta/Generated/Letta.FeedsClient.FeedsBackfillSubscription.g.cs +++ b/src/libs/Letta/Generated/Letta.FeedsClient.FeedsBackfillSubscription.g.cs @@ -395,18 +395,17 @@ partial void ProcessFeedsBackfillSubscriptionResponseContent( __exception_404 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -440,17 +439,15 @@ partial void ProcessFeedsBackfillSubscriptionResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -487,17 +484,15 @@ partial void ProcessFeedsBackfillSubscriptionResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.FeedsClient.FeedsCreateFeed.g.cs b/src/libs/Letta/Generated/Letta.FeedsClient.FeedsCreateFeed.g.cs index c6ed9e91..f53ab77c 100644 --- a/src/libs/Letta/Generated/Letta.FeedsClient.FeedsCreateFeed.g.cs +++ b/src/libs/Letta/Generated/Letta.FeedsClient.FeedsCreateFeed.g.cs @@ -384,17 +384,15 @@ partial void ProcessFeedsCreateFeedResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -431,17 +429,15 @@ partial void ProcessFeedsCreateFeedResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.FeedsClient.FeedsDeleteFeed.g.cs b/src/libs/Letta/Generated/Letta.FeedsClient.FeedsDeleteFeed.g.cs index b985837d..b829493b 100644 --- a/src/libs/Letta/Generated/Letta.FeedsClient.FeedsDeleteFeed.g.cs +++ b/src/libs/Letta/Generated/Letta.FeedsClient.FeedsDeleteFeed.g.cs @@ -393,17 +393,15 @@ partial void ProcessFeedsDeleteFeedResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -440,17 +438,15 @@ partial void ProcessFeedsDeleteFeedResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.FeedsClient.FeedsDeleteSubscription.g.cs b/src/libs/Letta/Generated/Letta.FeedsClient.FeedsDeleteSubscription.g.cs index 8acb8588..679de92d 100644 --- a/src/libs/Letta/Generated/Letta.FeedsClient.FeedsDeleteSubscription.g.cs +++ b/src/libs/Letta/Generated/Letta.FeedsClient.FeedsDeleteSubscription.g.cs @@ -402,17 +402,15 @@ partial void ProcessFeedsDeleteSubscriptionResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -449,17 +447,15 @@ partial void ProcessFeedsDeleteSubscriptionResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.FeedsClient.FeedsGetFeed.g.cs b/src/libs/Letta/Generated/Letta.FeedsClient.FeedsGetFeed.g.cs index 5e5d587d..df181a01 100644 --- a/src/libs/Letta/Generated/Letta.FeedsClient.FeedsGetFeed.g.cs +++ b/src/libs/Letta/Generated/Letta.FeedsClient.FeedsGetFeed.g.cs @@ -373,17 +373,15 @@ partial void ProcessFeedsGetFeedResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -420,17 +418,15 @@ partial void ProcessFeedsGetFeedResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.FeedsClient.FeedsGetMessage.g.cs b/src/libs/Letta/Generated/Letta.FeedsClient.FeedsGetMessage.g.cs index cdc55696..dfc1d5f6 100644 --- a/src/libs/Letta/Generated/Letta.FeedsClient.FeedsGetMessage.g.cs +++ b/src/libs/Letta/Generated/Letta.FeedsClient.FeedsGetMessage.g.cs @@ -375,18 +375,17 @@ partial void ProcessFeedsGetMessageResponseContent( __exception_404 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -420,17 +419,15 @@ partial void ProcessFeedsGetMessageResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -467,17 +464,15 @@ partial void ProcessFeedsGetMessageResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.FeedsClient.FeedsListFeeds.g.cs b/src/libs/Letta/Generated/Letta.FeedsClient.FeedsListFeeds.g.cs index c8dc3a02..3fc298fe 100644 --- a/src/libs/Letta/Generated/Letta.FeedsClient.FeedsListFeeds.g.cs +++ b/src/libs/Letta/Generated/Letta.FeedsClient.FeedsListFeeds.g.cs @@ -406,17 +406,15 @@ partial void ProcessFeedsListFeedsResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -453,17 +451,15 @@ partial void ProcessFeedsListFeedsResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.FeedsClient.FeedsListMessages.g.cs b/src/libs/Letta/Generated/Letta.FeedsClient.FeedsListMessages.g.cs index 47f12fcc..4d4ea797 100644 --- a/src/libs/Letta/Generated/Letta.FeedsClient.FeedsListMessages.g.cs +++ b/src/libs/Letta/Generated/Letta.FeedsClient.FeedsListMessages.g.cs @@ -395,17 +395,15 @@ partial void ProcessFeedsListMessagesResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -442,17 +440,15 @@ partial void ProcessFeedsListMessagesResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.FeedsClient.FeedsListSubscriptionHistory.g.cs b/src/libs/Letta/Generated/Letta.FeedsClient.FeedsListSubscriptionHistory.g.cs index 2d87c074..9da8c646 100644 --- a/src/libs/Letta/Generated/Letta.FeedsClient.FeedsListSubscriptionHistory.g.cs +++ b/src/libs/Letta/Generated/Letta.FeedsClient.FeedsListSubscriptionHistory.g.cs @@ -397,18 +397,17 @@ partial void ProcessFeedsListSubscriptionHistoryResponseContent( __exception_404 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -442,17 +441,15 @@ partial void ProcessFeedsListSubscriptionHistoryResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -489,17 +486,15 @@ partial void ProcessFeedsListSubscriptionHistoryResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.FeedsClient.FeedsListSubscriptions.g.cs b/src/libs/Letta/Generated/Letta.FeedsClient.FeedsListSubscriptions.g.cs index facfcc14..487a51eb 100644 --- a/src/libs/Letta/Generated/Letta.FeedsClient.FeedsListSubscriptions.g.cs +++ b/src/libs/Letta/Generated/Letta.FeedsClient.FeedsListSubscriptions.g.cs @@ -405,17 +405,15 @@ partial void ProcessFeedsListSubscriptionsResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -452,17 +450,15 @@ partial void ProcessFeedsListSubscriptionsResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.FeedsClient.FeedsPublishMessages.g.cs b/src/libs/Letta/Generated/Letta.FeedsClient.FeedsPublishMessages.g.cs index 981e2dd4..aa9ca3da 100644 --- a/src/libs/Letta/Generated/Letta.FeedsClient.FeedsPublishMessages.g.cs +++ b/src/libs/Letta/Generated/Letta.FeedsClient.FeedsPublishMessages.g.cs @@ -393,17 +393,15 @@ partial void ProcessFeedsPublishMessagesResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -440,17 +438,15 @@ partial void ProcessFeedsPublishMessagesResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.FeedsClient.FeedsSubscribeAgent.g.cs b/src/libs/Letta/Generated/Letta.FeedsClient.FeedsSubscribeAgent.g.cs index e0ff4a6d..5e3ba08b 100644 --- a/src/libs/Letta/Generated/Letta.FeedsClient.FeedsSubscribeAgent.g.cs +++ b/src/libs/Letta/Generated/Letta.FeedsClient.FeedsSubscribeAgent.g.cs @@ -386,18 +386,17 @@ partial void ProcessFeedsSubscribeAgentResponseContent( __exception_400 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -431,17 +430,15 @@ partial void ProcessFeedsSubscribeAgentResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -478,17 +475,15 @@ partial void ProcessFeedsSubscribeAgentResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.FeedsClient.FeedsTriggerSubscription.g.cs b/src/libs/Letta/Generated/Letta.FeedsClient.FeedsTriggerSubscription.g.cs index 932fd75c..07089757 100644 --- a/src/libs/Letta/Generated/Letta.FeedsClient.FeedsTriggerSubscription.g.cs +++ b/src/libs/Letta/Generated/Letta.FeedsClient.FeedsTriggerSubscription.g.cs @@ -395,18 +395,17 @@ partial void ProcessFeedsTriggerSubscriptionResponseContent( __exception_404 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -440,17 +439,15 @@ partial void ProcessFeedsTriggerSubscriptionResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -487,17 +484,15 @@ partial void ProcessFeedsTriggerSubscriptionResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.FeedsClient.FeedsUnsubscribeAgent.g.cs b/src/libs/Letta/Generated/Letta.FeedsClient.FeedsUnsubscribeAgent.g.cs index 95df1695..7dd65eea 100644 --- a/src/libs/Letta/Generated/Letta.FeedsClient.FeedsUnsubscribeAgent.g.cs +++ b/src/libs/Letta/Generated/Letta.FeedsClient.FeedsUnsubscribeAgent.g.cs @@ -393,17 +393,15 @@ partial void ProcessFeedsUnsubscribeAgentResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -440,17 +438,15 @@ partial void ProcessFeedsUnsubscribeAgentResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.FeedsClient.FeedsUpdateAllSubscriptionsCron.g.cs b/src/libs/Letta/Generated/Letta.FeedsClient.FeedsUpdateAllSubscriptionsCron.g.cs index bc94a4d2..b62d54e8 100644 --- a/src/libs/Letta/Generated/Letta.FeedsClient.FeedsUpdateAllSubscriptionsCron.g.cs +++ b/src/libs/Letta/Generated/Letta.FeedsClient.FeedsUpdateAllSubscriptionsCron.g.cs @@ -386,18 +386,17 @@ partial void ProcessFeedsUpdateAllSubscriptionsCronResponseContent( __exception_404 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -431,17 +430,15 @@ partial void ProcessFeedsUpdateAllSubscriptionsCronResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -478,17 +475,15 @@ partial void ProcessFeedsUpdateAllSubscriptionsCronResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.FeedsClient.FeedsUpdateSubscription.g.cs b/src/libs/Letta/Generated/Letta.FeedsClient.FeedsUpdateSubscription.g.cs index a230bf41..f8523ffe 100644 --- a/src/libs/Letta/Generated/Letta.FeedsClient.FeedsUpdateSubscription.g.cs +++ b/src/libs/Letta/Generated/Letta.FeedsClient.FeedsUpdateSubscription.g.cs @@ -402,17 +402,15 @@ partial void ProcessFeedsUpdateSubscriptionResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -449,17 +447,15 @@ partial void ProcessFeedsUpdateSubscriptionResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.FoldersClient.CountFolders.g.cs b/src/libs/Letta/Generated/Letta.FoldersClient.CountFolders.g.cs index 4fd9b4ce..35064c74 100644 --- a/src/libs/Letta/Generated/Letta.FoldersClient.CountFolders.g.cs +++ b/src/libs/Letta/Generated/Letta.FoldersClient.CountFolders.g.cs @@ -357,18 +357,17 @@ partial void ProcessCountFoldersResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -402,17 +401,15 @@ partial void ProcessCountFoldersResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -449,17 +446,15 @@ partial void ProcessCountFoldersResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.FoldersClient.CreateFolder.g.cs b/src/libs/Letta/Generated/Letta.FoldersClient.CreateFolder.g.cs index 44fd39e6..fe702a96 100644 --- a/src/libs/Letta/Generated/Letta.FoldersClient.CreateFolder.g.cs +++ b/src/libs/Letta/Generated/Letta.FoldersClient.CreateFolder.g.cs @@ -377,18 +377,17 @@ partial void ProcessCreateFolderResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -422,17 +421,15 @@ partial void ProcessCreateFolderResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -469,17 +466,15 @@ partial void ProcessCreateFolderResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.FoldersClient.DeleteFileFromFolder.g.cs b/src/libs/Letta/Generated/Letta.FoldersClient.DeleteFileFromFolder.g.cs index 339ff147..258f7393 100644 --- a/src/libs/Letta/Generated/Letta.FoldersClient.DeleteFileFromFolder.g.cs +++ b/src/libs/Letta/Generated/Letta.FoldersClient.DeleteFileFromFolder.g.cs @@ -376,18 +376,17 @@ await DeleteFileFromFolderAsResponseAsync( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -414,17 +413,15 @@ await DeleteFileFromFolderAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -452,17 +449,15 @@ await DeleteFileFromFolderAsResponseAsync( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.FoldersClient.DeleteFolder.g.cs b/src/libs/Letta/Generated/Letta.FoldersClient.DeleteFolder.g.cs index 83823480..83bab0fc 100644 --- a/src/libs/Letta/Generated/Letta.FoldersClient.DeleteFolder.g.cs +++ b/src/libs/Letta/Generated/Letta.FoldersClient.DeleteFolder.g.cs @@ -370,18 +370,17 @@ partial void ProcessDeleteFolderResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -413,17 +412,15 @@ partial void ProcessDeleteFolderResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -458,17 +455,15 @@ partial void ProcessDeleteFolderResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.FoldersClient.ListAgentsForFolder.g.cs b/src/libs/Letta/Generated/Letta.FoldersClient.ListAgentsForFolder.g.cs index c73b79a6..73485115 100644 --- a/src/libs/Letta/Generated/Letta.FoldersClient.ListAgentsForFolder.g.cs +++ b/src/libs/Letta/Generated/Letta.FoldersClient.ListAgentsForFolder.g.cs @@ -448,18 +448,17 @@ partial void ProcessListAgentsForFolderResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -493,17 +492,15 @@ partial void ProcessListAgentsForFolderResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -540,17 +537,15 @@ partial void ProcessListAgentsForFolderResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.FoldersClient.ListFilesForFolder.g.cs b/src/libs/Letta/Generated/Letta.FoldersClient.ListFilesForFolder.g.cs index bf94f131..d10d62d0 100644 --- a/src/libs/Letta/Generated/Letta.FoldersClient.ListFilesForFolder.g.cs +++ b/src/libs/Letta/Generated/Letta.FoldersClient.ListFilesForFolder.g.cs @@ -464,18 +464,17 @@ partial void ProcessListFilesForFolderResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -509,17 +508,15 @@ partial void ProcessListFilesForFolderResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -556,17 +553,15 @@ partial void ProcessListFilesForFolderResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.FoldersClient.ListFolderPassages.g.cs b/src/libs/Letta/Generated/Letta.FoldersClient.ListFolderPassages.g.cs index 3bd65fba..89438ef4 100644 --- a/src/libs/Letta/Generated/Letta.FoldersClient.ListFolderPassages.g.cs +++ b/src/libs/Letta/Generated/Letta.FoldersClient.ListFolderPassages.g.cs @@ -448,18 +448,17 @@ partial void ProcessListFolderPassagesResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -493,17 +492,15 @@ partial void ProcessListFolderPassagesResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -540,17 +537,15 @@ partial void ProcessListFolderPassagesResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.FoldersClient.ListFolders.g.cs b/src/libs/Letta/Generated/Letta.FoldersClient.ListFolders.g.cs index ac0c481e..9ec2b30d 100644 --- a/src/libs/Letta/Generated/Letta.FoldersClient.ListFolders.g.cs +++ b/src/libs/Letta/Generated/Letta.FoldersClient.ListFolders.g.cs @@ -449,18 +449,17 @@ partial void ProcessListFoldersResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -494,17 +493,15 @@ partial void ProcessListFoldersResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -541,17 +538,15 @@ partial void ProcessListFoldersResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.FoldersClient.ModifyFolder.g.cs b/src/libs/Letta/Generated/Letta.FoldersClient.ModifyFolder.g.cs index fc32b371..cc5ac6da 100644 --- a/src/libs/Letta/Generated/Letta.FoldersClient.ModifyFolder.g.cs +++ b/src/libs/Letta/Generated/Letta.FoldersClient.ModifyFolder.g.cs @@ -390,18 +390,17 @@ partial void ProcessModifyFolderResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -435,17 +434,15 @@ partial void ProcessModifyFolderResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -482,17 +479,15 @@ partial void ProcessModifyFolderResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.FoldersClient.RetrieveFile.g.cs b/src/libs/Letta/Generated/Letta.FoldersClient.RetrieveFile.g.cs index fa7965b8..ccb2c72f 100644 --- a/src/libs/Letta/Generated/Letta.FoldersClient.RetrieveFile.g.cs +++ b/src/libs/Letta/Generated/Letta.FoldersClient.RetrieveFile.g.cs @@ -401,18 +401,17 @@ partial void ProcessRetrieveFileResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -446,17 +445,15 @@ partial void ProcessRetrieveFileResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -493,17 +490,15 @@ partial void ProcessRetrieveFileResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.FoldersClient.RetrieveFolder.g.cs b/src/libs/Letta/Generated/Letta.FoldersClient.RetrieveFolder.g.cs index 0170b881..1b1a307e 100644 --- a/src/libs/Letta/Generated/Letta.FoldersClient.RetrieveFolder.g.cs +++ b/src/libs/Letta/Generated/Letta.FoldersClient.RetrieveFolder.g.cs @@ -370,18 +370,17 @@ partial void ProcessRetrieveFolderResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -415,17 +414,15 @@ partial void ProcessRetrieveFolderResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -462,17 +459,15 @@ partial void ProcessRetrieveFolderResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.FoldersClient.RetrieveMetadata.g.cs b/src/libs/Letta/Generated/Letta.FoldersClient.RetrieveMetadata.g.cs index 12059dbc..29fab800 100644 --- a/src/libs/Letta/Generated/Letta.FoldersClient.RetrieveMetadata.g.cs +++ b/src/libs/Letta/Generated/Letta.FoldersClient.RetrieveMetadata.g.cs @@ -383,18 +383,17 @@ partial void ProcessRetrieveMetadataResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -428,17 +427,15 @@ partial void ProcessRetrieveMetadataResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -475,17 +472,15 @@ partial void ProcessRetrieveMetadataResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.FoldersClient.UploadFileToFolder.g.cs b/src/libs/Letta/Generated/Letta.FoldersClient.UploadFileToFolder.g.cs index 40903048..77bbb192 100644 --- a/src/libs/Letta/Generated/Letta.FoldersClient.UploadFileToFolder.g.cs +++ b/src/libs/Letta/Generated/Letta.FoldersClient.UploadFileToFolder.g.cs @@ -478,18 +478,17 @@ request.Filename is null __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -523,17 +522,15 @@ request.Filename is null } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -570,17 +567,15 @@ request.Filename is null { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } @@ -1021,18 +1016,17 @@ request.Filename is null __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -1062,17 +1056,15 @@ request.Filename is null } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -1105,17 +1097,15 @@ request.Filename is null { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } @@ -1513,18 +1503,17 @@ request.Filename is null __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -1558,17 +1547,15 @@ request.Filename is null } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -1605,17 +1592,15 @@ request.Filename is null { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.HealthClient.CheckHealth.g.cs b/src/libs/Letta/Generated/Letta.HealthClient.CheckHealth.g.cs index ecdf90f7..9ede4fea 100644 --- a/src/libs/Letta/Generated/Letta.HealthClient.CheckHealth.g.cs +++ b/src/libs/Letta/Generated/Letta.HealthClient.CheckHealth.g.cs @@ -364,17 +364,15 @@ partial void ProcessCheckHealthResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -411,17 +409,15 @@ partial void ProcessCheckHealthResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.HealthClient.CheckReadiness.g.cs b/src/libs/Letta/Generated/Letta.HealthClient.CheckReadiness.g.cs index d009c487..b813af31 100644 --- a/src/libs/Letta/Generated/Letta.HealthClient.CheckReadiness.g.cs +++ b/src/libs/Letta/Generated/Letta.HealthClient.CheckReadiness.g.cs @@ -364,17 +364,15 @@ partial void ProcessCheckReadinessResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -411,17 +409,15 @@ partial void ProcessCheckReadinessResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.InternalAgentsClient.CountInternalAgents.g.cs b/src/libs/Letta/Generated/Letta.InternalAgentsClient.CountInternalAgents.g.cs index be1e6060..cfd144b8 100644 --- a/src/libs/Letta/Generated/Letta.InternalAgentsClient.CountInternalAgents.g.cs +++ b/src/libs/Letta/Generated/Letta.InternalAgentsClient.CountInternalAgents.g.cs @@ -375,18 +375,17 @@ partial void ProcessCountInternalAgentsResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -420,17 +419,15 @@ partial void ProcessCountInternalAgentsResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -467,17 +464,15 @@ partial void ProcessCountInternalAgentsResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.InternalAgentsClient.ModifyInternalCoreMemoryBlock.g.cs b/src/libs/Letta/Generated/Letta.InternalAgentsClient.ModifyInternalCoreMemoryBlock.g.cs index 31913c81..95fd42d2 100644 --- a/src/libs/Letta/Generated/Letta.InternalAgentsClient.ModifyInternalCoreMemoryBlock.g.cs +++ b/src/libs/Letta/Generated/Letta.InternalAgentsClient.ModifyInternalCoreMemoryBlock.g.cs @@ -399,18 +399,17 @@ partial void ProcessModifyInternalCoreMemoryBlockResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -444,17 +443,15 @@ partial void ProcessModifyInternalCoreMemoryBlockResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -491,17 +488,15 @@ partial void ProcessModifyInternalCoreMemoryBlockResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.InternalBlocksClient.CreateInternalBlock.g.cs b/src/libs/Letta/Generated/Letta.InternalBlocksClient.CreateInternalBlock.g.cs index 5de643fc..5aaa22af 100644 --- a/src/libs/Letta/Generated/Letta.InternalBlocksClient.CreateInternalBlock.g.cs +++ b/src/libs/Letta/Generated/Letta.InternalBlocksClient.CreateInternalBlock.g.cs @@ -375,18 +375,17 @@ partial void ProcessCreateInternalBlockResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -420,17 +419,15 @@ partial void ProcessCreateInternalBlockResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -467,17 +464,15 @@ partial void ProcessCreateInternalBlockResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.InternalBlocksClient.DeleteInternalBlock.g.cs b/src/libs/Letta/Generated/Letta.InternalBlocksClient.DeleteInternalBlock.g.cs index da45480e..02b2bac4 100644 --- a/src/libs/Letta/Generated/Letta.InternalBlocksClient.DeleteInternalBlock.g.cs +++ b/src/libs/Letta/Generated/Letta.InternalBlocksClient.DeleteInternalBlock.g.cs @@ -368,18 +368,17 @@ partial void ProcessDeleteInternalBlockResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -411,17 +410,15 @@ partial void ProcessDeleteInternalBlockResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -456,17 +453,15 @@ partial void ProcessDeleteInternalBlockResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.InternalBlocksClient.ListAgentsForInternalBlock.g.cs b/src/libs/Letta/Generated/Letta.InternalBlocksClient.ListAgentsForInternalBlock.g.cs index 369369b8..937259ac 100644 --- a/src/libs/Letta/Generated/Letta.InternalBlocksClient.ListAgentsForInternalBlock.g.cs +++ b/src/libs/Letta/Generated/Letta.InternalBlocksClient.ListAgentsForInternalBlock.g.cs @@ -482,18 +482,17 @@ partial void ProcessListAgentsForInternalBlockResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -527,17 +526,15 @@ partial void ProcessListAgentsForInternalBlockResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -574,17 +571,15 @@ partial void ProcessListAgentsForInternalBlockResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.InternalBlocksClient.ListInternalBlocks.g.cs b/src/libs/Letta/Generated/Letta.InternalBlocksClient.ListInternalBlocks.g.cs index 8046494a..d4fa9ed2 100644 --- a/src/libs/Letta/Generated/Letta.InternalBlocksClient.ListInternalBlocks.g.cs +++ b/src/libs/Letta/Generated/Letta.InternalBlocksClient.ListInternalBlocks.g.cs @@ -603,18 +603,17 @@ partial void ProcessListInternalBlocksResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -648,17 +647,15 @@ partial void ProcessListInternalBlocksResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -695,17 +692,15 @@ partial void ProcessListInternalBlocksResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.InternalRunsClient.ListInternalRuns.g.cs b/src/libs/Letta/Generated/Letta.InternalRunsClient.ListInternalRuns.g.cs index 27ec1161..42b655de 100644 --- a/src/libs/Letta/Generated/Letta.InternalRunsClient.ListInternalRuns.g.cs +++ b/src/libs/Letta/Generated/Letta.InternalRunsClient.ListInternalRuns.g.cs @@ -709,18 +709,17 @@ partial void ProcessListInternalRunsResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -754,17 +753,15 @@ partial void ProcessListInternalRunsResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -801,17 +798,15 @@ partial void ProcessListInternalRunsResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.InternalTemplatesClient.CreateInternalTemplateAgent.g.cs b/src/libs/Letta/Generated/Letta.InternalTemplatesClient.CreateInternalTemplateAgent.g.cs index 00ac0280..15df4b16 100644 --- a/src/libs/Letta/Generated/Letta.InternalTemplatesClient.CreateInternalTemplateAgent.g.cs +++ b/src/libs/Letta/Generated/Letta.InternalTemplatesClient.CreateInternalTemplateAgent.g.cs @@ -379,18 +379,17 @@ partial void ProcessCreateInternalTemplateAgentResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -424,17 +423,15 @@ partial void ProcessCreateInternalTemplateAgentResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -471,17 +468,15 @@ partial void ProcessCreateInternalTemplateAgentResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.InternalTemplatesClient.CreateInternalTemplateBlock.g.cs b/src/libs/Letta/Generated/Letta.InternalTemplatesClient.CreateInternalTemplateBlock.g.cs index 01eaa72a..fc332f6a 100644 --- a/src/libs/Letta/Generated/Letta.InternalTemplatesClient.CreateInternalTemplateBlock.g.cs +++ b/src/libs/Letta/Generated/Letta.InternalTemplatesClient.CreateInternalTemplateBlock.g.cs @@ -377,18 +377,17 @@ partial void ProcessCreateInternalTemplateBlockResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -422,17 +421,15 @@ partial void ProcessCreateInternalTemplateBlockResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -469,17 +466,15 @@ partial void ProcessCreateInternalTemplateBlockResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.InternalTemplatesClient.CreateInternalTemplateBlocksBatch.g.cs b/src/libs/Letta/Generated/Letta.InternalTemplatesClient.CreateInternalTemplateBlocksBatch.g.cs index 4246f3f3..5ba93096 100644 --- a/src/libs/Letta/Generated/Letta.InternalTemplatesClient.CreateInternalTemplateBlocksBatch.g.cs +++ b/src/libs/Letta/Generated/Letta.InternalTemplatesClient.CreateInternalTemplateBlocksBatch.g.cs @@ -377,18 +377,17 @@ partial void ProcessCreateInternalTemplateBlocksBatchResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -422,17 +421,15 @@ partial void ProcessCreateInternalTemplateBlocksBatchResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -469,17 +466,15 @@ partial void ProcessCreateInternalTemplateBlocksBatchResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.InternalTemplatesClient.CreateInternalTemplateGroup.g.cs b/src/libs/Letta/Generated/Letta.InternalTemplatesClient.CreateInternalTemplateGroup.g.cs index a0f01572..d122cef5 100644 --- a/src/libs/Letta/Generated/Letta.InternalTemplatesClient.CreateInternalTemplateGroup.g.cs +++ b/src/libs/Letta/Generated/Letta.InternalTemplatesClient.CreateInternalTemplateGroup.g.cs @@ -379,18 +379,17 @@ partial void ProcessCreateInternalTemplateGroupResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -424,17 +423,15 @@ partial void ProcessCreateInternalTemplateGroupResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -471,17 +468,15 @@ partial void ProcessCreateInternalTemplateGroupResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.InternalTemplatesClient.DeleteDeployment.g.cs b/src/libs/Letta/Generated/Letta.InternalTemplatesClient.DeleteDeployment.g.cs index 8b436401..f042b5b4 100644 --- a/src/libs/Letta/Generated/Letta.InternalTemplatesClient.DeleteDeployment.g.cs +++ b/src/libs/Letta/Generated/Letta.InternalTemplatesClient.DeleteDeployment.g.cs @@ -368,18 +368,17 @@ partial void ProcessDeleteDeploymentResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -413,17 +412,15 @@ partial void ProcessDeleteDeploymentResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -460,17 +457,15 @@ partial void ProcessDeleteDeploymentResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.InternalTemplatesClient.ListDeploymentEntities.g.cs b/src/libs/Letta/Generated/Letta.InternalTemplatesClient.ListDeploymentEntities.g.cs index 7180031e..f2daee6e 100644 --- a/src/libs/Letta/Generated/Letta.InternalTemplatesClient.ListDeploymentEntities.g.cs +++ b/src/libs/Letta/Generated/Letta.InternalTemplatesClient.ListDeploymentEntities.g.cs @@ -384,18 +384,17 @@ partial void ProcessListDeploymentEntitiesResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -429,17 +428,15 @@ partial void ProcessListDeploymentEntitiesResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -476,17 +473,15 @@ partial void ProcessListDeploymentEntitiesResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.JobsClient.CancelJob.g.cs b/src/libs/Letta/Generated/Letta.JobsClient.CancelJob.g.cs index ba5e025b..6d856a5f 100644 --- a/src/libs/Letta/Generated/Letta.JobsClient.CancelJob.g.cs +++ b/src/libs/Letta/Generated/Letta.JobsClient.CancelJob.g.cs @@ -374,18 +374,17 @@ partial void ProcessCancelJobResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -419,17 +418,15 @@ partial void ProcessCancelJobResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -466,17 +463,15 @@ partial void ProcessCancelJobResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.JobsClient.DeleteJob.g.cs b/src/libs/Letta/Generated/Letta.JobsClient.DeleteJob.g.cs index fbb463ca..8523bf29 100644 --- a/src/libs/Letta/Generated/Letta.JobsClient.DeleteJob.g.cs +++ b/src/libs/Letta/Generated/Letta.JobsClient.DeleteJob.g.cs @@ -370,18 +370,17 @@ partial void ProcessDeleteJobResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -415,17 +414,15 @@ partial void ProcessDeleteJobResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -462,17 +459,15 @@ partial void ProcessDeleteJobResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.JobsClient.ListJobs.g.cs b/src/libs/Letta/Generated/Letta.JobsClient.ListJobs.g.cs index 1085eb3c..0df21538 100644 --- a/src/libs/Letta/Generated/Letta.JobsClient.ListJobs.g.cs +++ b/src/libs/Letta/Generated/Letta.JobsClient.ListJobs.g.cs @@ -483,18 +483,17 @@ partial void ProcessListJobsResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -528,17 +527,15 @@ partial void ProcessListJobsResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -575,17 +572,15 @@ partial void ProcessListJobsResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.JobsClient.RetrieveJob.g.cs b/src/libs/Letta/Generated/Letta.JobsClient.RetrieveJob.g.cs index bcf2a3c4..74498600 100644 --- a/src/libs/Letta/Generated/Letta.JobsClient.RetrieveJob.g.cs +++ b/src/libs/Letta/Generated/Letta.JobsClient.RetrieveJob.g.cs @@ -370,18 +370,17 @@ partial void ProcessRetrieveJobResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -415,17 +414,15 @@ partial void ProcessRetrieveJobResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -462,17 +459,15 @@ partial void ProcessRetrieveJobResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.McpServersClient.McpConnectMcpServer.g.cs b/src/libs/Letta/Generated/Letta.McpServersClient.McpConnectMcpServer.g.cs index fff270c7..67978a13 100644 --- a/src/libs/Letta/Generated/Letta.McpServersClient.McpConnectMcpServer.g.cs +++ b/src/libs/Letta/Generated/Letta.McpServersClient.McpConnectMcpServer.g.cs @@ -368,18 +368,17 @@ partial void ProcessMcpConnectMcpServerResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -411,17 +410,15 @@ partial void ProcessMcpConnectMcpServerResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -456,17 +453,15 @@ partial void ProcessMcpConnectMcpServerResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.McpServersClient.McpCreateMcpServer.g.cs b/src/libs/Letta/Generated/Letta.McpServersClient.McpCreateMcpServer.g.cs index 1b1f4990..cd4a5fb0 100644 --- a/src/libs/Letta/Generated/Letta.McpServersClient.McpCreateMcpServer.g.cs +++ b/src/libs/Letta/Generated/Letta.McpServersClient.McpCreateMcpServer.g.cs @@ -377,18 +377,17 @@ partial void ProcessMcpCreateMcpServerResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -422,17 +421,15 @@ partial void ProcessMcpCreateMcpServerResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -469,17 +466,15 @@ partial void ProcessMcpCreateMcpServerResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.McpServersClient.McpDeleteMcpServer.g.cs b/src/libs/Letta/Generated/Letta.McpServersClient.McpDeleteMcpServer.g.cs index a3e1d269..ce851648 100644 --- a/src/libs/Letta/Generated/Letta.McpServersClient.McpDeleteMcpServer.g.cs +++ b/src/libs/Letta/Generated/Letta.McpServersClient.McpDeleteMcpServer.g.cs @@ -359,18 +359,17 @@ await McpDeleteMcpServerAsResponseAsync( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -397,17 +396,15 @@ await McpDeleteMcpServerAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -435,17 +432,15 @@ await McpDeleteMcpServerAsResponseAsync( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.McpServersClient.McpListMcpServers.g.cs b/src/libs/Letta/Generated/Letta.McpServersClient.McpListMcpServers.g.cs index 1a1457a4..56d96212 100644 --- a/src/libs/Letta/Generated/Letta.McpServersClient.McpListMcpServers.g.cs +++ b/src/libs/Letta/Generated/Letta.McpServersClient.McpListMcpServers.g.cs @@ -357,18 +357,17 @@ partial void ProcessMcpListMcpServersResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -402,17 +401,15 @@ partial void ProcessMcpListMcpServersResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -449,17 +446,15 @@ partial void ProcessMcpListMcpServersResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.McpServersClient.McpListToolsForMcpServer.g.cs b/src/libs/Letta/Generated/Letta.McpServersClient.McpListToolsForMcpServer.g.cs index ae18e656..9fa6a8ec 100644 --- a/src/libs/Letta/Generated/Letta.McpServersClient.McpListToolsForMcpServer.g.cs +++ b/src/libs/Letta/Generated/Letta.McpServersClient.McpListToolsForMcpServer.g.cs @@ -366,18 +366,17 @@ partial void ProcessMcpListToolsForMcpServerResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -411,17 +410,15 @@ partial void ProcessMcpListToolsForMcpServerResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -458,17 +455,15 @@ partial void ProcessMcpListToolsForMcpServerResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.McpServersClient.McpRefreshMcpServerTools.g.cs b/src/libs/Letta/Generated/Letta.McpServersClient.McpRefreshMcpServerTools.g.cs index ea249fda..9da6a89c 100644 --- a/src/libs/Letta/Generated/Letta.McpServersClient.McpRefreshMcpServerTools.g.cs +++ b/src/libs/Letta/Generated/Letta.McpServersClient.McpRefreshMcpServerTools.g.cs @@ -388,18 +388,17 @@ partial void ProcessMcpRefreshMcpServerToolsResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -431,17 +430,15 @@ partial void ProcessMcpRefreshMcpServerToolsResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -476,17 +473,15 @@ partial void ProcessMcpRefreshMcpServerToolsResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.McpServersClient.McpRetrieveMcpServer.g.cs b/src/libs/Letta/Generated/Letta.McpServersClient.McpRetrieveMcpServer.g.cs index dbfb54b7..56105025 100644 --- a/src/libs/Letta/Generated/Letta.McpServersClient.McpRetrieveMcpServer.g.cs +++ b/src/libs/Letta/Generated/Letta.McpServersClient.McpRetrieveMcpServer.g.cs @@ -366,18 +366,17 @@ partial void ProcessMcpRetrieveMcpServerResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -411,17 +410,15 @@ partial void ProcessMcpRetrieveMcpServerResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -458,17 +455,15 @@ partial void ProcessMcpRetrieveMcpServerResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.McpServersClient.McpRetrieveMcpTool.g.cs b/src/libs/Letta/Generated/Letta.McpServersClient.McpRetrieveMcpTool.g.cs index 2343a0b3..d06f1a14 100644 --- a/src/libs/Letta/Generated/Letta.McpServersClient.McpRetrieveMcpTool.g.cs +++ b/src/libs/Letta/Generated/Letta.McpServersClient.McpRetrieveMcpTool.g.cs @@ -375,18 +375,17 @@ partial void ProcessMcpRetrieveMcpToolResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -420,17 +419,15 @@ partial void ProcessMcpRetrieveMcpToolResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -467,17 +464,15 @@ partial void ProcessMcpRetrieveMcpToolResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.McpServersClient.McpRunTool.g.cs b/src/libs/Letta/Generated/Letta.McpServersClient.McpRunTool.g.cs index 716dab16..18875c84 100644 --- a/src/libs/Letta/Generated/Letta.McpServersClient.McpRunTool.g.cs +++ b/src/libs/Letta/Generated/Letta.McpServersClient.McpRunTool.g.cs @@ -397,18 +397,17 @@ partial void ProcessMcpRunToolResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -442,17 +441,15 @@ partial void ProcessMcpRunToolResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -489,17 +486,15 @@ partial void ProcessMcpRunToolResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.McpServersClient.McpUpdateMcpServer.g.cs b/src/libs/Letta/Generated/Letta.McpServersClient.McpUpdateMcpServer.g.cs index 55d52ce8..853e490c 100644 --- a/src/libs/Letta/Generated/Letta.McpServersClient.McpUpdateMcpServer.g.cs +++ b/src/libs/Letta/Generated/Letta.McpServersClient.McpUpdateMcpServer.g.cs @@ -386,18 +386,17 @@ partial void ProcessMcpUpdateMcpServerResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -431,17 +430,15 @@ partial void ProcessMcpUpdateMcpServerResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -478,17 +475,15 @@ partial void ProcessMcpUpdateMcpServerResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.MemoryFilesClient.MemoryFilesGetFileHistory.g.cs b/src/libs/Letta/Generated/Letta.MemoryFilesClient.MemoryFilesGetFileHistory.g.cs index 19deaf93..db6b5108 100644 --- a/src/libs/Letta/Generated/Letta.MemoryFilesClient.MemoryFilesGetFileHistory.g.cs +++ b/src/libs/Letta/Generated/Letta.MemoryFilesClient.MemoryFilesGetFileHistory.g.cs @@ -388,18 +388,17 @@ partial void ProcessMemoryFilesGetFileHistoryResponseContent( __exception_404 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // 501 if ((int)__response.StatusCode == 501) @@ -426,18 +425,17 @@ partial void ProcessMemoryFilesGetFileHistoryResponseContent( __exception_501 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_501 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_501, - statusCode: __response.StatusCode) - { - ResponseBody = __content_501, - ResponseObject = __value_501, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_501, + responseObject: __value_501, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -471,17 +469,15 @@ partial void ProcessMemoryFilesGetFileHistoryResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -518,17 +514,15 @@ partial void ProcessMemoryFilesGetFileHistoryResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.MemoryFilesClient.MemoryFilesListDirectory.g.cs b/src/libs/Letta/Generated/Letta.MemoryFilesClient.MemoryFilesListDirectory.g.cs index ddb3c93d..f8dc04fe 100644 --- a/src/libs/Letta/Generated/Letta.MemoryFilesClient.MemoryFilesListDirectory.g.cs +++ b/src/libs/Letta/Generated/Letta.MemoryFilesClient.MemoryFilesListDirectory.g.cs @@ -398,18 +398,17 @@ partial void ProcessMemoryFilesListDirectoryResponseContent( __exception_404 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // 501 if ((int)__response.StatusCode == 501) @@ -436,18 +435,17 @@ partial void ProcessMemoryFilesListDirectoryResponseContent( __exception_501 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_501 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_501, - statusCode: __response.StatusCode) - { - ResponseBody = __content_501, - ResponseObject = __value_501, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_501, + responseObject: __value_501, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -481,17 +479,15 @@ partial void ProcessMemoryFilesListDirectoryResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -528,17 +524,15 @@ partial void ProcessMemoryFilesListDirectoryResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.MemoryFilesClient.MemoryFilesReadFileContent.g.cs b/src/libs/Letta/Generated/Letta.MemoryFilesClient.MemoryFilesReadFileContent.g.cs index 3bf830e2..998247be 100644 --- a/src/libs/Letta/Generated/Letta.MemoryFilesClient.MemoryFilesReadFileContent.g.cs +++ b/src/libs/Letta/Generated/Letta.MemoryFilesClient.MemoryFilesReadFileContent.g.cs @@ -388,18 +388,17 @@ partial void ProcessMemoryFilesReadFileContentResponseContent( __exception_404 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // 501 if ((int)__response.StatusCode == 501) @@ -426,18 +425,17 @@ partial void ProcessMemoryFilesReadFileContentResponseContent( __exception_501 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_501 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_501, - statusCode: __response.StatusCode) - { - ResponseBody = __content_501, - ResponseObject = __value_501, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_501, + responseObject: __value_501, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -471,17 +469,15 @@ partial void ProcessMemoryFilesReadFileContentResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -518,17 +514,15 @@ partial void ProcessMemoryFilesReadFileContentResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.MessagesClient.CancelBatch.g.cs b/src/libs/Letta/Generated/Letta.MessagesClient.CancelBatch.g.cs index fc9d0842..04c40b9a 100644 --- a/src/libs/Letta/Generated/Letta.MessagesClient.CancelBatch.g.cs +++ b/src/libs/Letta/Generated/Letta.MessagesClient.CancelBatch.g.cs @@ -366,18 +366,17 @@ partial void ProcessCancelBatchResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -409,17 +408,15 @@ partial void ProcessCancelBatchResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -454,17 +451,15 @@ partial void ProcessCancelBatchResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.MessagesClient.CreateBatch.g.cs b/src/libs/Letta/Generated/Letta.MessagesClient.CreateBatch.g.cs index 7113301c..a1f4c1ad 100644 --- a/src/libs/Letta/Generated/Letta.MessagesClient.CreateBatch.g.cs +++ b/src/libs/Letta/Generated/Letta.MessagesClient.CreateBatch.g.cs @@ -381,18 +381,17 @@ partial void ProcessCreateBatchResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -426,17 +425,15 @@ partial void ProcessCreateBatchResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -473,17 +470,15 @@ partial void ProcessCreateBatchResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.MessagesClient.ListAllMessages.g.cs b/src/libs/Letta/Generated/Letta.MessagesClient.ListAllMessages.g.cs index af0c1b8b..b20a00f1 100644 --- a/src/libs/Letta/Generated/Letta.MessagesClient.ListAllMessages.g.cs +++ b/src/libs/Letta/Generated/Letta.MessagesClient.ListAllMessages.g.cs @@ -447,18 +447,17 @@ partial void ProcessListAllMessagesResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -492,17 +491,15 @@ partial void ProcessListAllMessagesResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -539,17 +536,15 @@ partial void ProcessListAllMessagesResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.MessagesClient.ListBatches.g.cs b/src/libs/Letta/Generated/Letta.MessagesClient.ListBatches.g.cs index 94f072fb..949ec7d3 100644 --- a/src/libs/Letta/Generated/Letta.MessagesClient.ListBatches.g.cs +++ b/src/libs/Letta/Generated/Letta.MessagesClient.ListBatches.g.cs @@ -435,18 +435,17 @@ partial void ProcessListBatchesResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -480,17 +479,15 @@ partial void ProcessListBatchesResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -527,17 +524,15 @@ partial void ProcessListBatchesResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.MessagesClient.ListMessagesForBatch.g.cs b/src/libs/Letta/Generated/Letta.MessagesClient.ListMessagesForBatch.g.cs index 00828b97..e58daf66 100644 --- a/src/libs/Letta/Generated/Letta.MessagesClient.ListMessagesForBatch.g.cs +++ b/src/libs/Letta/Generated/Letta.MessagesClient.ListMessagesForBatch.g.cs @@ -458,18 +458,17 @@ partial void ProcessListMessagesForBatchResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -503,17 +502,15 @@ partial void ProcessListMessagesForBatchResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -550,17 +547,15 @@ partial void ProcessListMessagesForBatchResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.MessagesClient.RetrieveBatch.g.cs b/src/libs/Letta/Generated/Letta.MessagesClient.RetrieveBatch.g.cs index 2a45cf20..e2c85507 100644 --- a/src/libs/Letta/Generated/Letta.MessagesClient.RetrieveBatch.g.cs +++ b/src/libs/Letta/Generated/Letta.MessagesClient.RetrieveBatch.g.cs @@ -366,18 +366,17 @@ partial void ProcessRetrieveBatchResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -411,17 +410,15 @@ partial void ProcessRetrieveBatchResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -458,17 +455,15 @@ partial void ProcessRetrieveBatchResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.MessagesClient.RetrieveMessage.g.cs b/src/libs/Letta/Generated/Letta.MessagesClient.RetrieveMessage.g.cs index b7042afc..6ba11bc8 100644 --- a/src/libs/Letta/Generated/Letta.MessagesClient.RetrieveMessage.g.cs +++ b/src/libs/Letta/Generated/Letta.MessagesClient.RetrieveMessage.g.cs @@ -370,18 +370,17 @@ partial void ProcessRetrieveMessageResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -415,17 +414,15 @@ partial void ProcessRetrieveMessageResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -462,17 +459,15 @@ partial void ProcessRetrieveMessageResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.MessagesClient.SearchAllMessages.g.cs b/src/libs/Letta/Generated/Letta.MessagesClient.SearchAllMessages.g.cs index 21480823..c60e536b 100644 --- a/src/libs/Letta/Generated/Letta.MessagesClient.SearchAllMessages.g.cs +++ b/src/libs/Letta/Generated/Letta.MessagesClient.SearchAllMessages.g.cs @@ -381,18 +381,17 @@ partial void ProcessSearchAllMessagesResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -426,17 +425,15 @@ partial void ProcessSearchAllMessagesResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -473,17 +470,15 @@ partial void ProcessSearchAllMessagesResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.MetadataClient.MetadataGetStatus.g.cs b/src/libs/Letta/Generated/Letta.MetadataClient.MetadataGetStatus.g.cs index e5eb3d63..be3f5447 100644 --- a/src/libs/Letta/Generated/Letta.MetadataClient.MetadataGetStatus.g.cs +++ b/src/libs/Letta/Generated/Letta.MetadataClient.MetadataGetStatus.g.cs @@ -362,17 +362,15 @@ partial void ProcessMetadataGetStatusResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -409,17 +407,15 @@ partial void ProcessMetadataGetStatusResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.MetadataClient.MetadataGetUser.g.cs b/src/libs/Letta/Generated/Letta.MetadataClient.MetadataGetUser.g.cs index d470744d..c395c7f5 100644 --- a/src/libs/Letta/Generated/Letta.MetadataClient.MetadataGetUser.g.cs +++ b/src/libs/Letta/Generated/Letta.MetadataClient.MetadataGetUser.g.cs @@ -357,18 +357,17 @@ partial void ProcessMetadataGetUserResponseContent( __exception_404 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -402,17 +401,15 @@ partial void ProcessMetadataGetUserResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -449,17 +446,15 @@ partial void ProcessMetadataGetUserResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.MetadataClient.MetadataRetrieveCurrentBalances.g.cs b/src/libs/Letta/Generated/Letta.MetadataClient.MetadataRetrieveCurrentBalances.g.cs index c1b3df4d..ea2c89b1 100644 --- a/src/libs/Letta/Generated/Letta.MetadataClient.MetadataRetrieveCurrentBalances.g.cs +++ b/src/libs/Letta/Generated/Letta.MetadataClient.MetadataRetrieveCurrentBalances.g.cs @@ -364,17 +364,15 @@ partial void ProcessMetadataRetrieveCurrentBalancesResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -411,17 +409,15 @@ partial void ProcessMetadataRetrieveCurrentBalancesResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.MetadataClient.MetadataSendFeedback.g.cs b/src/libs/Letta/Generated/Letta.MetadataClient.MetadataSendFeedback.g.cs index afdf5b8c..f00addaf 100644 --- a/src/libs/Letta/Generated/Letta.MetadataClient.MetadataSendFeedback.g.cs +++ b/src/libs/Letta/Generated/Letta.MetadataClient.MetadataSendFeedback.g.cs @@ -384,17 +384,15 @@ partial void ProcessMetadataSendFeedbackResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -431,17 +429,15 @@ partial void ProcessMetadataSendFeedbackResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.MetadataClient.MetadataSendTelemetry.g.cs b/src/libs/Letta/Generated/Letta.MetadataClient.MetadataSendTelemetry.g.cs index 86a78caf..9bd8f90d 100644 --- a/src/libs/Letta/Generated/Letta.MetadataClient.MetadataSendTelemetry.g.cs +++ b/src/libs/Letta/Generated/Letta.MetadataClient.MetadataSendTelemetry.g.cs @@ -384,17 +384,15 @@ partial void ProcessMetadataSendTelemetryResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -431,17 +429,15 @@ partial void ProcessMetadataSendTelemetryResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.ModelsClient.ListEmbeddingModels.g.cs b/src/libs/Letta/Generated/Letta.ModelsClient.ListEmbeddingModels.g.cs index 1af75e32..8f7c4b4c 100644 --- a/src/libs/Letta/Generated/Letta.ModelsClient.ListEmbeddingModels.g.cs +++ b/src/libs/Letta/Generated/Letta.ModelsClient.ListEmbeddingModels.g.cs @@ -361,18 +361,17 @@ partial void ProcessListEmbeddingModelsResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -406,17 +405,15 @@ partial void ProcessListEmbeddingModelsResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -453,17 +450,15 @@ partial void ProcessListEmbeddingModelsResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.ModelsClient.ListModels.g.cs b/src/libs/Letta/Generated/Letta.ModelsClient.ListModels.g.cs index 3a7b8669..a6dfcd3e 100644 --- a/src/libs/Letta/Generated/Letta.ModelsClient.ListModels.g.cs +++ b/src/libs/Letta/Generated/Letta.ModelsClient.ListModels.g.cs @@ -393,18 +393,17 @@ partial void ProcessListModelsResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -438,17 +437,15 @@ partial void ProcessListModelsResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -485,17 +482,15 @@ partial void ProcessListModelsResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.ModelsClient.ModelsListEmbeddingModels.g.cs b/src/libs/Letta/Generated/Letta.ModelsClient.ModelsListEmbeddingModels.g.cs index e0d02fe6..c5fea8cb 100644 --- a/src/libs/Letta/Generated/Letta.ModelsClient.ModelsListEmbeddingModels.g.cs +++ b/src/libs/Letta/Generated/Letta.ModelsClient.ModelsListEmbeddingModels.g.cs @@ -348,17 +348,15 @@ await ModelsListEmbeddingModelsAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -386,17 +384,15 @@ await ModelsListEmbeddingModelsAsResponseAsync( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.PassagesClient.SearchPassages.g.cs b/src/libs/Letta/Generated/Letta.PassagesClient.SearchPassages.g.cs index 0519c1a6..36ec46a2 100644 --- a/src/libs/Letta/Generated/Letta.PassagesClient.SearchPassages.g.cs +++ b/src/libs/Letta/Generated/Letta.PassagesClient.SearchPassages.g.cs @@ -389,18 +389,17 @@ partial void ProcessSearchPassagesResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -434,17 +433,15 @@ partial void ProcessSearchPassagesResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -481,17 +478,15 @@ partial void ProcessSearchPassagesResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.PipelinesClient.PipelinesCountPipelines.g.cs b/src/libs/Letta/Generated/Letta.PipelinesClient.PipelinesCountPipelines.g.cs index 4b46382a..4e83e1f9 100644 --- a/src/libs/Letta/Generated/Letta.PipelinesClient.PipelinesCountPipelines.g.cs +++ b/src/libs/Letta/Generated/Letta.PipelinesClient.PipelinesCountPipelines.g.cs @@ -396,17 +396,15 @@ partial void ProcessPipelinesCountPipelinesResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -443,17 +441,15 @@ partial void ProcessPipelinesCountPipelinesResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.PipelinesClient.PipelinesCreatePipeline.g.cs b/src/libs/Letta/Generated/Letta.PipelinesClient.PipelinesCreatePipeline.g.cs index d3ca89b8..402d5e24 100644 --- a/src/libs/Letta/Generated/Letta.PipelinesClient.PipelinesCreatePipeline.g.cs +++ b/src/libs/Letta/Generated/Letta.PipelinesClient.PipelinesCreatePipeline.g.cs @@ -377,18 +377,17 @@ partial void ProcessPipelinesCreatePipelineResponseContent( __exception_400 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -422,17 +421,15 @@ partial void ProcessPipelinesCreatePipelineResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -469,17 +466,15 @@ partial void ProcessPipelinesCreatePipelineResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.PipelinesClient.PipelinesDeletePipeline.g.cs b/src/libs/Letta/Generated/Letta.PipelinesClient.PipelinesDeletePipeline.g.cs index 9de6c923..89359327 100644 --- a/src/libs/Letta/Generated/Letta.PipelinesClient.PipelinesDeletePipeline.g.cs +++ b/src/libs/Letta/Generated/Letta.PipelinesClient.PipelinesDeletePipeline.g.cs @@ -386,18 +386,17 @@ partial void ProcessPipelinesDeletePipelineResponseContent( __exception_404 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -431,17 +430,15 @@ partial void ProcessPipelinesDeletePipelineResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -478,17 +475,15 @@ partial void ProcessPipelinesDeletePipelineResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.PipelinesClient.PipelinesGetPipeline.g.cs b/src/libs/Letta/Generated/Letta.PipelinesClient.PipelinesGetPipeline.g.cs index 58e4d4fb..ffa30eba 100644 --- a/src/libs/Letta/Generated/Letta.PipelinesClient.PipelinesGetPipeline.g.cs +++ b/src/libs/Letta/Generated/Letta.PipelinesClient.PipelinesGetPipeline.g.cs @@ -366,18 +366,17 @@ partial void ProcessPipelinesGetPipelineResponseContent( __exception_404 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -411,17 +410,15 @@ partial void ProcessPipelinesGetPipelineResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -458,17 +455,15 @@ partial void ProcessPipelinesGetPipelineResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.PipelinesClient.PipelinesListPipelineSyncHistory.g.cs b/src/libs/Letta/Generated/Letta.PipelinesClient.PipelinesListPipelineSyncHistory.g.cs index 97e26323..f739b0c7 100644 --- a/src/libs/Letta/Generated/Letta.PipelinesClient.PipelinesListPipelineSyncHistory.g.cs +++ b/src/libs/Letta/Generated/Letta.PipelinesClient.PipelinesListPipelineSyncHistory.g.cs @@ -366,18 +366,17 @@ partial void ProcessPipelinesListPipelineSyncHistoryResponseContent( __exception_404 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -411,17 +410,15 @@ partial void ProcessPipelinesListPipelineSyncHistoryResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -458,17 +455,15 @@ partial void ProcessPipelinesListPipelineSyncHistoryResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.PipelinesClient.PipelinesListPipelines.g.cs b/src/libs/Letta/Generated/Letta.PipelinesClient.PipelinesListPipelines.g.cs index c98178d4..ebb30e15 100644 --- a/src/libs/Letta/Generated/Letta.PipelinesClient.PipelinesListPipelines.g.cs +++ b/src/libs/Letta/Generated/Letta.PipelinesClient.PipelinesListPipelines.g.cs @@ -416,17 +416,15 @@ partial void ProcessPipelinesListPipelinesResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -463,17 +461,15 @@ partial void ProcessPipelinesListPipelinesResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.PipelinesClient.PipelinesPreviewPipeline.g.cs b/src/libs/Letta/Generated/Letta.PipelinesClient.PipelinesPreviewPipeline.g.cs index 62f3138f..f71e7440 100644 --- a/src/libs/Letta/Generated/Letta.PipelinesClient.PipelinesPreviewPipeline.g.cs +++ b/src/libs/Letta/Generated/Letta.PipelinesClient.PipelinesPreviewPipeline.g.cs @@ -377,18 +377,17 @@ partial void ProcessPipelinesPreviewPipelineResponseContent( __exception_400 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -422,17 +421,15 @@ partial void ProcessPipelinesPreviewPipelineResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -469,17 +466,15 @@ partial void ProcessPipelinesPreviewPipelineResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.PipelinesClient.PipelinesSyncPipeline.g.cs b/src/libs/Letta/Generated/Letta.PipelinesClient.PipelinesSyncPipeline.g.cs index 9f6f8ab5..3e8dae05 100644 --- a/src/libs/Letta/Generated/Letta.PipelinesClient.PipelinesSyncPipeline.g.cs +++ b/src/libs/Letta/Generated/Letta.PipelinesClient.PipelinesSyncPipeline.g.cs @@ -386,18 +386,17 @@ partial void ProcessPipelinesSyncPipelineResponseContent( __exception_400 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // 404 if ((int)__response.StatusCode == 404) @@ -424,18 +423,17 @@ partial void ProcessPipelinesSyncPipelineResponseContent( __exception_404 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -469,17 +467,15 @@ partial void ProcessPipelinesSyncPipelineResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -516,17 +512,15 @@ partial void ProcessPipelinesSyncPipelineResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.PipelinesClient.PipelinesUpdatePipeline.g.cs b/src/libs/Letta/Generated/Letta.PipelinesClient.PipelinesUpdatePipeline.g.cs index 1dd1c241..d73c3b43 100644 --- a/src/libs/Letta/Generated/Letta.PipelinesClient.PipelinesUpdatePipeline.g.cs +++ b/src/libs/Letta/Generated/Letta.PipelinesClient.PipelinesUpdatePipeline.g.cs @@ -386,18 +386,17 @@ partial void ProcessPipelinesUpdatePipelineResponseContent( __exception_404 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -431,17 +430,15 @@ partial void ProcessPipelinesUpdatePipelineResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -478,17 +475,15 @@ partial void ProcessPipelinesUpdatePipelineResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.PipelinesClient.PipelinesUpdatePipelineProducerConfig.g.cs b/src/libs/Letta/Generated/Letta.PipelinesClient.PipelinesUpdatePipelineProducerConfig.g.cs index 5444f14b..de262726 100644 --- a/src/libs/Letta/Generated/Letta.PipelinesClient.PipelinesUpdatePipelineProducerConfig.g.cs +++ b/src/libs/Letta/Generated/Letta.PipelinesClient.PipelinesUpdatePipelineProducerConfig.g.cs @@ -386,18 +386,17 @@ partial void ProcessPipelinesUpdatePipelineProducerConfigResponseContent( __exception_400 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // 404 if ((int)__response.StatusCode == 404) @@ -424,18 +423,17 @@ partial void ProcessPipelinesUpdatePipelineProducerConfigResponseContent( __exception_404 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -469,17 +467,15 @@ partial void ProcessPipelinesUpdatePipelineProducerConfigResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -516,17 +512,15 @@ partial void ProcessPipelinesUpdatePipelineProducerConfigResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.ProjectsClient.ProjectsCreateProject.g.cs b/src/libs/Letta/Generated/Letta.ProjectsClient.ProjectsCreateProject.g.cs index 869b33a2..be00fa78 100644 --- a/src/libs/Letta/Generated/Letta.ProjectsClient.ProjectsCreateProject.g.cs +++ b/src/libs/Letta/Generated/Letta.ProjectsClient.ProjectsCreateProject.g.cs @@ -384,17 +384,15 @@ partial void ProcessProjectsCreateProjectResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -431,17 +429,15 @@ partial void ProcessProjectsCreateProjectResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.ProjectsClient.ProjectsDeleteProject.g.cs b/src/libs/Letta/Generated/Letta.ProjectsClient.ProjectsDeleteProject.g.cs index 60da4763..fce7d0d2 100644 --- a/src/libs/Letta/Generated/Letta.ProjectsClient.ProjectsDeleteProject.g.cs +++ b/src/libs/Letta/Generated/Letta.ProjectsClient.ProjectsDeleteProject.g.cs @@ -393,17 +393,15 @@ partial void ProcessProjectsDeleteProjectResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -440,17 +438,15 @@ partial void ProcessProjectsDeleteProjectResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.ProjectsClient.ProjectsListProjects.g.cs b/src/libs/Letta/Generated/Letta.ProjectsClient.ProjectsListProjects.g.cs index 0b06d8db..eca39978 100644 --- a/src/libs/Letta/Generated/Letta.ProjectsClient.ProjectsListProjects.g.cs +++ b/src/libs/Letta/Generated/Letta.ProjectsClient.ProjectsListProjects.g.cs @@ -396,17 +396,15 @@ partial void ProcessProjectsListProjectsResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -443,17 +441,15 @@ partial void ProcessProjectsListProjectsResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.ProvidersClient.CheckExistingProvider.g.cs b/src/libs/Letta/Generated/Letta.ProvidersClient.CheckExistingProvider.g.cs index 2c81e259..6435d7b5 100644 --- a/src/libs/Letta/Generated/Letta.ProvidersClient.CheckExistingProvider.g.cs +++ b/src/libs/Letta/Generated/Letta.ProvidersClient.CheckExistingProvider.g.cs @@ -370,18 +370,17 @@ partial void ProcessCheckExistingProviderResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -413,17 +412,15 @@ partial void ProcessCheckExistingProviderResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -458,17 +455,15 @@ partial void ProcessCheckExistingProviderResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.ProvidersClient.CheckProvider.g.cs b/src/libs/Letta/Generated/Letta.ProvidersClient.CheckProvider.g.cs index 733f2c66..ab1e8679 100644 --- a/src/libs/Letta/Generated/Letta.ProvidersClient.CheckProvider.g.cs +++ b/src/libs/Letta/Generated/Letta.ProvidersClient.CheckProvider.g.cs @@ -377,18 +377,17 @@ partial void ProcessCheckProviderResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -420,17 +419,15 @@ partial void ProcessCheckProviderResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -465,17 +462,15 @@ partial void ProcessCheckProviderResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.ProvidersClient.CreateProvider.g.cs b/src/libs/Letta/Generated/Letta.ProvidersClient.CreateProvider.g.cs index 579a12d4..77b535af 100644 --- a/src/libs/Letta/Generated/Letta.ProvidersClient.CreateProvider.g.cs +++ b/src/libs/Letta/Generated/Letta.ProvidersClient.CreateProvider.g.cs @@ -377,18 +377,17 @@ partial void ProcessCreateProviderResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -422,17 +421,15 @@ partial void ProcessCreateProviderResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -469,17 +466,15 @@ partial void ProcessCreateProviderResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.ProvidersClient.DeleteProvider.g.cs b/src/libs/Letta/Generated/Letta.ProvidersClient.DeleteProvider.g.cs index db83323f..401b4640 100644 --- a/src/libs/Letta/Generated/Letta.ProvidersClient.DeleteProvider.g.cs +++ b/src/libs/Letta/Generated/Letta.ProvidersClient.DeleteProvider.g.cs @@ -370,18 +370,17 @@ partial void ProcessDeleteProviderResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -413,17 +412,15 @@ partial void ProcessDeleteProviderResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -458,17 +455,15 @@ partial void ProcessDeleteProviderResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.ProvidersClient.ListProviders.g.cs b/src/libs/Letta/Generated/Letta.ProvidersClient.ListProviders.g.cs index 8cf7b74e..bf078cfa 100644 --- a/src/libs/Letta/Generated/Letta.ProvidersClient.ListProviders.g.cs +++ b/src/libs/Letta/Generated/Letta.ProvidersClient.ListProviders.g.cs @@ -463,18 +463,17 @@ partial void ProcessListProvidersResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -508,17 +507,15 @@ partial void ProcessListProvidersResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -555,17 +552,15 @@ partial void ProcessListProvidersResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.ProvidersClient.ModifyProvider.g.cs b/src/libs/Letta/Generated/Letta.ProvidersClient.ModifyProvider.g.cs index c8a1ebd6..c4dd1877 100644 --- a/src/libs/Letta/Generated/Letta.ProvidersClient.ModifyProvider.g.cs +++ b/src/libs/Letta/Generated/Letta.ProvidersClient.ModifyProvider.g.cs @@ -390,18 +390,17 @@ partial void ProcessModifyProviderResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -435,17 +434,15 @@ partial void ProcessModifyProviderResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -482,17 +479,15 @@ partial void ProcessModifyProviderResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.ProvidersClient.RefreshProviderModels.g.cs b/src/libs/Letta/Generated/Letta.ProvidersClient.RefreshProviderModels.g.cs index e7a79a41..682907c6 100644 --- a/src/libs/Letta/Generated/Letta.ProvidersClient.RefreshProviderModels.g.cs +++ b/src/libs/Letta/Generated/Letta.ProvidersClient.RefreshProviderModels.g.cs @@ -372,18 +372,17 @@ partial void ProcessRefreshProviderModelsResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -417,17 +416,15 @@ partial void ProcessRefreshProviderModelsResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -464,17 +461,15 @@ partial void ProcessRefreshProviderModelsResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.ProvidersClient.RetrieveProvider.g.cs b/src/libs/Letta/Generated/Letta.ProvidersClient.RetrieveProvider.g.cs index 9f8b9921..c1e6f4b8 100644 --- a/src/libs/Letta/Generated/Letta.ProvidersClient.RetrieveProvider.g.cs +++ b/src/libs/Letta/Generated/Letta.ProvidersClient.RetrieveProvider.g.cs @@ -370,18 +370,17 @@ partial void ProcessRetrieveProviderResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -415,17 +414,15 @@ partial void ProcessRetrieveProviderResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -462,17 +459,15 @@ partial void ProcessRetrieveProviderResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.RunsClient.DeleteRun.g.cs b/src/libs/Letta/Generated/Letta.RunsClient.DeleteRun.g.cs index ea3d884b..9c2e8d5b 100644 --- a/src/libs/Letta/Generated/Letta.RunsClient.DeleteRun.g.cs +++ b/src/libs/Letta/Generated/Letta.RunsClient.DeleteRun.g.cs @@ -366,18 +366,17 @@ partial void ProcessDeleteRunResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -409,17 +408,15 @@ partial void ProcessDeleteRunResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -454,17 +451,15 @@ partial void ProcessDeleteRunResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.RunsClient.ListMessagesForRun.g.cs b/src/libs/Letta/Generated/Letta.RunsClient.ListMessagesForRun.g.cs index eaf5a4c6..fb96635a 100644 --- a/src/libs/Letta/Generated/Letta.RunsClient.ListMessagesForRun.g.cs +++ b/src/libs/Letta/Generated/Letta.RunsClient.ListMessagesForRun.g.cs @@ -444,18 +444,17 @@ partial void ProcessListMessagesForRunResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -489,17 +488,15 @@ partial void ProcessListMessagesForRunResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -536,17 +533,15 @@ partial void ProcessListMessagesForRunResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.RunsClient.ListRuns.g.cs b/src/libs/Letta/Generated/Letta.RunsClient.ListRuns.g.cs index 7dc04ba5..8556c9d9 100644 --- a/src/libs/Letta/Generated/Letta.RunsClient.ListRuns.g.cs +++ b/src/libs/Letta/Generated/Letta.RunsClient.ListRuns.g.cs @@ -553,18 +553,17 @@ partial void ProcessListRunsResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -598,17 +597,15 @@ partial void ProcessListRunsResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -645,17 +642,15 @@ partial void ProcessListRunsResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.RunsClient.ListStepsForRun.g.cs b/src/libs/Letta/Generated/Letta.RunsClient.ListStepsForRun.g.cs index 0bc98e94..6acd070b 100644 --- a/src/libs/Letta/Generated/Letta.RunsClient.ListStepsForRun.g.cs +++ b/src/libs/Letta/Generated/Letta.RunsClient.ListStepsForRun.g.cs @@ -444,18 +444,17 @@ partial void ProcessListStepsForRunResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -489,17 +488,15 @@ partial void ProcessListStepsForRunResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -536,17 +533,15 @@ partial void ProcessListStepsForRunResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.RunsClient.RetrieveMetricsForRun.g.cs b/src/libs/Letta/Generated/Letta.RunsClient.RetrieveMetricsForRun.g.cs index 2aeed031..8888837f 100644 --- a/src/libs/Letta/Generated/Letta.RunsClient.RetrieveMetricsForRun.g.cs +++ b/src/libs/Letta/Generated/Letta.RunsClient.RetrieveMetricsForRun.g.cs @@ -366,18 +366,17 @@ partial void ProcessRetrieveMetricsForRunResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -411,17 +410,15 @@ partial void ProcessRetrieveMetricsForRunResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -458,17 +455,15 @@ partial void ProcessRetrieveMetricsForRunResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.RunsClient.RetrieveRun.g.cs b/src/libs/Letta/Generated/Letta.RunsClient.RetrieveRun.g.cs index bf03a0a6..ada4a02a 100644 --- a/src/libs/Letta/Generated/Letta.RunsClient.RetrieveRun.g.cs +++ b/src/libs/Letta/Generated/Letta.RunsClient.RetrieveRun.g.cs @@ -366,18 +366,17 @@ partial void ProcessRetrieveRunResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -411,17 +410,15 @@ partial void ProcessRetrieveRunResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -458,17 +455,15 @@ partial void ProcessRetrieveRunResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.RunsClient.RetrieveStreamForRun.g.cs b/src/libs/Letta/Generated/Letta.RunsClient.RetrieveStreamForRun.g.cs index b16458bc..aa5e214b 100644 --- a/src/libs/Letta/Generated/Letta.RunsClient.RetrieveStreamForRun.g.cs +++ b/src/libs/Letta/Generated/Letta.RunsClient.RetrieveStreamForRun.g.cs @@ -384,18 +384,17 @@ partial void ProcessRetrieveStreamForRunResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -427,17 +426,15 @@ partial void ProcessRetrieveStreamForRunResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -472,17 +469,15 @@ partial void ProcessRetrieveStreamForRunResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.RunsClient.RetrieveTraceForRun.g.cs b/src/libs/Letta/Generated/Letta.RunsClient.RetrieveTraceForRun.g.cs index 7b061525..2336b4c1 100644 --- a/src/libs/Letta/Generated/Letta.RunsClient.RetrieveTraceForRun.g.cs +++ b/src/libs/Letta/Generated/Letta.RunsClient.RetrieveTraceForRun.g.cs @@ -396,18 +396,17 @@ partial void ProcessRetrieveTraceForRunResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -441,17 +440,15 @@ partial void ProcessRetrieveTraceForRunResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -488,17 +485,15 @@ partial void ProcessRetrieveTraceForRunResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.RunsClient.RetrieveUsageForRun.g.cs b/src/libs/Letta/Generated/Letta.RunsClient.RetrieveUsageForRun.g.cs index 356137f9..b9c0a84e 100644 --- a/src/libs/Letta/Generated/Letta.RunsClient.RetrieveUsageForRun.g.cs +++ b/src/libs/Letta/Generated/Letta.RunsClient.RetrieveUsageForRun.g.cs @@ -366,18 +366,17 @@ partial void ProcessRetrieveUsageForRunResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -411,17 +410,15 @@ partial void ProcessRetrieveUsageForRunResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -458,17 +455,15 @@ partial void ProcessRetrieveUsageForRunResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.SandboxesClient.SandboxesCreateSandbox.g.cs b/src/libs/Letta/Generated/Letta.SandboxesClient.SandboxesCreateSandbox.g.cs index cfae9a74..20e0c1dc 100644 --- a/src/libs/Letta/Generated/Letta.SandboxesClient.SandboxesCreateSandbox.g.cs +++ b/src/libs/Letta/Generated/Letta.SandboxesClient.SandboxesCreateSandbox.g.cs @@ -377,18 +377,17 @@ partial void ProcessSandboxesCreateSandboxResponseContent( __exception_400 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // 500 if ((int)__response.StatusCode == 500) @@ -415,18 +414,17 @@ partial void ProcessSandboxesCreateSandboxResponseContent( __exception_500 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, - statusCode: __response.StatusCode) - { - ResponseBody = __content_500, - ResponseObject = __value_500, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_500, + responseObject: __value_500, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -460,17 +458,15 @@ partial void ProcessSandboxesCreateSandboxResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -507,17 +503,15 @@ partial void ProcessSandboxesCreateSandboxResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.SandboxesClient.SandboxesListSandboxes.g.cs b/src/libs/Letta/Generated/Letta.SandboxesClient.SandboxesListSandboxes.g.cs index 2d31eb64..f57efa86 100644 --- a/src/libs/Letta/Generated/Letta.SandboxesClient.SandboxesListSandboxes.g.cs +++ b/src/libs/Letta/Generated/Letta.SandboxesClient.SandboxesListSandboxes.g.cs @@ -386,17 +386,15 @@ partial void ProcessSandboxesListSandboxesResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -433,17 +431,15 @@ partial void ProcessSandboxesListSandboxesResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.SandboxesClient.SandboxesTerminateSandbox.g.cs b/src/libs/Letta/Generated/Letta.SandboxesClient.SandboxesTerminateSandbox.g.cs index 9d3bb82e..1d61e463 100644 --- a/src/libs/Letta/Generated/Letta.SandboxesClient.SandboxesTerminateSandbox.g.cs +++ b/src/libs/Letta/Generated/Letta.SandboxesClient.SandboxesTerminateSandbox.g.cs @@ -386,18 +386,17 @@ partial void ProcessSandboxesTerminateSandboxResponseContent( __exception_404 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // 500 if ((int)__response.StatusCode == 500) @@ -424,18 +423,17 @@ partial void ProcessSandboxesTerminateSandboxResponseContent( __exception_500 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, - statusCode: __response.StatusCode) - { - ResponseBody = __content_500, - ResponseObject = __value_500, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_500, + responseObject: __value_500, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -469,17 +467,15 @@ partial void ProcessSandboxesTerminateSandboxResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -516,17 +512,15 @@ partial void ProcessSandboxesTerminateSandboxResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.ScheduledMessagesClient.ScheduledMessagesDeleteScheduledMessage.g.cs b/src/libs/Letta/Generated/Letta.ScheduledMessagesClient.ScheduledMessagesDeleteScheduledMessage.g.cs index b5d9add0..989406d1 100644 --- a/src/libs/Letta/Generated/Letta.ScheduledMessagesClient.ScheduledMessagesDeleteScheduledMessage.g.cs +++ b/src/libs/Letta/Generated/Letta.ScheduledMessagesClient.ScheduledMessagesDeleteScheduledMessage.g.cs @@ -402,17 +402,15 @@ partial void ProcessScheduledMessagesDeleteScheduledMessageResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -449,17 +447,15 @@ partial void ProcessScheduledMessagesDeleteScheduledMessageResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.ScheduledMessagesClient.ScheduledMessagesListScheduledMessages.g.cs b/src/libs/Letta/Generated/Letta.ScheduledMessagesClient.ScheduledMessagesListScheduledMessages.g.cs index 44e93b49..4560896f 100644 --- a/src/libs/Letta/Generated/Letta.ScheduledMessagesClient.ScheduledMessagesListScheduledMessages.g.cs +++ b/src/libs/Letta/Generated/Letta.ScheduledMessagesClient.ScheduledMessagesListScheduledMessages.g.cs @@ -395,17 +395,15 @@ partial void ProcessScheduledMessagesListScheduledMessagesResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -442,17 +440,15 @@ partial void ProcessScheduledMessagesListScheduledMessagesResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.ScheduledMessagesClient.ScheduledMessagesRetrieveScheduledMessage.g.cs b/src/libs/Letta/Generated/Letta.ScheduledMessagesClient.ScheduledMessagesRetrieveScheduledMessage.g.cs index 188a260a..83a493e3 100644 --- a/src/libs/Letta/Generated/Letta.ScheduledMessagesClient.ScheduledMessagesRetrieveScheduledMessage.g.cs +++ b/src/libs/Letta/Generated/Letta.ScheduledMessagesClient.ScheduledMessagesRetrieveScheduledMessage.g.cs @@ -382,17 +382,15 @@ partial void ProcessScheduledMessagesRetrieveScheduledMessageResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -429,17 +427,15 @@ partial void ProcessScheduledMessagesRetrieveScheduledMessageResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.ScheduledMessagesClient.ScheduledMessagesScheduleAgentMessage.g.cs b/src/libs/Letta/Generated/Letta.ScheduledMessagesClient.ScheduledMessagesScheduleAgentMessage.g.cs index a5c9b1da..6179cb17 100644 --- a/src/libs/Letta/Generated/Letta.ScheduledMessagesClient.ScheduledMessagesScheduleAgentMessage.g.cs +++ b/src/libs/Letta/Generated/Letta.ScheduledMessagesClient.ScheduledMessagesScheduleAgentMessage.g.cs @@ -393,17 +393,15 @@ partial void ProcessScheduledMessagesScheduleAgentMessageResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -440,17 +438,15 @@ partial void ProcessScheduledMessagesScheduleAgentMessageResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.StepsClient.ListMessagesForStep.g.cs b/src/libs/Letta/Generated/Letta.StepsClient.ListMessagesForStep.g.cs index 50269252..c91e5729 100644 --- a/src/libs/Letta/Generated/Letta.StepsClient.ListMessagesForStep.g.cs +++ b/src/libs/Letta/Generated/Letta.StepsClient.ListMessagesForStep.g.cs @@ -448,18 +448,17 @@ partial void ProcessListMessagesForStepResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -493,17 +492,15 @@ partial void ProcessListMessagesForStepResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -540,17 +537,15 @@ partial void ProcessListMessagesForStepResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.StepsClient.ListSteps.g.cs b/src/libs/Letta/Generated/Letta.StepsClient.ListSteps.g.cs index 606acaa4..f612e1c9 100644 --- a/src/libs/Letta/Generated/Letta.StepsClient.ListSteps.g.cs +++ b/src/libs/Letta/Generated/Letta.StepsClient.ListSteps.g.cs @@ -580,18 +580,17 @@ partial void ProcessListStepsResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -625,17 +624,15 @@ partial void ProcessListStepsResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -672,17 +669,15 @@ partial void ProcessListStepsResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.StepsClient.ModifyFeedbackForStep.g.cs b/src/libs/Letta/Generated/Letta.StepsClient.ModifyFeedbackForStep.g.cs index 02f698ab..89a56632 100644 --- a/src/libs/Letta/Generated/Letta.StepsClient.ModifyFeedbackForStep.g.cs +++ b/src/libs/Letta/Generated/Letta.StepsClient.ModifyFeedbackForStep.g.cs @@ -390,18 +390,17 @@ partial void ProcessModifyFeedbackForStepResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -435,17 +434,15 @@ partial void ProcessModifyFeedbackForStepResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -482,17 +479,15 @@ partial void ProcessModifyFeedbackForStepResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.StepsClient.RetrieveMetricsForStep.g.cs b/src/libs/Letta/Generated/Letta.StepsClient.RetrieveMetricsForStep.g.cs index 5b9cc760..3be28446 100644 --- a/src/libs/Letta/Generated/Letta.StepsClient.RetrieveMetricsForStep.g.cs +++ b/src/libs/Letta/Generated/Letta.StepsClient.RetrieveMetricsForStep.g.cs @@ -370,18 +370,17 @@ partial void ProcessRetrieveMetricsForStepResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -415,17 +414,15 @@ partial void ProcessRetrieveMetricsForStepResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -462,17 +459,15 @@ partial void ProcessRetrieveMetricsForStepResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.StepsClient.RetrieveStep.g.cs b/src/libs/Letta/Generated/Letta.StepsClient.RetrieveStep.g.cs index fcf3bbf5..ab2f6109 100644 --- a/src/libs/Letta/Generated/Letta.StepsClient.RetrieveStep.g.cs +++ b/src/libs/Letta/Generated/Letta.StepsClient.RetrieveStep.g.cs @@ -370,18 +370,17 @@ partial void ProcessRetrieveStepResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -415,17 +414,15 @@ partial void ProcessRetrieveStepResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -462,17 +459,15 @@ partial void ProcessRetrieveStepResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.StepsClient.RetrieveTraceForStep.g.cs b/src/libs/Letta/Generated/Letta.StepsClient.RetrieveTraceForStep.g.cs index c3a4f1cf..ffde8d32 100644 --- a/src/libs/Letta/Generated/Letta.StepsClient.RetrieveTraceForStep.g.cs +++ b/src/libs/Letta/Generated/Letta.StepsClient.RetrieveTraceForStep.g.cs @@ -368,18 +368,17 @@ partial void ProcessRetrieveTraceForStepResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -413,17 +412,15 @@ partial void ProcessRetrieveTraceForStepResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -460,17 +457,15 @@ partial void ProcessRetrieveTraceForStepResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.TagClient.ListTags.g.cs b/src/libs/Letta/Generated/Letta.TagClient.ListTags.g.cs index c982bef1..0aca8bba 100644 --- a/src/libs/Letta/Generated/Letta.TagClient.ListTags.g.cs +++ b/src/libs/Letta/Generated/Letta.TagClient.ListTags.g.cs @@ -465,18 +465,17 @@ partial void ProcessListTagsResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -510,17 +509,15 @@ partial void ProcessListTagsResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -557,17 +554,15 @@ partial void ProcessListTagsResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesCreateAgentsFromTemplate.g.cs b/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesCreateAgentsFromTemplate.g.cs index 10ba5265..37ef179c 100644 --- a/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesCreateAgentsFromTemplate.g.cs +++ b/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesCreateAgentsFromTemplate.g.cs @@ -388,18 +388,17 @@ await TemplatesCreateAgentsFromTemplateAsResponseAsync( __exception_402 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_402 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_402, - statusCode: __response.StatusCode) - { - ResponseBody = __content_402, - ResponseObject = __value_402, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_402, + responseObject: __value_402, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -426,17 +425,15 @@ await TemplatesCreateAgentsFromTemplateAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -464,17 +461,15 @@ await TemplatesCreateAgentsFromTemplateAsResponseAsync( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesCreateAgentsFromTemplateNoProject.g.cs b/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesCreateAgentsFromTemplateNoProject.g.cs index f94248c5..bed8d822 100644 --- a/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesCreateAgentsFromTemplateNoProject.g.cs +++ b/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesCreateAgentsFromTemplateNoProject.g.cs @@ -386,18 +386,17 @@ partial void ProcessTemplatesCreateAgentsFromTemplateNoProjectResponseContent( __exception_402 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_402 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_402, - statusCode: __response.StatusCode) - { - ResponseBody = __content_402, - ResponseObject = __value_402, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_402, + responseObject: __value_402, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -431,17 +430,15 @@ partial void ProcessTemplatesCreateAgentsFromTemplateNoProjectResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -478,17 +475,15 @@ partial void ProcessTemplatesCreateAgentsFromTemplateNoProjectResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesCreateTemplate.g.cs b/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesCreateTemplate.g.cs index 43f467e2..fa85b066 100644 --- a/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesCreateTemplate.g.cs +++ b/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesCreateTemplate.g.cs @@ -384,18 +384,17 @@ partial void ProcessTemplatesCreateTemplateResponseContent( __exception_400 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -429,17 +428,15 @@ partial void ProcessTemplatesCreateTemplateResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -476,17 +473,15 @@ partial void ProcessTemplatesCreateTemplateResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesCreateTemplateNoProject.g.cs b/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesCreateTemplateNoProject.g.cs index 96c4af09..0fc69d3a 100644 --- a/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesCreateTemplateNoProject.g.cs +++ b/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesCreateTemplateNoProject.g.cs @@ -375,18 +375,17 @@ partial void ProcessTemplatesCreateTemplateNoProjectResponseContent( __exception_400 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -420,17 +419,15 @@ partial void ProcessTemplatesCreateTemplateNoProjectResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -467,17 +464,15 @@ partial void ProcessTemplatesCreateTemplateNoProjectResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesDeleteTemplate.g.cs b/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesDeleteTemplate.g.cs index d8e4bbcb..b63c7127 100644 --- a/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesDeleteTemplate.g.cs +++ b/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesDeleteTemplate.g.cs @@ -395,18 +395,17 @@ partial void ProcessTemplatesDeleteTemplateResponseContent( __exception_404 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -440,17 +439,15 @@ partial void ProcessTemplatesDeleteTemplateResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -487,17 +484,15 @@ partial void ProcessTemplatesDeleteTemplateResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesDeleteTemplateNoProject.g.cs b/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesDeleteTemplateNoProject.g.cs index 72f834bb..cab7aa29 100644 --- a/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesDeleteTemplateNoProject.g.cs +++ b/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesDeleteTemplateNoProject.g.cs @@ -386,18 +386,17 @@ partial void ProcessTemplatesDeleteTemplateNoProjectResponseContent( __exception_404 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -431,17 +430,15 @@ partial void ProcessTemplatesDeleteTemplateNoProjectResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -478,17 +475,15 @@ partial void ProcessTemplatesDeleteTemplateNoProjectResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesForkTemplate.g.cs b/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesForkTemplate.g.cs index 38a4b5aa..b92bbb96 100644 --- a/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesForkTemplate.g.cs +++ b/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesForkTemplate.g.cs @@ -395,18 +395,17 @@ partial void ProcessTemplatesForkTemplateResponseContent( __exception_400 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -440,17 +439,15 @@ partial void ProcessTemplatesForkTemplateResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -487,17 +484,15 @@ partial void ProcessTemplatesForkTemplateResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesGetTemplateSnapshot.g.cs b/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesGetTemplateSnapshot.g.cs index 081b2a08..a201cbcc 100644 --- a/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesGetTemplateSnapshot.g.cs +++ b/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesGetTemplateSnapshot.g.cs @@ -382,17 +382,15 @@ partial void ProcessTemplatesGetTemplateSnapshotResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -429,17 +427,15 @@ partial void ProcessTemplatesGetTemplateSnapshotResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesLegacyMigration.g.cs b/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesLegacyMigration.g.cs index 75527257..f2490c16 100644 --- a/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesLegacyMigration.g.cs +++ b/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesLegacyMigration.g.cs @@ -386,18 +386,17 @@ partial void ProcessTemplatesLegacyMigrationResponseContent( __exception_400 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // 404 if ((int)__response.StatusCode == 404) @@ -424,18 +423,17 @@ partial void ProcessTemplatesLegacyMigrationResponseContent( __exception_404 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -469,17 +467,15 @@ partial void ProcessTemplatesLegacyMigrationResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -516,17 +512,15 @@ partial void ProcessTemplatesLegacyMigrationResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesListTemplateVersions.g.cs b/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesListTemplateVersions.g.cs index e2ea6d4a..54efb9ce 100644 --- a/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesListTemplateVersions.g.cs +++ b/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesListTemplateVersions.g.cs @@ -397,18 +397,17 @@ partial void ProcessTemplatesListTemplateVersionsResponseContent( __exception_404 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -442,17 +441,15 @@ partial void ProcessTemplatesListTemplateVersionsResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -489,17 +486,15 @@ partial void ProcessTemplatesListTemplateVersionsResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesListTemplates.g.cs b/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesListTemplates.g.cs index c40d644e..75c90c91 100644 --- a/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesListTemplates.g.cs +++ b/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesListTemplates.g.cs @@ -466,17 +466,15 @@ partial void ProcessTemplatesListTemplatesResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -513,17 +511,15 @@ partial void ProcessTemplatesListTemplatesResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesMigrateDeployment.g.cs b/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesMigrateDeployment.g.cs index ebeb58ab..9776a8d5 100644 --- a/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesMigrateDeployment.g.cs +++ b/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesMigrateDeployment.g.cs @@ -404,18 +404,17 @@ partial void ProcessTemplatesMigrateDeploymentResponseContent( __exception_400 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // 404 if ((int)__response.StatusCode == 404) @@ -442,18 +441,17 @@ partial void ProcessTemplatesMigrateDeploymentResponseContent( __exception_404 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // 500 if ((int)__response.StatusCode == 500) @@ -480,18 +478,17 @@ partial void ProcessTemplatesMigrateDeploymentResponseContent( __exception_500 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, - statusCode: __response.StatusCode) - { - ResponseBody = __content_500, - ResponseObject = __value_500, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_500, + responseObject: __value_500, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -525,17 +522,15 @@ partial void ProcessTemplatesMigrateDeploymentResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -572,17 +567,15 @@ partial void ProcessTemplatesMigrateDeploymentResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesRenameTemplate.g.cs b/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesRenameTemplate.g.cs index 1cdea27f..63fd3ae2 100644 --- a/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesRenameTemplate.g.cs +++ b/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesRenameTemplate.g.cs @@ -395,18 +395,17 @@ partial void ProcessTemplatesRenameTemplateResponseContent( __exception_400 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // 404 if ((int)__response.StatusCode == 404) @@ -433,18 +432,17 @@ partial void ProcessTemplatesRenameTemplateResponseContent( __exception_404 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // 409 if ((int)__response.StatusCode == 409) @@ -471,18 +469,17 @@ partial void ProcessTemplatesRenameTemplateResponseContent( __exception_409 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_409 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_409, - statusCode: __response.StatusCode) - { - ResponseBody = __content_409, - ResponseObject = __value_409, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_409, + responseObject: __value_409, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -516,17 +513,15 @@ partial void ProcessTemplatesRenameTemplateResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -563,17 +558,15 @@ partial void ProcessTemplatesRenameTemplateResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesRollbackTemplate.g.cs b/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesRollbackTemplate.g.cs index 81c38a2a..7ef9154f 100644 --- a/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesRollbackTemplate.g.cs +++ b/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesRollbackTemplate.g.cs @@ -395,18 +395,17 @@ partial void ProcessTemplatesRollbackTemplateResponseContent( __exception_400 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // 404 if ((int)__response.StatusCode == 404) @@ -433,18 +432,17 @@ partial void ProcessTemplatesRollbackTemplateResponseContent( __exception_404 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // 500 if ((int)__response.StatusCode == 500) @@ -471,18 +469,17 @@ partial void ProcessTemplatesRollbackTemplateResponseContent( __exception_500 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, - statusCode: __response.StatusCode) - { - ResponseBody = __content_500, - ResponseObject = __value_500, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_500, + responseObject: __value_500, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -516,17 +513,15 @@ partial void ProcessTemplatesRollbackTemplateResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -563,17 +558,15 @@ partial void ProcessTemplatesRollbackTemplateResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesRollbackTemplateNoProject.g.cs b/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesRollbackTemplateNoProject.g.cs index 37faffda..8f029e52 100644 --- a/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesRollbackTemplateNoProject.g.cs +++ b/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesRollbackTemplateNoProject.g.cs @@ -386,18 +386,17 @@ partial void ProcessTemplatesRollbackTemplateNoProjectResponseContent( __exception_400 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // 404 if ((int)__response.StatusCode == 404) @@ -424,18 +423,17 @@ partial void ProcessTemplatesRollbackTemplateNoProjectResponseContent( __exception_404 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // 500 if ((int)__response.StatusCode == 500) @@ -462,18 +460,17 @@ partial void ProcessTemplatesRollbackTemplateNoProjectResponseContent( __exception_500 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, - statusCode: __response.StatusCode) - { - ResponseBody = __content_500, - ResponseObject = __value_500, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_500, + responseObject: __value_500, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -507,17 +504,15 @@ partial void ProcessTemplatesRollbackTemplateNoProjectResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -554,17 +549,15 @@ partial void ProcessTemplatesRollbackTemplateNoProjectResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesSaveTemplateVersion.g.cs b/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesSaveTemplateVersion.g.cs index 4c01a518..3b2c6eea 100644 --- a/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesSaveTemplateVersion.g.cs +++ b/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesSaveTemplateVersion.g.cs @@ -395,18 +395,17 @@ partial void ProcessTemplatesSaveTemplateVersionResponseContent( __exception_400 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -440,17 +439,15 @@ partial void ProcessTemplatesSaveTemplateVersionResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -487,17 +484,15 @@ partial void ProcessTemplatesSaveTemplateVersionResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesSaveTemplateVersionNoProject.g.cs b/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesSaveTemplateVersionNoProject.g.cs index acce12dd..c8aef1ee 100644 --- a/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesSaveTemplateVersionNoProject.g.cs +++ b/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesSaveTemplateVersionNoProject.g.cs @@ -386,18 +386,17 @@ partial void ProcessTemplatesSaveTemplateVersionNoProjectResponseContent( __exception_400 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -431,17 +430,15 @@ partial void ProcessTemplatesSaveTemplateVersionNoProjectResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -478,17 +475,15 @@ partial void ProcessTemplatesSaveTemplateVersionNoProjectResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesSetCurrentTemplateFromSnapshot.g.cs b/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesSetCurrentTemplateFromSnapshot.g.cs index 7febe274..56154ac3 100644 --- a/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesSetCurrentTemplateFromSnapshot.g.cs +++ b/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesSetCurrentTemplateFromSnapshot.g.cs @@ -395,18 +395,17 @@ partial void ProcessTemplatesSetCurrentTemplateFromSnapshotResponseContent( __exception_400 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // 404 if ((int)__response.StatusCode == 404) @@ -433,18 +432,17 @@ partial void ProcessTemplatesSetCurrentTemplateFromSnapshotResponseContent( __exception_404 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // 500 if ((int)__response.StatusCode == 500) @@ -471,18 +469,17 @@ partial void ProcessTemplatesSetCurrentTemplateFromSnapshotResponseContent( __exception_500 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, - statusCode: __response.StatusCode) - { - ResponseBody = __content_500, - ResponseObject = __value_500, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_500, + responseObject: __value_500, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -516,17 +513,15 @@ partial void ProcessTemplatesSetCurrentTemplateFromSnapshotResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -563,17 +558,15 @@ partial void ProcessTemplatesSetCurrentTemplateFromSnapshotResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesUpdateCurrentTemplateFromAgentFile.g.cs b/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesUpdateCurrentTemplateFromAgentFile.g.cs index 3ca7dcb6..7e621fbf 100644 --- a/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesUpdateCurrentTemplateFromAgentFile.g.cs +++ b/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesUpdateCurrentTemplateFromAgentFile.g.cs @@ -395,18 +395,17 @@ partial void ProcessTemplatesUpdateCurrentTemplateFromAgentFileResponseContent( __exception_400 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // 404 if ((int)__response.StatusCode == 404) @@ -433,18 +432,17 @@ partial void ProcessTemplatesUpdateCurrentTemplateFromAgentFileResponseContent( __exception_404 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // 500 if ((int)__response.StatusCode == 500) @@ -471,18 +469,17 @@ partial void ProcessTemplatesUpdateCurrentTemplateFromAgentFileResponseContent( __exception_500 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, - statusCode: __response.StatusCode) - { - ResponseBody = __content_500, - ResponseObject = __value_500, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_500, + responseObject: __value_500, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -516,17 +513,15 @@ partial void ProcessTemplatesUpdateCurrentTemplateFromAgentFileResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -563,17 +558,15 @@ partial void ProcessTemplatesUpdateCurrentTemplateFromAgentFileResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesUpdateCurrentTemplateFromAgentFileNoProject.g.cs b/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesUpdateCurrentTemplateFromAgentFileNoProject.g.cs index 26a9cb29..af61c0e2 100644 --- a/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesUpdateCurrentTemplateFromAgentFileNoProject.g.cs +++ b/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesUpdateCurrentTemplateFromAgentFileNoProject.g.cs @@ -386,18 +386,17 @@ partial void ProcessTemplatesUpdateCurrentTemplateFromAgentFileNoProjectResponse __exception_400 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // 404 if ((int)__response.StatusCode == 404) @@ -424,18 +423,17 @@ partial void ProcessTemplatesUpdateCurrentTemplateFromAgentFileNoProjectResponse __exception_404 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // 500 if ((int)__response.StatusCode == 500) @@ -462,18 +460,17 @@ partial void ProcessTemplatesUpdateCurrentTemplateFromAgentFileNoProjectResponse __exception_500 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, - statusCode: __response.StatusCode) - { - ResponseBody = __content_500, - ResponseObject = __value_500, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_500, + responseObject: __value_500, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -507,17 +504,15 @@ partial void ProcessTemplatesUpdateCurrentTemplateFromAgentFileNoProjectResponse } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -554,17 +549,15 @@ partial void ProcessTemplatesUpdateCurrentTemplateFromAgentFileNoProjectResponse { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesUpdateTemplateDescription.g.cs b/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesUpdateTemplateDescription.g.cs index 59a076c4..909fa46a 100644 --- a/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesUpdateTemplateDescription.g.cs +++ b/src/libs/Letta/Generated/Letta.TemplatesClient.TemplatesUpdateTemplateDescription.g.cs @@ -395,18 +395,17 @@ partial void ProcessTemplatesUpdateTemplateDescriptionResponseContent( __exception_400 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // 404 if ((int)__response.StatusCode == 404) @@ -433,18 +432,17 @@ partial void ProcessTemplatesUpdateTemplateDescriptionResponseContent( __exception_404 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -478,17 +476,15 @@ partial void ProcessTemplatesUpdateTemplateDescriptionResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -525,17 +521,15 @@ partial void ProcessTemplatesUpdateTemplateDescriptionResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.ToolsClient.AddBaseTools.g.cs b/src/libs/Letta/Generated/Letta.ToolsClient.AddBaseTools.g.cs index 8dcf20c3..2698e0c8 100644 --- a/src/libs/Letta/Generated/Letta.ToolsClient.AddBaseTools.g.cs +++ b/src/libs/Letta/Generated/Letta.ToolsClient.AddBaseTools.g.cs @@ -357,18 +357,17 @@ partial void ProcessAddBaseToolsResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -402,17 +401,15 @@ partial void ProcessAddBaseToolsResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -449,17 +446,15 @@ partial void ProcessAddBaseToolsResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.ToolsClient.AddMcpServer.g.cs b/src/libs/Letta/Generated/Letta.ToolsClient.AddMcpServer.g.cs index d84692f0..f749fcb4 100644 --- a/src/libs/Letta/Generated/Letta.ToolsClient.AddMcpServer.g.cs +++ b/src/libs/Letta/Generated/Letta.ToolsClient.AddMcpServer.g.cs @@ -375,18 +375,17 @@ partial void ProcessAddMcpServerResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -420,17 +419,15 @@ partial void ProcessAddMcpServerResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -467,17 +464,15 @@ partial void ProcessAddMcpServerResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.ToolsClient.AddMcpTool.g.cs b/src/libs/Letta/Generated/Letta.ToolsClient.AddMcpTool.g.cs index 1ce59f71..7401e602 100644 --- a/src/libs/Letta/Generated/Letta.ToolsClient.AddMcpTool.g.cs +++ b/src/libs/Letta/Generated/Letta.ToolsClient.AddMcpTool.g.cs @@ -375,18 +375,17 @@ partial void ProcessAddMcpToolResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -420,17 +419,15 @@ partial void ProcessAddMcpToolResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -467,17 +464,15 @@ partial void ProcessAddMcpToolResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.ToolsClient.ConnectMcpServer.g.cs b/src/libs/Letta/Generated/Letta.ToolsClient.ConnectMcpServer.g.cs index 4d7aae9d..94cfa1ee 100644 --- a/src/libs/Letta/Generated/Letta.ToolsClient.ConnectMcpServer.g.cs +++ b/src/libs/Letta/Generated/Letta.ToolsClient.ConnectMcpServer.g.cs @@ -377,18 +377,17 @@ partial void ProcessConnectMcpServerResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -420,17 +419,15 @@ partial void ProcessConnectMcpServerResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -465,17 +462,15 @@ partial void ProcessConnectMcpServerResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.ToolsClient.CountTools.g.cs b/src/libs/Letta/Generated/Letta.ToolsClient.CountTools.g.cs index 68f1f5d0..1ba4bb39 100644 --- a/src/libs/Letta/Generated/Letta.ToolsClient.CountTools.g.cs +++ b/src/libs/Letta/Generated/Letta.ToolsClient.CountTools.g.cs @@ -471,18 +471,17 @@ partial void ProcessCountToolsResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -516,17 +515,15 @@ partial void ProcessCountToolsResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -563,17 +560,15 @@ partial void ProcessCountToolsResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.ToolsClient.CreateTool.g.cs b/src/libs/Letta/Generated/Letta.ToolsClient.CreateTool.g.cs index d7ec940e..da6515a2 100644 --- a/src/libs/Letta/Generated/Letta.ToolsClient.CreateTool.g.cs +++ b/src/libs/Letta/Generated/Letta.ToolsClient.CreateTool.g.cs @@ -377,18 +377,17 @@ partial void ProcessCreateToolResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -422,17 +421,15 @@ partial void ProcessCreateToolResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -469,17 +466,15 @@ partial void ProcessCreateToolResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.ToolsClient.DeleteMcpServer.g.cs b/src/libs/Letta/Generated/Letta.ToolsClient.DeleteMcpServer.g.cs index de813b03..8c381d4c 100644 --- a/src/libs/Letta/Generated/Letta.ToolsClient.DeleteMcpServer.g.cs +++ b/src/libs/Letta/Generated/Letta.ToolsClient.DeleteMcpServer.g.cs @@ -366,18 +366,17 @@ partial void ProcessDeleteMcpServerResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -411,17 +410,15 @@ partial void ProcessDeleteMcpServerResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -458,17 +455,15 @@ partial void ProcessDeleteMcpServerResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.ToolsClient.DeleteTool.g.cs b/src/libs/Letta/Generated/Letta.ToolsClient.DeleteTool.g.cs index 5aa6b893..94ab35b1 100644 --- a/src/libs/Letta/Generated/Letta.ToolsClient.DeleteTool.g.cs +++ b/src/libs/Letta/Generated/Letta.ToolsClient.DeleteTool.g.cs @@ -370,18 +370,17 @@ partial void ProcessDeleteToolResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -413,17 +412,15 @@ partial void ProcessDeleteToolResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -458,17 +455,15 @@ partial void ProcessDeleteToolResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.ToolsClient.ExecuteMcpTool.g.cs b/src/libs/Letta/Generated/Letta.ToolsClient.ExecuteMcpTool.g.cs index d69708e0..2eb4ea41 100644 --- a/src/libs/Letta/Generated/Letta.ToolsClient.ExecuteMcpTool.g.cs +++ b/src/libs/Letta/Generated/Letta.ToolsClient.ExecuteMcpTool.g.cs @@ -397,18 +397,17 @@ partial void ProcessExecuteMcpToolResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -440,17 +439,15 @@ partial void ProcessExecuteMcpToolResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -485,17 +482,15 @@ partial void ProcessExecuteMcpToolResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.ToolsClient.ListMcpServers.g.cs b/src/libs/Letta/Generated/Letta.ToolsClient.ListMcpServers.g.cs index 75110112..4e14f4a0 100644 --- a/src/libs/Letta/Generated/Letta.ToolsClient.ListMcpServers.g.cs +++ b/src/libs/Letta/Generated/Letta.ToolsClient.ListMcpServers.g.cs @@ -357,18 +357,17 @@ partial void ProcessListMcpServersResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -400,17 +399,15 @@ partial void ProcessListMcpServersResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -445,17 +442,15 @@ partial void ProcessListMcpServersResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.ToolsClient.ListMcpToolsByServer.g.cs b/src/libs/Letta/Generated/Letta.ToolsClient.ListMcpToolsByServer.g.cs index 64764d15..ed91d715 100644 --- a/src/libs/Letta/Generated/Letta.ToolsClient.ListMcpToolsByServer.g.cs +++ b/src/libs/Letta/Generated/Letta.ToolsClient.ListMcpToolsByServer.g.cs @@ -366,18 +366,17 @@ partial void ProcessListMcpToolsByServerResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -411,17 +410,15 @@ partial void ProcessListMcpToolsByServerResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -458,17 +455,15 @@ partial void ProcessListMcpToolsByServerResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.ToolsClient.ListTools.g.cs b/src/libs/Letta/Generated/Letta.ToolsClient.ListTools.g.cs index 46efa384..b0ca9701 100644 --- a/src/libs/Letta/Generated/Letta.ToolsClient.ListTools.g.cs +++ b/src/libs/Letta/Generated/Letta.ToolsClient.ListTools.g.cs @@ -535,18 +535,17 @@ partial void ProcessListToolsResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -580,17 +579,15 @@ partial void ProcessListToolsResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -627,17 +624,15 @@ partial void ProcessListToolsResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.ToolsClient.McpOauthCallback.g.cs b/src/libs/Letta/Generated/Letta.ToolsClient.McpOauthCallback.g.cs index dfccd85e..86b8cf81 100644 --- a/src/libs/Letta/Generated/Letta.ToolsClient.McpOauthCallback.g.cs +++ b/src/libs/Letta/Generated/Letta.ToolsClient.McpOauthCallback.g.cs @@ -417,18 +417,17 @@ partial void ProcessMcpOauthCallbackResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -460,17 +459,15 @@ partial void ProcessMcpOauthCallbackResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -505,17 +502,15 @@ partial void ProcessMcpOauthCallbackResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.ToolsClient.ModifyTool.g.cs b/src/libs/Letta/Generated/Letta.ToolsClient.ModifyTool.g.cs index 743a9194..c0f0625b 100644 --- a/src/libs/Letta/Generated/Letta.ToolsClient.ModifyTool.g.cs +++ b/src/libs/Letta/Generated/Letta.ToolsClient.ModifyTool.g.cs @@ -390,18 +390,17 @@ partial void ProcessModifyToolResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -435,17 +434,15 @@ partial void ProcessModifyToolResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -482,17 +479,15 @@ partial void ProcessModifyToolResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.ToolsClient.ResyncMcpServerTools.g.cs b/src/libs/Letta/Generated/Letta.ToolsClient.ResyncMcpServerTools.g.cs index 409af8a0..aed3e559 100644 --- a/src/libs/Letta/Generated/Letta.ToolsClient.ResyncMcpServerTools.g.cs +++ b/src/libs/Letta/Generated/Letta.ToolsClient.ResyncMcpServerTools.g.cs @@ -388,18 +388,17 @@ partial void ProcessResyncMcpServerToolsResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -431,17 +430,15 @@ partial void ProcessResyncMcpServerToolsResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -476,17 +473,15 @@ partial void ProcessResyncMcpServerToolsResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.ToolsClient.RetrieveTool.g.cs b/src/libs/Letta/Generated/Letta.ToolsClient.RetrieveTool.g.cs index eda3b4ec..378be0c9 100644 --- a/src/libs/Letta/Generated/Letta.ToolsClient.RetrieveTool.g.cs +++ b/src/libs/Letta/Generated/Letta.ToolsClient.RetrieveTool.g.cs @@ -370,18 +370,17 @@ partial void ProcessRetrieveToolResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -415,17 +414,15 @@ partial void ProcessRetrieveToolResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -462,17 +459,15 @@ partial void ProcessRetrieveToolResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.ToolsClient.RunToolFromSource.g.cs b/src/libs/Letta/Generated/Letta.ToolsClient.RunToolFromSource.g.cs index 699577da..7a8ec33d 100644 --- a/src/libs/Letta/Generated/Letta.ToolsClient.RunToolFromSource.g.cs +++ b/src/libs/Letta/Generated/Letta.ToolsClient.RunToolFromSource.g.cs @@ -377,18 +377,17 @@ partial void ProcessRunToolFromSourceResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -422,17 +421,15 @@ partial void ProcessRunToolFromSourceResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -469,17 +466,15 @@ partial void ProcessRunToolFromSourceResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.ToolsClient.SearchTools.g.cs b/src/libs/Letta/Generated/Letta.ToolsClient.SearchTools.g.cs index 3ca6ffad..1c1f01eb 100644 --- a/src/libs/Letta/Generated/Letta.ToolsClient.SearchTools.g.cs +++ b/src/libs/Letta/Generated/Letta.ToolsClient.SearchTools.g.cs @@ -383,18 +383,17 @@ partial void ProcessSearchToolsResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -428,17 +427,15 @@ partial void ProcessSearchToolsResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -475,17 +472,15 @@ partial void ProcessSearchToolsResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.ToolsClient.TestMcpServer.g.cs b/src/libs/Letta/Generated/Letta.ToolsClient.TestMcpServer.g.cs index 1997ca3d..935d7a45 100644 --- a/src/libs/Letta/Generated/Letta.ToolsClient.TestMcpServer.g.cs +++ b/src/libs/Letta/Generated/Letta.ToolsClient.TestMcpServer.g.cs @@ -377,18 +377,17 @@ partial void ProcessTestMcpServerResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -420,17 +419,15 @@ partial void ProcessTestMcpServerResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -465,17 +462,15 @@ partial void ProcessTestMcpServerResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.ToolsClient.UpdateMcpServer.g.cs b/src/libs/Letta/Generated/Letta.ToolsClient.UpdateMcpServer.g.cs index da8d62b3..2c04373f 100644 --- a/src/libs/Letta/Generated/Letta.ToolsClient.UpdateMcpServer.g.cs +++ b/src/libs/Letta/Generated/Letta.ToolsClient.UpdateMcpServer.g.cs @@ -384,18 +384,17 @@ partial void ProcessUpdateMcpServerResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -429,17 +428,15 @@ partial void ProcessUpdateMcpServerResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -476,17 +473,15 @@ partial void ProcessUpdateMcpServerResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Letta/Generated/Letta.ToolsClient.UpsertTool.g.cs b/src/libs/Letta/Generated/Letta.ToolsClient.UpsertTool.g.cs index eab95a48..378223c8 100644 --- a/src/libs/Letta/Generated/Letta.ToolsClient.UpsertTool.g.cs +++ b/src/libs/Letta/Generated/Letta.ToolsClient.UpsertTool.g.cs @@ -377,18 +377,17 @@ partial void ProcessUpsertToolResponseContent( __exception_422 = __ex; } - throw new global::Letta.ApiException( + + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -422,17 +421,15 @@ partial void ProcessUpsertToolResponseContent( } catch (global::System.Exception __ex) { - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -469,17 +466,15 @@ partial void ProcessUpsertToolResponseContent( { } - throw new global::Letta.ApiException( + throw global::Letta.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } }