From 4909287e4402f86f48127ddd0203e474c31fcafb Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 24 May 2026 04:10:41 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- ...notationConfigV1AnnotationConfigsPost.g.cs | 54 ++++--- ...nfigV1AnnotationConfigsConfigIdDelete.g.cs | 54 ++++--- ...1AnnotationConfigsConfigIdentifierGet.g.cs | 54 ++++--- ...notationConfigsV1AnnotationConfigsGet.g.cs | 54 ++++--- ...nConfigV1AnnotationConfigsConfigIdPut.g.cs | 54 ++++--- ...ationsClient.DeleteSessionAnnotations.g.cs | 69 ++++----- ...notationsClient.DeleteSpanAnnotations.g.cs | 69 ++++----- ...otationsClient.DeleteTraceAnnotations.g.cs | 69 ++++----- ...nt.ListSessionAnnotationsBySessionIds.g.cs | 69 ++++----- ...nsClient.ListSpanAnnotationsBySpanIds.g.cs | 69 ++++----- ...Client.ListTraceAnnotationsByTraceIds.g.cs | 69 ++++----- ...gentsAgentIdSessionsSessionIdChatPost.g.cs | 39 +++-- ...tsAgentIdSessionsSessionIdSummaryPost.g.cs | 39 +++-- ...enix.DatasetsClient.DeleteDatasetById.g.cs | 69 ++++----- .../Phoenix.DatasetsClient.GetDataset.g.cs | 69 ++++----- .../Phoenix.DatasetsClient.GetDatasetCsv.g.cs | 54 ++++--- ...nix.DatasetsClient.GetDatasetExamples.g.cs | 69 ++++----- ...hoenix.DatasetsClient.GetDatasetJSONL.g.cs | 54 ++++--- ...setsClient.GetDatasetJSONLOpenAIEvals.g.cs | 54 ++++--- ...lient.GetDatasetJSONLOpenAIFineTuning.g.cs | 54 ++++--- ...Client.ListDatasetVersionsByDatasetId.g.cs | 54 ++++--- .../Phoenix.DatasetsClient.ListDatasets.g.cs | 54 ++++--- .../Phoenix.DatasetsClient.UploadDataset.g.cs | 69 ++++----- .../Phoenix/Generated/Phoenix.Exceptions.g.cs | 134 ++++++++++++++++++ ...ix.ExperimentsClient.CreateExperiment.g.cs | 69 ++++----- ...ExperimentsClient.CreateExperimentRun.g.cs | 84 +++++------ ...ix.ExperimentsClient.DeleteExperiment.g.cs | 69 ++++----- ...oenix.ExperimentsClient.GetExperiment.g.cs | 69 ++++----- ...ix.ExperimentsClient.GetExperimentCSV.g.cs | 54 ++++--- ...x.ExperimentsClient.GetExperimentJSON.g.cs | 69 ++++----- ...nt.GetIncompleteExperimentEvaluations.g.cs | 84 +++++------ ...ntsClient.GetIncompleteExperimentRuns.g.cs | 69 ++++----- ....ExperimentsClient.ListExperimentRuns.g.cs | 69 ++++----- ...nix.ExperimentsClient.ListExperiments.g.cs | 54 ++++--- ...entsClient.UpsertExperimentEvaluation.g.cs | 69 ++++----- ....PhoenixClient.CheckHealthzHealthzGet.g.cs | 24 ++-- ...ix.PhoenixClient.CheckReadyzReadyzGet.g.cs | 24 ++-- ...nt.CreateTokensOauth2IdpNameTokensGet.g.cs | 39 +++-- ...sswordResetAuthPasswordResetEmailPost.g.cs | 24 ++-- ...enixClient.LdapLoginAuthLdapLoginPost.g.cs | 24 ++-- ...enix.PhoenixClient.LoginAuthLoginPost.g.cs | 24 ++-- ...enixClient.LoginOauth2IdpNameLoginGet.g.cs | 39 +++-- ...nixClient.LoginOauth2IdpNameLoginPost.g.cs | 39 +++-- ...nix.PhoenixClient.LogoutAuthLogoutGet.g.cs | 24 ++-- ...ixClient.RefreshTokensAuthRefreshPost.g.cs | 24 ++-- ...nt.ResetPasswordAuthPasswordResetPost.g.cs | 24 ++-- ...xClient.VersionArizePhoenixVersionGet.g.cs | 24 ++-- .../Phoenix.ProjectsClient.CreateProject.g.cs | 54 ++++--- .../Phoenix.ProjectsClient.DeleteProject.g.cs | 69 ++++----- .../Phoenix.ProjectsClient.GetProject.g.cs | 69 ++++----- .../Phoenix.ProjectsClient.GetProjects.g.cs | 54 ++++--- .../Phoenix.ProjectsClient.UpdateProject.g.cs | 69 ++++----- ....PromptsClient.CreatePromptVersionTag.g.cs | 69 ++++----- .../Phoenix.PromptsClient.DeletePrompt.g.cs | 69 ++++----- ....PromptsClient.DeletePromptVersionTag.g.cs | 69 ++++----- ...ent.GetPromptVersionByPromptVersionId.g.cs | 69 ++++----- ...omptsClient.GetPromptVersionByTagName.g.cs | 69 ++++----- ....PromptsClient.GetPromptVersionLatest.g.cs | 69 ++++----- ...ix.PromptsClient.GetPromptVersionTags.g.cs | 69 ++++----- .../Phoenix.PromptsClient.GetPrompts.g.cs | 54 ++++--- ...enix.PromptsClient.ListPromptVersions.g.cs | 69 ++++----- ...oenix.PromptsClient.PostPromptVersion.g.cs | 54 ++++--- ...x.SecretsClient.UpsertOrDeleteSecrets.g.cs | 69 ++++----- ...oenix.SessionsClient.AnnotateSessions.g.cs | 69 ++++----- ...enix.SessionsClient.CreateSessionNote.g.cs | 69 ++++----- .../Phoenix.SessionsClient.DeleteSession.g.cs | 69 ++++----- ...Phoenix.SessionsClient.DeleteSessions.g.cs | 54 ++++--- .../Phoenix.SessionsClient.GetSession.g.cs | 69 ++++----- ...ix.SessionsClient.ListProjectSessions.g.cs | 69 ++++----- ...nix.SpansClient.AnnotateSpanDocuments.g.cs | 69 ++++----- .../Phoenix.SpansClient.AnnotateSpans.g.cs | 69 ++++----- .../Phoenix.SpansClient.CreateSpanNote.g.cs | 69 ++++----- .../Phoenix.SpansClient.CreateSpans.g.cs | 84 +++++------ .../Phoenix.SpansClient.DeleteSpan.g.cs | 69 ++++----- .../Phoenix.SpansClient.GetSpans.g.cs | 69 ++++----- .../Phoenix.SpansClient.SpanSearch.g.cs | 69 ++++----- .../Phoenix.TracesClient.AnnotateTraces.g.cs | 69 ++++----- .../Phoenix.TracesClient.CreateTraceNote.g.cs | 69 ++++----- .../Phoenix.TracesClient.DeleteTrace.g.cs | 69 ++++----- ...hoenix.TracesClient.ListProjectTraces.g.cs | 69 ++++----- .../Phoenix.UsersClient.CreateUser.g.cs | 84 +++++------ .../Phoenix.UsersClient.DeleteUser.g.cs | 69 ++++----- .../Phoenix.UsersClient.GetUsers.g.cs | 54 ++++--- .../Phoenix.UsersClient.GetViewer.g.cs | 54 ++++--- 84 files changed, 2336 insertions(+), 2730 deletions(-) diff --git a/src/libs/Phoenix/Generated/Phoenix.AnnotationConfigsClient.CreateAnnotationConfigV1AnnotationConfigsPost.g.cs b/src/libs/Phoenix/Generated/Phoenix.AnnotationConfigsClient.CreateAnnotationConfigV1AnnotationConfigsPost.g.cs index bf89300..9dd2ae9 100644 --- a/src/libs/Phoenix/Generated/Phoenix.AnnotationConfigsClient.CreateAnnotationConfigV1AnnotationConfigsPost.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.AnnotationConfigsClient.CreateAnnotationConfigV1AnnotationConfigsPost.g.cs @@ -358,18 +358,17 @@ partial void ProcessCreateAnnotationConfigV1AnnotationConfigsPostResponseContent __exception_403 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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 if ((int)__response.StatusCode == 422) @@ -396,18 +395,17 @@ partial void ProcessCreateAnnotationConfigV1AnnotationConfigsPostResponseContent __exception_422 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -441,17 +439,15 @@ partial void ProcessCreateAnnotationConfigV1AnnotationConfigsPostResponseContent } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -488,17 +484,15 @@ partial void ProcessCreateAnnotationConfigV1AnnotationConfigsPostResponseContent { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.AnnotationConfigsClient.DeleteAnnotationConfigV1AnnotationConfigsConfigIdDelete.g.cs b/src/libs/Phoenix/Generated/Phoenix.AnnotationConfigsClient.DeleteAnnotationConfigV1AnnotationConfigsConfigIdDelete.g.cs index 91dc0b0..3fdf589 100644 --- a/src/libs/Phoenix/Generated/Phoenix.AnnotationConfigsClient.DeleteAnnotationConfigV1AnnotationConfigsConfigIdDelete.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.AnnotationConfigsClient.DeleteAnnotationConfigV1AnnotationConfigsConfigIdDelete.g.cs @@ -353,18 +353,17 @@ partial void ProcessDeleteAnnotationConfigV1AnnotationConfigsConfigIdDeleteRespo __exception_403 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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 if ((int)__response.StatusCode == 422) @@ -391,18 +390,17 @@ partial void ProcessDeleteAnnotationConfigV1AnnotationConfigsConfigIdDeleteRespo __exception_422 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.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) @@ -436,17 +434,15 @@ partial void ProcessDeleteAnnotationConfigV1AnnotationConfigsConfigIdDeleteRespo } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -483,17 +479,15 @@ partial void ProcessDeleteAnnotationConfigV1AnnotationConfigsConfigIdDeleteRespo { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.AnnotationConfigsClient.GetAnnotationConfigByNameOrIdV1AnnotationConfigsConfigIdentifierGet.g.cs b/src/libs/Phoenix/Generated/Phoenix.AnnotationConfigsClient.GetAnnotationConfigByNameOrIdV1AnnotationConfigsConfigIdentifierGet.g.cs index be1d62c..984894b 100644 --- a/src/libs/Phoenix/Generated/Phoenix.AnnotationConfigsClient.GetAnnotationConfigByNameOrIdV1AnnotationConfigsConfigIdentifierGet.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.AnnotationConfigsClient.GetAnnotationConfigByNameOrIdV1AnnotationConfigsConfigIdentifierGet.g.cs @@ -353,18 +353,17 @@ partial void ProcessGetAnnotationConfigByNameOrIdV1AnnotationConfigsConfigIdenti __exception_403 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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 if ((int)__response.StatusCode == 422) @@ -391,18 +390,17 @@ partial void ProcessGetAnnotationConfigByNameOrIdV1AnnotationConfigsConfigIdenti __exception_422 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.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) @@ -436,17 +434,15 @@ partial void ProcessGetAnnotationConfigByNameOrIdV1AnnotationConfigsConfigIdenti } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -483,17 +479,15 @@ partial void ProcessGetAnnotationConfigByNameOrIdV1AnnotationConfigsConfigIdenti { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.AnnotationConfigsClient.ListAnnotationConfigsV1AnnotationConfigsGet.g.cs b/src/libs/Phoenix/Generated/Phoenix.AnnotationConfigsClient.ListAnnotationConfigsV1AnnotationConfigsGet.g.cs index fe69e12..ec64b91 100644 --- a/src/libs/Phoenix/Generated/Phoenix.AnnotationConfigsClient.ListAnnotationConfigsV1AnnotationConfigsGet.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.AnnotationConfigsClient.ListAnnotationConfigsV1AnnotationConfigsGet.g.cs @@ -374,18 +374,17 @@ partial void ProcessListAnnotationConfigsV1AnnotationConfigsGetResponseContent( __exception_403 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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 if ((int)__response.StatusCode == 422) @@ -412,18 +411,17 @@ partial void ProcessListAnnotationConfigsV1AnnotationConfigsGetResponseContent( __exception_422 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.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) @@ -457,17 +455,15 @@ partial void ProcessListAnnotationConfigsV1AnnotationConfigsGetResponseContent( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -504,17 +500,15 @@ partial void ProcessListAnnotationConfigsV1AnnotationConfigsGetResponseContent( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.AnnotationConfigsClient.UpdateAnnotationConfigV1AnnotationConfigsConfigIdPut.g.cs b/src/libs/Phoenix/Generated/Phoenix.AnnotationConfigsClient.UpdateAnnotationConfigV1AnnotationConfigsConfigIdPut.g.cs index 4d566f4..3ba3690 100644 --- a/src/libs/Phoenix/Generated/Phoenix.AnnotationConfigsClient.UpdateAnnotationConfigV1AnnotationConfigsConfigIdPut.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.AnnotationConfigsClient.UpdateAnnotationConfigV1AnnotationConfigsConfigIdPut.g.cs @@ -371,18 +371,17 @@ partial void ProcessUpdateAnnotationConfigV1AnnotationConfigsConfigIdPutResponse __exception_403 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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 if ((int)__response.StatusCode == 422) @@ -409,18 +408,17 @@ partial void ProcessUpdateAnnotationConfigV1AnnotationConfigsConfigIdPutResponse __exception_422 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.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) @@ -454,17 +452,15 @@ partial void ProcessUpdateAnnotationConfigV1AnnotationConfigsConfigIdPutResponse } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -501,17 +497,15 @@ partial void ProcessUpdateAnnotationConfigV1AnnotationConfigsConfigIdPutResponse { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.AnnotationsClient.DeleteSessionAnnotations.g.cs b/src/libs/Phoenix/Generated/Phoenix.AnnotationsClient.DeleteSessionAnnotations.g.cs index a40de3d..828a32f 100644 --- a/src/libs/Phoenix/Generated/Phoenix.AnnotationsClient.DeleteSessionAnnotations.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.AnnotationsClient.DeleteSessionAnnotations.g.cs @@ -478,18 +478,17 @@ await DeleteSessionAnnotationsAsResponseAsync( __exception_403 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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)); } // Project not found if ((int)__response.StatusCode == 404) @@ -516,18 +515,17 @@ await DeleteSessionAnnotationsAsResponseAsync( __exception_404 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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)); } // Invalid parameters if ((int)__response.StatusCode == 422) @@ -554,18 +552,17 @@ await DeleteSessionAnnotationsAsResponseAsync( __exception_422 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.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) @@ -592,17 +589,15 @@ await DeleteSessionAnnotationsAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -630,17 +625,15 @@ await DeleteSessionAnnotationsAsResponseAsync( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.AnnotationsClient.DeleteSpanAnnotations.g.cs b/src/libs/Phoenix/Generated/Phoenix.AnnotationsClient.DeleteSpanAnnotations.g.cs index cb14a57..9fe5bf0 100644 --- a/src/libs/Phoenix/Generated/Phoenix.AnnotationsClient.DeleteSpanAnnotations.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.AnnotationsClient.DeleteSpanAnnotations.g.cs @@ -478,18 +478,17 @@ await DeleteSpanAnnotationsAsResponseAsync( __exception_403 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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)); } // Project not found if ((int)__response.StatusCode == 404) @@ -516,18 +515,17 @@ await DeleteSpanAnnotationsAsResponseAsync( __exception_404 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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)); } // Invalid parameters if ((int)__response.StatusCode == 422) @@ -554,18 +552,17 @@ await DeleteSpanAnnotationsAsResponseAsync( __exception_422 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.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) @@ -592,17 +589,15 @@ await DeleteSpanAnnotationsAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -630,17 +625,15 @@ await DeleteSpanAnnotationsAsResponseAsync( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.AnnotationsClient.DeleteTraceAnnotations.g.cs b/src/libs/Phoenix/Generated/Phoenix.AnnotationsClient.DeleteTraceAnnotations.g.cs index 06d2f5c..7942297 100644 --- a/src/libs/Phoenix/Generated/Phoenix.AnnotationsClient.DeleteTraceAnnotations.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.AnnotationsClient.DeleteTraceAnnotations.g.cs @@ -478,18 +478,17 @@ await DeleteTraceAnnotationsAsResponseAsync( __exception_403 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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)); } // Project not found if ((int)__response.StatusCode == 404) @@ -516,18 +515,17 @@ await DeleteTraceAnnotationsAsResponseAsync( __exception_404 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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)); } // Invalid parameters if ((int)__response.StatusCode == 422) @@ -554,18 +552,17 @@ await DeleteTraceAnnotationsAsResponseAsync( __exception_422 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.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) @@ -592,17 +589,15 @@ await DeleteTraceAnnotationsAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -630,17 +625,15 @@ await DeleteTraceAnnotationsAsResponseAsync( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.AnnotationsClient.ListSessionAnnotationsBySessionIds.g.cs b/src/libs/Phoenix/Generated/Phoenix.AnnotationsClient.ListSessionAnnotationsBySessionIds.g.cs index 21b4109..0d58ac8 100644 --- a/src/libs/Phoenix/Generated/Phoenix.AnnotationsClient.ListSessionAnnotationsBySessionIds.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.AnnotationsClient.ListSessionAnnotationsBySessionIds.g.cs @@ -443,18 +443,17 @@ partial void ProcessListSessionAnnotationsBySessionIdsResponseContent( __exception_403 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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)); } // Project or sessions not found if ((int)__response.StatusCode == 404) @@ -481,18 +480,17 @@ partial void ProcessListSessionAnnotationsBySessionIdsResponseContent( __exception_404 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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)); } // Invalid parameters if ((int)__response.StatusCode == 422) @@ -519,18 +517,17 @@ partial void ProcessListSessionAnnotationsBySessionIdsResponseContent( __exception_422 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.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) @@ -564,17 +561,15 @@ partial void ProcessListSessionAnnotationsBySessionIdsResponseContent( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -611,17 +606,15 @@ partial void ProcessListSessionAnnotationsBySessionIdsResponseContent( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.AnnotationsClient.ListSpanAnnotationsBySpanIds.g.cs b/src/libs/Phoenix/Generated/Phoenix.AnnotationsClient.ListSpanAnnotationsBySpanIds.g.cs index 1a24e9e..038e67d 100644 --- a/src/libs/Phoenix/Generated/Phoenix.AnnotationsClient.ListSpanAnnotationsBySpanIds.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.AnnotationsClient.ListSpanAnnotationsBySpanIds.g.cs @@ -443,18 +443,17 @@ partial void ProcessListSpanAnnotationsBySpanIdsResponseContent( __exception_403 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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)); } // Project or spans not found if ((int)__response.StatusCode == 404) @@ -481,18 +480,17 @@ partial void ProcessListSpanAnnotationsBySpanIdsResponseContent( __exception_404 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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)); } // Invalid parameters if ((int)__response.StatusCode == 422) @@ -519,18 +517,17 @@ partial void ProcessListSpanAnnotationsBySpanIdsResponseContent( __exception_422 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.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) @@ -564,17 +561,15 @@ partial void ProcessListSpanAnnotationsBySpanIdsResponseContent( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -611,17 +606,15 @@ partial void ProcessListSpanAnnotationsBySpanIdsResponseContent( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.AnnotationsClient.ListTraceAnnotationsByTraceIds.g.cs b/src/libs/Phoenix/Generated/Phoenix.AnnotationsClient.ListTraceAnnotationsByTraceIds.g.cs index 1fe3e04..6b67889 100644 --- a/src/libs/Phoenix/Generated/Phoenix.AnnotationsClient.ListTraceAnnotationsByTraceIds.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.AnnotationsClient.ListTraceAnnotationsByTraceIds.g.cs @@ -443,18 +443,17 @@ partial void ProcessListTraceAnnotationsByTraceIdsResponseContent( __exception_403 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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)); } // Project or traces not found if ((int)__response.StatusCode == 404) @@ -481,18 +480,17 @@ partial void ProcessListTraceAnnotationsByTraceIdsResponseContent( __exception_404 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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)); } // Invalid parameters if ((int)__response.StatusCode == 422) @@ -519,18 +517,17 @@ partial void ProcessListTraceAnnotationsByTraceIdsResponseContent( __exception_422 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.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) @@ -564,17 +561,15 @@ partial void ProcessListTraceAnnotationsByTraceIdsResponseContent( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -611,17 +606,15 @@ partial void ProcessListTraceAnnotationsByTraceIdsResponseContent( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.ChatClient.ChatAgentsAgentIdSessionsSessionIdChatPost.g.cs b/src/libs/Phoenix/Generated/Phoenix.ChatClient.ChatAgentsAgentIdSessionsSessionIdChatPost.g.cs index 8922b0e..e977a1f 100644 --- a/src/libs/Phoenix/Generated/Phoenix.ChatClient.ChatAgentsAgentIdSessionsSessionIdChatPost.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.ChatClient.ChatAgentsAgentIdSessionsSessionIdChatPost.g.cs @@ -376,18 +376,17 @@ partial void ProcessChatAgentsAgentIdSessionsSessionIdChatPostResponseContent( __exception_422 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -419,17 +418,15 @@ partial void ProcessChatAgentsAgentIdSessionsSessionIdChatPostResponseContent( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -464,17 +461,15 @@ partial void ProcessChatAgentsAgentIdSessionsSessionIdChatPostResponseContent( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.ChatClient.SummarizeEndpointAgentsAgentIdSessionsSessionIdSummaryPost.g.cs b/src/libs/Phoenix/Generated/Phoenix.ChatClient.SummarizeEndpointAgentsAgentIdSessionsSessionIdSummaryPost.g.cs index dbfccb0..1546612 100644 --- a/src/libs/Phoenix/Generated/Phoenix.ChatClient.SummarizeEndpointAgentsAgentIdSessionsSessionIdSummaryPost.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.ChatClient.SummarizeEndpointAgentsAgentIdSessionsSessionIdSummaryPost.g.cs @@ -378,18 +378,17 @@ partial void ProcessSummarizeEndpointAgentsAgentIdSessionsSessionIdSummaryPostRe __exception_422 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.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) @@ -423,17 +422,15 @@ partial void ProcessSummarizeEndpointAgentsAgentIdSessionsSessionIdSummaryPostRe } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -470,17 +467,15 @@ partial void ProcessSummarizeEndpointAgentsAgentIdSessionsSessionIdSummaryPostRe { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.DatasetsClient.DeleteDatasetById.g.cs b/src/libs/Phoenix/Generated/Phoenix.DatasetsClient.DeleteDatasetById.g.cs index 5a07fd2..b5c322e 100644 --- a/src/libs/Phoenix/Generated/Phoenix.DatasetsClient.DeleteDatasetById.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.DatasetsClient.DeleteDatasetById.g.cs @@ -346,18 +346,17 @@ await DeleteDatasetByIdAsResponseAsync( __exception_403 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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)); } // Dataset not found if ((int)__response.StatusCode == 404) @@ -384,18 +383,17 @@ await DeleteDatasetByIdAsResponseAsync( __exception_404 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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)); } // Invalid dataset ID if ((int)__response.StatusCode == 422) @@ -422,18 +420,17 @@ await DeleteDatasetByIdAsResponseAsync( __exception_422 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.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 @@ await DeleteDatasetByIdAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -498,17 +493,15 @@ await DeleteDatasetByIdAsResponseAsync( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.DatasetsClient.GetDataset.g.cs b/src/libs/Phoenix/Generated/Phoenix.DatasetsClient.GetDataset.g.cs index 02ae876..4a3fab0 100644 --- a/src/libs/Phoenix/Generated/Phoenix.DatasetsClient.GetDataset.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.DatasetsClient.GetDataset.g.cs @@ -353,18 +353,17 @@ partial void ProcessGetDatasetResponseContent( __exception_403 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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 if ((int)__response.StatusCode == 404) @@ -391,18 +390,17 @@ partial void ProcessGetDatasetResponseContent( __exception_404 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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) @@ -429,18 +427,17 @@ partial void ProcessGetDatasetResponseContent( __exception_422 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.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) @@ -474,17 +471,15 @@ partial void ProcessGetDatasetResponseContent( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -521,17 +516,15 @@ partial void ProcessGetDatasetResponseContent( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.DatasetsClient.GetDatasetCsv.g.cs b/src/libs/Phoenix/Generated/Phoenix.DatasetsClient.GetDatasetCsv.g.cs index 1ff39b1..821ad26 100644 --- a/src/libs/Phoenix/Generated/Phoenix.DatasetsClient.GetDatasetCsv.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.DatasetsClient.GetDatasetCsv.g.cs @@ -369,18 +369,17 @@ partial void ProcessGetDatasetCsvResponseContent( __exception_403 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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)); } // Unprocessable Entity if ((int)__response.StatusCode == 422) @@ -407,18 +406,17 @@ partial void ProcessGetDatasetCsvResponseContent( __exception_422 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.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) @@ -450,17 +448,15 @@ partial void ProcessGetDatasetCsvResponseContent( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -495,17 +491,15 @@ partial void ProcessGetDatasetCsvResponseContent( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.DatasetsClient.GetDatasetExamples.g.cs b/src/libs/Phoenix/Generated/Phoenix.DatasetsClient.GetDatasetExamples.g.cs index 210d07f..8051343 100644 --- a/src/libs/Phoenix/Generated/Phoenix.DatasetsClient.GetDatasetExamples.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.DatasetsClient.GetDatasetExamples.g.cs @@ -383,18 +383,17 @@ partial void ProcessGetDatasetExamplesResponseContent( __exception_403 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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 if ((int)__response.StatusCode == 404) @@ -421,18 +420,17 @@ partial void ProcessGetDatasetExamplesResponseContent( __exception_404 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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) @@ -459,18 +457,17 @@ partial void ProcessGetDatasetExamplesResponseContent( __exception_422 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.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) @@ -504,17 +501,15 @@ partial void ProcessGetDatasetExamplesResponseContent( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -551,17 +546,15 @@ partial void ProcessGetDatasetExamplesResponseContent( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.DatasetsClient.GetDatasetJSONL.g.cs b/src/libs/Phoenix/Generated/Phoenix.DatasetsClient.GetDatasetJSONL.g.cs index 4b5df47..d97cc7b 100644 --- a/src/libs/Phoenix/Generated/Phoenix.DatasetsClient.GetDatasetJSONL.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.DatasetsClient.GetDatasetJSONL.g.cs @@ -369,18 +369,17 @@ partial void ProcessGetDatasetJSONLResponseContent( __exception_403 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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)); } // Invalid dataset or version ID if ((int)__response.StatusCode == 422) @@ -407,18 +406,17 @@ partial void ProcessGetDatasetJSONLResponseContent( __exception_422 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.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) @@ -450,17 +448,15 @@ partial void ProcessGetDatasetJSONLResponseContent( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -495,17 +491,15 @@ partial void ProcessGetDatasetJSONLResponseContent( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.DatasetsClient.GetDatasetJSONLOpenAIEvals.g.cs b/src/libs/Phoenix/Generated/Phoenix.DatasetsClient.GetDatasetJSONLOpenAIEvals.g.cs index 59b07c8..0cf06ae 100644 --- a/src/libs/Phoenix/Generated/Phoenix.DatasetsClient.GetDatasetJSONLOpenAIEvals.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.DatasetsClient.GetDatasetJSONLOpenAIEvals.g.cs @@ -369,18 +369,17 @@ partial void ProcessGetDatasetJSONLOpenAIEvalsResponseContent( __exception_403 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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)); } // Invalid dataset or version ID if ((int)__response.StatusCode == 422) @@ -407,18 +406,17 @@ partial void ProcessGetDatasetJSONLOpenAIEvalsResponseContent( __exception_422 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.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) @@ -450,17 +448,15 @@ partial void ProcessGetDatasetJSONLOpenAIEvalsResponseContent( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -495,17 +491,15 @@ partial void ProcessGetDatasetJSONLOpenAIEvalsResponseContent( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.DatasetsClient.GetDatasetJSONLOpenAIFineTuning.g.cs b/src/libs/Phoenix/Generated/Phoenix.DatasetsClient.GetDatasetJSONLOpenAIFineTuning.g.cs index 63198b9..a570a49 100644 --- a/src/libs/Phoenix/Generated/Phoenix.DatasetsClient.GetDatasetJSONLOpenAIFineTuning.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.DatasetsClient.GetDatasetJSONLOpenAIFineTuning.g.cs @@ -369,18 +369,17 @@ partial void ProcessGetDatasetJSONLOpenAIFineTuningResponseContent( __exception_403 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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)); } // Invalid dataset or version ID if ((int)__response.StatusCode == 422) @@ -407,18 +406,17 @@ partial void ProcessGetDatasetJSONLOpenAIFineTuningResponseContent( __exception_422 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.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) @@ -450,17 +448,15 @@ partial void ProcessGetDatasetJSONLOpenAIFineTuningResponseContent( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -495,17 +491,15 @@ partial void ProcessGetDatasetJSONLOpenAIFineTuningResponseContent( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.DatasetsClient.ListDatasetVersionsByDatasetId.g.cs b/src/libs/Phoenix/Generated/Phoenix.DatasetsClient.ListDatasetVersionsByDatasetId.g.cs index 3b7c47b..0599cd9 100644 --- a/src/libs/Phoenix/Generated/Phoenix.DatasetsClient.ListDatasetVersionsByDatasetId.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.DatasetsClient.ListDatasetVersionsByDatasetId.g.cs @@ -385,18 +385,17 @@ partial void ProcessListDatasetVersionsByDatasetIdResponseContent( __exception_403 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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)); } // Unprocessable Entity if ((int)__response.StatusCode == 422) @@ -423,18 +422,17 @@ partial void ProcessListDatasetVersionsByDatasetIdResponseContent( __exception_422 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.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) @@ -468,17 +466,15 @@ partial void ProcessListDatasetVersionsByDatasetIdResponseContent( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -515,17 +511,15 @@ partial void ProcessListDatasetVersionsByDatasetIdResponseContent( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.DatasetsClient.ListDatasets.g.cs b/src/libs/Phoenix/Generated/Phoenix.DatasetsClient.ListDatasets.g.cs index 2892266..d5771e4 100644 --- a/src/libs/Phoenix/Generated/Phoenix.DatasetsClient.ListDatasets.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.DatasetsClient.ListDatasets.g.cs @@ -386,18 +386,17 @@ partial void ProcessListDatasetsResponseContent( __exception_403 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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)); } // Unprocessable Entity if ((int)__response.StatusCode == 422) @@ -424,18 +423,17 @@ partial void ProcessListDatasetsResponseContent( __exception_422 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.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 +467,15 @@ partial void ProcessListDatasetsResponseContent( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -516,17 +512,15 @@ partial void ProcessListDatasetsResponseContent( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.DatasetsClient.UploadDataset.g.cs b/src/libs/Phoenix/Generated/Phoenix.DatasetsClient.UploadDataset.g.cs index 3616ef3..13bb540 100644 --- a/src/libs/Phoenix/Generated/Phoenix.DatasetsClient.UploadDataset.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.DatasetsClient.UploadDataset.g.cs @@ -378,18 +378,17 @@ partial void ProcessUploadDatasetResponseContent( __exception_403 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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)); } // Dataset with the given name already exists (action=create). if ((int)__response.StatusCode == 409) @@ -416,18 +415,17 @@ partial void ProcessUploadDatasetResponseContent( __exception_409 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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)); } // Invalid request body if ((int)__response.StatusCode == 422) @@ -454,18 +452,17 @@ partial void ProcessUploadDatasetResponseContent( __exception_422 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.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) @@ -499,17 +496,15 @@ partial void ProcessUploadDatasetResponseContent( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -546,17 +541,15 @@ partial void ProcessUploadDatasetResponseContent( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.Exceptions.g.cs b/src/libs/Phoenix/Generated/Phoenix.Exceptions.g.cs index 02a3e45..e181f06 100644 --- a/src/libs/Phoenix/Generated/Phoenix.Exceptions.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.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::Phoenix.ApiException Create( + global::System.Net.HttpStatusCode statusCode, + string message, + global::System.Exception? innerException = null, + global::System.Collections.Generic.IDictionary>? responseHeaders = null) + { + return new global::Phoenix.ApiException(message, innerException, statusCode); + } + + /// + /// Convenience overload that constructs an with response body and headers populated. + /// + public static global::Phoenix.ApiException Create( + global::System.Net.HttpStatusCode statusCode, + string message, + global::System.Exception? innerException, + string? responseBody, + global::System.Collections.Generic.Dictionary>? responseHeaders) + { + var exception = global::Phoenix.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::Phoenix.ApiException Create( + global::System.Net.HttpStatusCode statusCode, + string message, + global::System.Exception? innerException = null, + global::System.Collections.Generic.IDictionary>? responseHeaders = null) + { + return new global::Phoenix.ApiException(message, innerException, statusCode); + } + + /// + /// Convenience overload that constructs an with response body, object, and headers populated. + /// + public static global::Phoenix.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::Phoenix.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/Phoenix/Generated/Phoenix.ExperimentsClient.CreateExperiment.g.cs b/src/libs/Phoenix/Generated/Phoenix.ExperimentsClient.CreateExperiment.g.cs index 6b19c89..7fe39a2 100644 --- a/src/libs/Phoenix/Generated/Phoenix.ExperimentsClient.CreateExperiment.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.ExperimentsClient.CreateExperiment.g.cs @@ -369,18 +369,17 @@ partial void ProcessCreateExperimentResponseContent( __exception_403 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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)); } // Dataset or DatasetVersion not found if ((int)__response.StatusCode == 404) @@ -407,18 +406,17 @@ partial void ProcessCreateExperimentResponseContent( __exception_404 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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) @@ -445,18 +443,17 @@ partial void ProcessCreateExperimentResponseContent( __exception_422 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.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 ProcessCreateExperimentResponseContent( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::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 ProcessCreateExperimentResponseContent( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.ExperimentsClient.CreateExperimentRun.g.cs b/src/libs/Phoenix/Generated/Phoenix.ExperimentsClient.CreateExperimentRun.g.cs index 9c475e1..f536278 100644 --- a/src/libs/Phoenix/Generated/Phoenix.ExperimentsClient.CreateExperimentRun.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.ExperimentsClient.CreateExperimentRun.g.cs @@ -369,18 +369,17 @@ partial void ProcessCreateExperimentRunResponseContent( __exception_403 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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)); } // Experiment or dataset example not found if ((int)__response.StatusCode == 404) @@ -407,18 +406,17 @@ partial void ProcessCreateExperimentRunResponseContent( __exception_404 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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)); } // Experiment run already exists with a successful result and cannot be updated if ((int)__response.StatusCode == 409) @@ -445,18 +443,17 @@ partial void ProcessCreateExperimentRunResponseContent( __exception_409 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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) @@ -483,18 +480,17 @@ partial void ProcessCreateExperimentRunResponseContent( __exception_422 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.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 ProcessCreateExperimentRunResponseContent( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::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 ProcessCreateExperimentRunResponseContent( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.ExperimentsClient.DeleteExperiment.g.cs b/src/libs/Phoenix/Generated/Phoenix.ExperimentsClient.DeleteExperiment.g.cs index c64e552..88b9180 100644 --- a/src/libs/Phoenix/Generated/Phoenix.ExperimentsClient.DeleteExperiment.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.ExperimentsClient.DeleteExperiment.g.cs @@ -360,18 +360,17 @@ await DeleteExperimentAsResponseAsync( __exception_403 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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)); } // Experiment not found if ((int)__response.StatusCode == 404) @@ -398,18 +397,17 @@ await DeleteExperimentAsResponseAsync( __exception_404 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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) @@ -436,18 +434,17 @@ await DeleteExperimentAsResponseAsync( __exception_422 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.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) @@ -474,17 +471,15 @@ await DeleteExperimentAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::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 @@ await DeleteExperimentAsResponseAsync( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.ExperimentsClient.GetExperiment.g.cs b/src/libs/Phoenix/Generated/Phoenix.ExperimentsClient.GetExperiment.g.cs index c1d941e..602168b 100644 --- a/src/libs/Phoenix/Generated/Phoenix.ExperimentsClient.GetExperiment.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.ExperimentsClient.GetExperiment.g.cs @@ -349,18 +349,17 @@ partial void ProcessGetExperimentResponseContent( __exception_403 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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)); } // Experiment not found if ((int)__response.StatusCode == 404) @@ -387,18 +386,17 @@ partial void ProcessGetExperimentResponseContent( __exception_404 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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) @@ -425,18 +423,17 @@ partial void ProcessGetExperimentResponseContent( __exception_422 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.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 ProcessGetExperimentResponseContent( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::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 ProcessGetExperimentResponseContent( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.ExperimentsClient.GetExperimentCSV.g.cs b/src/libs/Phoenix/Generated/Phoenix.ExperimentsClient.GetExperimentCSV.g.cs index 64fd12f..7ed6e98 100644 --- a/src/libs/Phoenix/Generated/Phoenix.ExperimentsClient.GetExperimentCSV.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.ExperimentsClient.GetExperimentCSV.g.cs @@ -349,18 +349,17 @@ partial void ProcessGetExperimentCSVResponseContent( __exception_403 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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 if ((int)__response.StatusCode == 422) @@ -387,18 +386,17 @@ partial void ProcessGetExperimentCSVResponseContent( __exception_422 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.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 ProcessGetExperimentCSVResponseContent( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::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 ProcessGetExperimentCSVResponseContent( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.ExperimentsClient.GetExperimentJSON.g.cs b/src/libs/Phoenix/Generated/Phoenix.ExperimentsClient.GetExperimentJSON.g.cs index d9fb0d0..9f4bc94 100644 --- a/src/libs/Phoenix/Generated/Phoenix.ExperimentsClient.GetExperimentJSON.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.ExperimentsClient.GetExperimentJSON.g.cs @@ -349,18 +349,17 @@ partial void ProcessGetExperimentJSONResponseContent( __exception_403 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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)); } // Experiment not found if ((int)__response.StatusCode == 404) @@ -387,18 +386,17 @@ partial void ProcessGetExperimentJSONResponseContent( __exception_404 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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) @@ -425,18 +423,17 @@ partial void ProcessGetExperimentJSONResponseContent( __exception_422 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.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) @@ -468,17 +465,15 @@ partial void ProcessGetExperimentJSONResponseContent( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::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 +508,15 @@ partial void ProcessGetExperimentJSONResponseContent( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.ExperimentsClient.GetIncompleteExperimentEvaluations.g.cs b/src/libs/Phoenix/Generated/Phoenix.ExperimentsClient.GetIncompleteExperimentEvaluations.g.cs index ce243b3..f179c36 100644 --- a/src/libs/Phoenix/Generated/Phoenix.ExperimentsClient.GetIncompleteExperimentEvaluations.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.ExperimentsClient.GetIncompleteExperimentEvaluations.g.cs @@ -419,18 +419,17 @@ partial void ProcessGetIncompleteExperimentEvaluationsResponseContent( __exception_403 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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)); } // No evaluator names provided if ((int)__response.StatusCode == 400) @@ -457,18 +456,17 @@ partial void ProcessGetIncompleteExperimentEvaluationsResponseContent( __exception_400 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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)); } // Experiment not found if ((int)__response.StatusCode == 404) @@ -495,18 +493,17 @@ partial void ProcessGetIncompleteExperimentEvaluationsResponseContent( __exception_404 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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)); } // Invalid cursor format if ((int)__response.StatusCode == 422) @@ -533,18 +530,17 @@ partial void ProcessGetIncompleteExperimentEvaluationsResponseContent( __exception_422 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.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 +574,15 @@ partial void ProcessGetIncompleteExperimentEvaluationsResponseContent( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::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 +619,15 @@ partial void ProcessGetIncompleteExperimentEvaluationsResponseContent( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.ExperimentsClient.GetIncompleteExperimentRuns.g.cs b/src/libs/Phoenix/Generated/Phoenix.ExperimentsClient.GetIncompleteExperimentRuns.g.cs index b1d7d58..7d44fa8 100644 --- a/src/libs/Phoenix/Generated/Phoenix.ExperimentsClient.GetIncompleteExperimentRuns.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.ExperimentsClient.GetIncompleteExperimentRuns.g.cs @@ -401,18 +401,17 @@ partial void ProcessGetIncompleteExperimentRunsResponseContent( __exception_403 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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)); } // Experiment not found if ((int)__response.StatusCode == 404) @@ -439,18 +438,17 @@ partial void ProcessGetIncompleteExperimentRunsResponseContent( __exception_404 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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)); } // Invalid cursor format if ((int)__response.StatusCode == 422) @@ -477,18 +475,17 @@ partial void ProcessGetIncompleteExperimentRunsResponseContent( __exception_422 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.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) @@ -522,17 +519,15 @@ partial void ProcessGetIncompleteExperimentRunsResponseContent( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -569,17 +564,15 @@ partial void ProcessGetIncompleteExperimentRunsResponseContent( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.ExperimentsClient.ListExperimentRuns.g.cs b/src/libs/Phoenix/Generated/Phoenix.ExperimentsClient.ListExperimentRuns.g.cs index fb621e1..c50bc3e 100644 --- a/src/libs/Phoenix/Generated/Phoenix.ExperimentsClient.ListExperimentRuns.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.ExperimentsClient.ListExperimentRuns.g.cs @@ -381,18 +381,17 @@ partial void ProcessListExperimentRunsResponseContent( __exception_403 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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)); } // Experiment not found if ((int)__response.StatusCode == 404) @@ -419,18 +418,17 @@ partial void ProcessListExperimentRunsResponseContent( __exception_404 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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)); } // Invalid cursor format if ((int)__response.StatusCode == 422) @@ -457,18 +455,17 @@ partial void ProcessListExperimentRunsResponseContent( __exception_422 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.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) @@ -502,17 +499,15 @@ partial void ProcessListExperimentRunsResponseContent( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -549,17 +544,15 @@ partial void ProcessListExperimentRunsResponseContent( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.ExperimentsClient.ListExperiments.g.cs b/src/libs/Phoenix/Generated/Phoenix.ExperimentsClient.ListExperiments.g.cs index 591d0d5..fc99e50 100644 --- a/src/libs/Phoenix/Generated/Phoenix.ExperimentsClient.ListExperiments.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.ExperimentsClient.ListExperiments.g.cs @@ -383,18 +383,17 @@ partial void ProcessListExperimentsResponseContent( __exception_403 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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)); } // Unprocessable Entity if ((int)__response.StatusCode == 422) @@ -421,18 +420,17 @@ partial void ProcessListExperimentsResponseContent( __exception_422 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.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 ProcessListExperimentsResponseContent( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::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 ProcessListExperimentsResponseContent( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.ExperimentsClient.UpsertExperimentEvaluation.g.cs b/src/libs/Phoenix/Generated/Phoenix.ExperimentsClient.UpsertExperimentEvaluation.g.cs index 2a9881d..37f1940 100644 --- a/src/libs/Phoenix/Generated/Phoenix.ExperimentsClient.UpsertExperimentEvaluation.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.ExperimentsClient.UpsertExperimentEvaluation.g.cs @@ -360,18 +360,17 @@ partial void ProcessUpsertExperimentEvaluationResponseContent( __exception_403 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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)); } // Experiment run not found if ((int)__response.StatusCode == 404) @@ -398,18 +397,17 @@ partial void ProcessUpsertExperimentEvaluationResponseContent( __exception_404 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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) @@ -436,18 +434,17 @@ partial void ProcessUpsertExperimentEvaluationResponseContent( __exception_422 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.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 ProcessUpsertExperimentEvaluationResponseContent( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::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 ProcessUpsertExperimentEvaluationResponseContent( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.PhoenixClient.CheckHealthzHealthzGet.g.cs b/src/libs/Phoenix/Generated/Phoenix.PhoenixClient.CheckHealthzHealthzGet.g.cs index 353a321..2c8f1af 100644 --- a/src/libs/Phoenix/Generated/Phoenix.PhoenixClient.CheckHealthzHealthzGet.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.PhoenixClient.CheckHealthzHealthzGet.g.cs @@ -345,17 +345,15 @@ partial void ProcessCheckHealthzHealthzGetResponseContent( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -390,17 +388,15 @@ partial void ProcessCheckHealthzHealthzGetResponseContent( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.PhoenixClient.CheckReadyzReadyzGet.g.cs b/src/libs/Phoenix/Generated/Phoenix.PhoenixClient.CheckReadyzReadyzGet.g.cs index 05b7b67..f9f2dc0 100644 --- a/src/libs/Phoenix/Generated/Phoenix.PhoenixClient.CheckReadyzReadyzGet.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.PhoenixClient.CheckReadyzReadyzGet.g.cs @@ -345,17 +345,15 @@ partial void ProcessCheckReadyzReadyzGetResponseContent( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -390,17 +388,15 @@ partial void ProcessCheckReadyzReadyzGetResponseContent( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.PhoenixClient.CreateTokensOauth2IdpNameTokensGet.g.cs b/src/libs/Phoenix/Generated/Phoenix.PhoenixClient.CreateTokensOauth2IdpNameTokensGet.g.cs index e57b6c9..062b21d 100644 --- a/src/libs/Phoenix/Generated/Phoenix.PhoenixClient.CreateTokensOauth2IdpNameTokensGet.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.PhoenixClient.CreateTokensOauth2IdpNameTokensGet.g.cs @@ -440,18 +440,17 @@ partial void ProcessCreateTokensOauth2IdpNameTokensGetResponseContent( __exception_422 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.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) @@ -483,17 +482,15 @@ partial void ProcessCreateTokensOauth2IdpNameTokensGetResponseContent( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::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 +525,15 @@ partial void ProcessCreateTokensOauth2IdpNameTokensGetResponseContent( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.PhoenixClient.InitiatePasswordResetAuthPasswordResetEmailPost.g.cs b/src/libs/Phoenix/Generated/Phoenix.PhoenixClient.InitiatePasswordResetAuthPasswordResetEmailPost.g.cs index 009d113..f102190 100644 --- a/src/libs/Phoenix/Generated/Phoenix.PhoenixClient.InitiatePasswordResetAuthPasswordResetEmailPost.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.PhoenixClient.InitiatePasswordResetAuthPasswordResetEmailPost.g.cs @@ -347,17 +347,15 @@ partial void ProcessInitiatePasswordResetAuthPasswordResetEmailPostResponseConte } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -392,17 +390,15 @@ partial void ProcessInitiatePasswordResetAuthPasswordResetEmailPostResponseConte { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.PhoenixClient.LdapLoginAuthLdapLoginPost.g.cs b/src/libs/Phoenix/Generated/Phoenix.PhoenixClient.LdapLoginAuthLdapLoginPost.g.cs index f5d2148..622f621 100644 --- a/src/libs/Phoenix/Generated/Phoenix.PhoenixClient.LdapLoginAuthLdapLoginPost.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.PhoenixClient.LdapLoginAuthLdapLoginPost.g.cs @@ -347,17 +347,15 @@ partial void ProcessLdapLoginAuthLdapLoginPostResponseContent( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -392,17 +390,15 @@ partial void ProcessLdapLoginAuthLdapLoginPostResponseContent( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.PhoenixClient.LoginAuthLoginPost.g.cs b/src/libs/Phoenix/Generated/Phoenix.PhoenixClient.LoginAuthLoginPost.g.cs index 9e9504e..445fe47 100644 --- a/src/libs/Phoenix/Generated/Phoenix.PhoenixClient.LoginAuthLoginPost.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.PhoenixClient.LoginAuthLoginPost.g.cs @@ -347,17 +347,15 @@ partial void ProcessLoginAuthLoginPostResponseContent( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -392,17 +390,15 @@ partial void ProcessLoginAuthLoginPostResponseContent( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.PhoenixClient.LoginOauth2IdpNameLoginGet.g.cs b/src/libs/Phoenix/Generated/Phoenix.PhoenixClient.LoginOauth2IdpNameLoginGet.g.cs index e955939..c7006b3 100644 --- a/src/libs/Phoenix/Generated/Phoenix.PhoenixClient.LoginOauth2IdpNameLoginGet.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.PhoenixClient.LoginOauth2IdpNameLoginGet.g.cs @@ -361,18 +361,17 @@ partial void ProcessLoginOauth2IdpNameLoginGetResponseContent( __exception_422 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.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) @@ -404,17 +403,15 @@ partial void ProcessLoginOauth2IdpNameLoginGetResponseContent( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -449,17 +446,15 @@ partial void ProcessLoginOauth2IdpNameLoginGetResponseContent( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.PhoenixClient.LoginOauth2IdpNameLoginPost.g.cs b/src/libs/Phoenix/Generated/Phoenix.PhoenixClient.LoginOauth2IdpNameLoginPost.g.cs index aa8c41c..dd210a1 100644 --- a/src/libs/Phoenix/Generated/Phoenix.PhoenixClient.LoginOauth2IdpNameLoginPost.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.PhoenixClient.LoginOauth2IdpNameLoginPost.g.cs @@ -361,18 +361,17 @@ partial void ProcessLoginOauth2IdpNameLoginPostResponseContent( __exception_422 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.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) @@ -404,17 +403,15 @@ partial void ProcessLoginOauth2IdpNameLoginPostResponseContent( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -449,17 +446,15 @@ partial void ProcessLoginOauth2IdpNameLoginPostResponseContent( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.PhoenixClient.LogoutAuthLogoutGet.g.cs b/src/libs/Phoenix/Generated/Phoenix.PhoenixClient.LogoutAuthLogoutGet.g.cs index 1b91527..0f32099 100644 --- a/src/libs/Phoenix/Generated/Phoenix.PhoenixClient.LogoutAuthLogoutGet.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.PhoenixClient.LogoutAuthLogoutGet.g.cs @@ -347,17 +347,15 @@ partial void ProcessLogoutAuthLogoutGetResponseContent( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -392,17 +390,15 @@ partial void ProcessLogoutAuthLogoutGetResponseContent( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.PhoenixClient.RefreshTokensAuthRefreshPost.g.cs b/src/libs/Phoenix/Generated/Phoenix.PhoenixClient.RefreshTokensAuthRefreshPost.g.cs index e38723b..3f74d56 100644 --- a/src/libs/Phoenix/Generated/Phoenix.PhoenixClient.RefreshTokensAuthRefreshPost.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.PhoenixClient.RefreshTokensAuthRefreshPost.g.cs @@ -347,17 +347,15 @@ partial void ProcessRefreshTokensAuthRefreshPostResponseContent( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -392,17 +390,15 @@ partial void ProcessRefreshTokensAuthRefreshPostResponseContent( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.PhoenixClient.ResetPasswordAuthPasswordResetPost.g.cs b/src/libs/Phoenix/Generated/Phoenix.PhoenixClient.ResetPasswordAuthPasswordResetPost.g.cs index e398dea..f5e6cc5 100644 --- a/src/libs/Phoenix/Generated/Phoenix.PhoenixClient.ResetPasswordAuthPasswordResetPost.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.PhoenixClient.ResetPasswordAuthPasswordResetPost.g.cs @@ -347,17 +347,15 @@ partial void ProcessResetPasswordAuthPasswordResetPostResponseContent( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -392,17 +390,15 @@ partial void ProcessResetPasswordAuthPasswordResetPostResponseContent( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.PhoenixClient.VersionArizePhoenixVersionGet.g.cs b/src/libs/Phoenix/Generated/Phoenix.PhoenixClient.VersionArizePhoenixVersionGet.g.cs index 379e6aa..087a2b4 100644 --- a/src/libs/Phoenix/Generated/Phoenix.PhoenixClient.VersionArizePhoenixVersionGet.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.PhoenixClient.VersionArizePhoenixVersionGet.g.cs @@ -345,17 +345,15 @@ partial void ProcessVersionArizePhoenixVersionGetResponseContent( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -390,17 +388,15 @@ partial void ProcessVersionArizePhoenixVersionGetResponseContent( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.ProjectsClient.CreateProject.g.cs b/src/libs/Phoenix/Generated/Phoenix.ProjectsClient.CreateProject.g.cs index bc18031..61944c3 100644 --- a/src/libs/Phoenix/Generated/Phoenix.ProjectsClient.CreateProject.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.ProjectsClient.CreateProject.g.cs @@ -362,18 +362,17 @@ partial void ProcessCreateProjectResponseContent( __exception_403 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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)); } // Unprocessable Entity if ((int)__response.StatusCode == 422) @@ -400,18 +399,17 @@ partial void ProcessCreateProjectResponseContent( __exception_422 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -445,17 +443,15 @@ partial void ProcessCreateProjectResponseContent( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -492,17 +488,15 @@ partial void ProcessCreateProjectResponseContent( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.ProjectsClient.DeleteProject.g.cs b/src/libs/Phoenix/Generated/Phoenix.ProjectsClient.DeleteProject.g.cs index 852a291..e7d1b3a 100644 --- a/src/libs/Phoenix/Generated/Phoenix.ProjectsClient.DeleteProject.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.ProjectsClient.DeleteProject.g.cs @@ -348,18 +348,17 @@ await DeleteProjectAsResponseAsync( __exception_403 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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 if ((int)__response.StatusCode == 404) @@ -386,18 +385,17 @@ await DeleteProjectAsResponseAsync( __exception_404 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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)); } // Unprocessable Entity if ((int)__response.StatusCode == 422) @@ -424,18 +422,17 @@ await DeleteProjectAsResponseAsync( __exception_422 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.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) @@ -462,17 +459,15 @@ await DeleteProjectAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -500,17 +495,15 @@ await DeleteProjectAsResponseAsync( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.ProjectsClient.GetProject.g.cs b/src/libs/Phoenix/Generated/Phoenix.ProjectsClient.GetProject.g.cs index 6e1d042..66f5c00 100644 --- a/src/libs/Phoenix/Generated/Phoenix.ProjectsClient.GetProject.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.ProjectsClient.GetProject.g.cs @@ -355,18 +355,17 @@ partial void ProcessGetProjectResponseContent( __exception_403 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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 if ((int)__response.StatusCode == 404) @@ -393,18 +392,17 @@ partial void ProcessGetProjectResponseContent( __exception_404 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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)); } // Unprocessable Entity if ((int)__response.StatusCode == 422) @@ -431,18 +429,17 @@ partial void ProcessGetProjectResponseContent( __exception_422 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.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 ProcessGetProjectResponseContent( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::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 ProcessGetProjectResponseContent( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.ProjectsClient.GetProjects.g.cs b/src/libs/Phoenix/Generated/Phoenix.ProjectsClient.GetProjects.g.cs index 5b2d5a9..06a515c 100644 --- a/src/libs/Phoenix/Generated/Phoenix.ProjectsClient.GetProjects.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.ProjectsClient.GetProjects.g.cs @@ -406,18 +406,17 @@ partial void ProcessGetProjectsResponseContent( __exception_403 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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)); } // Unprocessable Entity if ((int)__response.StatusCode == 422) @@ -444,18 +443,17 @@ partial void ProcessGetProjectsResponseContent( __exception_422 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -489,17 +487,15 @@ partial void ProcessGetProjectsResponseContent( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -536,17 +532,15 @@ partial void ProcessGetProjectsResponseContent( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.ProjectsClient.UpdateProject.g.cs b/src/libs/Phoenix/Generated/Phoenix.ProjectsClient.UpdateProject.g.cs index 5604507..cd0c10e 100644 --- a/src/libs/Phoenix/Generated/Phoenix.ProjectsClient.UpdateProject.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.ProjectsClient.UpdateProject.g.cs @@ -375,18 +375,17 @@ partial void ProcessUpdateProjectResponseContent( __exception_403 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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 if ((int)__response.StatusCode == 404) @@ -413,18 +412,17 @@ partial void ProcessUpdateProjectResponseContent( __exception_404 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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)); } // Unprocessable Entity if ((int)__response.StatusCode == 422) @@ -451,18 +449,17 @@ partial void ProcessUpdateProjectResponseContent( __exception_422 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.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) @@ -496,17 +493,15 @@ partial void ProcessUpdateProjectResponseContent( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -543,17 +538,15 @@ partial void ProcessUpdateProjectResponseContent( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.PromptsClient.CreatePromptVersionTag.g.cs b/src/libs/Phoenix/Generated/Phoenix.PromptsClient.CreatePromptVersionTag.g.cs index aab38e7..3e570ac 100644 --- a/src/libs/Phoenix/Generated/Phoenix.PromptsClient.CreatePromptVersionTag.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.PromptsClient.CreatePromptVersionTag.g.cs @@ -368,18 +368,17 @@ await CreatePromptVersionTagAsResponseAsync( __exception_403 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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 if ((int)__response.StatusCode == 404) @@ -406,18 +405,17 @@ await CreatePromptVersionTagAsResponseAsync( __exception_404 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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)); } // Unprocessable Entity if ((int)__response.StatusCode == 422) @@ -444,18 +442,17 @@ await CreatePromptVersionTagAsResponseAsync( __exception_422 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.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) @@ -482,17 +479,15 @@ await CreatePromptVersionTagAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -520,17 +515,15 @@ await CreatePromptVersionTagAsResponseAsync( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.PromptsClient.DeletePrompt.g.cs b/src/libs/Phoenix/Generated/Phoenix.PromptsClient.DeletePrompt.g.cs index a049a55..ae94adb 100644 --- a/src/libs/Phoenix/Generated/Phoenix.PromptsClient.DeletePrompt.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.PromptsClient.DeletePrompt.g.cs @@ -348,18 +348,17 @@ await DeletePromptAsResponseAsync( __exception_403 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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 if ((int)__response.StatusCode == 404) @@ -386,18 +385,17 @@ await DeletePromptAsResponseAsync( __exception_404 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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)); } // Unprocessable Entity if ((int)__response.StatusCode == 422) @@ -424,18 +422,17 @@ await DeletePromptAsResponseAsync( __exception_422 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.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) @@ -462,17 +459,15 @@ await DeletePromptAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -500,17 +495,15 @@ await DeletePromptAsResponseAsync( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.PromptsClient.DeletePromptVersionTag.g.cs b/src/libs/Phoenix/Generated/Phoenix.PromptsClient.DeletePromptVersionTag.g.cs index b3736f0..4a4fc5f 100644 --- a/src/libs/Phoenix/Generated/Phoenix.PromptsClient.DeletePromptVersionTag.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.PromptsClient.DeletePromptVersionTag.g.cs @@ -361,18 +361,17 @@ await DeletePromptVersionTagAsResponseAsync( __exception_403 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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 if ((int)__response.StatusCode == 404) @@ -399,18 +398,17 @@ await DeletePromptVersionTagAsResponseAsync( __exception_404 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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)); } // Unprocessable Entity if ((int)__response.StatusCode == 422) @@ -437,18 +435,17 @@ await DeletePromptVersionTagAsResponseAsync( __exception_422 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.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) @@ -475,17 +472,15 @@ await DeletePromptVersionTagAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::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 +508,15 @@ await DeletePromptVersionTagAsResponseAsync( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.PromptsClient.GetPromptVersionByPromptVersionId.g.cs b/src/libs/Phoenix/Generated/Phoenix.PromptsClient.GetPromptVersionByPromptVersionId.g.cs index 77d5eaf..b89fa52 100644 --- a/src/libs/Phoenix/Generated/Phoenix.PromptsClient.GetPromptVersionByPromptVersionId.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.PromptsClient.GetPromptVersionByPromptVersionId.g.cs @@ -355,18 +355,17 @@ partial void ProcessGetPromptVersionByPromptVersionIdResponseContent( __exception_403 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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 if ((int)__response.StatusCode == 404) @@ -393,18 +392,17 @@ partial void ProcessGetPromptVersionByPromptVersionIdResponseContent( __exception_404 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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)); } // Unprocessable Entity if ((int)__response.StatusCode == 422) @@ -431,18 +429,17 @@ partial void ProcessGetPromptVersionByPromptVersionIdResponseContent( __exception_422 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.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 ProcessGetPromptVersionByPromptVersionIdResponseContent( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::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 ProcessGetPromptVersionByPromptVersionIdResponseContent( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.PromptsClient.GetPromptVersionByTagName.g.cs b/src/libs/Phoenix/Generated/Phoenix.PromptsClient.GetPromptVersionByTagName.g.cs index 56bc5ad..304cc60 100644 --- a/src/libs/Phoenix/Generated/Phoenix.PromptsClient.GetPromptVersionByTagName.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.PromptsClient.GetPromptVersionByTagName.g.cs @@ -368,18 +368,17 @@ partial void ProcessGetPromptVersionByTagNameResponseContent( __exception_403 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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 if ((int)__response.StatusCode == 404) @@ -406,18 +405,17 @@ partial void ProcessGetPromptVersionByTagNameResponseContent( __exception_404 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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)); } // Unprocessable Entity if ((int)__response.StatusCode == 422) @@ -444,18 +442,17 @@ partial void ProcessGetPromptVersionByTagNameResponseContent( __exception_422 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -489,17 +486,15 @@ partial void ProcessGetPromptVersionByTagNameResponseContent( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -536,17 +531,15 @@ partial void ProcessGetPromptVersionByTagNameResponseContent( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.PromptsClient.GetPromptVersionLatest.g.cs b/src/libs/Phoenix/Generated/Phoenix.PromptsClient.GetPromptVersionLatest.g.cs index 5aa69fe..dd480d3 100644 --- a/src/libs/Phoenix/Generated/Phoenix.PromptsClient.GetPromptVersionLatest.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.PromptsClient.GetPromptVersionLatest.g.cs @@ -355,18 +355,17 @@ partial void ProcessGetPromptVersionLatestResponseContent( __exception_403 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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 if ((int)__response.StatusCode == 404) @@ -393,18 +392,17 @@ partial void ProcessGetPromptVersionLatestResponseContent( __exception_404 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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)); } // Unprocessable Entity if ((int)__response.StatusCode == 422) @@ -431,18 +429,17 @@ partial void ProcessGetPromptVersionLatestResponseContent( __exception_422 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.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 ProcessGetPromptVersionLatestResponseContent( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::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 ProcessGetPromptVersionLatestResponseContent( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.PromptsClient.GetPromptVersionTags.g.cs b/src/libs/Phoenix/Generated/Phoenix.PromptsClient.GetPromptVersionTags.g.cs index 3d39a7d..93be61e 100644 --- a/src/libs/Phoenix/Generated/Phoenix.PromptsClient.GetPromptVersionTags.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.PromptsClient.GetPromptVersionTags.g.cs @@ -387,18 +387,17 @@ partial void ProcessGetPromptVersionTagsResponseContent( __exception_403 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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 if ((int)__response.StatusCode == 404) @@ -425,18 +424,17 @@ partial void ProcessGetPromptVersionTagsResponseContent( __exception_404 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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)); } // Unprocessable Entity if ((int)__response.StatusCode == 422) @@ -463,18 +461,17 @@ partial void ProcessGetPromptVersionTagsResponseContent( __exception_422 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.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 +505,15 @@ partial void ProcessGetPromptVersionTagsResponseContent( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::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 +550,15 @@ partial void ProcessGetPromptVersionTagsResponseContent( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.PromptsClient.GetPrompts.g.cs b/src/libs/Phoenix/Generated/Phoenix.PromptsClient.GetPrompts.g.cs index 1b3c068..c149687 100644 --- a/src/libs/Phoenix/Generated/Phoenix.PromptsClient.GetPrompts.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.PromptsClient.GetPrompts.g.cs @@ -374,18 +374,17 @@ partial void ProcessGetPromptsResponseContent( __exception_403 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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)); } // Unprocessable Entity if ((int)__response.StatusCode == 422) @@ -412,18 +411,17 @@ partial void ProcessGetPromptsResponseContent( __exception_422 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.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) @@ -457,17 +455,15 @@ partial void ProcessGetPromptsResponseContent( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -504,17 +500,15 @@ partial void ProcessGetPromptsResponseContent( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.PromptsClient.ListPromptVersions.g.cs b/src/libs/Phoenix/Generated/Phoenix.PromptsClient.ListPromptVersions.g.cs index 297ca96..3012695 100644 --- a/src/libs/Phoenix/Generated/Phoenix.PromptsClient.ListPromptVersions.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.PromptsClient.ListPromptVersions.g.cs @@ -387,18 +387,17 @@ partial void ProcessListPromptVersionsResponseContent( __exception_403 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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)); } // Unprocessable Entity if ((int)__response.StatusCode == 422) @@ -425,18 +424,17 @@ partial void ProcessListPromptVersionsResponseContent( __exception_422 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Not Found if ((int)__response.StatusCode == 404) @@ -463,18 +461,17 @@ partial void ProcessListPromptVersionsResponseContent( __exception_404 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_404, - statusCode: __response.StatusCode) - { - ResponseBody = __content_404, - ResponseObject = __value_404, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_404, + responseObject: __value_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -508,17 +505,15 @@ partial void ProcessListPromptVersionsResponseContent( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::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 +550,15 @@ partial void ProcessListPromptVersionsResponseContent( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.PromptsClient.PostPromptVersion.g.cs b/src/libs/Phoenix/Generated/Phoenix.PromptsClient.PostPromptVersion.g.cs index 4948762..1064e4d 100644 --- a/src/libs/Phoenix/Generated/Phoenix.PromptsClient.PostPromptVersion.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.PromptsClient.PostPromptVersion.g.cs @@ -362,18 +362,17 @@ partial void ProcessPostPromptVersionResponseContent( __exception_403 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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)); } // Unprocessable Entity if ((int)__response.StatusCode == 422) @@ -400,18 +399,17 @@ partial void ProcessPostPromptVersionResponseContent( __exception_422 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -445,17 +443,15 @@ partial void ProcessPostPromptVersionResponseContent( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -492,17 +488,15 @@ partial void ProcessPostPromptVersionResponseContent( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.SecretsClient.UpsertOrDeleteSecrets.g.cs b/src/libs/Phoenix/Generated/Phoenix.SecretsClient.UpsertOrDeleteSecrets.g.cs index b01fea8..ff7fa3e 100644 --- a/src/libs/Phoenix/Generated/Phoenix.SecretsClient.UpsertOrDeleteSecrets.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.SecretsClient.UpsertOrDeleteSecrets.g.cs @@ -362,18 +362,17 @@ partial void ProcessUpsertOrDeleteSecretsResponseContent( __exception_403 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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)); } // Unprocessable Entity if ((int)__response.StatusCode == 422) @@ -400,18 +399,17 @@ partial void ProcessUpsertOrDeleteSecretsResponseContent( __exception_422 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Insufficient Storage if ((int)__response.StatusCode == 507) @@ -438,18 +436,17 @@ partial void ProcessUpsertOrDeleteSecretsResponseContent( __exception_507 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_507 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_507, - statusCode: __response.StatusCode) - { - ResponseBody = __content_507, - ResponseObject = __value_507, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_507, + responseObject: __value_507, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -483,17 +480,15 @@ partial void ProcessUpsertOrDeleteSecretsResponseContent( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -530,17 +525,15 @@ partial void ProcessUpsertOrDeleteSecretsResponseContent( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.SessionsClient.AnnotateSessions.g.cs b/src/libs/Phoenix/Generated/Phoenix.SessionsClient.AnnotateSessions.g.cs index 94d866e..c366df0 100644 --- a/src/libs/Phoenix/Generated/Phoenix.SessionsClient.AnnotateSessions.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.SessionsClient.AnnotateSessions.g.cs @@ -378,18 +378,17 @@ partial void ProcessAnnotateSessionsResponseContent( __exception_403 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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)); } // Session not found if ((int)__response.StatusCode == 404) @@ -416,18 +415,17 @@ partial void ProcessAnnotateSessionsResponseContent( __exception_404 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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) @@ -454,18 +452,17 @@ partial void ProcessAnnotateSessionsResponseContent( __exception_422 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.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) @@ -499,17 +496,15 @@ partial void ProcessAnnotateSessionsResponseContent( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -546,17 +541,15 @@ partial void ProcessAnnotateSessionsResponseContent( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.SessionsClient.CreateSessionNote.g.cs b/src/libs/Phoenix/Generated/Phoenix.SessionsClient.CreateSessionNote.g.cs index 16af46e..0b594a8 100644 --- a/src/libs/Phoenix/Generated/Phoenix.SessionsClient.CreateSessionNote.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.SessionsClient.CreateSessionNote.g.cs @@ -362,18 +362,17 @@ partial void ProcessCreateSessionNoteResponseContent( __exception_403 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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)); } // Session not found if ((int)__response.StatusCode == 404) @@ -400,18 +399,17 @@ partial void ProcessCreateSessionNoteResponseContent( __exception_404 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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) @@ -438,18 +436,17 @@ partial void ProcessCreateSessionNoteResponseContent( __exception_422 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.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) @@ -483,17 +480,15 @@ partial void ProcessCreateSessionNoteResponseContent( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -530,17 +525,15 @@ partial void ProcessCreateSessionNoteResponseContent( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.SessionsClient.DeleteSession.g.cs b/src/libs/Phoenix/Generated/Phoenix.SessionsClient.DeleteSession.g.cs index 2ffa402..12ac606 100644 --- a/src/libs/Phoenix/Generated/Phoenix.SessionsClient.DeleteSession.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.SessionsClient.DeleteSession.g.cs @@ -354,18 +354,17 @@ await DeleteSessionAsResponseAsync( __exception_403 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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 if ((int)__response.StatusCode == 404) @@ -392,18 +391,17 @@ await DeleteSessionAsResponseAsync( __exception_404 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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) @@ -430,18 +428,17 @@ await DeleteSessionAsResponseAsync( __exception_422 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.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) @@ -468,17 +465,15 @@ await DeleteSessionAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -506,17 +501,15 @@ await DeleteSessionAsResponseAsync( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.SessionsClient.DeleteSessions.g.cs b/src/libs/Phoenix/Generated/Phoenix.SessionsClient.DeleteSessions.g.cs index 83ca48c..2319fe4 100644 --- a/src/libs/Phoenix/Generated/Phoenix.SessionsClient.DeleteSessions.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.SessionsClient.DeleteSessions.g.cs @@ -355,18 +355,17 @@ await DeleteSessionsAsResponseAsync( __exception_403 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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)); } // Unprocessable Entity if ((int)__response.StatusCode == 422) @@ -393,18 +392,17 @@ await DeleteSessionsAsResponseAsync( __exception_422 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -431,17 +429,15 @@ await DeleteSessionsAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -469,17 +465,15 @@ await DeleteSessionsAsResponseAsync( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.SessionsClient.GetSession.g.cs b/src/libs/Phoenix/Generated/Phoenix.SessionsClient.GetSession.g.cs index 2d51857..8e2a78f 100644 --- a/src/libs/Phoenix/Generated/Phoenix.SessionsClient.GetSession.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.SessionsClient.GetSession.g.cs @@ -353,18 +353,17 @@ partial void ProcessGetSessionResponseContent( __exception_403 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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 if ((int)__response.StatusCode == 404) @@ -391,18 +390,17 @@ partial void ProcessGetSessionResponseContent( __exception_404 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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)); } // Unprocessable Entity if ((int)__response.StatusCode == 422) @@ -429,18 +427,17 @@ partial void ProcessGetSessionResponseContent( __exception_422 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.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) @@ -474,17 +471,15 @@ partial void ProcessGetSessionResponseContent( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -521,17 +516,15 @@ partial void ProcessGetSessionResponseContent( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.SessionsClient.ListProjectSessions.g.cs b/src/libs/Phoenix/Generated/Phoenix.SessionsClient.ListProjectSessions.g.cs index 257183f..ca3b571 100644 --- a/src/libs/Phoenix/Generated/Phoenix.SessionsClient.ListProjectSessions.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.SessionsClient.ListProjectSessions.g.cs @@ -401,18 +401,17 @@ partial void ProcessListProjectSessionsResponseContent( __exception_403 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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 if ((int)__response.StatusCode == 404) @@ -439,18 +438,17 @@ partial void ProcessListProjectSessionsResponseContent( __exception_404 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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)); } // Unprocessable Entity if ((int)__response.StatusCode == 422) @@ -477,18 +475,17 @@ partial void ProcessListProjectSessionsResponseContent( __exception_422 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.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) @@ -522,17 +519,15 @@ partial void ProcessListProjectSessionsResponseContent( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -569,17 +564,15 @@ partial void ProcessListProjectSessionsResponseContent( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.SpansClient.AnnotateSpanDocuments.g.cs b/src/libs/Phoenix/Generated/Phoenix.SpansClient.AnnotateSpanDocuments.g.cs index 04b64a7..29aaa71 100644 --- a/src/libs/Phoenix/Generated/Phoenix.SpansClient.AnnotateSpanDocuments.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.SpansClient.AnnotateSpanDocuments.g.cs @@ -378,18 +378,17 @@ partial void ProcessAnnotateSpanDocumentsResponseContent( __exception_403 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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)); } // Span not found if ((int)__response.StatusCode == 404) @@ -416,18 +415,17 @@ partial void ProcessAnnotateSpanDocumentsResponseContent( __exception_404 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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)); } // Invalid request - non-empty identifier not supported if ((int)__response.StatusCode == 422) @@ -454,18 +452,17 @@ partial void ProcessAnnotateSpanDocumentsResponseContent( __exception_422 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.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) @@ -499,17 +496,15 @@ partial void ProcessAnnotateSpanDocumentsResponseContent( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -546,17 +541,15 @@ partial void ProcessAnnotateSpanDocumentsResponseContent( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.SpansClient.AnnotateSpans.g.cs b/src/libs/Phoenix/Generated/Phoenix.SpansClient.AnnotateSpans.g.cs index b2d2547..da5dcd6 100644 --- a/src/libs/Phoenix/Generated/Phoenix.SpansClient.AnnotateSpans.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.SpansClient.AnnotateSpans.g.cs @@ -378,18 +378,17 @@ partial void ProcessAnnotateSpansResponseContent( __exception_403 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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)); } // Span not found if ((int)__response.StatusCode == 404) @@ -416,18 +415,17 @@ partial void ProcessAnnotateSpansResponseContent( __exception_404 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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) @@ -454,18 +452,17 @@ partial void ProcessAnnotateSpansResponseContent( __exception_422 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.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) @@ -499,17 +496,15 @@ partial void ProcessAnnotateSpansResponseContent( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -546,17 +541,15 @@ partial void ProcessAnnotateSpansResponseContent( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.SpansClient.CreateSpanNote.g.cs b/src/libs/Phoenix/Generated/Phoenix.SpansClient.CreateSpanNote.g.cs index 704ce80..b654a26 100644 --- a/src/libs/Phoenix/Generated/Phoenix.SpansClient.CreateSpanNote.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.SpansClient.CreateSpanNote.g.cs @@ -362,18 +362,17 @@ partial void ProcessCreateSpanNoteResponseContent( __exception_403 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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)); } // Span not found if ((int)__response.StatusCode == 404) @@ -400,18 +399,17 @@ partial void ProcessCreateSpanNoteResponseContent( __exception_404 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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) @@ -438,18 +436,17 @@ partial void ProcessCreateSpanNoteResponseContent( __exception_422 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.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) @@ -483,17 +480,15 @@ partial void ProcessCreateSpanNoteResponseContent( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -530,17 +525,15 @@ partial void ProcessCreateSpanNoteResponseContent( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.SpansClient.CreateSpans.g.cs b/src/libs/Phoenix/Generated/Phoenix.SpansClient.CreateSpans.g.cs index bc7b1f4..8a88d86 100644 --- a/src/libs/Phoenix/Generated/Phoenix.SpansClient.CreateSpans.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.SpansClient.CreateSpans.g.cs @@ -375,18 +375,17 @@ partial void ProcessCreateSpansResponseContent( __exception_403 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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 if ((int)__response.StatusCode == 404) @@ -413,18 +412,17 @@ partial void ProcessCreateSpansResponseContent( __exception_404 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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)); } // Bad Request if ((int)__response.StatusCode == 400) @@ -451,18 +449,17 @@ partial void ProcessCreateSpansResponseContent( __exception_400 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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)); } // Validation Error if ((int)__response.StatusCode == 422) @@ -489,18 +486,17 @@ partial void ProcessCreateSpansResponseContent( __exception_422 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.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) @@ -534,17 +530,15 @@ partial void ProcessCreateSpansResponseContent( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -581,17 +575,15 @@ partial void ProcessCreateSpansResponseContent( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.SpansClient.DeleteSpan.g.cs b/src/libs/Phoenix/Generated/Phoenix.SpansClient.DeleteSpan.g.cs index 96fc604..9498cf2 100644 --- a/src/libs/Phoenix/Generated/Phoenix.SpansClient.DeleteSpan.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.SpansClient.DeleteSpan.g.cs @@ -366,18 +366,17 @@ await DeleteSpanAsResponseAsync( __exception_403 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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 if ((int)__response.StatusCode == 404) @@ -404,18 +403,17 @@ await DeleteSpanAsResponseAsync( __exception_404 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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) @@ -442,18 +440,17 @@ await DeleteSpanAsResponseAsync( __exception_422 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -480,17 +477,15 @@ await DeleteSpanAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::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 @@ await DeleteSpanAsResponseAsync( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.SpansClient.GetSpans.g.cs b/src/libs/Phoenix/Generated/Phoenix.SpansClient.GetSpans.g.cs index 89e8032..377de8b 100644 --- a/src/libs/Phoenix/Generated/Phoenix.SpansClient.GetSpans.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.SpansClient.GetSpans.g.cs @@ -499,18 +499,17 @@ partial void ProcessGetSpansResponseContent( __exception_403 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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 if ((int)__response.StatusCode == 404) @@ -537,18 +536,17 @@ partial void ProcessGetSpansResponseContent( __exception_404 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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)); } // Unprocessable Entity if ((int)__response.StatusCode == 422) @@ -575,18 +573,17 @@ partial void ProcessGetSpansResponseContent( __exception_422 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.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) @@ -620,17 +617,15 @@ partial void ProcessGetSpansResponseContent( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -667,17 +662,15 @@ partial void ProcessGetSpansResponseContent( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.SpansClient.SpanSearch.g.cs b/src/libs/Phoenix/Generated/Phoenix.SpansClient.SpanSearch.g.cs index fbf7768..92e2cbd 100644 --- a/src/libs/Phoenix/Generated/Phoenix.SpansClient.SpanSearch.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.SpansClient.SpanSearch.g.cs @@ -485,18 +485,17 @@ partial void ProcessSpanSearchResponseContent( __exception_403 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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 if ((int)__response.StatusCode == 404) @@ -523,18 +522,17 @@ partial void ProcessSpanSearchResponseContent( __exception_404 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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)); } // Unprocessable Entity if ((int)__response.StatusCode == 422) @@ -561,18 +559,17 @@ partial void ProcessSpanSearchResponseContent( __exception_422 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.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) @@ -606,17 +603,15 @@ partial void ProcessSpanSearchResponseContent( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -653,17 +648,15 @@ partial void ProcessSpanSearchResponseContent( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.TracesClient.AnnotateTraces.g.cs b/src/libs/Phoenix/Generated/Phoenix.TracesClient.AnnotateTraces.g.cs index 80c3398..23d6f89 100644 --- a/src/libs/Phoenix/Generated/Phoenix.TracesClient.AnnotateTraces.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.TracesClient.AnnotateTraces.g.cs @@ -378,18 +378,17 @@ partial void ProcessAnnotateTracesResponseContent( __exception_403 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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 if ((int)__response.StatusCode == 404) @@ -416,18 +415,17 @@ partial void ProcessAnnotateTracesResponseContent( __exception_404 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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) @@ -454,18 +452,17 @@ partial void ProcessAnnotateTracesResponseContent( __exception_422 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.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) @@ -499,17 +496,15 @@ partial void ProcessAnnotateTracesResponseContent( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -546,17 +541,15 @@ partial void ProcessAnnotateTracesResponseContent( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.TracesClient.CreateTraceNote.g.cs b/src/libs/Phoenix/Generated/Phoenix.TracesClient.CreateTraceNote.g.cs index f5ab789..850afdf 100644 --- a/src/libs/Phoenix/Generated/Phoenix.TracesClient.CreateTraceNote.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.TracesClient.CreateTraceNote.g.cs @@ -362,18 +362,17 @@ partial void ProcessCreateTraceNoteResponseContent( __exception_403 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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 if ((int)__response.StatusCode == 404) @@ -400,18 +399,17 @@ partial void ProcessCreateTraceNoteResponseContent( __exception_404 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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) @@ -438,18 +436,17 @@ partial void ProcessCreateTraceNoteResponseContent( __exception_422 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.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) @@ -483,17 +480,15 @@ partial void ProcessCreateTraceNoteResponseContent( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -530,17 +525,15 @@ partial void ProcessCreateTraceNoteResponseContent( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.TracesClient.DeleteTrace.g.cs b/src/libs/Phoenix/Generated/Phoenix.TracesClient.DeleteTrace.g.cs index 763085b..c1b382c 100644 --- a/src/libs/Phoenix/Generated/Phoenix.TracesClient.DeleteTrace.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.TracesClient.DeleteTrace.g.cs @@ -354,18 +354,17 @@ await DeleteTraceAsResponseAsync( __exception_403 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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 if ((int)__response.StatusCode == 404) @@ -392,18 +391,17 @@ await DeleteTraceAsResponseAsync( __exception_404 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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) @@ -430,18 +428,17 @@ await DeleteTraceAsResponseAsync( __exception_422 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.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) @@ -468,17 +465,15 @@ await DeleteTraceAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -506,17 +501,15 @@ await DeleteTraceAsResponseAsync( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.TracesClient.ListProjectTraces.g.cs b/src/libs/Phoenix/Generated/Phoenix.TracesClient.ListProjectTraces.g.cs index e92a8f3..77ed7a4 100644 --- a/src/libs/Phoenix/Generated/Phoenix.TracesClient.ListProjectTraces.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.TracesClient.ListProjectTraces.g.cs @@ -475,18 +475,17 @@ partial void ProcessListProjectTracesResponseContent( __exception_403 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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 if ((int)__response.StatusCode == 404) @@ -513,18 +512,17 @@ partial void ProcessListProjectTracesResponseContent( __exception_404 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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)); } // Unprocessable Entity if ((int)__response.StatusCode == 422) @@ -551,18 +549,17 @@ partial void ProcessListProjectTracesResponseContent( __exception_422 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.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) @@ -596,17 +593,15 @@ partial void ProcessListProjectTracesResponseContent( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -643,17 +638,15 @@ partial void ProcessListProjectTracesResponseContent( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.UsersClient.CreateUser.g.cs b/src/libs/Phoenix/Generated/Phoenix.UsersClient.CreateUser.g.cs index 9ea49d2..50063b4 100644 --- a/src/libs/Phoenix/Generated/Phoenix.UsersClient.CreateUser.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.UsersClient.CreateUser.g.cs @@ -362,18 +362,17 @@ partial void ProcessCreateUserResponseContent( __exception_403 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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)); } // Role not found. if ((int)__response.StatusCode == 400) @@ -400,18 +399,17 @@ partial void ProcessCreateUserResponseContent( __exception_400 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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)); } // Username or email already exists. if ((int)__response.StatusCode == 409) @@ -438,18 +436,17 @@ partial void ProcessCreateUserResponseContent( __exception_409 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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)); } // Unprocessable Entity if ((int)__response.StatusCode == 422) @@ -476,18 +473,17 @@ partial void ProcessCreateUserResponseContent( __exception_422 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.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) @@ -521,17 +517,15 @@ partial void ProcessCreateUserResponseContent( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -568,17 +562,15 @@ partial void ProcessCreateUserResponseContent( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.UsersClient.DeleteUser.g.cs b/src/libs/Phoenix/Generated/Phoenix.UsersClient.DeleteUser.g.cs index a6016be..2b4810e 100644 --- a/src/libs/Phoenix/Generated/Phoenix.UsersClient.DeleteUser.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.UsersClient.DeleteUser.g.cs @@ -348,18 +348,17 @@ await DeleteUserAsResponseAsync( __exception_403 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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)); } // User not found. if ((int)__response.StatusCode == 404) @@ -386,18 +385,17 @@ await DeleteUserAsResponseAsync( __exception_404 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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)); } // Unprocessable Entity if ((int)__response.StatusCode == 422) @@ -424,18 +422,17 @@ await DeleteUserAsResponseAsync( __exception_422 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.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) @@ -462,17 +459,15 @@ await DeleteUserAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -500,17 +495,15 @@ await DeleteUserAsResponseAsync( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.UsersClient.GetUsers.g.cs b/src/libs/Phoenix/Generated/Phoenix.UsersClient.GetUsers.g.cs index b576219..4296b36 100644 --- a/src/libs/Phoenix/Generated/Phoenix.UsersClient.GetUsers.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.UsersClient.GetUsers.g.cs @@ -374,18 +374,17 @@ partial void ProcessGetUsersResponseContent( __exception_403 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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)); } // Unprocessable Entity if ((int)__response.StatusCode == 422) @@ -412,18 +411,17 @@ partial void ProcessGetUsersResponseContent( __exception_422 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.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) @@ -457,17 +455,15 @@ partial void ProcessGetUsersResponseContent( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -504,17 +500,15 @@ partial void ProcessGetUsersResponseContent( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/Phoenix/Generated/Phoenix.UsersClient.GetViewer.g.cs b/src/libs/Phoenix/Generated/Phoenix.UsersClient.GetViewer.g.cs index 46bde74..f34eabb 100644 --- a/src/libs/Phoenix/Generated/Phoenix.UsersClient.GetViewer.g.cs +++ b/src/libs/Phoenix/Generated/Phoenix.UsersClient.GetViewer.g.cs @@ -342,18 +342,17 @@ partial void ProcessGetViewerResponseContent( __exception_403 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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)); } // User not found. if ((int)__response.StatusCode == 401) @@ -380,18 +379,17 @@ partial void ProcessGetViewerResponseContent( __exception_401 = __ex; } - throw new global::Phoenix.ApiException( + + throw global::Phoenix.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 (__effectiveReadResponseAsString) @@ -425,17 +423,15 @@ partial void ProcessGetViewerResponseContent( } catch (global::System.Exception __ex) { - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -472,17 +468,15 @@ partial void ProcessGetViewerResponseContent( { } - throw new global::Phoenix.ApiException( + throw global::Phoenix.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } }