From 2c7a0567f59e32ea25569f7ab6fb8bb46f422071 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 24 May 2026 06:24:56 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- .../RevAI.AccountClient.GetAccount.g.cs | 39 +++-- .../RevAI.CaptionsClient.GetCaptions.g.cs | 80 +++++------ .../RevAI/Generated/RevAI.Exceptions.g.cs | 134 ++++++++++++++++++ ...lient.DeleteLanguageIdentificationJob.g.cs | 67 ++++----- ...ient.GetLanguageIdentificationJobById.g.cs | 54 ++++--- ...t.GetListOfLanguageIdentificationJobs.g.cs | 54 ++++--- ...lient.SubmitLanguageIdentificationJob.g.cs | 67 ++++----- ...lient.GetLanguageIdentificationResult.g.cs | 67 ++++----- ...JobsClient.DeleteSentimentAnalysisJob.g.cs | 67 ++++----- ...Client.GetListOfSentimentAnalysisJobs.g.cs | 54 ++++--- ...obsClient.GetSentimentAnalysisJobById.g.cs | 54 ++++--- ...JobsClient.SubmitSentimentAnalysisJob.g.cs | 54 ++++--- ...ultsClient.GetSentimentAnalysisResult.g.cs | 67 ++++----- ...onJobsClient.DeleteTopicExtractionJob.g.cs | 67 ++++----- ...bsClient.GetListOfTopicExtractionJobs.g.cs | 54 ++++--- ...nJobsClient.GetTopicExtractionJobById.g.cs | 54 ++++--- ...onJobsClient.SubmitTopicExtractionJob.g.cs | 54 ++++--- ...esultsClient.GetTopicExtractionResult.g.cs | 67 ++++----- .../RevAI.TranscriptClient.GetTranscript.g.cs | 67 ++++----- ...tionJobsClient.DeleteTranscriptionJob.g.cs | 67 ++++----- ...JobsClient.GetListOfTranscriptionJobs.g.cs | 54 ++++--- ...ionJobsClient.GetTranscriptionJobById.g.cs | 54 ++++--- ...tionJobsClient.SubmitTranscriptionJob.g.cs | 67 ++++----- 23 files changed, 727 insertions(+), 736 deletions(-) diff --git a/src/libs/RevAI/Generated/RevAI.AccountClient.GetAccount.g.cs b/src/libs/RevAI/Generated/RevAI.AccountClient.GetAccount.g.cs index b01baa0..240a7c4 100644 --- a/src/libs/RevAI/Generated/RevAI.AccountClient.GetAccount.g.cs +++ b/src/libs/RevAI/Generated/RevAI.AccountClient.GetAccount.g.cs @@ -342,18 +342,17 @@ partial void ProcessGetAccountResponseContent( __exception_401 = __ex; } - throw new global::RevAI.ApiException( + + throw global::RevAI.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) @@ -387,17 +386,15 @@ partial void ProcessGetAccountResponseContent( } catch (global::System.Exception __ex) { - throw new global::RevAI.ApiException( + throw global::RevAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -434,17 +431,15 @@ partial void ProcessGetAccountResponseContent( { } - throw new global::RevAI.ApiException( + throw global::RevAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/RevAI/Generated/RevAI.CaptionsClient.GetCaptions.g.cs b/src/libs/RevAI/Generated/RevAI.CaptionsClient.GetCaptions.g.cs index e75de2e..8a55412 100644 --- a/src/libs/RevAI/Generated/RevAI.CaptionsClient.GetCaptions.g.cs +++ b/src/libs/RevAI/Generated/RevAI.CaptionsClient.GetCaptions.g.cs @@ -382,18 +382,17 @@ partial void ProcessGetCaptionsResponseContent( __exception_401 = __ex; } - throw new global::RevAI.ApiException( + + throw global::RevAI.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)); } // Job not found if ((int)__response.StatusCode == 404) @@ -420,18 +419,17 @@ partial void ProcessGetCaptionsResponseContent( __exception_404 = __ex; } - throw new global::RevAI.ApiException( + + throw global::RevAI.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 ((int)__response.StatusCode == 406) @@ -454,17 +452,16 @@ partial void ProcessGetCaptionsResponseContent( __exception_406 = __ex; } - throw new global::RevAI.ApiException( + + throw global::RevAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_406 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_406, - statusCode: __response.StatusCode) - { - ResponseBody = __content_406, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_406, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // if ((int)__response.StatusCode == 409) @@ -487,17 +484,16 @@ partial void ProcessGetCaptionsResponseContent( __exception_409 = __ex; } - throw new global::RevAI.ApiException( + + throw global::RevAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_409 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_409, - statusCode: __response.StatusCode) - { - ResponseBody = __content_409, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_409, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -529,17 +525,15 @@ partial void ProcessGetCaptionsResponseContent( } catch (global::System.Exception __ex) { - throw new global::RevAI.ApiException( + throw global::RevAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -574,17 +568,15 @@ partial void ProcessGetCaptionsResponseContent( { } - throw new global::RevAI.ApiException( + throw global::RevAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/RevAI/Generated/RevAI.Exceptions.g.cs b/src/libs/RevAI/Generated/RevAI.Exceptions.g.cs index 0691b77..1d289b6 100644 --- a/src/libs/RevAI/Generated/RevAI.Exceptions.g.cs +++ b/src/libs/RevAI/Generated/RevAI.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::RevAI.ApiException Create( + global::System.Net.HttpStatusCode statusCode, + string message, + global::System.Exception? innerException = null, + global::System.Collections.Generic.IDictionary>? responseHeaders = null) + { + return new global::RevAI.ApiException(message, innerException, statusCode); + } + + /// + /// Convenience overload that constructs an with response body and headers populated. + /// + public static global::RevAI.ApiException Create( + global::System.Net.HttpStatusCode statusCode, + string message, + global::System.Exception? innerException, + string? responseBody, + global::System.Collections.Generic.Dictionary>? responseHeaders) + { + var exception = global::RevAI.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::RevAI.ApiException Create( + global::System.Net.HttpStatusCode statusCode, + string message, + global::System.Exception? innerException = null, + global::System.Collections.Generic.IDictionary>? responseHeaders = null) + { + return new global::RevAI.ApiException(message, innerException, statusCode); + } + + /// + /// Convenience overload that constructs an with response body, object, and headers populated. + /// + public static global::RevAI.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::RevAI.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/RevAI/Generated/RevAI.LanguageIdentificationJobsClient.DeleteLanguageIdentificationJob.g.cs b/src/libs/RevAI/Generated/RevAI.LanguageIdentificationJobsClient.DeleteLanguageIdentificationJob.g.cs index 39bd279..6bd3b25 100644 --- a/src/libs/RevAI/Generated/RevAI.LanguageIdentificationJobsClient.DeleteLanguageIdentificationJob.g.cs +++ b/src/libs/RevAI/Generated/RevAI.LanguageIdentificationJobsClient.DeleteLanguageIdentificationJob.g.cs @@ -344,18 +344,17 @@ await DeleteLanguageIdentificationJobAsResponseAsync( __exception_401 = __ex; } - throw new global::RevAI.ApiException( + + throw global::RevAI.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)); } // Job not found if ((int)__response.StatusCode == 404) @@ -382,18 +381,17 @@ await DeleteLanguageIdentificationJobAsResponseAsync( __exception_404 = __ex; } - throw new global::RevAI.ApiException( + + throw global::RevAI.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 ((int)__response.StatusCode == 409) @@ -416,17 +414,16 @@ await DeleteLanguageIdentificationJobAsResponseAsync( __exception_409 = __ex; } - throw new global::RevAI.ApiException( + + throw global::RevAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_409 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_409, - statusCode: __response.StatusCode) - { - ResponseBody = __content_409, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_409, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -453,17 +450,15 @@ await DeleteLanguageIdentificationJobAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::RevAI.ApiException( + throw global::RevAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -491,17 +486,15 @@ await DeleteLanguageIdentificationJobAsResponseAsync( { } - throw new global::RevAI.ApiException( + throw global::RevAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/RevAI/Generated/RevAI.LanguageIdentificationJobsClient.GetLanguageIdentificationJobById.g.cs b/src/libs/RevAI/Generated/RevAI.LanguageIdentificationJobsClient.GetLanguageIdentificationJobById.g.cs index a46c184..ed8b733 100644 --- a/src/libs/RevAI/Generated/RevAI.LanguageIdentificationJobsClient.GetLanguageIdentificationJobById.g.cs +++ b/src/libs/RevAI/Generated/RevAI.LanguageIdentificationJobsClient.GetLanguageIdentificationJobById.g.cs @@ -351,18 +351,17 @@ partial void ProcessGetLanguageIdentificationJobByIdResponseContent( __exception_401 = __ex; } - throw new global::RevAI.ApiException( + + throw global::RevAI.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)); } // Job not found if ((int)__response.StatusCode == 404) @@ -389,18 +388,17 @@ partial void ProcessGetLanguageIdentificationJobByIdResponseContent( __exception_404 = __ex; } - throw new global::RevAI.ApiException( + + throw global::RevAI.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) @@ -434,17 +432,15 @@ partial void ProcessGetLanguageIdentificationJobByIdResponseContent( } catch (global::System.Exception __ex) { - throw new global::RevAI.ApiException( + throw global::RevAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -481,17 +477,15 @@ partial void ProcessGetLanguageIdentificationJobByIdResponseContent( { } - throw new global::RevAI.ApiException( + throw global::RevAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/RevAI/Generated/RevAI.LanguageIdentificationJobsClient.GetListOfLanguageIdentificationJobs.g.cs b/src/libs/RevAI/Generated/RevAI.LanguageIdentificationJobsClient.GetListOfLanguageIdentificationJobs.g.cs index 55830c0..08979f2 100644 --- a/src/libs/RevAI/Generated/RevAI.LanguageIdentificationJobsClient.GetListOfLanguageIdentificationJobs.g.cs +++ b/src/libs/RevAI/Generated/RevAI.LanguageIdentificationJobsClient.GetListOfLanguageIdentificationJobs.g.cs @@ -364,18 +364,17 @@ partial void ProcessGetListOfLanguageIdentificationJobsResponseContent( __exception_400 = __ex; } - throw new global::RevAI.ApiException( + + throw global::RevAI.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)); } // Authorization has been denied for this request if ((int)__response.StatusCode == 401) @@ -402,18 +401,17 @@ partial void ProcessGetListOfLanguageIdentificationJobsResponseContent( __exception_401 = __ex; } - throw new global::RevAI.ApiException( + + throw global::RevAI.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) @@ -447,17 +445,15 @@ partial void ProcessGetListOfLanguageIdentificationJobsResponseContent( } catch (global::System.Exception __ex) { - throw new global::RevAI.ApiException( + throw global::RevAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -494,17 +490,15 @@ partial void ProcessGetListOfLanguageIdentificationJobsResponseContent( { } - throw new global::RevAI.ApiException( + throw global::RevAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/RevAI/Generated/RevAI.LanguageIdentificationJobsClient.SubmitLanguageIdentificationJob.g.cs b/src/libs/RevAI/Generated/RevAI.LanguageIdentificationJobsClient.SubmitLanguageIdentificationJob.g.cs index 588d3f5..79a2dfc 100644 --- a/src/libs/RevAI/Generated/RevAI.LanguageIdentificationJobsClient.SubmitLanguageIdentificationJob.g.cs +++ b/src/libs/RevAI/Generated/RevAI.LanguageIdentificationJobsClient.SubmitLanguageIdentificationJob.g.cs @@ -362,18 +362,17 @@ partial void ProcessSubmitLanguageIdentificationJobResponseContent( __exception_400 = __ex; } - throw new global::RevAI.ApiException( + + throw global::RevAI.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)); } // Authorization has been denied for this request if ((int)__response.StatusCode == 401) @@ -400,18 +399,17 @@ partial void ProcessSubmitLanguageIdentificationJobResponseContent( __exception_401 = __ex; } - throw new global::RevAI.ApiException( + + throw global::RevAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // if ((int)__response.StatusCode == 413) @@ -434,17 +432,16 @@ partial void ProcessSubmitLanguageIdentificationJobResponseContent( __exception_413 = __ex; } - throw new global::RevAI.ApiException( + + throw global::RevAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_413 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_413, - statusCode: __response.StatusCode) - { - ResponseBody = __content_413, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_413, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -478,17 +475,15 @@ partial void ProcessSubmitLanguageIdentificationJobResponseContent( } catch (global::System.Exception __ex) { - throw new global::RevAI.ApiException( + throw global::RevAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -525,17 +520,15 @@ partial void ProcessSubmitLanguageIdentificationJobResponseContent( { } - throw new global::RevAI.ApiException( + throw global::RevAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/RevAI/Generated/RevAI.LanguageIdentificationResultsClient.GetLanguageIdentificationResult.g.cs b/src/libs/RevAI/Generated/RevAI.LanguageIdentificationResultsClient.GetLanguageIdentificationResult.g.cs index a5b57d5..285ba06 100644 --- a/src/libs/RevAI/Generated/RevAI.LanguageIdentificationResultsClient.GetLanguageIdentificationResult.g.cs +++ b/src/libs/RevAI/Generated/RevAI.LanguageIdentificationResultsClient.GetLanguageIdentificationResult.g.cs @@ -351,18 +351,17 @@ partial void ProcessGetLanguageIdentificationResultResponseContent( __exception_401 = __ex; } - throw new global::RevAI.ApiException( + + throw global::RevAI.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)); } // Job not found if ((int)__response.StatusCode == 404) @@ -389,18 +388,17 @@ partial void ProcessGetLanguageIdentificationResultResponseContent( __exception_404 = __ex; } - throw new global::RevAI.ApiException( + + throw global::RevAI.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 ((int)__response.StatusCode == 409) @@ -423,17 +421,16 @@ partial void ProcessGetLanguageIdentificationResultResponseContent( __exception_409 = __ex; } - throw new global::RevAI.ApiException( + + throw global::RevAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_409 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_409, - statusCode: __response.StatusCode) - { - ResponseBody = __content_409, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_409, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -467,17 +464,15 @@ partial void ProcessGetLanguageIdentificationResultResponseContent( } catch (global::System.Exception __ex) { - throw new global::RevAI.ApiException( + throw global::RevAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -514,17 +509,15 @@ partial void ProcessGetLanguageIdentificationResultResponseContent( { } - throw new global::RevAI.ApiException( + throw global::RevAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/RevAI/Generated/RevAI.SentimentAnalysisJobsClient.DeleteSentimentAnalysisJob.g.cs b/src/libs/RevAI/Generated/RevAI.SentimentAnalysisJobsClient.DeleteSentimentAnalysisJob.g.cs index e26bfc8..cb45f82 100644 --- a/src/libs/RevAI/Generated/RevAI.SentimentAnalysisJobsClient.DeleteSentimentAnalysisJob.g.cs +++ b/src/libs/RevAI/Generated/RevAI.SentimentAnalysisJobsClient.DeleteSentimentAnalysisJob.g.cs @@ -344,18 +344,17 @@ await DeleteSentimentAnalysisJobAsResponseAsync( __exception_401 = __ex; } - throw new global::RevAI.ApiException( + + throw global::RevAI.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)); } // Job not found if ((int)__response.StatusCode == 404) @@ -382,18 +381,17 @@ await DeleteSentimentAnalysisJobAsResponseAsync( __exception_404 = __ex; } - throw new global::RevAI.ApiException( + + throw global::RevAI.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 ((int)__response.StatusCode == 409) @@ -416,17 +414,16 @@ await DeleteSentimentAnalysisJobAsResponseAsync( __exception_409 = __ex; } - throw new global::RevAI.ApiException( + + throw global::RevAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_409 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_409, - statusCode: __response.StatusCode) - { - ResponseBody = __content_409, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_409, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -453,17 +450,15 @@ await DeleteSentimentAnalysisJobAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::RevAI.ApiException( + throw global::RevAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -491,17 +486,15 @@ await DeleteSentimentAnalysisJobAsResponseAsync( { } - throw new global::RevAI.ApiException( + throw global::RevAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/RevAI/Generated/RevAI.SentimentAnalysisJobsClient.GetListOfSentimentAnalysisJobs.g.cs b/src/libs/RevAI/Generated/RevAI.SentimentAnalysisJobsClient.GetListOfSentimentAnalysisJobs.g.cs index cf1acb6..998e56f 100644 --- a/src/libs/RevAI/Generated/RevAI.SentimentAnalysisJobsClient.GetListOfSentimentAnalysisJobs.g.cs +++ b/src/libs/RevAI/Generated/RevAI.SentimentAnalysisJobsClient.GetListOfSentimentAnalysisJobs.g.cs @@ -364,18 +364,17 @@ partial void ProcessGetListOfSentimentAnalysisJobsResponseContent( __exception_400 = __ex; } - throw new global::RevAI.ApiException( + + throw global::RevAI.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)); } // Authorization has been denied for this request if ((int)__response.StatusCode == 401) @@ -402,18 +401,17 @@ partial void ProcessGetListOfSentimentAnalysisJobsResponseContent( __exception_401 = __ex; } - throw new global::RevAI.ApiException( + + throw global::RevAI.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) @@ -447,17 +445,15 @@ partial void ProcessGetListOfSentimentAnalysisJobsResponseContent( } catch (global::System.Exception __ex) { - throw new global::RevAI.ApiException( + throw global::RevAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -494,17 +490,15 @@ partial void ProcessGetListOfSentimentAnalysisJobsResponseContent( { } - throw new global::RevAI.ApiException( + throw global::RevAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/RevAI/Generated/RevAI.SentimentAnalysisJobsClient.GetSentimentAnalysisJobById.g.cs b/src/libs/RevAI/Generated/RevAI.SentimentAnalysisJobsClient.GetSentimentAnalysisJobById.g.cs index 65f4536..b0cf2a1 100644 --- a/src/libs/RevAI/Generated/RevAI.SentimentAnalysisJobsClient.GetSentimentAnalysisJobById.g.cs +++ b/src/libs/RevAI/Generated/RevAI.SentimentAnalysisJobsClient.GetSentimentAnalysisJobById.g.cs @@ -351,18 +351,17 @@ partial void ProcessGetSentimentAnalysisJobByIdResponseContent( __exception_401 = __ex; } - throw new global::RevAI.ApiException( + + throw global::RevAI.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)); } // Job not found if ((int)__response.StatusCode == 404) @@ -389,18 +388,17 @@ partial void ProcessGetSentimentAnalysisJobByIdResponseContent( __exception_404 = __ex; } - throw new global::RevAI.ApiException( + + throw global::RevAI.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) @@ -434,17 +432,15 @@ partial void ProcessGetSentimentAnalysisJobByIdResponseContent( } catch (global::System.Exception __ex) { - throw new global::RevAI.ApiException( + throw global::RevAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -481,17 +477,15 @@ partial void ProcessGetSentimentAnalysisJobByIdResponseContent( { } - throw new global::RevAI.ApiException( + throw global::RevAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/RevAI/Generated/RevAI.SentimentAnalysisJobsClient.SubmitSentimentAnalysisJob.g.cs b/src/libs/RevAI/Generated/RevAI.SentimentAnalysisJobsClient.SubmitSentimentAnalysisJob.g.cs index af8e773..79ea751 100644 --- a/src/libs/RevAI/Generated/RevAI.SentimentAnalysisJobsClient.SubmitSentimentAnalysisJob.g.cs +++ b/src/libs/RevAI/Generated/RevAI.SentimentAnalysisJobsClient.SubmitSentimentAnalysisJob.g.cs @@ -362,18 +362,17 @@ partial void ProcessSubmitSentimentAnalysisJobResponseContent( __exception_400 = __ex; } - throw new global::RevAI.ApiException( + + throw global::RevAI.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)); } // Authorization has been denied for this request if ((int)__response.StatusCode == 401) @@ -400,18 +399,17 @@ partial void ProcessSubmitSentimentAnalysisJobResponseContent( __exception_401 = __ex; } - throw new global::RevAI.ApiException( + + throw global::RevAI.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) @@ -445,17 +443,15 @@ partial void ProcessSubmitSentimentAnalysisJobResponseContent( } catch (global::System.Exception __ex) { - throw new global::RevAI.ApiException( + throw global::RevAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::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 ProcessSubmitSentimentAnalysisJobResponseContent( { } - throw new global::RevAI.ApiException( + throw global::RevAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/RevAI/Generated/RevAI.SentimentAnalysisResultsClient.GetSentimentAnalysisResult.g.cs b/src/libs/RevAI/Generated/RevAI.SentimentAnalysisResultsClient.GetSentimentAnalysisResult.g.cs index 8b4584c..01e9ceb 100644 --- a/src/libs/RevAI/Generated/RevAI.SentimentAnalysisResultsClient.GetSentimentAnalysisResult.g.cs +++ b/src/libs/RevAI/Generated/RevAI.SentimentAnalysisResultsClient.GetSentimentAnalysisResult.g.cs @@ -351,18 +351,17 @@ partial void ProcessGetSentimentAnalysisResultResponseContent( __exception_401 = __ex; } - throw new global::RevAI.ApiException( + + throw global::RevAI.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)); } // Job not found if ((int)__response.StatusCode == 404) @@ -389,18 +388,17 @@ partial void ProcessGetSentimentAnalysisResultResponseContent( __exception_404 = __ex; } - throw new global::RevAI.ApiException( + + throw global::RevAI.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 ((int)__response.StatusCode == 409) @@ -423,17 +421,16 @@ partial void ProcessGetSentimentAnalysisResultResponseContent( __exception_409 = __ex; } - throw new global::RevAI.ApiException( + + throw global::RevAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_409 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_409, - statusCode: __response.StatusCode) - { - ResponseBody = __content_409, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_409, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -467,17 +464,15 @@ partial void ProcessGetSentimentAnalysisResultResponseContent( } catch (global::System.Exception __ex) { - throw new global::RevAI.ApiException( + throw global::RevAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -514,17 +509,15 @@ partial void ProcessGetSentimentAnalysisResultResponseContent( { } - throw new global::RevAI.ApiException( + throw global::RevAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/RevAI/Generated/RevAI.TopicExtractionJobsClient.DeleteTopicExtractionJob.g.cs b/src/libs/RevAI/Generated/RevAI.TopicExtractionJobsClient.DeleteTopicExtractionJob.g.cs index 6c903e0..6c7d274 100644 --- a/src/libs/RevAI/Generated/RevAI.TopicExtractionJobsClient.DeleteTopicExtractionJob.g.cs +++ b/src/libs/RevAI/Generated/RevAI.TopicExtractionJobsClient.DeleteTopicExtractionJob.g.cs @@ -344,18 +344,17 @@ await DeleteTopicExtractionJobAsResponseAsync( __exception_401 = __ex; } - throw new global::RevAI.ApiException( + + throw global::RevAI.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)); } // Job not found if ((int)__response.StatusCode == 404) @@ -382,18 +381,17 @@ await DeleteTopicExtractionJobAsResponseAsync( __exception_404 = __ex; } - throw new global::RevAI.ApiException( + + throw global::RevAI.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 ((int)__response.StatusCode == 409) @@ -416,17 +414,16 @@ await DeleteTopicExtractionJobAsResponseAsync( __exception_409 = __ex; } - throw new global::RevAI.ApiException( + + throw global::RevAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_409 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_409, - statusCode: __response.StatusCode) - { - ResponseBody = __content_409, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_409, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -453,17 +450,15 @@ await DeleteTopicExtractionJobAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::RevAI.ApiException( + throw global::RevAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -491,17 +486,15 @@ await DeleteTopicExtractionJobAsResponseAsync( { } - throw new global::RevAI.ApiException( + throw global::RevAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/RevAI/Generated/RevAI.TopicExtractionJobsClient.GetListOfTopicExtractionJobs.g.cs b/src/libs/RevAI/Generated/RevAI.TopicExtractionJobsClient.GetListOfTopicExtractionJobs.g.cs index 0e1441e..59410ab 100644 --- a/src/libs/RevAI/Generated/RevAI.TopicExtractionJobsClient.GetListOfTopicExtractionJobs.g.cs +++ b/src/libs/RevAI/Generated/RevAI.TopicExtractionJobsClient.GetListOfTopicExtractionJobs.g.cs @@ -364,18 +364,17 @@ partial void ProcessGetListOfTopicExtractionJobsResponseContent( __exception_400 = __ex; } - throw new global::RevAI.ApiException( + + throw global::RevAI.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)); } // Authorization has been denied for this request if ((int)__response.StatusCode == 401) @@ -402,18 +401,17 @@ partial void ProcessGetListOfTopicExtractionJobsResponseContent( __exception_401 = __ex; } - throw new global::RevAI.ApiException( + + throw global::RevAI.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) @@ -447,17 +445,15 @@ partial void ProcessGetListOfTopicExtractionJobsResponseContent( } catch (global::System.Exception __ex) { - throw new global::RevAI.ApiException( + throw global::RevAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -494,17 +490,15 @@ partial void ProcessGetListOfTopicExtractionJobsResponseContent( { } - throw new global::RevAI.ApiException( + throw global::RevAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/RevAI/Generated/RevAI.TopicExtractionJobsClient.GetTopicExtractionJobById.g.cs b/src/libs/RevAI/Generated/RevAI.TopicExtractionJobsClient.GetTopicExtractionJobById.g.cs index 11b96ea..b6c234c 100644 --- a/src/libs/RevAI/Generated/RevAI.TopicExtractionJobsClient.GetTopicExtractionJobById.g.cs +++ b/src/libs/RevAI/Generated/RevAI.TopicExtractionJobsClient.GetTopicExtractionJobById.g.cs @@ -351,18 +351,17 @@ partial void ProcessGetTopicExtractionJobByIdResponseContent( __exception_401 = __ex; } - throw new global::RevAI.ApiException( + + throw global::RevAI.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)); } // Job not found if ((int)__response.StatusCode == 404) @@ -389,18 +388,17 @@ partial void ProcessGetTopicExtractionJobByIdResponseContent( __exception_404 = __ex; } - throw new global::RevAI.ApiException( + + throw global::RevAI.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) @@ -434,17 +432,15 @@ partial void ProcessGetTopicExtractionJobByIdResponseContent( } catch (global::System.Exception __ex) { - throw new global::RevAI.ApiException( + throw global::RevAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -481,17 +477,15 @@ partial void ProcessGetTopicExtractionJobByIdResponseContent( { } - throw new global::RevAI.ApiException( + throw global::RevAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/RevAI/Generated/RevAI.TopicExtractionJobsClient.SubmitTopicExtractionJob.g.cs b/src/libs/RevAI/Generated/RevAI.TopicExtractionJobsClient.SubmitTopicExtractionJob.g.cs index 9970ba9..44633a6 100644 --- a/src/libs/RevAI/Generated/RevAI.TopicExtractionJobsClient.SubmitTopicExtractionJob.g.cs +++ b/src/libs/RevAI/Generated/RevAI.TopicExtractionJobsClient.SubmitTopicExtractionJob.g.cs @@ -362,18 +362,17 @@ partial void ProcessSubmitTopicExtractionJobResponseContent( __exception_400 = __ex; } - throw new global::RevAI.ApiException( + + throw global::RevAI.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)); } // Authorization has been denied for this request if ((int)__response.StatusCode == 401) @@ -400,18 +399,17 @@ partial void ProcessSubmitTopicExtractionJobResponseContent( __exception_401 = __ex; } - throw new global::RevAI.ApiException( + + throw global::RevAI.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) @@ -445,17 +443,15 @@ partial void ProcessSubmitTopicExtractionJobResponseContent( } catch (global::System.Exception __ex) { - throw new global::RevAI.ApiException( + throw global::RevAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::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 ProcessSubmitTopicExtractionJobResponseContent( { } - throw new global::RevAI.ApiException( + throw global::RevAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/RevAI/Generated/RevAI.TopicExtractionResultsClient.GetTopicExtractionResult.g.cs b/src/libs/RevAI/Generated/RevAI.TopicExtractionResultsClient.GetTopicExtractionResult.g.cs index 1d7cb00..b819c5d 100644 --- a/src/libs/RevAI/Generated/RevAI.TopicExtractionResultsClient.GetTopicExtractionResult.g.cs +++ b/src/libs/RevAI/Generated/RevAI.TopicExtractionResultsClient.GetTopicExtractionResult.g.cs @@ -351,18 +351,17 @@ partial void ProcessGetTopicExtractionResultResponseContent( __exception_401 = __ex; } - throw new global::RevAI.ApiException( + + throw global::RevAI.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)); } // Job not found if ((int)__response.StatusCode == 404) @@ -389,18 +388,17 @@ partial void ProcessGetTopicExtractionResultResponseContent( __exception_404 = __ex; } - throw new global::RevAI.ApiException( + + throw global::RevAI.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 ((int)__response.StatusCode == 409) @@ -423,17 +421,16 @@ partial void ProcessGetTopicExtractionResultResponseContent( __exception_409 = __ex; } - throw new global::RevAI.ApiException( + + throw global::RevAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_409 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_409, - statusCode: __response.StatusCode) - { - ResponseBody = __content_409, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_409, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -467,17 +464,15 @@ partial void ProcessGetTopicExtractionResultResponseContent( } catch (global::System.Exception __ex) { - throw new global::RevAI.ApiException( + throw global::RevAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -514,17 +509,15 @@ partial void ProcessGetTopicExtractionResultResponseContent( { } - throw new global::RevAI.ApiException( + throw global::RevAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/RevAI/Generated/RevAI.TranscriptClient.GetTranscript.g.cs b/src/libs/RevAI/Generated/RevAI.TranscriptClient.GetTranscript.g.cs index 3a14576..9ae9437 100644 --- a/src/libs/RevAI/Generated/RevAI.TranscriptClient.GetTranscript.g.cs +++ b/src/libs/RevAI/Generated/RevAI.TranscriptClient.GetTranscript.g.cs @@ -370,18 +370,17 @@ partial void ProcessGetTranscriptResponseContent( __exception_401 = __ex; } - throw new global::RevAI.ApiException( + + throw global::RevAI.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)); } // Job not found if ((int)__response.StatusCode == 404) @@ -408,18 +407,17 @@ partial void ProcessGetTranscriptResponseContent( __exception_404 = __ex; } - throw new global::RevAI.ApiException( + + throw global::RevAI.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 ((int)__response.StatusCode == 409) @@ -442,17 +440,16 @@ partial void ProcessGetTranscriptResponseContent( __exception_409 = __ex; } - throw new global::RevAI.ApiException( + + throw global::RevAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_409 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_409, - statusCode: __response.StatusCode) - { - ResponseBody = __content_409, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_409, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -486,17 +483,15 @@ partial void ProcessGetTranscriptResponseContent( } catch (global::System.Exception __ex) { - throw new global::RevAI.ApiException( + throw global::RevAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -533,17 +528,15 @@ partial void ProcessGetTranscriptResponseContent( { } - throw new global::RevAI.ApiException( + throw global::RevAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/RevAI/Generated/RevAI.TranscriptionJobsClient.DeleteTranscriptionJob.g.cs b/src/libs/RevAI/Generated/RevAI.TranscriptionJobsClient.DeleteTranscriptionJob.g.cs index db4c714..d4cb959 100644 --- a/src/libs/RevAI/Generated/RevAI.TranscriptionJobsClient.DeleteTranscriptionJob.g.cs +++ b/src/libs/RevAI/Generated/RevAI.TranscriptionJobsClient.DeleteTranscriptionJob.g.cs @@ -344,18 +344,17 @@ await DeleteTranscriptionJobAsResponseAsync( __exception_401 = __ex; } - throw new global::RevAI.ApiException( + + throw global::RevAI.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)); } // Job not found if ((int)__response.StatusCode == 404) @@ -382,18 +381,17 @@ await DeleteTranscriptionJobAsResponseAsync( __exception_404 = __ex; } - throw new global::RevAI.ApiException( + + throw global::RevAI.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 ((int)__response.StatusCode == 409) @@ -416,17 +414,16 @@ await DeleteTranscriptionJobAsResponseAsync( __exception_409 = __ex; } - throw new global::RevAI.ApiException( + + throw global::RevAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_409 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_409, - statusCode: __response.StatusCode) - { - ResponseBody = __content_409, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_409, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -453,17 +450,15 @@ await DeleteTranscriptionJobAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::RevAI.ApiException( + throw global::RevAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -491,17 +486,15 @@ await DeleteTranscriptionJobAsResponseAsync( { } - throw new global::RevAI.ApiException( + throw global::RevAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/RevAI/Generated/RevAI.TranscriptionJobsClient.GetListOfTranscriptionJobs.g.cs b/src/libs/RevAI/Generated/RevAI.TranscriptionJobsClient.GetListOfTranscriptionJobs.g.cs index 82f5aaa..bc86e03 100644 --- a/src/libs/RevAI/Generated/RevAI.TranscriptionJobsClient.GetListOfTranscriptionJobs.g.cs +++ b/src/libs/RevAI/Generated/RevAI.TranscriptionJobsClient.GetListOfTranscriptionJobs.g.cs @@ -364,18 +364,17 @@ partial void ProcessGetListOfTranscriptionJobsResponseContent( __exception_400 = __ex; } - throw new global::RevAI.ApiException( + + throw global::RevAI.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)); } // Authorization has been denied for this request if ((int)__response.StatusCode == 401) @@ -402,18 +401,17 @@ partial void ProcessGetListOfTranscriptionJobsResponseContent( __exception_401 = __ex; } - throw new global::RevAI.ApiException( + + throw global::RevAI.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) @@ -447,17 +445,15 @@ partial void ProcessGetListOfTranscriptionJobsResponseContent( } catch (global::System.Exception __ex) { - throw new global::RevAI.ApiException( + throw global::RevAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -494,17 +490,15 @@ partial void ProcessGetListOfTranscriptionJobsResponseContent( { } - throw new global::RevAI.ApiException( + throw global::RevAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/RevAI/Generated/RevAI.TranscriptionJobsClient.GetTranscriptionJobById.g.cs b/src/libs/RevAI/Generated/RevAI.TranscriptionJobsClient.GetTranscriptionJobById.g.cs index 5869a89..d0b4c80 100644 --- a/src/libs/RevAI/Generated/RevAI.TranscriptionJobsClient.GetTranscriptionJobById.g.cs +++ b/src/libs/RevAI/Generated/RevAI.TranscriptionJobsClient.GetTranscriptionJobById.g.cs @@ -351,18 +351,17 @@ partial void ProcessGetTranscriptionJobByIdResponseContent( __exception_401 = __ex; } - throw new global::RevAI.ApiException( + + throw global::RevAI.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)); } // Job not found if ((int)__response.StatusCode == 404) @@ -389,18 +388,17 @@ partial void ProcessGetTranscriptionJobByIdResponseContent( __exception_404 = __ex; } - throw new global::RevAI.ApiException( + + throw global::RevAI.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) @@ -434,17 +432,15 @@ partial void ProcessGetTranscriptionJobByIdResponseContent( } catch (global::System.Exception __ex) { - throw new global::RevAI.ApiException( + throw global::RevAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -481,17 +477,15 @@ partial void ProcessGetTranscriptionJobByIdResponseContent( { } - throw new global::RevAI.ApiException( + throw global::RevAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/RevAI/Generated/RevAI.TranscriptionJobsClient.SubmitTranscriptionJob.g.cs b/src/libs/RevAI/Generated/RevAI.TranscriptionJobsClient.SubmitTranscriptionJob.g.cs index fde3cb3..5077e87 100644 --- a/src/libs/RevAI/Generated/RevAI.TranscriptionJobsClient.SubmitTranscriptionJob.g.cs +++ b/src/libs/RevAI/Generated/RevAI.TranscriptionJobsClient.SubmitTranscriptionJob.g.cs @@ -362,18 +362,17 @@ partial void ProcessSubmitTranscriptionJobResponseContent( __exception_400 = __ex; } - throw new global::RevAI.ApiException( + + throw global::RevAI.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)); } // Authorization has been denied for this request if ((int)__response.StatusCode == 401) @@ -400,18 +399,17 @@ partial void ProcessSubmitTranscriptionJobResponseContent( __exception_401 = __ex; } - throw new global::RevAI.ApiException( + + throw global::RevAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // if ((int)__response.StatusCode == 413) @@ -434,17 +432,16 @@ partial void ProcessSubmitTranscriptionJobResponseContent( __exception_413 = __ex; } - throw new global::RevAI.ApiException( + + throw global::RevAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_413 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_413, - statusCode: __response.StatusCode) - { - ResponseBody = __content_413, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_413, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -478,17 +475,15 @@ partial void ProcessSubmitTranscriptionJobResponseContent( } catch (global::System.Exception __ex) { - throw new global::RevAI.ApiException( + throw global::RevAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -525,17 +520,15 @@ partial void ProcessSubmitTranscriptionJobResponseContent( { } - throw new global::RevAI.ApiException( + throw global::RevAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } }