From 910f13e8a054977cc35a1e7fec57187be57c8ae4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 24 May 2026 04:19:34 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- ...sClient.AddRequestLogToDatasetVersion.g.cs | 99 ++++++------- ...tasetsClient.AddTraceToDatasetVersion.g.cs | 99 ++++++------- ...yer.DatasetsClient.CreateDatasetGroup.g.cs | 84 +++++------ ...tsClient.CreateDatasetVersionFromFile.g.cs | 114 +++++++-------- ....CreateDatasetVersionFromFilterParams.g.cs | 84 +++++------ ...asetsClient.CreateDraftDatasetVersion.g.cs | 99 ++++++------- ...ptLayer.DatasetsClient.GetDatasetRows.g.cs | 84 +++++------ ...omptLayer.DatasetsClient.ListDatasets.g.cs | 69 ++++----- ...atasetsClient.SaveDraftDatasetVersion.g.cs | 84 +++++------ ...r.EvaluationsClient.GetEvaluationRows.g.cs | 84 +++++------ ...yer.EvaluationsClient.ListEvaluations.g.cs | 69 ++++----- .../Generated/PromptLayer.Exceptions.g.cs | 134 ++++++++++++++++++ ...Client.AttachDatasetGroupIdExternalId.g.cs | 99 ++++++------- ...nalIdsClient.AttachFolderIdExternalId.g.cs | 99 ++++++------- ...ient.AttachPromptTemplateIdExternalId.g.cs | 99 ++++++------- ...nalIdsClient.AttachReportIdExternalId.g.cs | 99 ++++++------- ...ent.AttachSkillCollectionIdExternalId.g.cs | 99 ++++++------- ...ernalIdsClient.AttachToolIdExternalId.g.cs | 99 ++++++------- ...lIdsClient.AttachWorkflowIdExternalId.g.cs | 99 ++++++------- ...Client.DeleteDatasetGroupIdExternalId.g.cs | 84 +++++------ ...nalIdsClient.DeleteFolderIdExternalId.g.cs | 84 +++++------ ...ient.DeletePromptTemplateIdExternalId.g.cs | 84 +++++------ ...nalIdsClient.DeleteReportIdExternalId.g.cs | 84 +++++------ ...ent.DeleteSkillCollectionIdExternalId.g.cs | 84 +++++------ ...ernalIdsClient.DeleteToolIdExternalId.g.cs | 84 +++++------ ...lIdsClient.DeleteWorkflowIdExternalId.g.cs | 84 +++++------ ...sClient.ListDatasetGroupIdExternalIds.g.cs | 84 +++++------ ...rnalIdsClient.ListFolderIdExternalIds.g.cs | 84 +++++------ ...lient.ListPromptTemplateIdExternalIds.g.cs | 84 +++++------ ...rnalIdsClient.ListReportIdExternalIds.g.cs | 84 +++++------ ...ient.ListSkillCollectionIdExternalIds.g.cs | 84 +++++------ ...ternalIdsClient.ListToolIdExternalIds.g.cs | 84 +++++------ ...alIdsClient.ListWorkflowIdExternalIds.g.cs | 84 +++++------ ...ient.UpsertPromptTemplateByExternalId.g.cs | 99 ++++++------- ...nt.CreateFolderApiPublicV2FoldersPost.g.cs | 99 ++++++------- ...itiesApiPublicV2FoldersEntitiesDelete.g.cs | 99 ++++++------- ...EntitiesApiPublicV2FoldersEntitiesGet.g.cs | 84 +++++------ ...ntitiesApiPublicV2FoldersEntitiesPost.g.cs | 84 +++++------ ...olderIdApiPublicV2FoldersResolveIdGet.g.cs | 84 +++++------ ...t.UpdateFolderApiPublicV2FoldersPatch.g.cs | 84 +++++------ .../PromptLayer.GroupClient.TrackGroup.g.cs | 65 ++++----- ...mptLayer.MetadataClient.TrackMetadata.g.cs | 67 ++++----- ...omptLayer.OtlpClient.IngestOtlpTraces.g.cs | 84 +++++------ .../PromptLayer.PromptClient.TrackPrompt.g.cs | 67 ++++----- ...etePromptTemplatesLabelsPromptLabelId.g.cs | 54 ++++--- ...platesClient.GetAllPromptTemplatesGet.g.cs | 54 ++++--- ...tTemplatesClient.GetPromptTemplateRaw.g.cs | 69 ++++----- ...ptTemplatesLabelsPromptIdentifierPost.g.cs | 67 ++++----- ...etPromptTemplatesPromptIdentifierPost.g.cs | 54 ++++--- ...PromptTemplatesClient.GetSnippetUsage.g.cs | 80 +++++------ ...omptTemplatesLabelsPromptLabelIdPatch.g.cs | 54 ++++--- ...Layer.PromptsClient.CreatePromptLabel.g.cs | 54 ++++--- ...ptLayer.ReportsClient.AddReportColumn.g.cs | 97 ++++++------- ...eportsClient.CreateEvaluationPipeline.g.cs | 114 +++++++-------- ...romptLayer.ReportsClient.DeleteReport.g.cs | 69 ++++----- ...ayer.ReportsClient.DeleteReportColumn.g.cs | 84 +++++------ ...yer.ReportsClient.DeleteReportsByName.g.cs | 65 ++++----- ...tLayer.ReportsClient.EditReportColumn.g.cs | 97 ++++++------- .../PromptLayer.ReportsClient.GetReport.g.cs | 65 ++++----- ...mptLayer.ReportsClient.GetReportScore.g.cs | 91 ++++++------ ...romptLayer.ReportsClient.RenameReport.g.cs | 82 +++++------ .../PromptLayer.ReportsClient.RunReport.g.cs | 99 ++++++------- ...r.ReportsClient.UpdateReportScoreCard.g.cs | 69 ++++----- .../PromptLayer.RequestClient.LogRequest.g.cs | 84 +++++------ ...RestClient.PatchPromptTemplateVersion.g.cs | 84 +++++------ ...PromptTemplateRestPromptTemplatesPost.g.cs | 69 ++++----- .../PromptLayer.ScoreClient.TrackScore.g.cs | 65 ++++----- ...onsClient.CreateSkillCollectionPublic.g.cs | 114 +++++++-------- ...ctionsClient.GetSkillCollectionPublic.g.cs | 99 ++++++------- ...ionsClient.ListSkillCollectionsPublic.g.cs | 69 ++++----- ...ient.SaveSkillCollectionVersionPublic.g.cs | 114 +++++++-------- ...onsClient.UpdateSkillCollectionPublic.g.cs | 99 ++++++------- ...omptLayer.SpansClient.CreateSpansBulk.g.cs | 99 ++++++------- ...ToolRegistryClient.CreateToolRegistry.g.cs | 69 ++++----- ....ToolRegistryClient.CreateToolVersion.g.cs | 37 +++-- ...er.ToolRegistryClient.GetToolRegistry.g.cs | 54 ++++--- ...ToolRegistryClient.ListToolRegistries.g.cs | 54 ++++--- ...er.ToolRegistryClient.TestExecuteTool.g.cs | 63 ++++---- ...PromptLayer.TrackingClient.GetRequest.g.cs | 99 ++++++------- ...er.TrackingClient.GetRequestAnalytics.g.cs | 84 +++++------ ...ingClient.GetRequestSearchSuggestions.g.cs | 84 +++++------ .../PromptLayer.TrackingClient.GetTrace.g.cs | 99 ++++++------- ...ayer.TrackingClient.SearchRequestLogs.g.cs | 99 ++++++------- ...ptLayer.WorkflowClient.CreateWorkflow.g.cs | 99 ++++++------- ...romptLayer.WorkflowClient.GetWorkflow.g.cs | 69 ++++----- ...ayer.WorkflowClient.GetWorkflowLabels.g.cs | 67 ++++----- ...nt.GetWorkflowVersionExecutionResults.g.cs | 91 ++++++------ ...mptLayer.WorkflowClient.ListWorkflows.g.cs | 69 ++++----- ...mptLayer.WorkflowClient.PatchWorkflow.g.cs | 84 +++++------ ...romptLayer.WorkflowClient.RunWorkflow.g.cs | 84 +++++------ 90 files changed, 3466 insertions(+), 4041 deletions(-) diff --git a/src/libs/PromptLayer/Generated/PromptLayer.DatasetsClient.AddRequestLogToDatasetVersion.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.DatasetsClient.AddRequestLogToDatasetVersion.g.cs index 26c44e6..7d110c1 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.DatasetsClient.AddRequestLogToDatasetVersion.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.DatasetsClient.AddRequestLogToDatasetVersion.g.cs @@ -360,18 +360,17 @@ partial void ProcessAddRequestLogToDatasetVersionResponseContent( __exception_400 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Unauthorized - missing or invalid API key. if ((int)__response.StatusCode == 401) @@ -398,18 +397,17 @@ partial void ProcessAddRequestLogToDatasetVersionResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Forbidden - API key does not have access to the requested resource. if ((int)__response.StatusCode == 403) @@ -436,18 +434,17 @@ partial void ProcessAddRequestLogToDatasetVersionResponseContent( __exception_403 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Not found - requested resource does not exist or is not accessible. if ((int)__response.StatusCode == 404) @@ -474,18 +471,17 @@ partial void ProcessAddRequestLogToDatasetVersionResponseContent( __exception_404 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Validation error - request parameters or body are invalid. if ((int)__response.StatusCode == 422) @@ -512,18 +508,17 @@ partial void ProcessAddRequestLogToDatasetVersionResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException?>( + + throw global::PromptLayer.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) @@ -557,17 +552,15 @@ partial void ProcessAddRequestLogToDatasetVersionResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -604,17 +597,15 @@ partial void ProcessAddRequestLogToDatasetVersionResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.DatasetsClient.AddTraceToDatasetVersion.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.DatasetsClient.AddTraceToDatasetVersion.g.cs index b7c1fef..16ed4a6 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.DatasetsClient.AddTraceToDatasetVersion.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.DatasetsClient.AddTraceToDatasetVersion.g.cs @@ -360,18 +360,17 @@ partial void ProcessAddTraceToDatasetVersionResponseContent( __exception_400 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Unauthorized - missing or invalid API key. if ((int)__response.StatusCode == 401) @@ -398,18 +397,17 @@ partial void ProcessAddTraceToDatasetVersionResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Forbidden - API key does not have access to the requested resource. if ((int)__response.StatusCode == 403) @@ -436,18 +434,17 @@ partial void ProcessAddTraceToDatasetVersionResponseContent( __exception_403 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Trace not found in the workspace. if ((int)__response.StatusCode == 404) @@ -474,18 +471,17 @@ partial void ProcessAddTraceToDatasetVersionResponseContent( __exception_404 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Validation error - request parameters or body are invalid. if ((int)__response.StatusCode == 422) @@ -512,18 +508,17 @@ partial void ProcessAddTraceToDatasetVersionResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException?>( + + throw global::PromptLayer.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) @@ -557,17 +552,15 @@ partial void ProcessAddTraceToDatasetVersionResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -604,17 +597,15 @@ partial void ProcessAddTraceToDatasetVersionResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.DatasetsClient.CreateDatasetGroup.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.DatasetsClient.CreateDatasetGroup.g.cs index dc140e0..a3d8938 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.DatasetsClient.CreateDatasetGroup.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.DatasetsClient.CreateDatasetGroup.g.cs @@ -360,18 +360,17 @@ partial void ProcessCreateDatasetGroupResponseContent( __exception_400 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Unauthorized - missing or invalid API key. if ((int)__response.StatusCode == 401) @@ -398,18 +397,17 @@ partial void ProcessCreateDatasetGroupResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // External ID conflict if ((int)__response.StatusCode == 409) @@ -436,18 +434,17 @@ partial void ProcessCreateDatasetGroupResponseContent( __exception_409 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Validation error - request parameters or body are invalid. if ((int)__response.StatusCode == 422) @@ -474,18 +471,17 @@ partial void ProcessCreateDatasetGroupResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException?>( + + throw global::PromptLayer.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) @@ -519,17 +515,15 @@ partial void ProcessCreateDatasetGroupResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -566,17 +560,15 @@ partial void ProcessCreateDatasetGroupResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.DatasetsClient.CreateDatasetVersionFromFile.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.DatasetsClient.CreateDatasetVersionFromFile.g.cs index 520c73e..83fbda1 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.DatasetsClient.CreateDatasetVersionFromFile.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.DatasetsClient.CreateDatasetVersionFromFile.g.cs @@ -360,18 +360,17 @@ partial void ProcessCreateDatasetVersionFromFileResponseContent( __exception_400 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Unauthorized - missing or invalid API key. if ((int)__response.StatusCode == 401) @@ -398,18 +397,17 @@ partial void ProcessCreateDatasetVersionFromFileResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Forbidden - API key does not have access to the requested resource. if ((int)__response.StatusCode == 403) @@ -436,18 +434,17 @@ partial void ProcessCreateDatasetVersionFromFileResponseContent( __exception_403 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Not found - requested resource does not exist or is not accessible. if ((int)__response.StatusCode == 404) @@ -474,18 +471,17 @@ partial void ProcessCreateDatasetVersionFromFileResponseContent( __exception_404 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Validation error - request parameters or body are invalid. if ((int)__response.StatusCode == 422) @@ -512,18 +508,17 @@ partial void ProcessCreateDatasetVersionFromFileResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException?>( + + throw global::PromptLayer.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)); } // Failed to upload file or create dataset version if ((int)__response.StatusCode == 500) @@ -550,18 +545,17 @@ partial void ProcessCreateDatasetVersionFromFileResponseContent( __exception_500 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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) @@ -595,17 +589,15 @@ partial void ProcessCreateDatasetVersionFromFileResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -642,17 +634,15 @@ partial void ProcessCreateDatasetVersionFromFileResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.DatasetsClient.CreateDatasetVersionFromFilterParams.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.DatasetsClient.CreateDatasetVersionFromFilterParams.g.cs index bf11afd..0a8df55 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.DatasetsClient.CreateDatasetVersionFromFilterParams.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.DatasetsClient.CreateDatasetVersionFromFilterParams.g.cs @@ -360,18 +360,17 @@ partial void ProcessCreateDatasetVersionFromFilterParamsResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Forbidden - API key does not have access to the requested resource. if ((int)__response.StatusCode == 403) @@ -398,18 +397,17 @@ partial void ProcessCreateDatasetVersionFromFilterParamsResponseContent( __exception_403 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Not found - requested resource does not exist or is not accessible. if ((int)__response.StatusCode == 404) @@ -436,18 +434,17 @@ partial void ProcessCreateDatasetVersionFromFilterParamsResponseContent( __exception_404 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Validation error - request parameters or body are invalid. if ((int)__response.StatusCode == 422) @@ -474,18 +471,17 @@ partial void ProcessCreateDatasetVersionFromFilterParamsResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException?>( + + throw global::PromptLayer.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) @@ -519,17 +515,15 @@ partial void ProcessCreateDatasetVersionFromFilterParamsResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -566,17 +560,15 @@ partial void ProcessCreateDatasetVersionFromFilterParamsResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.DatasetsClient.CreateDraftDatasetVersion.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.DatasetsClient.CreateDraftDatasetVersion.g.cs index b5b3165..6f6e11a 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.DatasetsClient.CreateDraftDatasetVersion.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.DatasetsClient.CreateDraftDatasetVersion.g.cs @@ -360,18 +360,17 @@ partial void ProcessCreateDraftDatasetVersionResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Forbidden - API key does not have access to the requested resource. if ((int)__response.StatusCode == 403) @@ -398,18 +397,17 @@ partial void ProcessCreateDraftDatasetVersionResponseContent( __exception_403 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Not found - requested resource does not exist or is not accessible. if ((int)__response.StatusCode == 404) @@ -436,18 +434,17 @@ partial void ProcessCreateDraftDatasetVersionResponseContent( __exception_404 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // A draft version already exists for this dataset group if ((int)__response.StatusCode == 409) @@ -474,18 +471,17 @@ partial void ProcessCreateDraftDatasetVersionResponseContent( __exception_409 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Validation error - request parameters or body are invalid. if ((int)__response.StatusCode == 422) @@ -512,18 +508,17 @@ partial void ProcessCreateDraftDatasetVersionResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException?>( + + throw global::PromptLayer.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) @@ -557,17 +552,15 @@ partial void ProcessCreateDraftDatasetVersionResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -604,17 +597,15 @@ partial void ProcessCreateDraftDatasetVersionResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.DatasetsClient.GetDatasetRows.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.DatasetsClient.GetDatasetRows.g.cs index 0a9e84b..7b3eac2 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.DatasetsClient.GetDatasetRows.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.DatasetsClient.GetDatasetRows.g.cs @@ -399,18 +399,17 @@ partial void ProcessGetDatasetRowsResponseContent( __exception_400 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Unauthorized - missing or invalid API key. if ((int)__response.StatusCode == 401) @@ -437,18 +436,17 @@ partial void ProcessGetDatasetRowsResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Not found - requested resource does not exist or is not accessible. if ((int)__response.StatusCode == 404) @@ -475,18 +473,17 @@ partial void ProcessGetDatasetRowsResponseContent( __exception_404 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Validation error - request parameters or body are invalid. if ((int)__response.StatusCode == 422) @@ -513,18 +510,17 @@ partial void ProcessGetDatasetRowsResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException?>( + + throw global::PromptLayer.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) @@ -558,17 +554,15 @@ partial void ProcessGetDatasetRowsResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -605,17 +599,15 @@ partial void ProcessGetDatasetRowsResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.DatasetsClient.ListDatasets.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.DatasetsClient.ListDatasets.g.cs index b92f90e..6414294 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.DatasetsClient.ListDatasets.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.DatasetsClient.ListDatasets.g.cs @@ -548,18 +548,17 @@ partial void ProcessListDatasetsResponseContent( __exception_400 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Unauthorized - missing or invalid API key. if ((int)__response.StatusCode == 401) @@ -586,18 +585,17 @@ partial void ProcessListDatasetsResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Validation error - request parameters or body are invalid. if ((int)__response.StatusCode == 422) @@ -624,18 +622,17 @@ partial void ProcessListDatasetsResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException?>( + + throw global::PromptLayer.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) @@ -669,17 +666,15 @@ partial void ProcessListDatasetsResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -716,17 +711,15 @@ partial void ProcessListDatasetsResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.DatasetsClient.SaveDraftDatasetVersion.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.DatasetsClient.SaveDraftDatasetVersion.g.cs index 62c3d5f..6ce7348 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.DatasetsClient.SaveDraftDatasetVersion.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.DatasetsClient.SaveDraftDatasetVersion.g.cs @@ -360,18 +360,17 @@ partial void ProcessSaveDraftDatasetVersionResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Forbidden - API key does not have access to the requested resource. if ((int)__response.StatusCode == 403) @@ -398,18 +397,17 @@ partial void ProcessSaveDraftDatasetVersionResponseContent( __exception_403 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Not found - requested resource does not exist or is not accessible. if ((int)__response.StatusCode == 404) @@ -436,18 +434,17 @@ partial void ProcessSaveDraftDatasetVersionResponseContent( __exception_404 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Validation error - request parameters or body are invalid. if ((int)__response.StatusCode == 422) @@ -474,18 +471,17 @@ partial void ProcessSaveDraftDatasetVersionResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException?>( + + throw global::PromptLayer.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) @@ -519,17 +515,15 @@ partial void ProcessSaveDraftDatasetVersionResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -566,17 +560,15 @@ partial void ProcessSaveDraftDatasetVersionResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.EvaluationsClient.GetEvaluationRows.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.EvaluationsClient.GetEvaluationRows.g.cs index 5b40435..1073356 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.EvaluationsClient.GetEvaluationRows.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.EvaluationsClient.GetEvaluationRows.g.cs @@ -389,18 +389,17 @@ partial void ProcessGetEvaluationRowsResponseContent( __exception_400 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Unauthorized - missing or invalid API key. if ((int)__response.StatusCode == 401) @@ -427,18 +426,17 @@ partial void ProcessGetEvaluationRowsResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Not found - requested resource does not exist or is not accessible. if ((int)__response.StatusCode == 404) @@ -465,18 +463,17 @@ partial void ProcessGetEvaluationRowsResponseContent( __exception_404 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Validation error - request parameters or body are invalid. if ((int)__response.StatusCode == 422) @@ -503,18 +500,17 @@ partial void ProcessGetEvaluationRowsResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException?>( + + throw global::PromptLayer.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) @@ -548,17 +544,15 @@ partial void ProcessGetEvaluationRowsResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -595,17 +589,15 @@ partial void ProcessGetEvaluationRowsResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.EvaluationsClient.ListEvaluations.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.EvaluationsClient.ListEvaluations.g.cs index e1ccda2..f4432a5 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.EvaluationsClient.ListEvaluations.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.EvaluationsClient.ListEvaluations.g.cs @@ -512,18 +512,17 @@ partial void ProcessListEvaluationsResponseContent( __exception_400 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Unauthorized - missing or invalid API key. if ((int)__response.StatusCode == 401) @@ -550,18 +549,17 @@ partial void ProcessListEvaluationsResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Validation error - request parameters or body are invalid. if ((int)__response.StatusCode == 422) @@ -588,18 +586,17 @@ partial void ProcessListEvaluationsResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException?>( + + throw global::PromptLayer.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) @@ -633,17 +630,15 @@ partial void ProcessListEvaluationsResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -680,17 +675,15 @@ partial void ProcessListEvaluationsResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.Exceptions.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.Exceptions.g.cs index 5356a6e..9845f14 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.Exceptions.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.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::PromptLayer.ApiException Create( + global::System.Net.HttpStatusCode statusCode, + string message, + global::System.Exception? innerException = null, + global::System.Collections.Generic.IDictionary>? responseHeaders = null) + { + return new global::PromptLayer.ApiException(message, innerException, statusCode); + } + + /// + /// Convenience overload that constructs an with response body and headers populated. + /// + public static global::PromptLayer.ApiException Create( + global::System.Net.HttpStatusCode statusCode, + string message, + global::System.Exception? innerException, + string? responseBody, + global::System.Collections.Generic.Dictionary>? responseHeaders) + { + var exception = global::PromptLayer.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::PromptLayer.ApiException Create( + global::System.Net.HttpStatusCode statusCode, + string message, + global::System.Exception? innerException = null, + global::System.Collections.Generic.IDictionary>? responseHeaders = null) + { + return new global::PromptLayer.ApiException(message, innerException, statusCode); + } + + /// + /// Convenience overload that constructs an with response body, object, and headers populated. + /// + public static global::PromptLayer.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::PromptLayer.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/PromptLayer/Generated/PromptLayer.ExternalIdsClient.AttachDatasetGroupIdExternalId.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.ExternalIdsClient.AttachDatasetGroupIdExternalId.g.cs index 96e491e..febd645 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.ExternalIdsClient.AttachDatasetGroupIdExternalId.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.ExternalIdsClient.AttachDatasetGroupIdExternalId.g.cs @@ -369,18 +369,17 @@ partial void ProcessAttachDatasetGroupIdExternalIdResponseContent( __exception_400 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Unauthorized if ((int)__response.StatusCode == 401) @@ -407,18 +406,17 @@ partial void ProcessAttachDatasetGroupIdExternalIdResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Entity Not Found if ((int)__response.StatusCode == 404) @@ -445,18 +443,17 @@ partial void ProcessAttachDatasetGroupIdExternalIdResponseContent( __exception_404 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Conflict if ((int)__response.StatusCode == 409) @@ -483,18 +480,17 @@ partial void ProcessAttachDatasetGroupIdExternalIdResponseContent( __exception_409 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Validation Error if ((int)__response.StatusCode == 422) @@ -521,18 +517,17 @@ partial void ProcessAttachDatasetGroupIdExternalIdResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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) @@ -566,17 +561,15 @@ partial void ProcessAttachDatasetGroupIdExternalIdResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -613,17 +606,15 @@ partial void ProcessAttachDatasetGroupIdExternalIdResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.ExternalIdsClient.AttachFolderIdExternalId.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.ExternalIdsClient.AttachFolderIdExternalId.g.cs index 0a11a37..f29196b 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.ExternalIdsClient.AttachFolderIdExternalId.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.ExternalIdsClient.AttachFolderIdExternalId.g.cs @@ -369,18 +369,17 @@ partial void ProcessAttachFolderIdExternalIdResponseContent( __exception_400 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Unauthorized if ((int)__response.StatusCode == 401) @@ -407,18 +406,17 @@ partial void ProcessAttachFolderIdExternalIdResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Entity Not Found if ((int)__response.StatusCode == 404) @@ -445,18 +443,17 @@ partial void ProcessAttachFolderIdExternalIdResponseContent( __exception_404 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Conflict if ((int)__response.StatusCode == 409) @@ -483,18 +480,17 @@ partial void ProcessAttachFolderIdExternalIdResponseContent( __exception_409 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Validation Error if ((int)__response.StatusCode == 422) @@ -521,18 +517,17 @@ partial void ProcessAttachFolderIdExternalIdResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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) @@ -566,17 +561,15 @@ partial void ProcessAttachFolderIdExternalIdResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -613,17 +606,15 @@ partial void ProcessAttachFolderIdExternalIdResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.ExternalIdsClient.AttachPromptTemplateIdExternalId.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.ExternalIdsClient.AttachPromptTemplateIdExternalId.g.cs index 6f7b9bc..5af7bf7 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.ExternalIdsClient.AttachPromptTemplateIdExternalId.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.ExternalIdsClient.AttachPromptTemplateIdExternalId.g.cs @@ -369,18 +369,17 @@ partial void ProcessAttachPromptTemplateIdExternalIdResponseContent( __exception_400 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Unauthorized if ((int)__response.StatusCode == 401) @@ -407,18 +406,17 @@ partial void ProcessAttachPromptTemplateIdExternalIdResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Entity Not Found if ((int)__response.StatusCode == 404) @@ -445,18 +443,17 @@ partial void ProcessAttachPromptTemplateIdExternalIdResponseContent( __exception_404 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Conflict if ((int)__response.StatusCode == 409) @@ -483,18 +480,17 @@ partial void ProcessAttachPromptTemplateIdExternalIdResponseContent( __exception_409 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Validation Error if ((int)__response.StatusCode == 422) @@ -521,18 +517,17 @@ partial void ProcessAttachPromptTemplateIdExternalIdResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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) @@ -566,17 +561,15 @@ partial void ProcessAttachPromptTemplateIdExternalIdResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -613,17 +606,15 @@ partial void ProcessAttachPromptTemplateIdExternalIdResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.ExternalIdsClient.AttachReportIdExternalId.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.ExternalIdsClient.AttachReportIdExternalId.g.cs index be5742f..e82a6d1 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.ExternalIdsClient.AttachReportIdExternalId.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.ExternalIdsClient.AttachReportIdExternalId.g.cs @@ -369,18 +369,17 @@ partial void ProcessAttachReportIdExternalIdResponseContent( __exception_400 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Unauthorized if ((int)__response.StatusCode == 401) @@ -407,18 +406,17 @@ partial void ProcessAttachReportIdExternalIdResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Entity Not Found if ((int)__response.StatusCode == 404) @@ -445,18 +443,17 @@ partial void ProcessAttachReportIdExternalIdResponseContent( __exception_404 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Conflict if ((int)__response.StatusCode == 409) @@ -483,18 +480,17 @@ partial void ProcessAttachReportIdExternalIdResponseContent( __exception_409 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Validation Error if ((int)__response.StatusCode == 422) @@ -521,18 +517,17 @@ partial void ProcessAttachReportIdExternalIdResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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) @@ -566,17 +561,15 @@ partial void ProcessAttachReportIdExternalIdResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -613,17 +606,15 @@ partial void ProcessAttachReportIdExternalIdResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.ExternalIdsClient.AttachSkillCollectionIdExternalId.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.ExternalIdsClient.AttachSkillCollectionIdExternalId.g.cs index b433c48..c339cd9 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.ExternalIdsClient.AttachSkillCollectionIdExternalId.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.ExternalIdsClient.AttachSkillCollectionIdExternalId.g.cs @@ -369,18 +369,17 @@ partial void ProcessAttachSkillCollectionIdExternalIdResponseContent( __exception_400 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Unauthorized if ((int)__response.StatusCode == 401) @@ -407,18 +406,17 @@ partial void ProcessAttachSkillCollectionIdExternalIdResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Entity Not Found if ((int)__response.StatusCode == 404) @@ -445,18 +443,17 @@ partial void ProcessAttachSkillCollectionIdExternalIdResponseContent( __exception_404 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Conflict if ((int)__response.StatusCode == 409) @@ -483,18 +480,17 @@ partial void ProcessAttachSkillCollectionIdExternalIdResponseContent( __exception_409 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Validation Error if ((int)__response.StatusCode == 422) @@ -521,18 +517,17 @@ partial void ProcessAttachSkillCollectionIdExternalIdResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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) @@ -566,17 +561,15 @@ partial void ProcessAttachSkillCollectionIdExternalIdResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -613,17 +606,15 @@ partial void ProcessAttachSkillCollectionIdExternalIdResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.ExternalIdsClient.AttachToolIdExternalId.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.ExternalIdsClient.AttachToolIdExternalId.g.cs index bf73e43..8ed2be7 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.ExternalIdsClient.AttachToolIdExternalId.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.ExternalIdsClient.AttachToolIdExternalId.g.cs @@ -369,18 +369,17 @@ partial void ProcessAttachToolIdExternalIdResponseContent( __exception_400 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Unauthorized if ((int)__response.StatusCode == 401) @@ -407,18 +406,17 @@ partial void ProcessAttachToolIdExternalIdResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Entity Not Found if ((int)__response.StatusCode == 404) @@ -445,18 +443,17 @@ partial void ProcessAttachToolIdExternalIdResponseContent( __exception_404 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Conflict if ((int)__response.StatusCode == 409) @@ -483,18 +480,17 @@ partial void ProcessAttachToolIdExternalIdResponseContent( __exception_409 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Validation Error if ((int)__response.StatusCode == 422) @@ -521,18 +517,17 @@ partial void ProcessAttachToolIdExternalIdResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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) @@ -566,17 +561,15 @@ partial void ProcessAttachToolIdExternalIdResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -613,17 +606,15 @@ partial void ProcessAttachToolIdExternalIdResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.ExternalIdsClient.AttachWorkflowIdExternalId.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.ExternalIdsClient.AttachWorkflowIdExternalId.g.cs index 577300f..1a5c2c4 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.ExternalIdsClient.AttachWorkflowIdExternalId.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.ExternalIdsClient.AttachWorkflowIdExternalId.g.cs @@ -369,18 +369,17 @@ partial void ProcessAttachWorkflowIdExternalIdResponseContent( __exception_400 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Unauthorized if ((int)__response.StatusCode == 401) @@ -407,18 +406,17 @@ partial void ProcessAttachWorkflowIdExternalIdResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Entity Not Found if ((int)__response.StatusCode == 404) @@ -445,18 +443,17 @@ partial void ProcessAttachWorkflowIdExternalIdResponseContent( __exception_404 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Conflict if ((int)__response.StatusCode == 409) @@ -483,18 +480,17 @@ partial void ProcessAttachWorkflowIdExternalIdResponseContent( __exception_409 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Validation Error if ((int)__response.StatusCode == 422) @@ -521,18 +517,17 @@ partial void ProcessAttachWorkflowIdExternalIdResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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) @@ -566,17 +561,15 @@ partial void ProcessAttachWorkflowIdExternalIdResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -613,17 +606,15 @@ partial void ProcessAttachWorkflowIdExternalIdResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.ExternalIdsClient.DeleteDatasetGroupIdExternalId.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.ExternalIdsClient.DeleteDatasetGroupIdExternalId.g.cs index 5154b47..f079707 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.ExternalIdsClient.DeleteDatasetGroupIdExternalId.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.ExternalIdsClient.DeleteDatasetGroupIdExternalId.g.cs @@ -367,18 +367,17 @@ partial void ProcessDeleteDatasetGroupIdExternalIdResponseContent( __exception_400 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Unauthorized if ((int)__response.StatusCode == 401) @@ -405,18 +404,17 @@ partial void ProcessDeleteDatasetGroupIdExternalIdResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Entity Not Found if ((int)__response.StatusCode == 404) @@ -443,18 +441,17 @@ partial void ProcessDeleteDatasetGroupIdExternalIdResponseContent( __exception_404 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Validation Error if ((int)__response.StatusCode == 422) @@ -481,18 +478,17 @@ partial void ProcessDeleteDatasetGroupIdExternalIdResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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) @@ -526,17 +522,15 @@ partial void ProcessDeleteDatasetGroupIdExternalIdResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::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 +567,15 @@ partial void ProcessDeleteDatasetGroupIdExternalIdResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.ExternalIdsClient.DeleteFolderIdExternalId.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.ExternalIdsClient.DeleteFolderIdExternalId.g.cs index 7236dda..481c5cf 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.ExternalIdsClient.DeleteFolderIdExternalId.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.ExternalIdsClient.DeleteFolderIdExternalId.g.cs @@ -367,18 +367,17 @@ partial void ProcessDeleteFolderIdExternalIdResponseContent( __exception_400 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Unauthorized if ((int)__response.StatusCode == 401) @@ -405,18 +404,17 @@ partial void ProcessDeleteFolderIdExternalIdResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Entity Not Found if ((int)__response.StatusCode == 404) @@ -443,18 +441,17 @@ partial void ProcessDeleteFolderIdExternalIdResponseContent( __exception_404 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Validation Error if ((int)__response.StatusCode == 422) @@ -481,18 +478,17 @@ partial void ProcessDeleteFolderIdExternalIdResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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) @@ -526,17 +522,15 @@ partial void ProcessDeleteFolderIdExternalIdResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::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 +567,15 @@ partial void ProcessDeleteFolderIdExternalIdResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.ExternalIdsClient.DeletePromptTemplateIdExternalId.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.ExternalIdsClient.DeletePromptTemplateIdExternalId.g.cs index 3e4c9a1..fe5e937 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.ExternalIdsClient.DeletePromptTemplateIdExternalId.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.ExternalIdsClient.DeletePromptTemplateIdExternalId.g.cs @@ -367,18 +367,17 @@ partial void ProcessDeletePromptTemplateIdExternalIdResponseContent( __exception_400 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Unauthorized if ((int)__response.StatusCode == 401) @@ -405,18 +404,17 @@ partial void ProcessDeletePromptTemplateIdExternalIdResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Entity Not Found if ((int)__response.StatusCode == 404) @@ -443,18 +441,17 @@ partial void ProcessDeletePromptTemplateIdExternalIdResponseContent( __exception_404 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Validation Error if ((int)__response.StatusCode == 422) @@ -481,18 +478,17 @@ partial void ProcessDeletePromptTemplateIdExternalIdResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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) @@ -526,17 +522,15 @@ partial void ProcessDeletePromptTemplateIdExternalIdResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::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 +567,15 @@ partial void ProcessDeletePromptTemplateIdExternalIdResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.ExternalIdsClient.DeleteReportIdExternalId.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.ExternalIdsClient.DeleteReportIdExternalId.g.cs index ac0257b..ef74a15 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.ExternalIdsClient.DeleteReportIdExternalId.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.ExternalIdsClient.DeleteReportIdExternalId.g.cs @@ -367,18 +367,17 @@ partial void ProcessDeleteReportIdExternalIdResponseContent( __exception_400 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Unauthorized if ((int)__response.StatusCode == 401) @@ -405,18 +404,17 @@ partial void ProcessDeleteReportIdExternalIdResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Entity Not Found if ((int)__response.StatusCode == 404) @@ -443,18 +441,17 @@ partial void ProcessDeleteReportIdExternalIdResponseContent( __exception_404 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Validation Error if ((int)__response.StatusCode == 422) @@ -481,18 +478,17 @@ partial void ProcessDeleteReportIdExternalIdResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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) @@ -526,17 +522,15 @@ partial void ProcessDeleteReportIdExternalIdResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::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 +567,15 @@ partial void ProcessDeleteReportIdExternalIdResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.ExternalIdsClient.DeleteSkillCollectionIdExternalId.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.ExternalIdsClient.DeleteSkillCollectionIdExternalId.g.cs index 760ce3d..9e74b41 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.ExternalIdsClient.DeleteSkillCollectionIdExternalId.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.ExternalIdsClient.DeleteSkillCollectionIdExternalId.g.cs @@ -367,18 +367,17 @@ partial void ProcessDeleteSkillCollectionIdExternalIdResponseContent( __exception_400 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Unauthorized if ((int)__response.StatusCode == 401) @@ -405,18 +404,17 @@ partial void ProcessDeleteSkillCollectionIdExternalIdResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Entity Not Found if ((int)__response.StatusCode == 404) @@ -443,18 +441,17 @@ partial void ProcessDeleteSkillCollectionIdExternalIdResponseContent( __exception_404 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Validation Error if ((int)__response.StatusCode == 422) @@ -481,18 +478,17 @@ partial void ProcessDeleteSkillCollectionIdExternalIdResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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) @@ -526,17 +522,15 @@ partial void ProcessDeleteSkillCollectionIdExternalIdResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::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 +567,15 @@ partial void ProcessDeleteSkillCollectionIdExternalIdResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.ExternalIdsClient.DeleteToolIdExternalId.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.ExternalIdsClient.DeleteToolIdExternalId.g.cs index 61f9467..7a2a87d 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.ExternalIdsClient.DeleteToolIdExternalId.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.ExternalIdsClient.DeleteToolIdExternalId.g.cs @@ -367,18 +367,17 @@ partial void ProcessDeleteToolIdExternalIdResponseContent( __exception_400 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Unauthorized if ((int)__response.StatusCode == 401) @@ -405,18 +404,17 @@ partial void ProcessDeleteToolIdExternalIdResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Entity Not Found if ((int)__response.StatusCode == 404) @@ -443,18 +441,17 @@ partial void ProcessDeleteToolIdExternalIdResponseContent( __exception_404 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Validation Error if ((int)__response.StatusCode == 422) @@ -481,18 +478,17 @@ partial void ProcessDeleteToolIdExternalIdResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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) @@ -526,17 +522,15 @@ partial void ProcessDeleteToolIdExternalIdResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::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 +567,15 @@ partial void ProcessDeleteToolIdExternalIdResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.ExternalIdsClient.DeleteWorkflowIdExternalId.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.ExternalIdsClient.DeleteWorkflowIdExternalId.g.cs index b58d471..675fb22 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.ExternalIdsClient.DeleteWorkflowIdExternalId.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.ExternalIdsClient.DeleteWorkflowIdExternalId.g.cs @@ -367,18 +367,17 @@ partial void ProcessDeleteWorkflowIdExternalIdResponseContent( __exception_400 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Unauthorized if ((int)__response.StatusCode == 401) @@ -405,18 +404,17 @@ partial void ProcessDeleteWorkflowIdExternalIdResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Entity Not Found if ((int)__response.StatusCode == 404) @@ -443,18 +441,17 @@ partial void ProcessDeleteWorkflowIdExternalIdResponseContent( __exception_404 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Validation Error if ((int)__response.StatusCode == 422) @@ -481,18 +478,17 @@ partial void ProcessDeleteWorkflowIdExternalIdResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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) @@ -526,17 +522,15 @@ partial void ProcessDeleteWorkflowIdExternalIdResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::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 +567,15 @@ partial void ProcessDeleteWorkflowIdExternalIdResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.ExternalIdsClient.ListDatasetGroupIdExternalIds.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.ExternalIdsClient.ListDatasetGroupIdExternalIds.g.cs index 0b580e9..4399de7 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.ExternalIdsClient.ListDatasetGroupIdExternalIds.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.ExternalIdsClient.ListDatasetGroupIdExternalIds.g.cs @@ -349,18 +349,17 @@ partial void ProcessListDatasetGroupIdExternalIdsResponseContent( __exception_400 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Unauthorized if ((int)__response.StatusCode == 401) @@ -387,18 +386,17 @@ partial void ProcessListDatasetGroupIdExternalIdsResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Entity Not Found if ((int)__response.StatusCode == 404) @@ -425,18 +423,17 @@ partial void ProcessListDatasetGroupIdExternalIdsResponseContent( __exception_404 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Validation Error if ((int)__response.StatusCode == 422) @@ -463,18 +460,17 @@ partial void ProcessListDatasetGroupIdExternalIdsResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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 +504,15 @@ partial void ProcessListDatasetGroupIdExternalIdsResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::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 +549,15 @@ partial void ProcessListDatasetGroupIdExternalIdsResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.ExternalIdsClient.ListFolderIdExternalIds.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.ExternalIdsClient.ListFolderIdExternalIds.g.cs index 99b7a3e..7137d7b 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.ExternalIdsClient.ListFolderIdExternalIds.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.ExternalIdsClient.ListFolderIdExternalIds.g.cs @@ -349,18 +349,17 @@ partial void ProcessListFolderIdExternalIdsResponseContent( __exception_400 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Unauthorized if ((int)__response.StatusCode == 401) @@ -387,18 +386,17 @@ partial void ProcessListFolderIdExternalIdsResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Entity Not Found if ((int)__response.StatusCode == 404) @@ -425,18 +423,17 @@ partial void ProcessListFolderIdExternalIdsResponseContent( __exception_404 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Validation Error if ((int)__response.StatusCode == 422) @@ -463,18 +460,17 @@ partial void ProcessListFolderIdExternalIdsResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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 +504,15 @@ partial void ProcessListFolderIdExternalIdsResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::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 +549,15 @@ partial void ProcessListFolderIdExternalIdsResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.ExternalIdsClient.ListPromptTemplateIdExternalIds.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.ExternalIdsClient.ListPromptTemplateIdExternalIds.g.cs index 9586f90..e25f527 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.ExternalIdsClient.ListPromptTemplateIdExternalIds.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.ExternalIdsClient.ListPromptTemplateIdExternalIds.g.cs @@ -349,18 +349,17 @@ partial void ProcessListPromptTemplateIdExternalIdsResponseContent( __exception_400 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Unauthorized if ((int)__response.StatusCode == 401) @@ -387,18 +386,17 @@ partial void ProcessListPromptTemplateIdExternalIdsResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Entity Not Found if ((int)__response.StatusCode == 404) @@ -425,18 +423,17 @@ partial void ProcessListPromptTemplateIdExternalIdsResponseContent( __exception_404 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Validation Error if ((int)__response.StatusCode == 422) @@ -463,18 +460,17 @@ partial void ProcessListPromptTemplateIdExternalIdsResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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 +504,15 @@ partial void ProcessListPromptTemplateIdExternalIdsResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::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 +549,15 @@ partial void ProcessListPromptTemplateIdExternalIdsResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.ExternalIdsClient.ListReportIdExternalIds.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.ExternalIdsClient.ListReportIdExternalIds.g.cs index aa6d5c2..d0043f4 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.ExternalIdsClient.ListReportIdExternalIds.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.ExternalIdsClient.ListReportIdExternalIds.g.cs @@ -349,18 +349,17 @@ partial void ProcessListReportIdExternalIdsResponseContent( __exception_400 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Unauthorized if ((int)__response.StatusCode == 401) @@ -387,18 +386,17 @@ partial void ProcessListReportIdExternalIdsResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Entity Not Found if ((int)__response.StatusCode == 404) @@ -425,18 +423,17 @@ partial void ProcessListReportIdExternalIdsResponseContent( __exception_404 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Validation Error if ((int)__response.StatusCode == 422) @@ -463,18 +460,17 @@ partial void ProcessListReportIdExternalIdsResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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 +504,15 @@ partial void ProcessListReportIdExternalIdsResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::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 +549,15 @@ partial void ProcessListReportIdExternalIdsResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.ExternalIdsClient.ListSkillCollectionIdExternalIds.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.ExternalIdsClient.ListSkillCollectionIdExternalIds.g.cs index cbae8a4..91dfbbb 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.ExternalIdsClient.ListSkillCollectionIdExternalIds.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.ExternalIdsClient.ListSkillCollectionIdExternalIds.g.cs @@ -349,18 +349,17 @@ partial void ProcessListSkillCollectionIdExternalIdsResponseContent( __exception_400 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Unauthorized if ((int)__response.StatusCode == 401) @@ -387,18 +386,17 @@ partial void ProcessListSkillCollectionIdExternalIdsResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Entity Not Found if ((int)__response.StatusCode == 404) @@ -425,18 +423,17 @@ partial void ProcessListSkillCollectionIdExternalIdsResponseContent( __exception_404 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Validation Error if ((int)__response.StatusCode == 422) @@ -463,18 +460,17 @@ partial void ProcessListSkillCollectionIdExternalIdsResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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 +504,15 @@ partial void ProcessListSkillCollectionIdExternalIdsResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::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 +549,15 @@ partial void ProcessListSkillCollectionIdExternalIdsResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.ExternalIdsClient.ListToolIdExternalIds.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.ExternalIdsClient.ListToolIdExternalIds.g.cs index 46c159b..a0e99d6 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.ExternalIdsClient.ListToolIdExternalIds.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.ExternalIdsClient.ListToolIdExternalIds.g.cs @@ -349,18 +349,17 @@ partial void ProcessListToolIdExternalIdsResponseContent( __exception_400 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Unauthorized if ((int)__response.StatusCode == 401) @@ -387,18 +386,17 @@ partial void ProcessListToolIdExternalIdsResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Entity Not Found if ((int)__response.StatusCode == 404) @@ -425,18 +423,17 @@ partial void ProcessListToolIdExternalIdsResponseContent( __exception_404 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Validation Error if ((int)__response.StatusCode == 422) @@ -463,18 +460,17 @@ partial void ProcessListToolIdExternalIdsResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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 +504,15 @@ partial void ProcessListToolIdExternalIdsResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::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 +549,15 @@ partial void ProcessListToolIdExternalIdsResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.ExternalIdsClient.ListWorkflowIdExternalIds.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.ExternalIdsClient.ListWorkflowIdExternalIds.g.cs index 53e6faa..20e84e2 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.ExternalIdsClient.ListWorkflowIdExternalIds.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.ExternalIdsClient.ListWorkflowIdExternalIds.g.cs @@ -349,18 +349,17 @@ partial void ProcessListWorkflowIdExternalIdsResponseContent( __exception_400 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Unauthorized if ((int)__response.StatusCode == 401) @@ -387,18 +386,17 @@ partial void ProcessListWorkflowIdExternalIdsResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Entity Not Found if ((int)__response.StatusCode == 404) @@ -425,18 +423,17 @@ partial void ProcessListWorkflowIdExternalIdsResponseContent( __exception_404 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Validation Error if ((int)__response.StatusCode == 422) @@ -463,18 +460,17 @@ partial void ProcessListWorkflowIdExternalIdsResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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 +504,15 @@ partial void ProcessListWorkflowIdExternalIdsResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::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 +549,15 @@ partial void ProcessListWorkflowIdExternalIdsResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.ExternalIdsClient.UpsertPromptTemplateByExternalId.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.ExternalIdsClient.UpsertPromptTemplateByExternalId.g.cs index c0f9dee..3692653 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.ExternalIdsClient.UpsertPromptTemplateByExternalId.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.ExternalIdsClient.UpsertPromptTemplateByExternalId.g.cs @@ -378,18 +378,17 @@ partial void ProcessUpsertPromptTemplateByExternalIdResponseContent( __exception_400 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Unauthorized if ((int)__response.StatusCode == 401) @@ -416,18 +415,17 @@ partial void ProcessUpsertPromptTemplateByExternalIdResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Entity Not Found if ((int)__response.StatusCode == 404) @@ -454,18 +452,17 @@ partial void ProcessUpsertPromptTemplateByExternalIdResponseContent( __exception_404 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Conflict if ((int)__response.StatusCode == 409) @@ -492,18 +489,17 @@ partial void ProcessUpsertPromptTemplateByExternalIdResponseContent( __exception_409 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Validation Error if ((int)__response.StatusCode == 422) @@ -530,18 +526,17 @@ partial void ProcessUpsertPromptTemplateByExternalIdResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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) @@ -575,17 +570,15 @@ partial void ProcessUpsertPromptTemplateByExternalIdResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -622,17 +615,15 @@ partial void ProcessUpsertPromptTemplateByExternalIdResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.FoldersClient.CreateFolderApiPublicV2FoldersPost.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.FoldersClient.CreateFolderApiPublicV2FoldersPost.g.cs index e18a647..f5b38ec 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.FoldersClient.CreateFolderApiPublicV2FoldersPost.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.FoldersClient.CreateFolderApiPublicV2FoldersPost.g.cs @@ -360,18 +360,17 @@ partial void ProcessCreateFolderApiPublicV2FoldersPostResponseContent( __exception_400 = __ex; } - throw new global::PromptLayer.ApiException?>( + + throw global::PromptLayer.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)); } // Unauthorized - Missing or invalid API key if ((int)__response.StatusCode == 401) @@ -398,18 +397,17 @@ partial void ProcessCreateFolderApiPublicV2FoldersPostResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Parent folder not found if ((int)__response.StatusCode == 404) @@ -436,18 +434,17 @@ partial void ProcessCreateFolderApiPublicV2FoldersPostResponseContent( __exception_404 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // External ID conflict if ((int)__response.StatusCode == 409) @@ -474,18 +471,17 @@ partial void ProcessCreateFolderApiPublicV2FoldersPostResponseContent( __exception_409 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Validation error - request parameters or body are invalid. if ((int)__response.StatusCode == 422) @@ -512,18 +508,17 @@ partial void ProcessCreateFolderApiPublicV2FoldersPostResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException?>( + + throw global::PromptLayer.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) @@ -557,17 +552,15 @@ partial void ProcessCreateFolderApiPublicV2FoldersPostResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -604,17 +597,15 @@ partial void ProcessCreateFolderApiPublicV2FoldersPostResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.FoldersClient.DeleteFolderEntitiesApiPublicV2FoldersEntitiesDelete.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.FoldersClient.DeleteFolderEntitiesApiPublicV2FoldersEntitiesDelete.g.cs index 37ff4d5..7d30052 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.FoldersClient.DeleteFolderEntitiesApiPublicV2FoldersEntitiesDelete.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.FoldersClient.DeleteFolderEntitiesApiPublicV2FoldersEntitiesDelete.g.cs @@ -360,18 +360,17 @@ partial void ProcessDeleteFolderEntitiesApiPublicV2FoldersEntitiesDeleteResponse __exception_400 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Unauthorized - Missing or invalid API key if ((int)__response.StatusCode == 401) @@ -398,18 +397,17 @@ partial void ProcessDeleteFolderEntitiesApiPublicV2FoldersEntitiesDeleteResponse __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Entity not found if ((int)__response.StatusCode == 404) @@ -436,18 +434,17 @@ partial void ProcessDeleteFolderEntitiesApiPublicV2FoldersEntitiesDeleteResponse __exception_404 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Validation error - request parameters or body are invalid. if ((int)__response.StatusCode == 422) @@ -474,18 +471,17 @@ partial void ProcessDeleteFolderEntitiesApiPublicV2FoldersEntitiesDeleteResponse __exception_422 = __ex; } - throw new global::PromptLayer.ApiException?>( + + throw global::PromptLayer.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)); } // Internal server error during deletion if ((int)__response.StatusCode == 500) @@ -512,18 +508,17 @@ partial void ProcessDeleteFolderEntitiesApiPublicV2FoldersEntitiesDeleteResponse __exception_500 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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) @@ -557,17 +552,15 @@ partial void ProcessDeleteFolderEntitiesApiPublicV2FoldersEntitiesDeleteResponse } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -604,17 +597,15 @@ partial void ProcessDeleteFolderEntitiesApiPublicV2FoldersEntitiesDeleteResponse { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.FoldersClient.ListFolderEntitiesApiPublicV2FoldersEntitiesGet.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.FoldersClient.ListFolderEntitiesApiPublicV2FoldersEntitiesGet.g.cs index 68bd504..ae4c445 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.FoldersClient.ListFolderEntitiesApiPublicV2FoldersEntitiesGet.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.FoldersClient.ListFolderEntitiesApiPublicV2FoldersEntitiesGet.g.cs @@ -572,18 +572,17 @@ partial void ProcessListFolderEntitiesApiPublicV2FoldersEntitiesGetResponseConte __exception_400 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Unauthorized - missing or invalid API key. if ((int)__response.StatusCode == 401) @@ -610,18 +609,17 @@ partial void ProcessListFolderEntitiesApiPublicV2FoldersEntitiesGetResponseConte __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Folder not found if ((int)__response.StatusCode == 404) @@ -648,18 +646,17 @@ partial void ProcessListFolderEntitiesApiPublicV2FoldersEntitiesGetResponseConte __exception_404 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Validation error - request parameters or body are invalid. if ((int)__response.StatusCode == 422) @@ -686,18 +683,17 @@ partial void ProcessListFolderEntitiesApiPublicV2FoldersEntitiesGetResponseConte __exception_422 = __ex; } - throw new global::PromptLayer.ApiException?>( + + throw global::PromptLayer.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) @@ -731,17 +727,15 @@ partial void ProcessListFolderEntitiesApiPublicV2FoldersEntitiesGetResponseConte } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -778,17 +772,15 @@ partial void ProcessListFolderEntitiesApiPublicV2FoldersEntitiesGetResponseConte { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.FoldersClient.MoveFolderEntitiesApiPublicV2FoldersEntitiesPost.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.FoldersClient.MoveFolderEntitiesApiPublicV2FoldersEntitiesPost.g.cs index 4be6741..f6ba3fa 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.FoldersClient.MoveFolderEntitiesApiPublicV2FoldersEntitiesPost.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.FoldersClient.MoveFolderEntitiesApiPublicV2FoldersEntitiesPost.g.cs @@ -360,18 +360,17 @@ partial void ProcessMoveFolderEntitiesApiPublicV2FoldersEntitiesPostResponseCont __exception_400 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Unauthorized - Missing or invalid API key if ((int)__response.StatusCode == 401) @@ -398,18 +397,17 @@ partial void ProcessMoveFolderEntitiesApiPublicV2FoldersEntitiesPostResponseCont __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Folder or entity not found if ((int)__response.StatusCode == 404) @@ -436,18 +434,17 @@ partial void ProcessMoveFolderEntitiesApiPublicV2FoldersEntitiesPostResponseCont __exception_404 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Validation error - request parameters or body are invalid. if ((int)__response.StatusCode == 422) @@ -474,18 +471,17 @@ partial void ProcessMoveFolderEntitiesApiPublicV2FoldersEntitiesPostResponseCont __exception_422 = __ex; } - throw new global::PromptLayer.ApiException?>( + + throw global::PromptLayer.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) @@ -519,17 +515,15 @@ partial void ProcessMoveFolderEntitiesApiPublicV2FoldersEntitiesPostResponseCont } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -566,17 +560,15 @@ partial void ProcessMoveFolderEntitiesApiPublicV2FoldersEntitiesPostResponseCont { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.FoldersClient.ResolveFolderIdApiPublicV2FoldersResolveIdGet.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.FoldersClient.ResolveFolderIdApiPublicV2FoldersResolveIdGet.g.cs index b945cb2..9506915 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.FoldersClient.ResolveFolderIdApiPublicV2FoldersResolveIdGet.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.FoldersClient.ResolveFolderIdApiPublicV2FoldersResolveIdGet.g.cs @@ -370,18 +370,17 @@ partial void ProcessResolveFolderIdApiPublicV2FoldersResolveIdGetResponseContent __exception_400 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Unauthorized - missing or invalid API key. if ((int)__response.StatusCode == 401) @@ -408,18 +407,17 @@ partial void ProcessResolveFolderIdApiPublicV2FoldersResolveIdGetResponseContent __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Folder path not found if ((int)__response.StatusCode == 404) @@ -446,18 +444,17 @@ partial void ProcessResolveFolderIdApiPublicV2FoldersResolveIdGetResponseContent __exception_404 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Validation error - request parameters or body are invalid. if ((int)__response.StatusCode == 422) @@ -484,18 +481,17 @@ partial void ProcessResolveFolderIdApiPublicV2FoldersResolveIdGetResponseContent __exception_422 = __ex; } - throw new global::PromptLayer.ApiException?>( + + throw global::PromptLayer.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) @@ -529,17 +525,15 @@ partial void ProcessResolveFolderIdApiPublicV2FoldersResolveIdGetResponseContent } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -576,17 +570,15 @@ partial void ProcessResolveFolderIdApiPublicV2FoldersResolveIdGetResponseContent { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.FoldersClient.UpdateFolderApiPublicV2FoldersPatch.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.FoldersClient.UpdateFolderApiPublicV2FoldersPatch.g.cs index 891ea83..c8bf321 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.FoldersClient.UpdateFolderApiPublicV2FoldersPatch.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.FoldersClient.UpdateFolderApiPublicV2FoldersPatch.g.cs @@ -373,18 +373,17 @@ partial void ProcessUpdateFolderApiPublicV2FoldersPatchResponseContent( __exception_400 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Unauthorized - Missing or invalid API key if ((int)__response.StatusCode == 401) @@ -411,18 +410,17 @@ partial void ProcessUpdateFolderApiPublicV2FoldersPatchResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Folder not found if ((int)__response.StatusCode == 404) @@ -449,18 +447,17 @@ partial void ProcessUpdateFolderApiPublicV2FoldersPatchResponseContent( __exception_404 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Validation error - request parameters or body are invalid. if ((int)__response.StatusCode == 422) @@ -487,18 +484,17 @@ partial void ProcessUpdateFolderApiPublicV2FoldersPatchResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException?>( + + throw global::PromptLayer.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) @@ -532,17 +528,15 @@ partial void ProcessUpdateFolderApiPublicV2FoldersPatchResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -579,17 +573,15 @@ partial void ProcessUpdateFolderApiPublicV2FoldersPatchResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.GroupClient.TrackGroup.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.GroupClient.TrackGroup.g.cs index 703dc71..0e2011e 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.GroupClient.TrackGroup.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.GroupClient.TrackGroup.g.cs @@ -356,17 +356,16 @@ partial void ProcessTrackGroupResponseContent( __exception_400 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // if ((int)__response.StatusCode == 401) @@ -389,17 +388,16 @@ partial void ProcessTrackGroupResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Validation error - request parameters or body are invalid. if ((int)__response.StatusCode == 422) @@ -426,18 +424,17 @@ partial void ProcessTrackGroupResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException?>( + + throw global::PromptLayer.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) @@ -471,17 +468,15 @@ partial void ProcessTrackGroupResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::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 +513,15 @@ partial void ProcessTrackGroupResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.MetadataClient.TrackMetadata.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.MetadataClient.TrackMetadata.g.cs index f8fcf8c..8fbb09d 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.MetadataClient.TrackMetadata.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.MetadataClient.TrackMetadata.g.cs @@ -356,17 +356,16 @@ partial void ProcessTrackMetadataResponseContent( __exception_400 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Unauthorized - missing or invalid API key. if ((int)__response.StatusCode == 401) @@ -393,18 +392,17 @@ partial void ProcessTrackMetadataResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Validation error - request parameters or body are invalid. if ((int)__response.StatusCode == 422) @@ -431,18 +429,17 @@ partial void ProcessTrackMetadataResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException?>( + + throw global::PromptLayer.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) @@ -476,17 +473,15 @@ partial void ProcessTrackMetadataResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -523,17 +518,15 @@ partial void ProcessTrackMetadataResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.OtlpClient.IngestOtlpTraces.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.OtlpClient.IngestOtlpTraces.g.cs index c072d46..8e7b99f 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.OtlpClient.IngestOtlpTraces.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.OtlpClient.IngestOtlpTraces.g.cs @@ -385,18 +385,17 @@ partial void ProcessIngestOtlpTracesResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Unsupported Content-Type if ((int)__response.StatusCode == 415) @@ -423,18 +422,17 @@ partial void ProcessIngestOtlpTracesResponseContent( __exception_415 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_415 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_415, - statusCode: __response.StatusCode) - { - ResponseBody = __content_415, - ResponseObject = __value_415, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_415, + responseObject: __value_415, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Validation error - request parameters or body are invalid. if ((int)__response.StatusCode == 422) @@ -461,18 +459,17 @@ partial void ProcessIngestOtlpTracesResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException?>( + + throw global::PromptLayer.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)); } // Internal server error during ingestion if ((int)__response.StatusCode == 500) @@ -499,18 +496,17 @@ partial void ProcessIngestOtlpTracesResponseContent( __exception_500 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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) @@ -544,17 +540,15 @@ partial void ProcessIngestOtlpTracesResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -591,17 +585,15 @@ partial void ProcessIngestOtlpTracesResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.PromptClient.TrackPrompt.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.PromptClient.TrackPrompt.g.cs index 59d0bad..2a7f9a2 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.PromptClient.TrackPrompt.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.PromptClient.TrackPrompt.g.cs @@ -356,17 +356,16 @@ partial void ProcessTrackPromptResponseContent( __exception_400 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Unauthorized - missing or invalid API key. if ((int)__response.StatusCode == 401) @@ -393,18 +392,17 @@ partial void ProcessTrackPromptResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Validation error - request parameters or body are invalid. if ((int)__response.StatusCode == 422) @@ -431,18 +429,17 @@ partial void ProcessTrackPromptResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException?>( + + throw global::PromptLayer.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) @@ -476,17 +473,15 @@ partial void ProcessTrackPromptResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -523,17 +518,15 @@ partial void ProcessTrackPromptResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.PromptTemplatesClient.DeletePromptTemplatesLabelsPromptLabelId.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.PromptTemplatesClient.DeletePromptTemplatesLabelsPromptLabelId.g.cs index 7ea289e..50017a5 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.PromptTemplatesClient.DeletePromptTemplatesLabelsPromptLabelId.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.PromptTemplatesClient.DeletePromptTemplatesLabelsPromptLabelId.g.cs @@ -349,18 +349,17 @@ partial void ProcessDeletePromptTemplatesLabelsPromptLabelIdResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Validation error - request parameters or body are invalid. if ((int)__response.StatusCode == 422) @@ -387,18 +386,17 @@ partial void ProcessDeletePromptTemplatesLabelsPromptLabelIdResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException?>( + + throw global::PromptLayer.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 +428,15 @@ partial void ProcessDeletePromptTemplatesLabelsPromptLabelIdResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::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 +471,15 @@ partial void ProcessDeletePromptTemplatesLabelsPromptLabelIdResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.PromptTemplatesClient.GetAllPromptTemplatesGet.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.PromptTemplatesClient.GetAllPromptTemplatesGet.g.cs index 05f18f1..a283883 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.PromptTemplatesClient.GetAllPromptTemplatesGet.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.PromptTemplatesClient.GetAllPromptTemplatesGet.g.cs @@ -510,18 +510,17 @@ partial void ProcessGetAllPromptTemplatesGetResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Validation error - request parameters or body are invalid. if ((int)__response.StatusCode == 422) @@ -548,18 +547,17 @@ partial void ProcessGetAllPromptTemplatesGetResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException?>( + + throw global::PromptLayer.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) @@ -593,17 +591,15 @@ partial void ProcessGetAllPromptTemplatesGetResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -640,17 +636,15 @@ partial void ProcessGetAllPromptTemplatesGetResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.PromptTemplatesClient.GetPromptTemplateRaw.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.PromptTemplatesClient.GetPromptTemplateRaw.g.cs index 9a26aba..def2d5e 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.PromptTemplatesClient.GetPromptTemplateRaw.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.PromptTemplatesClient.GetPromptTemplateRaw.g.cs @@ -415,18 +415,17 @@ partial void ProcessGetPromptTemplateRawResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Not found - requested resource does not exist or is not accessible. if ((int)__response.StatusCode == 404) @@ -453,18 +452,17 @@ partial void ProcessGetPromptTemplateRawResponseContent( __exception_404 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Validation error - request parameters or body are invalid. if ((int)__response.StatusCode == 422) @@ -491,18 +489,17 @@ partial void ProcessGetPromptTemplateRawResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException?>( + + throw global::PromptLayer.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) @@ -536,17 +533,15 @@ partial void ProcessGetPromptTemplateRawResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -583,17 +578,15 @@ partial void ProcessGetPromptTemplateRawResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.PromptTemplatesClient.GetPromptTemplatesLabelsPromptIdentifierPost.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.PromptTemplatesClient.GetPromptTemplatesLabelsPromptIdentifierPost.g.cs index e60074b..34955aa 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.PromptTemplatesClient.GetPromptTemplatesLabelsPromptIdentifierPost.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.PromptTemplatesClient.GetPromptTemplatesLabelsPromptIdentifierPost.g.cs @@ -353,18 +353,17 @@ partial void ProcessGetPromptTemplatesLabelsPromptIdentifierPostResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // if ((int)__response.StatusCode == 404) @@ -387,17 +386,16 @@ partial void ProcessGetPromptTemplatesLabelsPromptIdentifierPostResponseContent( __exception_404 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Validation error - request parameters or body are invalid. if ((int)__response.StatusCode == 422) @@ -424,18 +422,17 @@ partial void ProcessGetPromptTemplatesLabelsPromptIdentifierPostResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException?>( + + throw global::PromptLayer.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) @@ -469,17 +466,15 @@ partial void ProcessGetPromptTemplatesLabelsPromptIdentifierPostResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::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 +511,15 @@ partial void ProcessGetPromptTemplatesLabelsPromptIdentifierPostResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.PromptTemplatesClient.GetPromptTemplatesPromptIdentifierPost.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.PromptTemplatesClient.GetPromptTemplatesPromptIdentifierPost.g.cs index ac377ca..5f56584 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.PromptTemplatesClient.GetPromptTemplatesPromptIdentifierPost.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.PromptTemplatesClient.GetPromptTemplatesPromptIdentifierPost.g.cs @@ -373,18 +373,17 @@ partial void ProcessGetPromptTemplatesPromptIdentifierPostResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Validation Error if ((int)__response.StatusCode == 422) @@ -411,18 +410,17 @@ partial void ProcessGetPromptTemplatesPromptIdentifierPostResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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) @@ -456,17 +454,15 @@ partial void ProcessGetPromptTemplatesPromptIdentifierPostResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -503,17 +499,15 @@ partial void ProcessGetPromptTemplatesPromptIdentifierPostResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.PromptTemplatesClient.GetSnippetUsage.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.PromptTemplatesClient.GetSnippetUsage.g.cs index 3439077..943e37b 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.PromptTemplatesClient.GetSnippetUsage.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.PromptTemplatesClient.GetSnippetUsage.g.cs @@ -369,18 +369,17 @@ partial void ProcessGetSnippetUsageResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // if ((int)__response.StatusCode == 403) @@ -403,17 +402,16 @@ partial void ProcessGetSnippetUsageResponseContent( __exception_403 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // if ((int)__response.StatusCode == 404) @@ -436,17 +434,16 @@ partial void ProcessGetSnippetUsageResponseContent( __exception_404 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Validation error - request parameters or body are invalid. if ((int)__response.StatusCode == 422) @@ -473,18 +470,17 @@ partial void ProcessGetSnippetUsageResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException?>( + + throw global::PromptLayer.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) @@ -518,17 +514,15 @@ partial void ProcessGetSnippetUsageResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -565,17 +559,15 @@ partial void ProcessGetSnippetUsageResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.PromptTemplatesClient.PromptTemplatesLabelsPromptLabelIdPatch.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.PromptTemplatesClient.PromptTemplatesLabelsPromptLabelIdPatch.g.cs index e444c08..91336ac 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.PromptTemplatesClient.PromptTemplatesLabelsPromptLabelIdPatch.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.PromptTemplatesClient.PromptTemplatesLabelsPromptLabelIdPatch.g.cs @@ -369,18 +369,17 @@ partial void ProcessPromptTemplatesLabelsPromptLabelIdPatchResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Validation error - request parameters or body are invalid. if ((int)__response.StatusCode == 422) @@ -407,18 +406,17 @@ partial void ProcessPromptTemplatesLabelsPromptLabelIdPatchResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException?>( + + throw global::PromptLayer.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) @@ -452,17 +450,15 @@ partial void ProcessPromptTemplatesLabelsPromptLabelIdPatchResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -499,17 +495,15 @@ partial void ProcessPromptTemplatesLabelsPromptLabelIdPatchResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.PromptsClient.CreatePromptLabel.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.PromptsClient.CreatePromptLabel.g.cs index c3a2776..fc3f4a2 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.PromptsClient.CreatePromptLabel.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.PromptsClient.CreatePromptLabel.g.cs @@ -369,18 +369,17 @@ partial void ProcessCreatePromptLabelResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Validation error - request parameters or body are invalid. if ((int)__response.StatusCode == 422) @@ -407,18 +406,17 @@ partial void ProcessCreatePromptLabelResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException?>( + + throw global::PromptLayer.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) @@ -452,17 +450,15 @@ partial void ProcessCreatePromptLabelResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -499,17 +495,15 @@ partial void ProcessCreatePromptLabelResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.ReportsClient.AddReportColumn.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.ReportsClient.AddReportColumn.g.cs index bdd2bf2..b5ede2e 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.ReportsClient.AddReportColumn.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.ReportsClient.AddReportColumn.g.cs @@ -360,18 +360,17 @@ partial void ProcessAddReportColumnResponseContent( __exception_400 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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 ((int)__response.StatusCode == 401) @@ -394,17 +393,16 @@ partial void ProcessAddReportColumnResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Forbidden - Cannot overwrite dataset columns or missing permissions if ((int)__response.StatusCode == 403) @@ -431,18 +429,17 @@ partial void ProcessAddReportColumnResponseContent( __exception_403 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Not Found - Report not found or not accessible if ((int)__response.StatusCode == 404) @@ -469,18 +466,17 @@ partial void ProcessAddReportColumnResponseContent( __exception_404 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Validation error - request parameters or body are invalid. if ((int)__response.StatusCode == 422) @@ -507,18 +503,17 @@ partial void ProcessAddReportColumnResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException?>( + + throw global::PromptLayer.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) @@ -552,17 +547,15 @@ partial void ProcessAddReportColumnResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -599,17 +592,15 @@ partial void ProcessAddReportColumnResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.ReportsClient.CreateEvaluationPipeline.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.ReportsClient.CreateEvaluationPipeline.g.cs index 4c79523..ba551f3 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.ReportsClient.CreateEvaluationPipeline.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.ReportsClient.CreateEvaluationPipeline.g.cs @@ -360,18 +360,17 @@ partial void ProcessCreateEvaluationPipelineResponseContent( __exception_400 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Unauthorized - missing or invalid API key. if ((int)__response.StatusCode == 401) @@ -398,18 +397,17 @@ partial void ProcessCreateEvaluationPipelineResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Forbidden - API key does not have access to the requested resource. if ((int)__response.StatusCode == 403) @@ -436,18 +434,17 @@ partial void ProcessCreateEvaluationPipelineResponseContent( __exception_403 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Not found - requested resource does not exist or is not accessible. if ((int)__response.StatusCode == 404) @@ -474,18 +471,17 @@ partial void ProcessCreateEvaluationPipelineResponseContent( __exception_404 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // External ID conflict if ((int)__response.StatusCode == 409) @@ -512,18 +508,17 @@ partial void ProcessCreateEvaluationPipelineResponseContent( __exception_409 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Validation error - request parameters or body are invalid. if ((int)__response.StatusCode == 422) @@ -550,18 +545,17 @@ partial void ProcessCreateEvaluationPipelineResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException?>( + + throw global::PromptLayer.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) @@ -595,17 +589,15 @@ partial void ProcessCreateEvaluationPipelineResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -642,17 +634,15 @@ partial void ProcessCreateEvaluationPipelineResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.ReportsClient.DeleteReport.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.ReportsClient.DeleteReport.g.cs index 64fbd81..023eeec 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.ReportsClient.DeleteReport.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.ReportsClient.DeleteReport.g.cs @@ -349,18 +349,17 @@ partial void ProcessDeleteReportResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Not found - requested resource does not exist or is not accessible. if ((int)__response.StatusCode == 404) @@ -387,18 +386,17 @@ partial void ProcessDeleteReportResponseContent( __exception_404 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Validation error - request parameters or body are invalid. if ((int)__response.StatusCode == 422) @@ -425,18 +423,17 @@ partial void ProcessDeleteReportResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException?>( + + throw global::PromptLayer.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) @@ -470,17 +467,15 @@ partial void ProcessDeleteReportResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -517,17 +512,15 @@ partial void ProcessDeleteReportResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.ReportsClient.DeleteReportColumn.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.ReportsClient.DeleteReportColumn.g.cs index 7275ab7..bffc0d9 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.ReportsClient.DeleteReportColumn.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.ReportsClient.DeleteReportColumn.g.cs @@ -342,18 +342,17 @@ await DeleteReportColumnAsResponseAsync( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Forbidden - API key does not have access to the requested resource. if ((int)__response.StatusCode == 403) @@ -380,18 +379,17 @@ await DeleteReportColumnAsResponseAsync( __exception_403 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Not found - requested resource does not exist or is not accessible. if ((int)__response.StatusCode == 404) @@ -418,18 +416,17 @@ await DeleteReportColumnAsResponseAsync( __exception_404 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Validation error - request parameters or body are invalid. if ((int)__response.StatusCode == 422) @@ -456,18 +453,17 @@ await DeleteReportColumnAsResponseAsync( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException?>( + + throw global::PromptLayer.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 +490,15 @@ await DeleteReportColumnAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -532,17 +526,15 @@ await DeleteReportColumnAsResponseAsync( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.ReportsClient.DeleteReportsByName.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.ReportsClient.DeleteReportsByName.g.cs index ae26389..526ee85 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.ReportsClient.DeleteReportsByName.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.ReportsClient.DeleteReportsByName.g.cs @@ -345,17 +345,16 @@ partial void ProcessDeleteReportsByNameResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // if ((int)__response.StatusCode == 404) @@ -378,17 +377,16 @@ partial void ProcessDeleteReportsByNameResponseContent( __exception_404 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Validation error - request parameters or body are invalid. if ((int)__response.StatusCode == 422) @@ -415,18 +413,17 @@ partial void ProcessDeleteReportsByNameResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException?>( + + throw global::PromptLayer.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 +457,15 @@ partial void ProcessDeleteReportsByNameResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::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 +502,15 @@ partial void ProcessDeleteReportsByNameResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.ReportsClient.EditReportColumn.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.ReportsClient.EditReportColumn.g.cs index c4c969a..37531fc 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.ReportsClient.EditReportColumn.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.ReportsClient.EditReportColumn.g.cs @@ -365,17 +365,16 @@ partial void ProcessEditReportColumnResponseContent( __exception_400 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Unauthorized - missing or invalid API key. if ((int)__response.StatusCode == 401) @@ -402,18 +401,17 @@ partial void ProcessEditReportColumnResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Forbidden - API key does not have access to the requested resource. if ((int)__response.StatusCode == 403) @@ -440,18 +438,17 @@ partial void ProcessEditReportColumnResponseContent( __exception_403 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Not found - requested resource does not exist or is not accessible. if ((int)__response.StatusCode == 404) @@ -478,18 +475,17 @@ partial void ProcessEditReportColumnResponseContent( __exception_404 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Validation error - request parameters or body are invalid. if ((int)__response.StatusCode == 422) @@ -516,18 +512,17 @@ partial void ProcessEditReportColumnResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException?>( + + throw global::PromptLayer.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) @@ -561,17 +556,15 @@ partial void ProcessEditReportColumnResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -608,17 +601,15 @@ partial void ProcessEditReportColumnResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.ReportsClient.GetReport.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.ReportsClient.GetReport.g.cs index c944ad6..e230e91 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.ReportsClient.GetReport.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.ReportsClient.GetReport.g.cs @@ -345,17 +345,16 @@ partial void ProcessGetReportResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // if ((int)__response.StatusCode == 404) @@ -378,17 +377,16 @@ partial void ProcessGetReportResponseContent( __exception_404 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Validation error - request parameters or body are invalid. if ((int)__response.StatusCode == 422) @@ -415,18 +413,17 @@ partial void ProcessGetReportResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException?>( + + throw global::PromptLayer.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 +457,15 @@ partial void ProcessGetReportResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::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 +502,15 @@ partial void ProcessGetReportResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.ReportsClient.GetReportScore.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.ReportsClient.GetReportScore.g.cs index 5a9c0d0..45b10af 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.ReportsClient.GetReportScore.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.ReportsClient.GetReportScore.g.cs @@ -345,17 +345,16 @@ partial void ProcessGetReportScoreResponseContent( __exception_400 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // if ((int)__response.StatusCode == 401) @@ -378,17 +377,16 @@ partial void ProcessGetReportScoreResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // if ((int)__response.StatusCode == 403) @@ -411,17 +409,16 @@ partial void ProcessGetReportScoreResponseContent( __exception_403 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // if ((int)__response.StatusCode == 404) @@ -444,17 +441,16 @@ partial void ProcessGetReportScoreResponseContent( __exception_404 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Validation error - request parameters or body are invalid. if ((int)__response.StatusCode == 422) @@ -481,18 +477,17 @@ partial void ProcessGetReportScoreResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException?>( + + throw global::PromptLayer.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) @@ -526,17 +521,15 @@ partial void ProcessGetReportScoreResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::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 +566,15 @@ partial void ProcessGetReportScoreResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.ReportsClient.RenameReport.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.ReportsClient.RenameReport.g.cs index eb50b6f..b1c5c80 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.ReportsClient.RenameReport.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.ReportsClient.RenameReport.g.cs @@ -365,17 +365,16 @@ partial void ProcessRenameReportResponseContent( __exception_400 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Unauthorized - missing or invalid API key. if ((int)__response.StatusCode == 401) @@ -402,18 +401,17 @@ partial void ProcessRenameReportResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Not found - requested resource does not exist or is not accessible. if ((int)__response.StatusCode == 404) @@ -440,18 +438,17 @@ partial void ProcessRenameReportResponseContent( __exception_404 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Validation error - request parameters or body are invalid. if ((int)__response.StatusCode == 422) @@ -478,18 +475,17 @@ partial void ProcessRenameReportResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException?>( + + throw global::PromptLayer.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 +519,15 @@ partial void ProcessRenameReportResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::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 +564,15 @@ partial void ProcessRenameReportResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.ReportsClient.RunReport.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.ReportsClient.RunReport.g.cs index 4545b2a..64155e7 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.ReportsClient.RunReport.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.ReportsClient.RunReport.g.cs @@ -369,18 +369,17 @@ partial void ProcessRunReportResponseContent( __exception_400 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Unauthorized - No requests found for the given criteria if ((int)__response.StatusCode == 401) @@ -407,18 +406,17 @@ partial void ProcessRunReportResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Forbidden - Can only run evaluation pipeline reports or dataset refresh not allowed if ((int)__response.StatusCode == 403) @@ -445,18 +443,17 @@ partial void ProcessRunReportResponseContent( __exception_403 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Not Found - Report or dataset not found if ((int)__response.StatusCode == 404) @@ -483,18 +480,17 @@ partial void ProcessRunReportResponseContent( __exception_404 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Validation error - request parameters or body are invalid. if ((int)__response.StatusCode == 422) @@ -521,18 +517,17 @@ partial void ProcessRunReportResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException?>( + + throw global::PromptLayer.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) @@ -566,17 +561,15 @@ partial void ProcessRunReportResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -613,17 +606,15 @@ partial void ProcessRunReportResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.ReportsClient.UpdateReportScoreCard.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.ReportsClient.UpdateReportScoreCard.g.cs index bda15c3..a42dbd3 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.ReportsClient.UpdateReportScoreCard.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.ReportsClient.UpdateReportScoreCard.g.cs @@ -369,18 +369,17 @@ partial void ProcessUpdateReportScoreCardResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Not found - requested resource does not exist or is not accessible. if ((int)__response.StatusCode == 404) @@ -407,18 +406,17 @@ partial void ProcessUpdateReportScoreCardResponseContent( __exception_404 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Validation error - request parameters or body are invalid. if ((int)__response.StatusCode == 422) @@ -445,18 +443,17 @@ partial void ProcessUpdateReportScoreCardResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException?>( + + throw global::PromptLayer.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) @@ -490,17 +487,15 @@ partial void ProcessUpdateReportScoreCardResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -537,17 +532,15 @@ partial void ProcessUpdateReportScoreCardResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.RequestClient.LogRequest.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.RequestClient.LogRequest.g.cs index 2233ee7..779affa 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.RequestClient.LogRequest.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.RequestClient.LogRequest.g.cs @@ -360,18 +360,17 @@ partial void ProcessLogRequestResponseContent( __exception_400 = __ex; } - throw new global::PromptLayer.ApiException?>( + + throw global::PromptLayer.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)); } // Unauthorized - missing or invalid API key. if ((int)__response.StatusCode == 401) @@ -398,18 +397,17 @@ partial void ProcessLogRequestResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Not found - requested resource does not exist or is not accessible. if ((int)__response.StatusCode == 404) @@ -436,18 +434,17 @@ partial void ProcessLogRequestResponseContent( __exception_404 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Validation error - request parameters or body are invalid. if ((int)__response.StatusCode == 422) @@ -474,18 +471,17 @@ partial void ProcessLogRequestResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException?>( + + throw global::PromptLayer.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) @@ -519,17 +515,15 @@ partial void ProcessLogRequestResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -566,17 +560,15 @@ partial void ProcessLogRequestResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.RestClient.PatchPromptTemplateVersion.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.RestClient.PatchPromptTemplateVersion.g.cs index 8ca63d1..defa25d 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.RestClient.PatchPromptTemplateVersion.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.RestClient.PatchPromptTemplateVersion.g.cs @@ -373,18 +373,17 @@ partial void ProcessPatchPromptTemplateVersionResponseContent( __exception_400 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Unauthorized - missing or invalid API key. if ((int)__response.StatusCode == 401) @@ -411,18 +410,17 @@ partial void ProcessPatchPromptTemplateVersionResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Not found - requested resource does not exist or is not accessible. if ((int)__response.StatusCode == 404) @@ -449,18 +447,17 @@ partial void ProcessPatchPromptTemplateVersionResponseContent( __exception_404 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Validation error - request parameters or body are invalid. if ((int)__response.StatusCode == 422) @@ -487,18 +484,17 @@ partial void ProcessPatchPromptTemplateVersionResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException?>( + + throw global::PromptLayer.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) @@ -532,17 +528,15 @@ partial void ProcessPatchPromptTemplateVersionResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -579,17 +573,15 @@ partial void ProcessPatchPromptTemplateVersionResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.RestClient.PublishPromptTemplateRestPromptTemplatesPost.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.RestClient.PublishPromptTemplateRestPromptTemplatesPost.g.cs index 3a4c26b..ca71cd6 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.RestClient.PublishPromptTemplateRestPromptTemplatesPost.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.RestClient.PublishPromptTemplateRestPromptTemplatesPost.g.cs @@ -360,18 +360,17 @@ partial void ProcessPublishPromptTemplateRestPromptTemplatesPostResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // External ID conflict if ((int)__response.StatusCode == 409) @@ -398,18 +397,17 @@ partial void ProcessPublishPromptTemplateRestPromptTemplatesPostResponseContent( __exception_409 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Validation Error if ((int)__response.StatusCode == 422) @@ -436,18 +434,17 @@ partial void ProcessPublishPromptTemplateRestPromptTemplatesPostResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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) @@ -481,17 +478,15 @@ partial void ProcessPublishPromptTemplateRestPromptTemplatesPostResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::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 +523,15 @@ partial void ProcessPublishPromptTemplateRestPromptTemplatesPostResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.ScoreClient.TrackScore.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.ScoreClient.TrackScore.g.cs index f1f0e09..34a9448 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.ScoreClient.TrackScore.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.ScoreClient.TrackScore.g.cs @@ -356,17 +356,16 @@ partial void ProcessTrackScoreResponseContent( __exception_400 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // if ((int)__response.StatusCode == 401) @@ -389,17 +388,16 @@ partial void ProcessTrackScoreResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Validation error - request parameters or body are invalid. if ((int)__response.StatusCode == 422) @@ -426,18 +424,17 @@ partial void ProcessTrackScoreResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException?>( + + throw global::PromptLayer.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) @@ -471,17 +468,15 @@ partial void ProcessTrackScoreResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::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 +513,15 @@ partial void ProcessTrackScoreResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.SkillCollectionsClient.CreateSkillCollectionPublic.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.SkillCollectionsClient.CreateSkillCollectionPublic.g.cs index e9f7c7f..ded4d16 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.SkillCollectionsClient.CreateSkillCollectionPublic.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.SkillCollectionsClient.CreateSkillCollectionPublic.g.cs @@ -360,18 +360,17 @@ partial void ProcessCreateSkillCollectionPublicResponseContent( __exception_400 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Authentication failed. if ((int)__response.StatusCode == 401) @@ -398,18 +397,17 @@ partial void ProcessCreateSkillCollectionPublicResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Invalid workspace_id or plan limit reached. if ((int)__response.StatusCode == 403) @@ -436,18 +434,17 @@ partial void ProcessCreateSkillCollectionPublicResponseContent( __exception_403 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // External ID conflict if ((int)__response.StatusCode == 409) @@ -474,18 +471,17 @@ partial void ProcessCreateSkillCollectionPublicResponseContent( __exception_409 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Unsupported content type. if ((int)__response.StatusCode == 415) @@ -512,18 +508,17 @@ partial void ProcessCreateSkillCollectionPublicResponseContent( __exception_415 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_415 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_415, - statusCode: __response.StatusCode) - { - ResponseBody = __content_415, - ResponseObject = __value_415, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_415, + responseObject: __value_415, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Validation error - request parameters or body are invalid. if ((int)__response.StatusCode == 422) @@ -550,18 +545,17 @@ partial void ProcessCreateSkillCollectionPublicResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException?>( + + throw global::PromptLayer.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) @@ -595,17 +589,15 @@ partial void ProcessCreateSkillCollectionPublicResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -642,17 +634,15 @@ partial void ProcessCreateSkillCollectionPublicResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.SkillCollectionsClient.GetSkillCollectionPublic.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.SkillCollectionsClient.GetSkillCollectionPublic.g.cs index b99d28b..a0d44f5 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.SkillCollectionsClient.GetSkillCollectionPublic.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.SkillCollectionsClient.GetSkillCollectionPublic.g.cs @@ -381,18 +381,17 @@ partial void ProcessGetSkillCollectionPublicResponseContent( __exception_400 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Unauthorized - missing or invalid API key. if ((int)__response.StatusCode == 401) @@ -419,18 +418,17 @@ partial void ProcessGetSkillCollectionPublicResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Forbidden - API key does not have access to the requested resource. if ((int)__response.StatusCode == 403) @@ -457,18 +455,17 @@ partial void ProcessGetSkillCollectionPublicResponseContent( __exception_403 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Not found - requested resource does not exist or is not accessible. if ((int)__response.StatusCode == 404) @@ -495,18 +492,17 @@ partial void ProcessGetSkillCollectionPublicResponseContent( __exception_404 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Validation error - request parameters or body are invalid. if ((int)__response.StatusCode == 422) @@ -533,18 +529,17 @@ partial void ProcessGetSkillCollectionPublicResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException?>( + + throw global::PromptLayer.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) @@ -578,17 +573,15 @@ partial void ProcessGetSkillCollectionPublicResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -625,17 +618,15 @@ partial void ProcessGetSkillCollectionPublicResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.SkillCollectionsClient.ListSkillCollectionsPublic.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.SkillCollectionsClient.ListSkillCollectionsPublic.g.cs index e9b7f2d..495d0d9 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.SkillCollectionsClient.ListSkillCollectionsPublic.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.SkillCollectionsClient.ListSkillCollectionsPublic.g.cs @@ -436,18 +436,17 @@ partial void ProcessListSkillCollectionsPublicResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Invalid workspace_id. if ((int)__response.StatusCode == 403) @@ -474,18 +473,17 @@ partial void ProcessListSkillCollectionsPublicResponseContent( __exception_403 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Validation error - request parameters or body are invalid. if ((int)__response.StatusCode == 422) @@ -512,18 +510,17 @@ partial void ProcessListSkillCollectionsPublicResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException?>( + + throw global::PromptLayer.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) @@ -557,17 +554,15 @@ partial void ProcessListSkillCollectionsPublicResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -604,17 +599,15 @@ partial void ProcessListSkillCollectionsPublicResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.SkillCollectionsClient.SaveSkillCollectionVersionPublic.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.SkillCollectionsClient.SaveSkillCollectionVersionPublic.g.cs index b834b84..c66b846 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.SkillCollectionsClient.SaveSkillCollectionVersionPublic.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.SkillCollectionsClient.SaveSkillCollectionVersionPublic.g.cs @@ -369,18 +369,17 @@ partial void ProcessSaveSkillCollectionVersionPublicResponseContent( __exception_400 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Authentication failed. if ((int)__response.StatusCode == 401) @@ -407,18 +406,17 @@ partial void ProcessSaveSkillCollectionVersionPublicResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Invalid workspace_id or plan limit reached. if ((int)__response.StatusCode == 403) @@ -445,18 +443,17 @@ partial void ProcessSaveSkillCollectionVersionPublicResponseContent( __exception_403 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Skill collection not found. if ((int)__response.StatusCode == 404) @@ -483,18 +480,17 @@ partial void ProcessSaveSkillCollectionVersionPublicResponseContent( __exception_404 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Unsupported content type. if ((int)__response.StatusCode == 415) @@ -521,18 +517,17 @@ partial void ProcessSaveSkillCollectionVersionPublicResponseContent( __exception_415 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_415 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_415, - statusCode: __response.StatusCode) - { - ResponseBody = __content_415, - ResponseObject = __value_415, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_415, + responseObject: __value_415, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Validation error - request parameters or body are invalid. if ((int)__response.StatusCode == 422) @@ -559,18 +554,17 @@ partial void ProcessSaveSkillCollectionVersionPublicResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException?>( + + throw global::PromptLayer.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) @@ -604,17 +598,15 @@ partial void ProcessSaveSkillCollectionVersionPublicResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -651,17 +643,15 @@ partial void ProcessSaveSkillCollectionVersionPublicResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.SkillCollectionsClient.UpdateSkillCollectionPublic.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.SkillCollectionsClient.UpdateSkillCollectionPublic.g.cs index a79368d..9e2909b 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.SkillCollectionsClient.UpdateSkillCollectionPublic.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.SkillCollectionsClient.UpdateSkillCollectionPublic.g.cs @@ -369,18 +369,17 @@ partial void ProcessUpdateSkillCollectionPublicResponseContent( __exception_400 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Authentication failed. if ((int)__response.StatusCode == 401) @@ -407,18 +406,17 @@ partial void ProcessUpdateSkillCollectionPublicResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Invalid workspace_id. if ((int)__response.StatusCode == 403) @@ -445,18 +443,17 @@ partial void ProcessUpdateSkillCollectionPublicResponseContent( __exception_403 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Skill collection not found. if ((int)__response.StatusCode == 404) @@ -483,18 +480,17 @@ partial void ProcessUpdateSkillCollectionPublicResponseContent( __exception_404 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Validation error - request parameters or body are invalid. if ((int)__response.StatusCode == 422) @@ -521,18 +517,17 @@ partial void ProcessUpdateSkillCollectionPublicResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException?>( + + throw global::PromptLayer.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) @@ -566,17 +561,15 @@ partial void ProcessUpdateSkillCollectionPublicResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -613,17 +606,15 @@ partial void ProcessUpdateSkillCollectionPublicResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.SpansClient.CreateSpansBulk.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.SpansClient.CreateSpansBulk.g.cs index 5de008a..e202331 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.SpansClient.CreateSpansBulk.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.SpansClient.CreateSpansBulk.g.cs @@ -360,18 +360,17 @@ partial void ProcessCreateSpansBulkResponseContent( __exception_400 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Unauthorized - missing or invalid API key. if ((int)__response.StatusCode == 401) @@ -398,18 +397,17 @@ partial void ProcessCreateSpansBulkResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Forbidden - API key does not have access to the requested resource. if ((int)__response.StatusCode == 403) @@ -436,18 +434,17 @@ partial void ProcessCreateSpansBulkResponseContent( __exception_403 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Validation error - request parameters or body are invalid. if ((int)__response.StatusCode == 422) @@ -474,18 +471,17 @@ partial void ProcessCreateSpansBulkResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException?>( + + throw global::PromptLayer.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)); } // Internal Server Error if ((int)__response.StatusCode == 500) @@ -512,18 +508,17 @@ partial void ProcessCreateSpansBulkResponseContent( __exception_500 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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) @@ -557,17 +552,15 @@ partial void ProcessCreateSpansBulkResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -604,17 +597,15 @@ partial void ProcessCreateSpansBulkResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.ToolRegistryClient.CreateToolRegistry.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.ToolRegistryClient.CreateToolRegistry.g.cs index 5e50aa9..d391c07 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.ToolRegistryClient.CreateToolRegistry.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.ToolRegistryClient.CreateToolRegistry.g.cs @@ -360,18 +360,17 @@ partial void ProcessCreateToolRegistryResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // External ID conflict if ((int)__response.StatusCode == 409) @@ -398,18 +397,17 @@ partial void ProcessCreateToolRegistryResponseContent( __exception_409 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Validation error - request parameters or body are invalid. if ((int)__response.StatusCode == 422) @@ -436,18 +434,17 @@ partial void ProcessCreateToolRegistryResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException?>( + + throw global::PromptLayer.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) @@ -481,17 +478,15 @@ partial void ProcessCreateToolRegistryResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::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 +523,15 @@ partial void ProcessCreateToolRegistryResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.ToolRegistryClient.CreateToolVersion.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.ToolRegistryClient.CreateToolVersion.g.cs index 6d16a56..7e0909d 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.ToolRegistryClient.CreateToolVersion.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.ToolRegistryClient.CreateToolVersion.g.cs @@ -369,17 +369,16 @@ partial void ProcessCreateToolVersionResponseContent( __exception_404 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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 (__effectiveReadResponseAsString) @@ -413,17 +412,15 @@ partial void ProcessCreateToolVersionResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::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 ProcessCreateToolVersionResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.ToolRegistryClient.GetToolRegistry.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.ToolRegistryClient.GetToolRegistry.g.cs index 8a20b5c..e458ea3 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.ToolRegistryClient.GetToolRegistry.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.ToolRegistryClient.GetToolRegistry.g.cs @@ -383,18 +383,17 @@ partial void ProcessGetToolRegistryResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Validation error - request parameters or body are invalid. if ((int)__response.StatusCode == 422) @@ -421,18 +420,17 @@ partial void ProcessGetToolRegistryResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException?>( + + throw global::PromptLayer.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) @@ -466,17 +464,15 @@ partial void ProcessGetToolRegistryResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::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 +509,15 @@ partial void ProcessGetToolRegistryResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.ToolRegistryClient.ListToolRegistries.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.ToolRegistryClient.ListToolRegistries.g.cs index eab35c0..363f34f 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.ToolRegistryClient.ListToolRegistries.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.ToolRegistryClient.ListToolRegistries.g.cs @@ -436,18 +436,17 @@ partial void ProcessListToolRegistriesResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Validation error - request parameters or body are invalid. if ((int)__response.StatusCode == 422) @@ -474,18 +473,17 @@ partial void ProcessListToolRegistriesResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException?>( + + throw global::PromptLayer.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) @@ -519,17 +517,15 @@ partial void ProcessListToolRegistriesResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -566,17 +562,15 @@ partial void ProcessListToolRegistriesResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.ToolRegistryClient.TestExecuteTool.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.ToolRegistryClient.TestExecuteTool.g.cs index 9324256..1cc757a 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.ToolRegistryClient.TestExecuteTool.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.ToolRegistryClient.TestExecuteTool.g.cs @@ -399,17 +399,16 @@ partial void ProcessTestExecuteToolResponseContent( __exception_400 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // if ((int)__response.StatusCode == 404) @@ -432,17 +431,16 @@ partial void ProcessTestExecuteToolResponseContent( __exception_404 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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 == 502) @@ -465,17 +463,16 @@ partial void ProcessTestExecuteToolResponseContent( __exception_502 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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) @@ -509,17 +506,15 @@ partial void ProcessTestExecuteToolResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::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 +551,15 @@ partial void ProcessTestExecuteToolResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.TrackingClient.GetRequest.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.TrackingClient.GetRequest.g.cs index d365f71..b0bb43d 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.TrackingClient.GetRequest.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.TrackingClient.GetRequest.g.cs @@ -349,18 +349,17 @@ partial void ProcessGetRequestResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Forbidden - API key does not have access to the requested resource. if ((int)__response.StatusCode == 403) @@ -387,18 +386,17 @@ partial void ProcessGetRequestResponseContent( __exception_403 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Not found - requested resource does not exist or is not accessible. if ((int)__response.StatusCode == 404) @@ -425,18 +423,17 @@ partial void ProcessGetRequestResponseContent( __exception_404 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Validation error - request parameters or body are invalid. if ((int)__response.StatusCode == 422) @@ -463,18 +460,17 @@ partial void ProcessGetRequestResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException?>( + + throw global::PromptLayer.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)); } // Internal server error. if ((int)__response.StatusCode == 500) @@ -501,18 +497,17 @@ partial void ProcessGetRequestResponseContent( __exception_500 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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) @@ -546,17 +541,15 @@ partial void ProcessGetRequestResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -593,17 +586,15 @@ partial void ProcessGetRequestResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.TrackingClient.GetRequestAnalytics.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.TrackingClient.GetRequestAnalytics.g.cs index e0f690b..aa4d2bd 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.TrackingClient.GetRequestAnalytics.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.TrackingClient.GetRequestAnalytics.g.cs @@ -360,18 +360,17 @@ partial void ProcessGetRequestAnalyticsResponseContent( __exception_400 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Unauthorized - missing or invalid API key. if ((int)__response.StatusCode == 401) @@ -398,18 +397,17 @@ partial void ProcessGetRequestAnalyticsResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Forbidden - API key does not have access to the requested resource. if ((int)__response.StatusCode == 403) @@ -436,18 +434,17 @@ partial void ProcessGetRequestAnalyticsResponseContent( __exception_403 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Validation error - request parameters or body are invalid. if ((int)__response.StatusCode == 422) @@ -474,18 +471,17 @@ partial void ProcessGetRequestAnalyticsResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException?>( + + throw global::PromptLayer.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) @@ -519,17 +515,15 @@ partial void ProcessGetRequestAnalyticsResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -566,17 +560,15 @@ partial void ProcessGetRequestAnalyticsResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.TrackingClient.GetRequestSearchSuggestions.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.TrackingClient.GetRequestSearchSuggestions.g.cs index 195443f..2b70a6b 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.TrackingClient.GetRequestSearchSuggestions.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.TrackingClient.GetRequestSearchSuggestions.g.cs @@ -392,18 +392,17 @@ partial void ProcessGetRequestSearchSuggestionsResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Forbidden - API key does not have access to the requested resource. if ((int)__response.StatusCode == 403) @@ -430,18 +429,17 @@ partial void ProcessGetRequestSearchSuggestionsResponseContent( __exception_403 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Validation error - request parameters or body are invalid. if ((int)__response.StatusCode == 422) @@ -468,18 +466,17 @@ partial void ProcessGetRequestSearchSuggestionsResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException?>( + + throw global::PromptLayer.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)); } // Too many requests - the endpoint rate limit was exceeded. if ((int)__response.StatusCode == 429) @@ -506,18 +503,17 @@ partial void ProcessGetRequestSearchSuggestionsResponseContent( __exception_429 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_429 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_429, - statusCode: __response.StatusCode) - { - ResponseBody = __content_429, - ResponseObject = __value_429, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_429, + responseObject: __value_429, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -551,17 +547,15 @@ partial void ProcessGetRequestSearchSuggestionsResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -598,17 +592,15 @@ partial void ProcessGetRequestSearchSuggestionsResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.TrackingClient.GetTrace.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.TrackingClient.GetTrace.g.cs index 15c92f9..d35070d 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.TrackingClient.GetTrace.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.TrackingClient.GetTrace.g.cs @@ -349,18 +349,17 @@ partial void ProcessGetTraceResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Forbidden - API key does not have access to the requested resource. if ((int)__response.StatusCode == 403) @@ -387,18 +386,17 @@ partial void ProcessGetTraceResponseContent( __exception_403 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Not found - requested resource does not exist or is not accessible. if ((int)__response.StatusCode == 404) @@ -425,18 +423,17 @@ partial void ProcessGetTraceResponseContent( __exception_404 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Validation error - request parameters or body are invalid. if ((int)__response.StatusCode == 422) @@ -463,18 +460,17 @@ partial void ProcessGetTraceResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException?>( + + throw global::PromptLayer.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)); } // Internal server error. if ((int)__response.StatusCode == 500) @@ -501,18 +497,17 @@ partial void ProcessGetTraceResponseContent( __exception_500 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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) @@ -546,17 +541,15 @@ partial void ProcessGetTraceResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -593,17 +586,15 @@ partial void ProcessGetTraceResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.TrackingClient.SearchRequestLogs.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.TrackingClient.SearchRequestLogs.g.cs index 0f55db3..4fa555c 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.TrackingClient.SearchRequestLogs.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.TrackingClient.SearchRequestLogs.g.cs @@ -358,18 +358,17 @@ partial void ProcessSearchRequestLogsResponseContent( __exception_400 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Unauthorized - missing or invalid API key. if ((int)__response.StatusCode == 401) @@ -396,18 +395,17 @@ partial void ProcessSearchRequestLogsResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Forbidden - API key does not have access to the requested resource. if ((int)__response.StatusCode == 403) @@ -434,18 +432,17 @@ partial void ProcessSearchRequestLogsResponseContent( __exception_403 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Validation error - request parameters or body are invalid. if ((int)__response.StatusCode == 422) @@ -472,18 +469,17 @@ partial void ProcessSearchRequestLogsResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException?>( + + throw global::PromptLayer.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)); } // Too many requests - the endpoint rate limit was exceeded. if ((int)__response.StatusCode == 429) @@ -510,18 +506,17 @@ partial void ProcessSearchRequestLogsResponseContent( __exception_429 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_429 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_429, - statusCode: __response.StatusCode) - { - ResponseBody = __content_429, - ResponseObject = __value_429, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_429, + responseObject: __value_429, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -555,17 +550,15 @@ partial void ProcessSearchRequestLogsResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -602,17 +595,15 @@ partial void ProcessSearchRequestLogsResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.WorkflowClient.CreateWorkflow.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.WorkflowClient.CreateWorkflow.g.cs index 53c4624..d4cd840 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.WorkflowClient.CreateWorkflow.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.WorkflowClient.CreateWorkflow.g.cs @@ -360,18 +360,17 @@ partial void ProcessCreateWorkflowResponseContent( __exception_400 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Unauthorized - missing or invalid API key. if ((int)__response.StatusCode == 401) @@ -398,18 +397,17 @@ partial void ProcessCreateWorkflowResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Not found - requested resource does not exist or is not accessible. if ((int)__response.StatusCode == 404) @@ -436,18 +434,17 @@ partial void ProcessCreateWorkflowResponseContent( __exception_404 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // External ID conflict if ((int)__response.StatusCode == 409) @@ -474,18 +471,17 @@ partial void ProcessCreateWorkflowResponseContent( __exception_409 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Validation error - request parameters or body are invalid. if ((int)__response.StatusCode == 422) @@ -512,18 +508,17 @@ partial void ProcessCreateWorkflowResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException?>( + + throw global::PromptLayer.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) @@ -557,17 +552,15 @@ partial void ProcessCreateWorkflowResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -604,17 +597,15 @@ partial void ProcessCreateWorkflowResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.WorkflowClient.GetWorkflow.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.WorkflowClient.GetWorkflow.g.cs index 47b7b69..6033e0b 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.WorkflowClient.GetWorkflow.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.WorkflowClient.GetWorkflow.g.cs @@ -371,18 +371,17 @@ partial void ProcessGetWorkflowResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Not found - requested resource does not exist or is not accessible. if ((int)__response.StatusCode == 404) @@ -409,18 +408,17 @@ partial void ProcessGetWorkflowResponseContent( __exception_404 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Validation error - request parameters or body are invalid. if ((int)__response.StatusCode == 422) @@ -447,18 +445,17 @@ partial void ProcessGetWorkflowResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException?>( + + throw global::PromptLayer.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 +489,15 @@ partial void ProcessGetWorkflowResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::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 +534,15 @@ partial void ProcessGetWorkflowResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.WorkflowClient.GetWorkflowLabels.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.WorkflowClient.GetWorkflowLabels.g.cs index 63a1c2e..b3c1399 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.WorkflowClient.GetWorkflowLabels.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.WorkflowClient.GetWorkflowLabels.g.cs @@ -349,18 +349,17 @@ partial void ProcessGetWorkflowLabelsResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // if ((int)__response.StatusCode == 404) @@ -383,17 +382,16 @@ partial void ProcessGetWorkflowLabelsResponseContent( __exception_404 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Validation error - request parameters or body are invalid. if ((int)__response.StatusCode == 422) @@ -420,18 +418,17 @@ partial void ProcessGetWorkflowLabelsResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException?>( + + throw global::PromptLayer.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) @@ -465,17 +462,15 @@ partial void ProcessGetWorkflowLabelsResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -512,17 +507,15 @@ partial void ProcessGetWorkflowLabelsResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.WorkflowClient.GetWorkflowVersionExecutionResults.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.WorkflowClient.GetWorkflowVersionExecutionResults.g.cs index 427316a..73a93b9 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.WorkflowClient.GetWorkflowVersionExecutionResults.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.WorkflowClient.GetWorkflowVersionExecutionResults.g.cs @@ -362,17 +362,16 @@ partial void ProcessGetWorkflowVersionExecutionResultsResponseContent( __exception_400 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // if ((int)__response.StatusCode == 401) @@ -395,17 +394,16 @@ partial void ProcessGetWorkflowVersionExecutionResultsResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // if ((int)__response.StatusCode == 403) @@ -428,17 +426,16 @@ partial void ProcessGetWorkflowVersionExecutionResultsResponseContent( __exception_403 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_403, - statusCode: __response.StatusCode) - { - ResponseBody = __content_403, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // if ((int)__response.StatusCode == 404) @@ -461,17 +458,16 @@ partial void ProcessGetWorkflowVersionExecutionResultsResponseContent( __exception_404 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Validation error - request parameters or body are invalid. if ((int)__response.StatusCode == 422) @@ -498,18 +494,17 @@ partial void ProcessGetWorkflowVersionExecutionResultsResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException?>( + + throw global::PromptLayer.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) @@ -543,17 +538,15 @@ partial void ProcessGetWorkflowVersionExecutionResultsResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -590,17 +583,15 @@ partial void ProcessGetWorkflowVersionExecutionResultsResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.WorkflowClient.ListWorkflows.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.WorkflowClient.ListWorkflows.g.cs index 6d3eb4c..30e0e9b 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.WorkflowClient.ListWorkflows.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.WorkflowClient.ListWorkflows.g.cs @@ -464,18 +464,17 @@ partial void ProcessListWorkflowsResponseContent( __exception_400 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Unauthorized if ((int)__response.StatusCode == 401) @@ -502,18 +501,17 @@ partial void ProcessListWorkflowsResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Validation error - request parameters or body are invalid. if ((int)__response.StatusCode == 422) @@ -540,18 +538,17 @@ partial void ProcessListWorkflowsResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException?>( + + throw global::PromptLayer.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) @@ -585,17 +582,15 @@ partial void ProcessListWorkflowsResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -632,17 +627,15 @@ partial void ProcessListWorkflowsResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.WorkflowClient.PatchWorkflow.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.WorkflowClient.PatchWorkflow.g.cs index 6de0c0c..655b6b7 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.WorkflowClient.PatchWorkflow.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.WorkflowClient.PatchWorkflow.g.cs @@ -369,18 +369,17 @@ partial void ProcessPatchWorkflowResponseContent( __exception_400 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Unauthorized - missing or invalid API key. if ((int)__response.StatusCode == 401) @@ -407,18 +406,17 @@ partial void ProcessPatchWorkflowResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Not found - requested resource does not exist or is not accessible. if ((int)__response.StatusCode == 404) @@ -445,18 +443,17 @@ partial void ProcessPatchWorkflowResponseContent( __exception_404 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Validation error - request parameters or body are invalid. if ((int)__response.StatusCode == 422) @@ -483,18 +480,17 @@ partial void ProcessPatchWorkflowResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException?>( + + throw global::PromptLayer.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 +524,15 @@ partial void ProcessPatchWorkflowResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::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 +569,15 @@ partial void ProcessPatchWorkflowResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/PromptLayer/Generated/PromptLayer.WorkflowClient.RunWorkflow.g.cs b/src/libs/PromptLayer/Generated/PromptLayer.WorkflowClient.RunWorkflow.g.cs index 80b109c..f49e868 100644 --- a/src/libs/PromptLayer/Generated/PromptLayer.WorkflowClient.RunWorkflow.g.cs +++ b/src/libs/PromptLayer/Generated/PromptLayer.WorkflowClient.RunWorkflow.g.cs @@ -369,18 +369,17 @@ partial void ProcessRunWorkflowResponseContent( __exception_400 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Unauthorized - missing or invalid API key. if ((int)__response.StatusCode == 401) @@ -407,18 +406,17 @@ partial void ProcessRunWorkflowResponseContent( __exception_401 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Not found - requested resource does not exist or is not accessible. if ((int)__response.StatusCode == 404) @@ -445,18 +443,17 @@ partial void ProcessRunWorkflowResponseContent( __exception_404 = __ex; } - throw new global::PromptLayer.ApiException( + + throw global::PromptLayer.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)); } // Validation error - request parameters or body are invalid. if ((int)__response.StatusCode == 422) @@ -483,18 +480,17 @@ partial void ProcessRunWorkflowResponseContent( __exception_422 = __ex; } - throw new global::PromptLayer.ApiException?>( + + throw global::PromptLayer.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 +524,15 @@ partial void ProcessRunWorkflowResponseContent( } catch (global::System.Exception __ex) { - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::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 +569,15 @@ partial void ProcessRunWorkflowResponseContent( { } - throw new global::PromptLayer.ApiException( + throw global::PromptLayer.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } }