diff --git a/src/libs/Inworld/Generated/Inworld.Exceptions.g.cs b/src/libs/Inworld/Generated/Inworld.Exceptions.g.cs
index d6b9c93..478402e 100644
--- a/src/libs/Inworld/Generated/Inworld.Exceptions.g.cs
+++ b/src/libs/Inworld/Generated/Inworld.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::Inworld.ApiException Create(
+ global::System.Net.HttpStatusCode statusCode,
+ string message,
+ global::System.Exception? innerException = null,
+ global::System.Collections.Generic.IDictionary>? responseHeaders = null)
+ {
+ return new global::Inworld.ApiException(message, innerException, statusCode);
+ }
+
+ ///
+ /// Convenience overload that constructs an with response body and headers populated.
+ ///
+ public static global::Inworld.ApiException Create(
+ global::System.Net.HttpStatusCode statusCode,
+ string message,
+ global::System.Exception? innerException,
+ string? responseBody,
+ global::System.Collections.Generic.Dictionary>? responseHeaders)
+ {
+ var exception = global::Inworld.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::Inworld.ApiException Create(
+ global::System.Net.HttpStatusCode statusCode,
+ string message,
+ global::System.Exception? innerException = null,
+ global::System.Collections.Generic.IDictionary>? responseHeaders = null)
+ {
+ return new global::Inworld.ApiException(message, innerException, statusCode);
+ }
+
+ ///
+ /// Convenience overload that constructs an with response body, object, and headers populated.
+ ///
+ public static global::Inworld.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::Inworld.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/Inworld/Generated/Inworld.ModelsClient.ListModels.g.cs b/src/libs/Inworld/Generated/Inworld.ModelsClient.ListModels.g.cs
index edfa5c7..34bf6a5 100644
--- a/src/libs/Inworld/Generated/Inworld.ModelsClient.ListModels.g.cs
+++ b/src/libs/Inworld/Generated/Inworld.ModelsClient.ListModels.g.cs
@@ -344,18 +344,17 @@ partial void ProcessListModelsResponseContent(
__exception_default = __ex;
}
- throw new global::Inworld.ApiException(
+
+ throw global::Inworld.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content_default ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_default,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content_default,
- ResponseObject = __value_default,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content_default,
+ responseObject: __value_default,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
if (__effectiveReadResponseAsString)
@@ -389,17 +388,15 @@ partial void ProcessListModelsResponseContent(
}
catch (global::System.Exception __ex)
{
- throw new global::Inworld.ApiException(
+ throw global::Inworld.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
else
@@ -436,17 +433,15 @@ partial void ProcessListModelsResponseContent(
{
}
- throw new global::Inworld.ApiException(
+ throw global::Inworld.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
diff --git a/src/libs/Inworld/Generated/Inworld.Realtime.Exceptions.g.cs b/src/libs/Inworld/Generated/Inworld.Realtime.Exceptions.g.cs
index 9199f21..e2f6857 100644
--- a/src/libs/Inworld/Generated/Inworld.Realtime.Exceptions.g.cs
+++ b/src/libs/Inworld/Generated/Inworld.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::Inworld.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::Inworld.Realtime.ApiException(message, innerException, statusCode);
+ }
+
+ ///
+ /// Convenience overload that constructs an with response body and headers populated.
+ ///
+ public static global::Inworld.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::Inworld.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::Inworld.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::Inworld.Realtime.ApiException(message, innerException, statusCode);
+ }
+
+ ///
+ /// Convenience overload that constructs an with response body, object, and headers populated.
+ ///
+ public static global::Inworld.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::Inworld.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/Inworld/Generated/Inworld.SpeechToTextClient.TranscribeAudio.g.cs b/src/libs/Inworld/Generated/Inworld.SpeechToTextClient.TranscribeAudio.g.cs
index f4dfa3d..4767fa7 100644
--- a/src/libs/Inworld/Generated/Inworld.SpeechToTextClient.TranscribeAudio.g.cs
+++ b/src/libs/Inworld/Generated/Inworld.SpeechToTextClient.TranscribeAudio.g.cs
@@ -362,18 +362,17 @@ partial void ProcessTranscribeAudioResponseContent(
__exception_default = __ex;
}
- throw new global::Inworld.ApiException(
+
+ throw global::Inworld.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content_default ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_default,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content_default,
- ResponseObject = __value_default,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content_default,
+ responseObject: __value_default,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
if (__effectiveReadResponseAsString)
@@ -407,17 +406,15 @@ partial void ProcessTranscribeAudioResponseContent(
}
catch (global::System.Exception __ex)
{
- throw new global::Inworld.ApiException(
+ throw global::Inworld.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
else
@@ -454,17 +451,15 @@ partial void ProcessTranscribeAudioResponseContent(
{
}
- throw new global::Inworld.ApiException(
+ throw global::Inworld.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
diff --git a/src/libs/Inworld/Generated/Inworld.TextToSpeechClient.SynthesizeSpeech.g.cs b/src/libs/Inworld/Generated/Inworld.TextToSpeechClient.SynthesizeSpeech.g.cs
index b1677bc..ead9a0c 100644
--- a/src/libs/Inworld/Generated/Inworld.TextToSpeechClient.SynthesizeSpeech.g.cs
+++ b/src/libs/Inworld/Generated/Inworld.TextToSpeechClient.SynthesizeSpeech.g.cs
@@ -366,18 +366,17 @@ partial void ProcessSynthesizeSpeechResponseContent(
__exception_default = __ex;
}
- throw new global::Inworld.ApiException(
+
+ throw global::Inworld.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content_default ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_default,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content_default,
- ResponseObject = __value_default,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content_default,
+ responseObject: __value_default,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
if (__effectiveReadResponseAsString)
@@ -411,17 +410,15 @@ partial void ProcessSynthesizeSpeechResponseContent(
}
catch (global::System.Exception __ex)
{
- throw new global::Inworld.ApiException(
+ throw global::Inworld.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
else
@@ -458,17 +455,15 @@ partial void ProcessSynthesizeSpeechResponseContent(
{
}
- throw new global::Inworld.ApiException(
+ throw global::Inworld.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
diff --git a/src/libs/Inworld/Generated/Inworld.VoicesClient.CloneVoice.g.cs b/src/libs/Inworld/Generated/Inworld.VoicesClient.CloneVoice.g.cs
index 1d685ab..f3bb347 100644
--- a/src/libs/Inworld/Generated/Inworld.VoicesClient.CloneVoice.g.cs
+++ b/src/libs/Inworld/Generated/Inworld.VoicesClient.CloneVoice.g.cs
@@ -364,18 +364,17 @@ partial void ProcessCloneVoiceResponseContent(
__exception_default = __ex;
}
- throw new global::Inworld.ApiException(
+
+ throw global::Inworld.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content_default ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_default,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content_default,
- ResponseObject = __value_default,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content_default,
+ responseObject: __value_default,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
if (__effectiveReadResponseAsString)
@@ -409,17 +408,15 @@ partial void ProcessCloneVoiceResponseContent(
}
catch (global::System.Exception __ex)
{
- throw new global::Inworld.ApiException(
+ throw global::Inworld.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
else
@@ -456,17 +453,15 @@ partial void ProcessCloneVoiceResponseContent(
{
}
- throw new global::Inworld.ApiException(
+ throw global::Inworld.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
diff --git a/src/libs/Inworld/Generated/Inworld.VoicesClient.DeleteVoice.g.cs b/src/libs/Inworld/Generated/Inworld.VoicesClient.DeleteVoice.g.cs
index 487b331..927f226 100644
--- a/src/libs/Inworld/Generated/Inworld.VoicesClient.DeleteVoice.g.cs
+++ b/src/libs/Inworld/Generated/Inworld.VoicesClient.DeleteVoice.g.cs
@@ -349,18 +349,17 @@ partial void ProcessDeleteVoiceResponseContent(
__exception_default = __ex;
}
- throw new global::Inworld.ApiException(
+
+ throw global::Inworld.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content_default ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_default,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content_default,
- ResponseObject = __value_default,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content_default,
+ responseObject: __value_default,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
if (__effectiveReadResponseAsString)
@@ -392,17 +391,15 @@ partial void ProcessDeleteVoiceResponseContent(
}
catch (global::System.Exception __ex)
{
- throw new global::Inworld.ApiException(
+ throw global::Inworld.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
else
@@ -437,17 +434,15 @@ partial void ProcessDeleteVoiceResponseContent(
{
}
- throw new global::Inworld.ApiException(
+ throw global::Inworld.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
diff --git a/src/libs/Inworld/Generated/Inworld.VoicesClient.DesignVoice.g.cs b/src/libs/Inworld/Generated/Inworld.VoicesClient.DesignVoice.g.cs
index bc889f8..2d77587 100644
--- a/src/libs/Inworld/Generated/Inworld.VoicesClient.DesignVoice.g.cs
+++ b/src/libs/Inworld/Generated/Inworld.VoicesClient.DesignVoice.g.cs
@@ -364,18 +364,17 @@ partial void ProcessDesignVoiceResponseContent(
__exception_default = __ex;
}
- throw new global::Inworld.ApiException(
+
+ throw global::Inworld.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content_default ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_default,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content_default,
- ResponseObject = __value_default,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content_default,
+ responseObject: __value_default,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
if (__effectiveReadResponseAsString)
@@ -409,17 +408,15 @@ partial void ProcessDesignVoiceResponseContent(
}
catch (global::System.Exception __ex)
{
- throw new global::Inworld.ApiException(
+ throw global::Inworld.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
else
@@ -456,17 +453,15 @@ partial void ProcessDesignVoiceResponseContent(
{
}
- throw new global::Inworld.ApiException(
+ throw global::Inworld.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
diff --git a/src/libs/Inworld/Generated/Inworld.VoicesClient.GetVoice.g.cs b/src/libs/Inworld/Generated/Inworld.VoicesClient.GetVoice.g.cs
index 9f41b9e..b140671 100644
--- a/src/libs/Inworld/Generated/Inworld.VoicesClient.GetVoice.g.cs
+++ b/src/libs/Inworld/Generated/Inworld.VoicesClient.GetVoice.g.cs
@@ -349,18 +349,17 @@ partial void ProcessGetVoiceResponseContent(
__exception_default = __ex;
}
- throw new global::Inworld.ApiException(
+
+ throw global::Inworld.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content_default ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_default,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content_default,
- ResponseObject = __value_default,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content_default,
+ responseObject: __value_default,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
if (__effectiveReadResponseAsString)
@@ -394,17 +393,15 @@ partial void ProcessGetVoiceResponseContent(
}
catch (global::System.Exception __ex)
{
- throw new global::Inworld.ApiException(
+ throw global::Inworld.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
else
@@ -441,17 +438,15 @@ partial void ProcessGetVoiceResponseContent(
{
}
- throw new global::Inworld.ApiException(
+ throw global::Inworld.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
diff --git a/src/libs/Inworld/Generated/Inworld.VoicesClient.ListVoices.g.cs b/src/libs/Inworld/Generated/Inworld.VoicesClient.ListVoices.g.cs
index 51e0677..f86c5d2 100644
--- a/src/libs/Inworld/Generated/Inworld.VoicesClient.ListVoices.g.cs
+++ b/src/libs/Inworld/Generated/Inworld.VoicesClient.ListVoices.g.cs
@@ -354,18 +354,17 @@ partial void ProcessListVoicesResponseContent(
__exception_default = __ex;
}
- throw new global::Inworld.ApiException(
+
+ throw global::Inworld.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content_default ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_default,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content_default,
- ResponseObject = __value_default,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content_default,
+ responseObject: __value_default,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
if (__effectiveReadResponseAsString)
@@ -399,17 +398,15 @@ partial void ProcessListVoicesResponseContent(
}
catch (global::System.Exception __ex)
{
- throw new global::Inworld.ApiException(
+ throw global::Inworld.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
else
@@ -446,17 +443,15 @@ partial void ProcessListVoicesResponseContent(
{
}
- throw new global::Inworld.ApiException(
+ throw global::Inworld.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
diff --git a/src/libs/Inworld/Generated/Inworld.VoicesClient.PublishVoice.g.cs b/src/libs/Inworld/Generated/Inworld.VoicesClient.PublishVoice.g.cs
index f146dd3..33d47b9 100644
--- a/src/libs/Inworld/Generated/Inworld.VoicesClient.PublishVoice.g.cs
+++ b/src/libs/Inworld/Generated/Inworld.VoicesClient.PublishVoice.g.cs
@@ -371,18 +371,17 @@ partial void ProcessPublishVoiceResponseContent(
__exception_default = __ex;
}
- throw new global::Inworld.ApiException(
+
+ throw global::Inworld.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content_default ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_default,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content_default,
- ResponseObject = __value_default,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content_default,
+ responseObject: __value_default,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
if (__effectiveReadResponseAsString)
@@ -416,17 +415,15 @@ partial void ProcessPublishVoiceResponseContent(
}
catch (global::System.Exception __ex)
{
- throw new global::Inworld.ApiException(
+ throw global::Inworld.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
else
@@ -463,17 +460,15 @@ partial void ProcessPublishVoiceResponseContent(
{
}
- throw new global::Inworld.ApiException(
+ throw global::Inworld.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
diff --git a/src/libs/Inworld/Generated/Inworld.VoicesClient.UpdateVoice.g.cs b/src/libs/Inworld/Generated/Inworld.VoicesClient.UpdateVoice.g.cs
index 6cfe8ef..bb296f9 100644
--- a/src/libs/Inworld/Generated/Inworld.VoicesClient.UpdateVoice.g.cs
+++ b/src/libs/Inworld/Generated/Inworld.VoicesClient.UpdateVoice.g.cs
@@ -371,18 +371,17 @@ partial void ProcessUpdateVoiceResponseContent(
__exception_default = __ex;
}
- throw new global::Inworld.ApiException(
+
+ throw global::Inworld.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content_default ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_default,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content_default,
- ResponseObject = __value_default,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content_default,
+ responseObject: __value_default,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
if (__effectiveReadResponseAsString)
@@ -416,17 +415,15 @@ partial void ProcessUpdateVoiceResponseContent(
}
catch (global::System.Exception __ex)
{
- throw new global::Inworld.ApiException(
+ throw global::Inworld.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
else
@@ -463,17 +460,15 @@ partial void ProcessUpdateVoiceResponseContent(
{
}
- throw new global::Inworld.ApiException(
+ throw global::Inworld.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}