diff --git a/src/libs/AssemblyAI/Generated/AssemblyAI.AssemblyAIClient.CreateChatCompletion.g.cs b/src/libs/AssemblyAI/Generated/AssemblyAI.AssemblyAIClient.CreateChatCompletion.g.cs index 7febe71..e4a8050 100644 --- a/src/libs/AssemblyAI/Generated/AssemblyAI.AssemblyAIClient.CreateChatCompletion.g.cs +++ b/src/libs/AssemblyAI/Generated/AssemblyAI.AssemblyAIClient.CreateChatCompletion.g.cs @@ -371,17 +371,15 @@ partial void ProcessCreateChatCompletionResponseContent( } catch (global::System.Exception __ex) { - throw new global::AssemblyAI.ApiException( + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -418,17 +416,15 @@ partial void ProcessCreateChatCompletionResponseContent( { } - throw new global::AssemblyAI.ApiException( + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/AssemblyAI/Generated/AssemblyAI.AssemblyAIClient.CreateSpeechUnderstanding.g.cs b/src/libs/AssemblyAI/Generated/AssemblyAI.AssemblyAIClient.CreateSpeechUnderstanding.g.cs index e0461b5..7086579 100644 --- a/src/libs/AssemblyAI/Generated/AssemblyAI.AssemblyAIClient.CreateSpeechUnderstanding.g.cs +++ b/src/libs/AssemblyAI/Generated/AssemblyAI.AssemblyAIClient.CreateSpeechUnderstanding.g.cs @@ -371,17 +371,15 @@ partial void ProcessCreateSpeechUnderstandingResponseContent( } catch (global::System.Exception __ex) { - throw new global::AssemblyAI.ApiException( + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -418,17 +416,15 @@ partial void ProcessCreateSpeechUnderstandingResponseContent( { } - throw new global::AssemblyAI.ApiException( + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/AssemblyAI/Generated/AssemblyAI.Exceptions.g.cs b/src/libs/AssemblyAI/Generated/AssemblyAI.Exceptions.g.cs index ff995ce..7c4f70b 100644 --- a/src/libs/AssemblyAI/Generated/AssemblyAI.Exceptions.g.cs +++ b/src/libs/AssemblyAI/Generated/AssemblyAI.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::AssemblyAI.ApiException Create( + global::System.Net.HttpStatusCode statusCode, + string message, + global::System.Exception? innerException = null, + global::System.Collections.Generic.IDictionary>? responseHeaders = null) + { + return new global::AssemblyAI.ApiException(message, innerException, statusCode); + } + + /// + /// Convenience overload that constructs an with response body and headers populated. + /// + public static global::AssemblyAI.ApiException Create( + global::System.Net.HttpStatusCode statusCode, + string message, + global::System.Exception? innerException, + string? responseBody, + global::System.Collections.Generic.Dictionary>? responseHeaders) + { + var exception = global::AssemblyAI.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::AssemblyAI.ApiException Create( + global::System.Net.HttpStatusCode statusCode, + string message, + global::System.Exception? innerException = null, + global::System.Collections.Generic.IDictionary>? responseHeaders = null) + { + return new global::AssemblyAI.ApiException(message, innerException, statusCode); + } + + /// + /// Convenience overload that constructs an with response body, object, and headers populated. + /// + public static global::AssemblyAI.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::AssemblyAI.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/AssemblyAI/Generated/AssemblyAI.Realtime.Exceptions.g.cs b/src/libs/AssemblyAI/Generated/AssemblyAI.Realtime.Exceptions.g.cs index 82fce9a..97222a6 100644 --- a/src/libs/AssemblyAI/Generated/AssemblyAI.Realtime.Exceptions.g.cs +++ b/src/libs/AssemblyAI/Generated/AssemblyAI.Realtime.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::AssemblyAI.Realtime.ApiException Create( + global::System.Net.HttpStatusCode statusCode, + string message, + global::System.Exception? innerException = null, + global::System.Collections.Generic.IDictionary>? responseHeaders = null) + { + return new global::AssemblyAI.Realtime.ApiException(message, innerException, statusCode); + } + + /// + /// Convenience overload that constructs an with response body and headers populated. + /// + public static global::AssemblyAI.Realtime.ApiException Create( + global::System.Net.HttpStatusCode statusCode, + string message, + global::System.Exception? innerException, + string? responseBody, + global::System.Collections.Generic.Dictionary>? responseHeaders) + { + var exception = global::AssemblyAI.Realtime.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::AssemblyAI.Realtime.ApiException Create( + global::System.Net.HttpStatusCode statusCode, + string message, + global::System.Exception? innerException = null, + global::System.Collections.Generic.IDictionary>? responseHeaders = null) + { + return new global::AssemblyAI.Realtime.ApiException(message, innerException, statusCode); + } + + /// + /// Convenience overload that constructs an with response body, object, and headers populated. + /// + public static global::AssemblyAI.Realtime.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::AssemblyAI.Realtime.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/AssemblyAI/Generated/AssemblyAI.SubpackageFilesClient.Upload.g.cs b/src/libs/AssemblyAI/Generated/AssemblyAI.SubpackageFilesClient.Upload.g.cs index 64838a6..98247ec 100644 --- a/src/libs/AssemblyAI/Generated/AssemblyAI.SubpackageFilesClient.Upload.g.cs +++ b/src/libs/AssemblyAI/Generated/AssemblyAI.SubpackageFilesClient.Upload.g.cs @@ -364,18 +364,17 @@ partial void ProcessUploadResponseContent( __exception_400 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Unauthorized if ((int)__response.StatusCode == 401) @@ -402,18 +401,17 @@ partial void ProcessUploadResponseContent( __exception_401 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.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)); } // Cannot access uploaded file if ((int)__response.StatusCode == 403) @@ -440,18 +438,17 @@ partial void ProcessUploadResponseContent( __exception_403 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.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) @@ -478,18 +475,17 @@ partial void ProcessUploadResponseContent( __exception_404 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.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)); } // Too many requests if ((int)__response.StatusCode == 429) @@ -516,18 +512,17 @@ partial void ProcessUploadResponseContent( __exception_429 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_429 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_429, - statusCode: __response.StatusCode) - { - ResponseBody = __content_429, - ResponseObject = __value_429, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_429, + responseObject: __value_429, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // An error occurred while processing the request if ((int)__response.StatusCode == 500) @@ -554,18 +549,17 @@ partial void ProcessUploadResponseContent( __exception_500 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, - statusCode: __response.StatusCode) - { - ResponseBody = __content_500, - ResponseObject = __value_500, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_500, + responseObject: __value_500, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Service unavailable if ((int)__response.StatusCode == 503) @@ -592,18 +586,17 @@ partial void ProcessUploadResponseContent( __exception_503 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_503 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_503, - statusCode: __response.StatusCode) - { - ResponseBody = __content_503, - ResponseObject = __value_503, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_503, + responseObject: __value_503, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Gateway timeout if ((int)__response.StatusCode == 504) @@ -630,18 +623,17 @@ partial void ProcessUploadResponseContent( __exception_504 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_504 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_504, - statusCode: __response.StatusCode) - { - ResponseBody = __content_504, - ResponseObject = __value_504, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_504, + responseObject: __value_504, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -675,17 +667,15 @@ partial void ProcessUploadResponseContent( } catch (global::System.Exception __ex) { - throw new global::AssemblyAI.ApiException( + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -722,17 +712,15 @@ partial void ProcessUploadResponseContent( { } - throw new global::AssemblyAI.ApiException( + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/AssemblyAI/Generated/AssemblyAI.SubpackageStreamingApiClient.GenerateStreamingToken.g.cs b/src/libs/AssemblyAI/Generated/AssemblyAI.SubpackageStreamingApiClient.GenerateStreamingToken.g.cs index 3026ed1..696b7e0 100644 --- a/src/libs/AssemblyAI/Generated/AssemblyAI.SubpackageStreamingApiClient.GenerateStreamingToken.g.cs +++ b/src/libs/AssemblyAI/Generated/AssemblyAI.SubpackageStreamingApiClient.GenerateStreamingToken.g.cs @@ -356,18 +356,17 @@ partial void ProcessGenerateStreamingTokenResponseContent( __exception_400 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Unauthorized - Invalid or missing API key if ((int)__response.StatusCode == 401) @@ -394,18 +393,17 @@ partial void ProcessGenerateStreamingTokenResponseContent( __exception_401 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.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)); } // Too Many Requests - Rate limit exceeded if ((int)__response.StatusCode == 429) @@ -432,18 +430,17 @@ partial void ProcessGenerateStreamingTokenResponseContent( __exception_429 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_429 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_429, - statusCode: __response.StatusCode) - { - ResponseBody = __content_429, - ResponseObject = __value_429, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_429, + responseObject: __value_429, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Internal Server Error if ((int)__response.StatusCode == 500) @@ -470,18 +467,17 @@ partial void ProcessGenerateStreamingTokenResponseContent( __exception_500 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, - statusCode: __response.StatusCode) - { - ResponseBody = __content_500, - ResponseObject = __value_500, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_500, + responseObject: __value_500, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -515,17 +511,15 @@ partial void ProcessGenerateStreamingTokenResponseContent( } catch (global::System.Exception __ex) { - throw new global::AssemblyAI.ApiException( + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -562,17 +556,15 @@ partial void ProcessGenerateStreamingTokenResponseContent( { } - throw new global::AssemblyAI.ApiException( + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/AssemblyAI/Generated/AssemblyAI.SubpackageTranscriptsClient.Delete.g.cs b/src/libs/AssemblyAI/Generated/AssemblyAI.SubpackageTranscriptsClient.Delete.g.cs index 4081e34..9da81c8 100644 --- a/src/libs/AssemblyAI/Generated/AssemblyAI.SubpackageTranscriptsClient.Delete.g.cs +++ b/src/libs/AssemblyAI/Generated/AssemblyAI.SubpackageTranscriptsClient.Delete.g.cs @@ -355,18 +355,17 @@ partial void ProcessDeleteResponseContent( __exception_400 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Unauthorized if ((int)__response.StatusCode == 401) @@ -393,18 +392,17 @@ partial void ProcessDeleteResponseContent( __exception_401 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Not found if ((int)__response.StatusCode == 404) @@ -431,18 +429,17 @@ partial void ProcessDeleteResponseContent( __exception_404 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.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)); } // Too many requests if ((int)__response.StatusCode == 429) @@ -469,18 +466,17 @@ partial void ProcessDeleteResponseContent( __exception_429 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_429 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_429, - statusCode: __response.StatusCode) - { - ResponseBody = __content_429, - ResponseObject = __value_429, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_429, + responseObject: __value_429, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // An error occurred while processing the request if ((int)__response.StatusCode == 500) @@ -507,18 +503,17 @@ partial void ProcessDeleteResponseContent( __exception_500 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, - statusCode: __response.StatusCode) - { - ResponseBody = __content_500, - ResponseObject = __value_500, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_500, + responseObject: __value_500, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Service unavailable if ((int)__response.StatusCode == 503) @@ -545,18 +540,17 @@ partial void ProcessDeleteResponseContent( __exception_503 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_503 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_503, - statusCode: __response.StatusCode) - { - ResponseBody = __content_503, - ResponseObject = __value_503, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_503, + responseObject: __value_503, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Gateway timeout if ((int)__response.StatusCode == 504) @@ -583,18 +577,17 @@ partial void ProcessDeleteResponseContent( __exception_504 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_504 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_504, - statusCode: __response.StatusCode) - { - ResponseBody = __content_504, - ResponseObject = __value_504, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_504, + responseObject: __value_504, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -628,17 +621,15 @@ partial void ProcessDeleteResponseContent( } catch (global::System.Exception __ex) { - throw new global::AssemblyAI.ApiException( + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -675,17 +666,15 @@ partial void ProcessDeleteResponseContent( { } - throw new global::AssemblyAI.ApiException( + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/AssemblyAI/Generated/AssemblyAI.SubpackageTranscriptsClient.Get.g.cs b/src/libs/AssemblyAI/Generated/AssemblyAI.SubpackageTranscriptsClient.Get.g.cs index b4ee49a..1e43079 100644 --- a/src/libs/AssemblyAI/Generated/AssemblyAI.SubpackageTranscriptsClient.Get.g.cs +++ b/src/libs/AssemblyAI/Generated/AssemblyAI.SubpackageTranscriptsClient.Get.g.cs @@ -353,18 +353,17 @@ partial void ProcessGetResponseContent( __exception_400 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Unauthorized if ((int)__response.StatusCode == 401) @@ -391,18 +390,17 @@ partial void ProcessGetResponseContent( __exception_401 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Not found if ((int)__response.StatusCode == 404) @@ -429,18 +427,17 @@ partial void ProcessGetResponseContent( __exception_404 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.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)); } // Too many requests if ((int)__response.StatusCode == 429) @@ -467,18 +464,17 @@ partial void ProcessGetResponseContent( __exception_429 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_429 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_429, - statusCode: __response.StatusCode) - { - ResponseBody = __content_429, - ResponseObject = __value_429, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_429, + responseObject: __value_429, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // An error occurred while processing the request if ((int)__response.StatusCode == 500) @@ -505,18 +501,17 @@ partial void ProcessGetResponseContent( __exception_500 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, - statusCode: __response.StatusCode) - { - ResponseBody = __content_500, - ResponseObject = __value_500, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_500, + responseObject: __value_500, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Service unavailable if ((int)__response.StatusCode == 503) @@ -543,18 +538,17 @@ partial void ProcessGetResponseContent( __exception_503 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_503 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_503, - statusCode: __response.StatusCode) - { - ResponseBody = __content_503, - ResponseObject = __value_503, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_503, + responseObject: __value_503, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Gateway timeout if ((int)__response.StatusCode == 504) @@ -581,18 +575,17 @@ partial void ProcessGetResponseContent( __exception_504 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_504 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_504, - statusCode: __response.StatusCode) - { - ResponseBody = __content_504, - ResponseObject = __value_504, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_504, + responseObject: __value_504, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -626,17 +619,15 @@ partial void ProcessGetResponseContent( } catch (global::System.Exception __ex) { - throw new global::AssemblyAI.ApiException( + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -673,17 +664,15 @@ partial void ProcessGetResponseContent( { } - throw new global::AssemblyAI.ApiException( + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/AssemblyAI/Generated/AssemblyAI.SubpackageTranscriptsClient.GetParagraphs.g.cs b/src/libs/AssemblyAI/Generated/AssemblyAI.SubpackageTranscriptsClient.GetParagraphs.g.cs index 2aa8912..9239a3f 100644 --- a/src/libs/AssemblyAI/Generated/AssemblyAI.SubpackageTranscriptsClient.GetParagraphs.g.cs +++ b/src/libs/AssemblyAI/Generated/AssemblyAI.SubpackageTranscriptsClient.GetParagraphs.g.cs @@ -353,18 +353,17 @@ partial void ProcessGetParagraphsResponseContent( __exception_400 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Unauthorized if ((int)__response.StatusCode == 401) @@ -391,18 +390,17 @@ partial void ProcessGetParagraphsResponseContent( __exception_401 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Not found if ((int)__response.StatusCode == 404) @@ -429,18 +427,17 @@ partial void ProcessGetParagraphsResponseContent( __exception_404 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.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)); } // Too many requests if ((int)__response.StatusCode == 429) @@ -467,18 +464,17 @@ partial void ProcessGetParagraphsResponseContent( __exception_429 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_429 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_429, - statusCode: __response.StatusCode) - { - ResponseBody = __content_429, - ResponseObject = __value_429, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_429, + responseObject: __value_429, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // An error occurred while processing the request if ((int)__response.StatusCode == 500) @@ -505,18 +501,17 @@ partial void ProcessGetParagraphsResponseContent( __exception_500 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, - statusCode: __response.StatusCode) - { - ResponseBody = __content_500, - ResponseObject = __value_500, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_500, + responseObject: __value_500, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Service unavailable if ((int)__response.StatusCode == 503) @@ -543,18 +538,17 @@ partial void ProcessGetParagraphsResponseContent( __exception_503 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_503 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_503, - statusCode: __response.StatusCode) - { - ResponseBody = __content_503, - ResponseObject = __value_503, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_503, + responseObject: __value_503, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Gateway timeout if ((int)__response.StatusCode == 504) @@ -581,18 +575,17 @@ partial void ProcessGetParagraphsResponseContent( __exception_504 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_504 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_504, - statusCode: __response.StatusCode) - { - ResponseBody = __content_504, - ResponseObject = __value_504, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_504, + responseObject: __value_504, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -626,17 +619,15 @@ partial void ProcessGetParagraphsResponseContent( } catch (global::System.Exception __ex) { - throw new global::AssemblyAI.ApiException( + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -673,17 +664,15 @@ partial void ProcessGetParagraphsResponseContent( { } - throw new global::AssemblyAI.ApiException( + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/AssemblyAI/Generated/AssemblyAI.SubpackageTranscriptsClient.GetRedactedAudio.g.cs b/src/libs/AssemblyAI/Generated/AssemblyAI.SubpackageTranscriptsClient.GetRedactedAudio.g.cs index 8815701..1901bf2 100644 --- a/src/libs/AssemblyAI/Generated/AssemblyAI.SubpackageTranscriptsClient.GetRedactedAudio.g.cs +++ b/src/libs/AssemblyAI/Generated/AssemblyAI.SubpackageTranscriptsClient.GetRedactedAudio.g.cs @@ -355,18 +355,17 @@ partial void ProcessGetRedactedAudioResponseContent( __exception_400 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Unauthorized if ((int)__response.StatusCode == 401) @@ -393,18 +392,17 @@ partial void ProcessGetRedactedAudioResponseContent( __exception_401 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Not found if ((int)__response.StatusCode == 404) @@ -431,18 +429,17 @@ partial void ProcessGetRedactedAudioResponseContent( __exception_404 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.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)); } // Too many requests if ((int)__response.StatusCode == 429) @@ -469,18 +466,17 @@ partial void ProcessGetRedactedAudioResponseContent( __exception_429 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_429 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_429, - statusCode: __response.StatusCode) - { - ResponseBody = __content_429, - ResponseObject = __value_429, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_429, + responseObject: __value_429, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // An error occurred while processing the request if ((int)__response.StatusCode == 500) @@ -507,18 +503,17 @@ partial void ProcessGetRedactedAudioResponseContent( __exception_500 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, - statusCode: __response.StatusCode) - { - ResponseBody = __content_500, - ResponseObject = __value_500, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_500, + responseObject: __value_500, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Service unavailable if ((int)__response.StatusCode == 503) @@ -545,18 +540,17 @@ partial void ProcessGetRedactedAudioResponseContent( __exception_503 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_503 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_503, - statusCode: __response.StatusCode) - { - ResponseBody = __content_503, - ResponseObject = __value_503, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_503, + responseObject: __value_503, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Gateway timeout if ((int)__response.StatusCode == 504) @@ -583,18 +577,17 @@ partial void ProcessGetRedactedAudioResponseContent( __exception_504 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_504 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_504, - statusCode: __response.StatusCode) - { - ResponseBody = __content_504, - ResponseObject = __value_504, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_504, + responseObject: __value_504, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -628,17 +621,15 @@ partial void ProcessGetRedactedAudioResponseContent( } catch (global::System.Exception __ex) { - throw new global::AssemblyAI.ApiException( + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -675,17 +666,15 @@ partial void ProcessGetRedactedAudioResponseContent( { } - throw new global::AssemblyAI.ApiException( + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/AssemblyAI/Generated/AssemblyAI.SubpackageTranscriptsClient.GetSentences.g.cs b/src/libs/AssemblyAI/Generated/AssemblyAI.SubpackageTranscriptsClient.GetSentences.g.cs index fd15f4e..bf84126 100644 --- a/src/libs/AssemblyAI/Generated/AssemblyAI.SubpackageTranscriptsClient.GetSentences.g.cs +++ b/src/libs/AssemblyAI/Generated/AssemblyAI.SubpackageTranscriptsClient.GetSentences.g.cs @@ -353,18 +353,17 @@ partial void ProcessGetSentencesResponseContent( __exception_400 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Unauthorized if ((int)__response.StatusCode == 401) @@ -391,18 +390,17 @@ partial void ProcessGetSentencesResponseContent( __exception_401 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Not found if ((int)__response.StatusCode == 404) @@ -429,18 +427,17 @@ partial void ProcessGetSentencesResponseContent( __exception_404 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.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)); } // Too many requests if ((int)__response.StatusCode == 429) @@ -467,18 +464,17 @@ partial void ProcessGetSentencesResponseContent( __exception_429 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_429 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_429, - statusCode: __response.StatusCode) - { - ResponseBody = __content_429, - ResponseObject = __value_429, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_429, + responseObject: __value_429, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // An error occurred while processing the request if ((int)__response.StatusCode == 500) @@ -505,18 +501,17 @@ partial void ProcessGetSentencesResponseContent( __exception_500 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, - statusCode: __response.StatusCode) - { - ResponseBody = __content_500, - ResponseObject = __value_500, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_500, + responseObject: __value_500, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Service unavailable if ((int)__response.StatusCode == 503) @@ -543,18 +538,17 @@ partial void ProcessGetSentencesResponseContent( __exception_503 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_503 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_503, - statusCode: __response.StatusCode) - { - ResponseBody = __content_503, - ResponseObject = __value_503, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_503, + responseObject: __value_503, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Gateway timeout if ((int)__response.StatusCode == 504) @@ -581,18 +575,17 @@ partial void ProcessGetSentencesResponseContent( __exception_504 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_504 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_504, - statusCode: __response.StatusCode) - { - ResponseBody = __content_504, - ResponseObject = __value_504, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_504, + responseObject: __value_504, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -626,17 +619,15 @@ partial void ProcessGetSentencesResponseContent( } catch (global::System.Exception __ex) { - throw new global::AssemblyAI.ApiException( + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -673,17 +664,15 @@ partial void ProcessGetSentencesResponseContent( { } - throw new global::AssemblyAI.ApiException( + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/AssemblyAI/Generated/AssemblyAI.SubpackageTranscriptsClient.GetSubtitles.g.cs b/src/libs/AssemblyAI/Generated/AssemblyAI.SubpackageTranscriptsClient.GetSubtitles.g.cs index 6ced56c..a996c23 100644 --- a/src/libs/AssemblyAI/Generated/AssemblyAI.SubpackageTranscriptsClient.GetSubtitles.g.cs +++ b/src/libs/AssemblyAI/Generated/AssemblyAI.SubpackageTranscriptsClient.GetSubtitles.g.cs @@ -378,18 +378,17 @@ partial void ProcessGetSubtitlesResponseContent( __exception_400 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Unauthorized if ((int)__response.StatusCode == 401) @@ -416,18 +415,17 @@ partial void ProcessGetSubtitlesResponseContent( __exception_401 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Not found if ((int)__response.StatusCode == 404) @@ -454,18 +452,17 @@ partial void ProcessGetSubtitlesResponseContent( __exception_404 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.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)); } // Too many requests if ((int)__response.StatusCode == 429) @@ -492,18 +489,17 @@ partial void ProcessGetSubtitlesResponseContent( __exception_429 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_429 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_429, - statusCode: __response.StatusCode) - { - ResponseBody = __content_429, - ResponseObject = __value_429, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_429, + responseObject: __value_429, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // An error occurred while processing the request if ((int)__response.StatusCode == 500) @@ -530,18 +526,17 @@ partial void ProcessGetSubtitlesResponseContent( __exception_500 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, - statusCode: __response.StatusCode) - { - ResponseBody = __content_500, - ResponseObject = __value_500, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_500, + responseObject: __value_500, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Service unavailable if ((int)__response.StatusCode == 503) @@ -568,18 +563,17 @@ partial void ProcessGetSubtitlesResponseContent( __exception_503 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_503 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_503, - statusCode: __response.StatusCode) - { - ResponseBody = __content_503, - ResponseObject = __value_503, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_503, + responseObject: __value_503, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Gateway timeout if ((int)__response.StatusCode == 504) @@ -606,18 +600,17 @@ partial void ProcessGetSubtitlesResponseContent( __exception_504 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_504 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_504, - statusCode: __response.StatusCode) - { - ResponseBody = __content_504, - ResponseObject = __value_504, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_504, + responseObject: __value_504, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -649,17 +642,15 @@ partial void ProcessGetSubtitlesResponseContent( } catch (global::System.Exception __ex) { - throw new global::AssemblyAI.ApiException( + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -694,17 +685,15 @@ partial void ProcessGetSubtitlesResponseContent( { } - throw new global::AssemblyAI.ApiException( + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/AssemblyAI/Generated/AssemblyAI.SubpackageTranscriptsClient.List.g.cs b/src/libs/AssemblyAI/Generated/AssemblyAI.SubpackageTranscriptsClient.List.g.cs index 11ec637..8f1e3f3 100644 --- a/src/libs/AssemblyAI/Generated/AssemblyAI.SubpackageTranscriptsClient.List.g.cs +++ b/src/libs/AssemblyAI/Generated/AssemblyAI.SubpackageTranscriptsClient.List.g.cs @@ -436,18 +436,17 @@ partial void ProcessListResponseContent( __exception_400 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Unauthorized if ((int)__response.StatusCode == 401) @@ -474,18 +473,17 @@ partial void ProcessListResponseContent( __exception_401 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Not found if ((int)__response.StatusCode == 404) @@ -512,18 +510,17 @@ partial void ProcessListResponseContent( __exception_404 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.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)); } // Too many requests if ((int)__response.StatusCode == 429) @@ -550,18 +547,17 @@ partial void ProcessListResponseContent( __exception_429 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_429 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_429, - statusCode: __response.StatusCode) - { - ResponseBody = __content_429, - ResponseObject = __value_429, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_429, + responseObject: __value_429, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // An error occurred while processing the request if ((int)__response.StatusCode == 500) @@ -588,18 +584,17 @@ partial void ProcessListResponseContent( __exception_500 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, - statusCode: __response.StatusCode) - { - ResponseBody = __content_500, - ResponseObject = __value_500, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_500, + responseObject: __value_500, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Service unavailable if ((int)__response.StatusCode == 503) @@ -626,18 +621,17 @@ partial void ProcessListResponseContent( __exception_503 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_503 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_503, - statusCode: __response.StatusCode) - { - ResponseBody = __content_503, - ResponseObject = __value_503, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_503, + responseObject: __value_503, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Gateway timeout if ((int)__response.StatusCode == 504) @@ -664,18 +658,17 @@ partial void ProcessListResponseContent( __exception_504 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_504 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_504, - statusCode: __response.StatusCode) - { - ResponseBody = __content_504, - ResponseObject = __value_504, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_504, + responseObject: __value_504, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -709,17 +702,15 @@ partial void ProcessListResponseContent( } catch (global::System.Exception __ex) { - throw new global::AssemblyAI.ApiException( + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -756,17 +747,15 @@ partial void ProcessListResponseContent( { } - throw new global::AssemblyAI.ApiException( + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/AssemblyAI/Generated/AssemblyAI.SubpackageTranscriptsClient.Submit.g.cs b/src/libs/AssemblyAI/Generated/AssemblyAI.SubpackageTranscriptsClient.Submit.g.cs index 020dc09..114e081 100644 --- a/src/libs/AssemblyAI/Generated/AssemblyAI.SubpackageTranscriptsClient.Submit.g.cs +++ b/src/libs/AssemblyAI/Generated/AssemblyAI.SubpackageTranscriptsClient.Submit.g.cs @@ -366,18 +366,17 @@ partial void ProcessSubmitResponseContent( __exception_400 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Unauthorized if ((int)__response.StatusCode == 401) @@ -404,18 +403,17 @@ partial void ProcessSubmitResponseContent( __exception_401 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Not found if ((int)__response.StatusCode == 404) @@ -442,18 +440,17 @@ partial void ProcessSubmitResponseContent( __exception_404 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.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)); } // Too many requests if ((int)__response.StatusCode == 429) @@ -480,18 +477,17 @@ partial void ProcessSubmitResponseContent( __exception_429 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_429 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_429, - statusCode: __response.StatusCode) - { - ResponseBody = __content_429, - ResponseObject = __value_429, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_429, + responseObject: __value_429, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // An error occurred while processing the request if ((int)__response.StatusCode == 500) @@ -518,18 +514,17 @@ partial void ProcessSubmitResponseContent( __exception_500 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, - statusCode: __response.StatusCode) - { - ResponseBody = __content_500, - ResponseObject = __value_500, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_500, + responseObject: __value_500, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Service unavailable if ((int)__response.StatusCode == 503) @@ -556,18 +551,17 @@ partial void ProcessSubmitResponseContent( __exception_503 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_503 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_503, - statusCode: __response.StatusCode) - { - ResponseBody = __content_503, - ResponseObject = __value_503, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_503, + responseObject: __value_503, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Gateway timeout if ((int)__response.StatusCode == 504) @@ -594,18 +588,17 @@ partial void ProcessSubmitResponseContent( __exception_504 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_504 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_504, - statusCode: __response.StatusCode) - { - ResponseBody = __content_504, - ResponseObject = __value_504, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_504, + responseObject: __value_504, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -639,17 +632,15 @@ partial void ProcessSubmitResponseContent( } catch (global::System.Exception __ex) { - throw new global::AssemblyAI.ApiException( + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -686,17 +677,15 @@ partial void ProcessSubmitResponseContent( { } - throw new global::AssemblyAI.ApiException( + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/AssemblyAI/Generated/AssemblyAI.SubpackageTranscriptsClient.WordSearch.g.cs b/src/libs/AssemblyAI/Generated/AssemblyAI.SubpackageTranscriptsClient.WordSearch.g.cs index ba6d065..93c0314 100644 --- a/src/libs/AssemblyAI/Generated/AssemblyAI.SubpackageTranscriptsClient.WordSearch.g.cs +++ b/src/libs/AssemblyAI/Generated/AssemblyAI.SubpackageTranscriptsClient.WordSearch.g.cs @@ -365,18 +365,17 @@ partial void ProcessWordSearchResponseContent( __exception_400 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Unauthorized if ((int)__response.StatusCode == 401) @@ -403,18 +402,17 @@ partial void ProcessWordSearchResponseContent( __exception_401 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_401, - statusCode: __response.StatusCode) - { - ResponseBody = __content_401, - ResponseObject = __value_401, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Not found if ((int)__response.StatusCode == 404) @@ -441,18 +439,17 @@ partial void ProcessWordSearchResponseContent( __exception_404 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.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)); } // Too many requests if ((int)__response.StatusCode == 429) @@ -479,18 +476,17 @@ partial void ProcessWordSearchResponseContent( __exception_429 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_429 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_429, - statusCode: __response.StatusCode) - { - ResponseBody = __content_429, - ResponseObject = __value_429, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_429, + responseObject: __value_429, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // An error occurred while processing the request if ((int)__response.StatusCode == 500) @@ -517,18 +513,17 @@ partial void ProcessWordSearchResponseContent( __exception_500 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, - statusCode: __response.StatusCode) - { - ResponseBody = __content_500, - ResponseObject = __value_500, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_500, + responseObject: __value_500, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Service unavailable if ((int)__response.StatusCode == 503) @@ -555,18 +550,17 @@ partial void ProcessWordSearchResponseContent( __exception_503 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_503 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_503, - statusCode: __response.StatusCode) - { - ResponseBody = __content_503, - ResponseObject = __value_503, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_503, + responseObject: __value_503, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Gateway timeout if ((int)__response.StatusCode == 504) @@ -593,18 +587,17 @@ partial void ProcessWordSearchResponseContent( __exception_504 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_504 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_504, - statusCode: __response.StatusCode) - { - ResponseBody = __content_504, - ResponseObject = __value_504, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_504, + responseObject: __value_504, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -638,17 +631,15 @@ partial void ProcessWordSearchResponseContent( } catch (global::System.Exception __ex) { - throw new global::AssemblyAI.ApiException( + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -685,17 +676,15 @@ partial void ProcessWordSearchResponseContent( { } - throw new global::AssemblyAI.ApiException( + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } diff --git a/src/libs/AssemblyAI/Generated/AssemblyAI.SubpackageVoiceAgentApiClient.GenerateVoiceAgentToken.g.cs b/src/libs/AssemblyAI/Generated/AssemblyAI.SubpackageVoiceAgentApiClient.GenerateVoiceAgentToken.g.cs index b5958cd..f3b9350 100644 --- a/src/libs/AssemblyAI/Generated/AssemblyAI.SubpackageVoiceAgentApiClient.GenerateVoiceAgentToken.g.cs +++ b/src/libs/AssemblyAI/Generated/AssemblyAI.SubpackageVoiceAgentApiClient.GenerateVoiceAgentToken.g.cs @@ -368,18 +368,17 @@ partial void ProcessGenerateVoiceAgentTokenResponseContent( __exception_400 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Unauthorized — invalid or missing API key. if ((int)__response.StatusCode == 401) @@ -406,18 +405,17 @@ partial void ProcessGenerateVoiceAgentTokenResponseContent( __exception_401 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.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)); } // Too Many Requests — rate limit exceeded. if ((int)__response.StatusCode == 429) @@ -444,18 +442,17 @@ partial void ProcessGenerateVoiceAgentTokenResponseContent( __exception_429 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_429 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_429, - statusCode: __response.StatusCode) - { - ResponseBody = __content_429, - ResponseObject = __value_429, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_429, + responseObject: __value_429, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } // Internal Server Error. if ((int)__response.StatusCode == 500) @@ -482,18 +479,17 @@ partial void ProcessGenerateVoiceAgentTokenResponseContent( __exception_500 = __ex; } - throw new global::AssemblyAI.ApiException( + + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_500, - statusCode: __response.StatusCode) - { - ResponseBody = __content_500, - ResponseObject = __value_500, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_500, + responseObject: __value_500, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -527,17 +523,15 @@ partial void ProcessGenerateVoiceAgentTokenResponseContent( } catch (global::System.Exception __ex) { - throw new global::AssemblyAI.ApiException( + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::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 ProcessGenerateVoiceAgentTokenResponseContent( { } - throw new global::AssemblyAI.ApiException( + throw global::AssemblyAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } }