Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/libs/Runway/Generated/Runway.Exceptions.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ public partial class ApiException : global::System.Exception
/// </summary>
public global::System.Net.HttpStatusCode StatusCode { get; }
/// <summary>
/// The response body.
/// The response body as a string, or <c>null</c> if the body could not be read.
/// This is always populated for error responses regardless of the <c>ReadResponseAsString</c> setting.
/// For success-path failures (e.g. deserialization errors), the client attempts a best-effort read.
/// </summary>
public string? ResponseBody { get; set; }
/// <summary>
Expand Down
3 changes: 3 additions & 0 deletions src/libs/Runway/Generated/Runway.IOrganizationClient.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ public partial interface IOrganizationClient : global::System.IDisposable
/// <summary>
/// Gets or sets a value indicating whether the response content should be read as a string.
/// True by default in debug builds, false otherwise.
/// When false, successful responses are deserialized directly from the response stream for better performance.
/// Error responses are always read as strings regardless of this setting,
/// ensuring <see cref="ApiException.ResponseBody"/> is populated.
/// </summary>
public bool ReadResponseAsString { get; set; }

Expand Down
3 changes: 3 additions & 0 deletions src/libs/Runway/Generated/Runway.IRunwayClient.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ public partial interface IRunwayClient : global::System.IDisposable
/// <summary>
/// Gets or sets a value indicating whether the response content should be read as a string.
/// True by default in debug builds, false otherwise.
/// When false, successful responses are deserialized directly from the response stream for better performance.
/// Error responses are always read as strings regardless of this setting,
/// ensuring <see cref="ApiException.ResponseBody"/> is populated.
/// </summary>
public bool ReadResponseAsString { get; set; }

Expand Down
3 changes: 3 additions & 0 deletions src/libs/Runway/Generated/Runway.IStartGeneratingClient.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ public partial interface IStartGeneratingClient : global::System.IDisposable
/// <summary>
/// Gets or sets a value indicating whether the response content should be read as a string.
/// True by default in debug builds, false otherwise.
/// When false, successful responses are deserialized directly from the response stream for better performance.
/// Error responses are always read as strings regardless of this setting,
/// ensuring <see cref="ApiException.ResponseBody"/> is populated.
/// </summary>
public bool ReadResponseAsString { get; set; }

Expand Down
3 changes: 3 additions & 0 deletions src/libs/Runway/Generated/Runway.ITaskManagementClient.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ public partial interface ITaskManagementClient : global::System.IDisposable
/// <summary>
/// Gets or sets a value indicating whether the response content should be read as a string.
/// True by default in debug builds, false otherwise.
/// When false, successful responses are deserialized directly from the response stream for better performance.
/// Error responses are always read as strings regardless of this setting,
/// ensuring <see cref="ApiException.ResponseBody"/> is populated.
/// </summary>
public bool ReadResponseAsString { get; set; }

Expand Down
3 changes: 3 additions & 0 deletions src/libs/Runway/Generated/Runway.IUploadsClient.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ public partial interface IUploadsClient : global::System.IDisposable
/// <summary>
/// Gets or sets a value indicating whether the response content should be read as a string.
/// True by default in debug builds, false otherwise.
/// When false, successful responses are deserialized directly from the response stream for better performance.
/// Error responses are always read as strings regardless of this setting,
/// ensuring <see cref="ApiException.ResponseBody"/> is populated.
/// </summary>
public bool ReadResponseAsString { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,25 @@ partial void ProcessCreateOrganizationUsageResponseContent(
}
catch (global::System.Exception __ex)
{
string? __content = null;
try
{
__content = await __response.Content.ReadAsStringAsync(
#if NET5_0_OR_GREATER
cancellationToken
#endif
).ConfigureAwait(false);
}
catch (global::System.Exception)
{
}

throw new global::Runway.ApiException(
message: __response.ReasonPhrase ?? string.Empty,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
statusCode: __response.StatusCode)
{
ResponseBody = __content,
ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,25 @@ partial void ProcessGetOrganizationResponseContent(
}
catch (global::System.Exception __ex)
{
string? __content = null;
try
{
__content = await __response.Content.ReadAsStringAsync(
#if NET5_0_OR_GREATER
cancellationToken
#endif
).ConfigureAwait(false);
}
catch (global::System.Exception)
{
}

throw new global::Runway.ApiException(
message: __response.ReasonPhrase ?? string.Empty,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
statusCode: __response.StatusCode)
{
ResponseBody = __content,
ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,9 @@ partial void ProcessCreateCharacterPerformanceResponseContent(
}
else
{
var __contentStream_429 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
__value_429 = await global::Runway.Response12.FromJsonStreamAsync(__contentStream_429, JsonSerializerContext).ConfigureAwait(false);
__content_429 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);

__value_429 = global::Runway.Response12.FromJson(__content_429, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
Expand Down Expand Up @@ -199,11 +200,25 @@ partial void ProcessCreateCharacterPerformanceResponseContent(
}
catch (global::System.Exception __ex)
{
string? __content = null;
try
{
__content = await __response.Content.ReadAsStringAsync(
#if NET5_0_OR_GREATER
cancellationToken
#endif
).ConfigureAwait(false);
}
catch (global::System.Exception)
{
}

throw new global::Runway.ApiException(
message: __response.ReasonPhrase ?? string.Empty,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
statusCode: __response.StatusCode)
{
ResponseBody = __content,
ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,9 @@ partial void ProcessCreateImageToVideoResponseContent(
}
else
{
var __contentStream_429 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
__value_429 = await global::Runway.Response4.FromJsonStreamAsync(__contentStream_429, JsonSerializerContext).ConfigureAwait(false);
__content_429 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);

__value_429 = global::Runway.Response4.FromJson(__content_429, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
Expand Down Expand Up @@ -199,11 +200,25 @@ partial void ProcessCreateImageToVideoResponseContent(
}
catch (global::System.Exception __ex)
{
string? __content = null;
try
{
__content = await __response.Content.ReadAsStringAsync(
#if NET5_0_OR_GREATER
cancellationToken
#endif
).ConfigureAwait(false);
}
catch (global::System.Exception)
{
}

throw new global::Runway.ApiException(
message: __response.ReasonPhrase ?? string.Empty,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
statusCode: __response.StatusCode)
{
ResponseBody = __content,
ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,9 @@ partial void ProcessCreateSoundEffectResponseContent(
}
else
{
var __contentStream_429 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
__value_429 = await global::Runway.Response14.FromJsonStreamAsync(__contentStream_429, JsonSerializerContext).ConfigureAwait(false);
__content_429 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);

__value_429 = global::Runway.Response14.FromJson(__content_429, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
Expand Down Expand Up @@ -199,11 +200,25 @@ partial void ProcessCreateSoundEffectResponseContent(
}
catch (global::System.Exception __ex)
{
string? __content = null;
try
{
__content = await __response.Content.ReadAsStringAsync(
#if NET5_0_OR_GREATER
cancellationToken
#endif
).ConfigureAwait(false);
}
catch (global::System.Exception)
{
}

throw new global::Runway.ApiException(
message: __response.ReasonPhrase ?? string.Empty,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
statusCode: __response.StatusCode)
{
ResponseBody = __content,
ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,9 @@ partial void ProcessCreateSpeechToSpeechResponseContent(
}
else
{
var __contentStream_429 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
__value_429 = await global::Runway.Response16.FromJsonStreamAsync(__contentStream_429, JsonSerializerContext).ConfigureAwait(false);
__content_429 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);

__value_429 = global::Runway.Response16.FromJson(__content_429, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
Expand Down Expand Up @@ -199,11 +200,25 @@ partial void ProcessCreateSpeechToSpeechResponseContent(
}
catch (global::System.Exception __ex)
{
string? __content = null;
try
{
__content = await __response.Content.ReadAsStringAsync(
#if NET5_0_OR_GREATER
cancellationToken
#endif
).ConfigureAwait(false);
}
catch (global::System.Exception)
{
}

throw new global::Runway.ApiException(
message: __response.ReasonPhrase ?? string.Empty,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
statusCode: __response.StatusCode)
{
ResponseBody = __content,
ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,9 @@ partial void ProcessCreateTextToImageResponseContent(
}
else
{
var __contentStream_429 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
__value_429 = await global::Runway.Response10.FromJsonStreamAsync(__contentStream_429, JsonSerializerContext).ConfigureAwait(false);
__content_429 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);

__value_429 = global::Runway.Response10.FromJson(__content_429, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
Expand Down Expand Up @@ -199,11 +200,25 @@ partial void ProcessCreateTextToImageResponseContent(
}
catch (global::System.Exception __ex)
{
string? __content = null;
try
{
__content = await __response.Content.ReadAsStringAsync(
#if NET5_0_OR_GREATER
cancellationToken
#endif
).ConfigureAwait(false);
}
catch (global::System.Exception)
{
}

throw new global::Runway.ApiException(
message: __response.ReasonPhrase ?? string.Empty,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
statusCode: __response.StatusCode)
{
ResponseBody = __content,
ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,9 @@ partial void ProcessCreateTextToSpeechResponseContent(
}
else
{
var __contentStream_429 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
__value_429 = await global::Runway.Response18.FromJsonStreamAsync(__contentStream_429, JsonSerializerContext).ConfigureAwait(false);
__content_429 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);

__value_429 = global::Runway.Response18.FromJson(__content_429, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
Expand Down Expand Up @@ -199,11 +200,25 @@ partial void ProcessCreateTextToSpeechResponseContent(
}
catch (global::System.Exception __ex)
{
string? __content = null;
try
{
__content = await __response.Content.ReadAsStringAsync(
#if NET5_0_OR_GREATER
cancellationToken
#endif
).ConfigureAwait(false);
}
catch (global::System.Exception)
{
}

throw new global::Runway.ApiException(
message: __response.ReasonPhrase ?? string.Empty,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
statusCode: __response.StatusCode)
{
ResponseBody = __content,
ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,9 @@ partial void ProcessCreateTextToVideoResponseContent(
}
else
{
var __contentStream_429 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
__value_429 = await global::Runway.Response6.FromJsonStreamAsync(__contentStream_429, JsonSerializerContext).ConfigureAwait(false);
__content_429 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);

__value_429 = global::Runway.Response6.FromJson(__content_429, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
Expand Down Expand Up @@ -199,11 +200,25 @@ partial void ProcessCreateTextToVideoResponseContent(
}
catch (global::System.Exception __ex)
{
string? __content = null;
try
{
__content = await __response.Content.ReadAsStringAsync(
#if NET5_0_OR_GREATER
cancellationToken
#endif
).ConfigureAwait(false);
}
catch (global::System.Exception)
{
}

throw new global::Runway.ApiException(
message: __response.ReasonPhrase ?? string.Empty,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
statusCode: __response.StatusCode)
{
ResponseBody = __content,
ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
Expand Down
Loading