From 03db47f57e53cf31faf4f555b79c16a3e0466b8c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 2 Jun 2026 07:13:38 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- .../ScaleAI/Generated/ScaleAI.Exceptions.g.cs | 134 ++++++++++++++++++ .../Generated/ScaleAI.OptionsSupport.g.cs | 81 +++++++++++ .../ScaleAI.ScaleAIClient.AddTaskTags.g.cs | 24 ++-- ...ScaleAI.ScaleAIClient.AssignTeammates.g.cs | 24 ++-- .../ScaleAI.ScaleAIClient.CancelTask.g.cs | 24 ++-- .../ScaleAI.ScaleAIClient.CreateBatch.g.cs | 24 ++-- .../ScaleAI.ScaleAIClient.CreateProject.g.cs | 24 ++-- ...leAI.ScaleAIClient.CreateProjectGroup.g.cs | 24 ++-- .../ScaleAI.ScaleAIClient.CreateTask.g.cs | 24 ++-- ...caleAIClient.CreateTextCollectionTask.g.cs | 24 ++-- .../ScaleAI.ScaleAIClient.DeleteTaskTags.g.cs | 24 ++-- ...leAI.ScaleAIClient.DeleteTaskUniqueId.g.cs | 24 ++-- .../ScaleAI.ScaleAIClient.FinalizeBatch.g.cs | 24 ++-- .../ScaleAI.ScaleAIClient.GetBatch.g.cs | 24 ++-- .../ScaleAI.ScaleAIClient.GetBatchStatus.g.cs | 24 ++-- .../ScaleAI.ScaleAIClient.GetProject.g.cs | 24 ++-- .../ScaleAI.ScaleAIClient.GetTask.g.cs | 24 ++-- .../ScaleAI.ScaleAIClient.ImportFile.g.cs | 24 ++-- ...aleAI.ScaleAIClient.InviteTeamMembers.g.cs | 24 ++-- ...ScaleAI.ScaleAIClient.ListAssignments.g.cs | 24 ++-- .../ScaleAI.ScaleAIClient.ListBatches.g.cs | 24 ++-- ...aleAI.ScaleAIClient.ListProjectGroups.g.cs | 24 ++-- .../ScaleAI.ScaleAIClient.ListProjects.g.cs | 24 ++-- ...aleAI.ScaleAIClient.ListStudioBatches.g.cs | 24 ++-- .../ScaleAI.ScaleAIClient.ListTasks.g.cs | 24 ++-- ...ScaleAI.ScaleAIClient.ListTeamMembers.g.cs | 24 ++-- ...AI.ScaleAIClient.ListTrainingAttempts.g.cs | 24 ++-- ...ScaleAI.ScaleAIClient.PrioritizeBatch.g.cs | 24 ++-- ...leAIClient.ResetStudioBatchPriorities.g.cs | 24 ++-- ...caleAIClient.SetStudioBatchPriorities.g.cs | 24 ++-- ...ScaleAI.ScaleAIClient.SetTaskMetadata.g.cs | 24 ++-- ...aleAI.ScaleAIClient.UnassignTeammates.g.cs | 24 ++-- ...eAI.ScaleAIClient.UpdateProjectParams.g.cs | 24 ++-- ...leAI.ScaleAIClient.UpdateTaskUniqueId.g.cs | 24 ++-- .../ScaleAI.ScaleAIClient.UpdateTeamRole.g.cs | 24 ++-- .../ScaleAI.ScaleAIClient.UploadFile.g.cs | 72 ++++------ 36 files changed, 575 insertions(+), 504 deletions(-) diff --git a/src/libs/ScaleAI/Generated/ScaleAI.Exceptions.g.cs b/src/libs/ScaleAI/Generated/ScaleAI.Exceptions.g.cs index 0001610..923f4a6 100644 --- a/src/libs/ScaleAI/Generated/ScaleAI.Exceptions.g.cs +++ b/src/libs/ScaleAI/Generated/ScaleAI.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::ScaleAI.ApiException Create( + global::System.Net.HttpStatusCode statusCode, + string message, + global::System.Exception? innerException = null, + global::System.Collections.Generic.IDictionary>? responseHeaders = null) + { + return new global::ScaleAI.ApiException(message, innerException, statusCode); + } + + /// + /// Convenience overload that constructs an with response body and headers populated. + /// + public static global::ScaleAI.ApiException Create( + global::System.Net.HttpStatusCode statusCode, + string message, + global::System.Exception? innerException, + string? responseBody, + global::System.Collections.Generic.Dictionary>? responseHeaders) + { + var exception = global::ScaleAI.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::ScaleAI.ApiException Create( + global::System.Net.HttpStatusCode statusCode, + string message, + global::System.Exception? innerException = null, + global::System.Collections.Generic.IDictionary>? responseHeaders = null) + { + return new global::ScaleAI.ApiException(message, innerException, statusCode); + } + + /// + /// Convenience overload that constructs an with response body, object, and headers populated. + /// + public static global::ScaleAI.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::ScaleAI.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/ScaleAI/Generated/ScaleAI.OptionsSupport.g.cs b/src/libs/ScaleAI/Generated/ScaleAI.OptionsSupport.g.cs index 692f1b6..424052f 100644 --- a/src/libs/ScaleAI/Generated/ScaleAI.OptionsSupport.g.cs +++ b/src/libs/ScaleAI/Generated/ScaleAI.OptionsSupport.g.cs @@ -150,6 +150,84 @@ public interface IAutoSDKAuthorizationProvider global::ScaleAI.AutoSDKHookContext context); } + /// + /// Marker keys stamped onto outgoing + /// instances so consumer s — and any + /// other transport-layer code that runs after AutoSDK's send pipeline — can observe whether + /// the resolved Authorization is call-scoped and opt out of overwriting it with a + /// rotation-aware account-level credential. + /// + public static class AutoSDKHttpRequestOptions + { + /// + /// Key under which records the marker. Exposed + /// for handlers that target frameworks older than .NET 5 and need to read the value + /// through the legacy HttpRequestMessage.Properties bag. + /// + public const string AuthorizationOverrideKey = "AutoSDK.AuthorizationOverride"; + +#if NET5_0_OR_GREATER + /// + /// Strongly-typed for + /// the call-scoped Authorization marker on .NET 5+ targets. Consumers should prefer this + /// over the legacy HttpRequestMessage.Properties bag where available. + /// + public static readonly global::System.Net.Http.HttpRequestOptionsKey AuthorizationOverride = + new global::System.Net.Http.HttpRequestOptionsKey(AuthorizationOverrideKey); +#endif + + /// + /// Stamps the call-scoped Authorization marker on . AutoSDK's + /// built-in calls this whenever the + /// resolved auth came from a per-request override or a client-level + /// . Hand-written SDK extensions that set a + /// non-default Authorization header (e.g. a session-scoped bearer returned by an + /// upstream poll) should call this too so downstream rotation handlers know to skip the + /// overwrite. + /// + /// + public static void StampAuthorizationOverride( + global::System.Net.Http.HttpRequestMessage? request) + { + if (request is null) + { + return; + } + +#if NET5_0_OR_GREATER + request.Options.Set(AuthorizationOverride, true); +#else +#pragma warning disable CS0618 // HttpRequestMessage.Properties is obsolete in NET5+, but the only option below it. + request.Properties[AuthorizationOverrideKey] = true; +#pragma warning restore CS0618 +#endif + } + + /// + /// Returns true when previously marked the + /// request as carrying a call-scoped Authorization. + /// + /// + public static bool HasAuthorizationOverride( + global::System.Net.Http.HttpRequestMessage? request) + { + if (request is null) + { + return false; + } + +#if NET5_0_OR_GREATER + return request.Options.TryGetValue(AuthorizationOverride, out var value) && value; +#else +#pragma warning disable CS0618 + return request.Properties.TryGetValue(AuthorizationOverrideKey, out var raw) && + raw is bool flag && + flag; +#pragma warning restore CS0618 +#endif + } + } + /// /// Built-in that consults /// before every outgoing @@ -176,6 +254,7 @@ public sealed class AutoSDKAuthorizationProviderHook : global::ScaleAI.AutoSDKHo ApplyAuthorization(context.Request, perRequest[index]); } + global::ScaleAI.AutoSDKHttpRequestOptions.StampAuthorizationOverride(context.Request); return; } @@ -195,6 +274,8 @@ public sealed class AutoSDKAuthorizationProviderHook : global::ScaleAI.AutoSDKHo { ApplyAuthorization(context.Request, resolved[index]); } + + global::ScaleAI.AutoSDKHttpRequestOptions.StampAuthorizationOverride(context.Request); } private static void ApplyAuthorization( diff --git a/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.AddTaskTags.g.cs b/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.AddTaskTags.g.cs index dc88e8b..9492d05 100644 --- a/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.AddTaskTags.g.cs +++ b/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.AddTaskTags.g.cs @@ -378,17 +378,15 @@ partial void ProcessAddTaskTagsResponseContent( } catch (global::System.Exception __ex) { - throw new global::ScaleAI.ApiException( + throw global::ScaleAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -425,17 +423,15 @@ partial void ProcessAddTaskTagsResponseContent( { } - throw new global::ScaleAI.ApiException( + throw global::ScaleAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/ScaleAI/Generated/ScaleAI.ScaleAIClient.AssignTeammates.g.cs b/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.AssignTeammates.g.cs index cce534d..6b3052b 100644 --- a/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.AssignTeammates.g.cs +++ b/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.AssignTeammates.g.cs @@ -367,17 +367,15 @@ partial void ProcessAssignTeammatesResponseContent( } catch (global::System.Exception __ex) { - throw new global::ScaleAI.ApiException( + throw global::ScaleAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -412,17 +410,15 @@ partial void ProcessAssignTeammatesResponseContent( { } - throw new global::ScaleAI.ApiException( + throw global::ScaleAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/ScaleAI/Generated/ScaleAI.ScaleAIClient.CancelTask.g.cs b/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.CancelTask.g.cs index 3e6d4b6..e5fac1b 100644 --- a/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.CancelTask.g.cs +++ b/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.CancelTask.g.cs @@ -370,17 +370,15 @@ partial void ProcessCancelTaskResponseContent( } catch (global::System.Exception __ex) { - throw new global::ScaleAI.ApiException( + throw global::ScaleAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -417,17 +415,15 @@ partial void ProcessCancelTaskResponseContent( { } - throw new global::ScaleAI.ApiException( + throw global::ScaleAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/ScaleAI/Generated/ScaleAI.ScaleAIClient.CreateBatch.g.cs b/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.CreateBatch.g.cs index 45cf86b..9e6b945 100644 --- a/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.CreateBatch.g.cs +++ b/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.CreateBatch.g.cs @@ -369,17 +369,15 @@ partial void ProcessCreateBatchResponseContent( } catch (global::System.Exception __ex) { - throw new global::ScaleAI.ApiException( + throw global::ScaleAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -416,17 +414,15 @@ partial void ProcessCreateBatchResponseContent( { } - throw new global::ScaleAI.ApiException( + throw global::ScaleAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/ScaleAI/Generated/ScaleAI.ScaleAIClient.CreateProject.g.cs b/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.CreateProject.g.cs index 57a3c46..f0bacb0 100644 --- a/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.CreateProject.g.cs +++ b/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.CreateProject.g.cs @@ -369,17 +369,15 @@ partial void ProcessCreateProjectResponseContent( } catch (global::System.Exception __ex) { - throw new global::ScaleAI.ApiException( + throw global::ScaleAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -416,17 +414,15 @@ partial void ProcessCreateProjectResponseContent( { } - throw new global::ScaleAI.ApiException( + throw global::ScaleAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/ScaleAI/Generated/ScaleAI.ScaleAIClient.CreateProjectGroup.g.cs b/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.CreateProjectGroup.g.cs index 25df004..302f3fa 100644 --- a/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.CreateProjectGroup.g.cs +++ b/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.CreateProjectGroup.g.cs @@ -376,17 +376,15 @@ partial void ProcessCreateProjectGroupResponseContent( } catch (global::System.Exception __ex) { - throw new global::ScaleAI.ApiException( + throw global::ScaleAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -421,17 +419,15 @@ partial void ProcessCreateProjectGroupResponseContent( { } - throw new global::ScaleAI.ApiException( + throw global::ScaleAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/ScaleAI/Generated/ScaleAI.ScaleAIClient.CreateTask.g.cs b/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.CreateTask.g.cs index 5c25048..7cea83c 100644 --- a/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.CreateTask.g.cs +++ b/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.CreateTask.g.cs @@ -369,17 +369,15 @@ partial void ProcessCreateTaskResponseContent( } catch (global::System.Exception __ex) { - throw new global::ScaleAI.ApiException( + throw global::ScaleAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -416,17 +414,15 @@ partial void ProcessCreateTaskResponseContent( { } - throw new global::ScaleAI.ApiException( + throw global::ScaleAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/ScaleAI/Generated/ScaleAI.ScaleAIClient.CreateTextCollectionTask.g.cs b/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.CreateTextCollectionTask.g.cs index 2727222..aef61e8 100644 --- a/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.CreateTextCollectionTask.g.cs +++ b/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.CreateTextCollectionTask.g.cs @@ -369,17 +369,15 @@ partial void ProcessCreateTextCollectionTaskResponseContent( } catch (global::System.Exception __ex) { - throw new global::ScaleAI.ApiException( + throw global::ScaleAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -416,17 +414,15 @@ partial void ProcessCreateTextCollectionTaskResponseContent( { } - throw new global::ScaleAI.ApiException( + throw global::ScaleAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/ScaleAI/Generated/ScaleAI.ScaleAIClient.DeleteTaskTags.g.cs b/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.DeleteTaskTags.g.cs index 7b84b95..851679d 100644 --- a/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.DeleteTaskTags.g.cs +++ b/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.DeleteTaskTags.g.cs @@ -378,17 +378,15 @@ partial void ProcessDeleteTaskTagsResponseContent( } catch (global::System.Exception __ex) { - throw new global::ScaleAI.ApiException( + throw global::ScaleAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -425,17 +423,15 @@ partial void ProcessDeleteTaskTagsResponseContent( { } - throw new global::ScaleAI.ApiException( + throw global::ScaleAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/ScaleAI/Generated/ScaleAI.ScaleAIClient.DeleteTaskUniqueId.g.cs b/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.DeleteTaskUniqueId.g.cs index 2ca6f7b..932f058 100644 --- a/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.DeleteTaskUniqueId.g.cs +++ b/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.DeleteTaskUniqueId.g.cs @@ -358,17 +358,15 @@ partial void ProcessDeleteTaskUniqueIdResponseContent( } catch (global::System.Exception __ex) { - throw new global::ScaleAI.ApiException( + throw global::ScaleAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -405,17 +403,15 @@ partial void ProcessDeleteTaskUniqueIdResponseContent( { } - throw new global::ScaleAI.ApiException( + throw global::ScaleAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/ScaleAI/Generated/ScaleAI.ScaleAIClient.FinalizeBatch.g.cs b/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.FinalizeBatch.g.cs index e33f78d..83fff7d 100644 --- a/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.FinalizeBatch.g.cs +++ b/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.FinalizeBatch.g.cs @@ -358,17 +358,15 @@ partial void ProcessFinalizeBatchResponseContent( } catch (global::System.Exception __ex) { - throw new global::ScaleAI.ApiException( + throw global::ScaleAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -405,17 +403,15 @@ partial void ProcessFinalizeBatchResponseContent( { } - throw new global::ScaleAI.ApiException( + throw global::ScaleAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/ScaleAI/Generated/ScaleAI.ScaleAIClient.GetBatch.g.cs b/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.GetBatch.g.cs index 6e021c1..99eb5f5 100644 --- a/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.GetBatch.g.cs +++ b/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.GetBatch.g.cs @@ -358,17 +358,15 @@ partial void ProcessGetBatchResponseContent( } catch (global::System.Exception __ex) { - throw new global::ScaleAI.ApiException( + throw global::ScaleAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -405,17 +403,15 @@ partial void ProcessGetBatchResponseContent( { } - throw new global::ScaleAI.ApiException( + throw global::ScaleAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/ScaleAI/Generated/ScaleAI.ScaleAIClient.GetBatchStatus.g.cs b/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.GetBatchStatus.g.cs index 4dff02c..d48d811 100644 --- a/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.GetBatchStatus.g.cs +++ b/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.GetBatchStatus.g.cs @@ -358,17 +358,15 @@ partial void ProcessGetBatchStatusResponseContent( } catch (global::System.Exception __ex) { - throw new global::ScaleAI.ApiException( + throw global::ScaleAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -405,17 +403,15 @@ partial void ProcessGetBatchStatusResponseContent( { } - throw new global::ScaleAI.ApiException( + throw global::ScaleAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/ScaleAI/Generated/ScaleAI.ScaleAIClient.GetProject.g.cs b/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.GetProject.g.cs index d648a63..7cc4b3c 100644 --- a/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.GetProject.g.cs +++ b/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.GetProject.g.cs @@ -358,17 +358,15 @@ partial void ProcessGetProjectResponseContent( } catch (global::System.Exception __ex) { - throw new global::ScaleAI.ApiException( + throw global::ScaleAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -405,17 +403,15 @@ partial void ProcessGetProjectResponseContent( { } - throw new global::ScaleAI.ApiException( + throw global::ScaleAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/ScaleAI/Generated/ScaleAI.ScaleAIClient.GetTask.g.cs b/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.GetTask.g.cs index f9d40c4..7bc1fd6 100644 --- a/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.GetTask.g.cs +++ b/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.GetTask.g.cs @@ -358,17 +358,15 @@ partial void ProcessGetTaskResponseContent( } catch (global::System.Exception __ex) { - throw new global::ScaleAI.ApiException( + throw global::ScaleAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -405,17 +403,15 @@ partial void ProcessGetTaskResponseContent( { } - throw new global::ScaleAI.ApiException( + throw global::ScaleAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/ScaleAI/Generated/ScaleAI.ScaleAIClient.ImportFile.g.cs b/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.ImportFile.g.cs index 4f6ca41..c28b527 100644 --- a/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.ImportFile.g.cs +++ b/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.ImportFile.g.cs @@ -369,17 +369,15 @@ partial void ProcessImportFileResponseContent( } catch (global::System.Exception __ex) { - throw new global::ScaleAI.ApiException( + throw global::ScaleAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -416,17 +414,15 @@ partial void ProcessImportFileResponseContent( { } - throw new global::ScaleAI.ApiException( + throw global::ScaleAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/ScaleAI/Generated/ScaleAI.ScaleAIClient.InviteTeamMembers.g.cs b/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.InviteTeamMembers.g.cs index a176a13..ffff7aa 100644 --- a/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.InviteTeamMembers.g.cs +++ b/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.InviteTeamMembers.g.cs @@ -369,17 +369,15 @@ partial void ProcessInviteTeamMembersResponseContent( } catch (global::System.Exception __ex) { - throw new global::ScaleAI.ApiException( + throw global::ScaleAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -416,17 +414,15 @@ partial void ProcessInviteTeamMembersResponseContent( { } - throw new global::ScaleAI.ApiException( + throw global::ScaleAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/ScaleAI/Generated/ScaleAI.ScaleAIClient.ListAssignments.g.cs b/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.ListAssignments.g.cs index 7af337b..bb711b6 100644 --- a/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.ListAssignments.g.cs +++ b/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.ListAssignments.g.cs @@ -347,17 +347,15 @@ partial void ProcessListAssignmentsResponseContent( } catch (global::System.Exception __ex) { - throw new global::ScaleAI.ApiException( + throw global::ScaleAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -392,17 +390,15 @@ partial void ProcessListAssignmentsResponseContent( { } - throw new global::ScaleAI.ApiException( + throw global::ScaleAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/ScaleAI/Generated/ScaleAI.ScaleAIClient.ListBatches.g.cs b/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.ListBatches.g.cs index cc6e8fa..03251bd 100644 --- a/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.ListBatches.g.cs +++ b/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.ListBatches.g.cs @@ -421,17 +421,15 @@ partial void ProcessListBatchesResponseContent( } catch (global::System.Exception __ex) { - throw new global::ScaleAI.ApiException( + throw global::ScaleAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -468,17 +466,15 @@ partial void ProcessListBatchesResponseContent( { } - throw new global::ScaleAI.ApiException( + throw global::ScaleAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/ScaleAI/Generated/ScaleAI.ScaleAIClient.ListProjectGroups.g.cs b/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.ListProjectGroups.g.cs index e464753..8cd9ab9 100644 --- a/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.ListProjectGroups.g.cs +++ b/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.ListProjectGroups.g.cs @@ -356,17 +356,15 @@ partial void ProcessListProjectGroupsResponseContent( } catch (global::System.Exception __ex) { - throw new global::ScaleAI.ApiException( + throw global::ScaleAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -401,17 +399,15 @@ partial void ProcessListProjectGroupsResponseContent( { } - throw new global::ScaleAI.ApiException( + throw global::ScaleAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/ScaleAI/Generated/ScaleAI.ScaleAIClient.ListProjects.g.cs b/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.ListProjects.g.cs index 3859aac..ab1d6b5 100644 --- a/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.ListProjects.g.cs +++ b/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.ListProjects.g.cs @@ -361,17 +361,15 @@ partial void ProcessListProjectsResponseContent( } catch (global::System.Exception __ex) { - throw new global::ScaleAI.ApiException( + throw global::ScaleAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -408,17 +406,15 @@ partial void ProcessListProjectsResponseContent( { } - throw new global::ScaleAI.ApiException( + throw global::ScaleAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/ScaleAI/Generated/ScaleAI.ScaleAIClient.ListStudioBatches.g.cs b/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.ListStudioBatches.g.cs index 75e5c02..41d8c68 100644 --- a/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.ListStudioBatches.g.cs +++ b/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.ListStudioBatches.g.cs @@ -347,17 +347,15 @@ partial void ProcessListStudioBatchesResponseContent( } catch (global::System.Exception __ex) { - throw new global::ScaleAI.ApiException( + throw global::ScaleAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -392,17 +390,15 @@ partial void ProcessListStudioBatchesResponseContent( { } - throw new global::ScaleAI.ApiException( + throw global::ScaleAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/ScaleAI/Generated/ScaleAI.ScaleAIClient.ListTasks.g.cs b/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.ListTasks.g.cs index 22bba7a..d07504b 100644 --- a/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.ListTasks.g.cs +++ b/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.ListTasks.g.cs @@ -491,17 +491,15 @@ partial void ProcessListTasksResponseContent( } catch (global::System.Exception __ex) { - throw new global::ScaleAI.ApiException( + throw global::ScaleAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -538,17 +536,15 @@ partial void ProcessListTasksResponseContent( { } - throw new global::ScaleAI.ApiException( + throw global::ScaleAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/ScaleAI/Generated/ScaleAI.ScaleAIClient.ListTeamMembers.g.cs b/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.ListTeamMembers.g.cs index f07f6a2..674c52a 100644 --- a/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.ListTeamMembers.g.cs +++ b/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.ListTeamMembers.g.cs @@ -349,17 +349,15 @@ partial void ProcessListTeamMembersResponseContent( } catch (global::System.Exception __ex) { - throw new global::ScaleAI.ApiException( + throw global::ScaleAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -396,17 +394,15 @@ partial void ProcessListTeamMembersResponseContent( { } - throw new global::ScaleAI.ApiException( + throw global::ScaleAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/ScaleAI/Generated/ScaleAI.ScaleAIClient.ListTrainingAttempts.g.cs b/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.ListTrainingAttempts.g.cs index 13a0ede..5b532c5 100644 --- a/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.ListTrainingAttempts.g.cs +++ b/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.ListTrainingAttempts.g.cs @@ -389,17 +389,15 @@ partial void ProcessListTrainingAttemptsResponseContent( } catch (global::System.Exception __ex) { - throw new global::ScaleAI.ApiException( + throw global::ScaleAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -434,17 +432,15 @@ partial void ProcessListTrainingAttemptsResponseContent( { } - throw new global::ScaleAI.ApiException( + throw global::ScaleAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/ScaleAI/Generated/ScaleAI.ScaleAIClient.PrioritizeBatch.g.cs b/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.PrioritizeBatch.g.cs index c870e9e..b6f523d 100644 --- a/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.PrioritizeBatch.g.cs +++ b/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.PrioritizeBatch.g.cs @@ -378,17 +378,15 @@ partial void ProcessPrioritizeBatchResponseContent( } catch (global::System.Exception __ex) { - throw new global::ScaleAI.ApiException( + throw global::ScaleAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -425,17 +423,15 @@ partial void ProcessPrioritizeBatchResponseContent( { } - throw new global::ScaleAI.ApiException( + throw global::ScaleAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/ScaleAI/Generated/ScaleAI.ScaleAIClient.ResetStudioBatchPriorities.g.cs b/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.ResetStudioBatchPriorities.g.cs index b194ea2..9679eb6 100644 --- a/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.ResetStudioBatchPriorities.g.cs +++ b/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.ResetStudioBatchPriorities.g.cs @@ -367,17 +367,15 @@ partial void ProcessResetStudioBatchPrioritiesResponseContent( } catch (global::System.Exception __ex) { - throw new global::ScaleAI.ApiException( + throw global::ScaleAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -412,17 +410,15 @@ partial void ProcessResetStudioBatchPrioritiesResponseContent( { } - throw new global::ScaleAI.ApiException( + throw global::ScaleAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/ScaleAI/Generated/ScaleAI.ScaleAIClient.SetStudioBatchPriorities.g.cs b/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.SetStudioBatchPriorities.g.cs index c2a53bd..23a2ad3 100644 --- a/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.SetStudioBatchPriorities.g.cs +++ b/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.SetStudioBatchPriorities.g.cs @@ -367,17 +367,15 @@ partial void ProcessSetStudioBatchPrioritiesResponseContent( } catch (global::System.Exception __ex) { - throw new global::ScaleAI.ApiException( + throw global::ScaleAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -412,17 +410,15 @@ partial void ProcessSetStudioBatchPrioritiesResponseContent( { } - throw new global::ScaleAI.ApiException( + throw global::ScaleAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/ScaleAI/Generated/ScaleAI.ScaleAIClient.SetTaskMetadata.g.cs b/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.SetTaskMetadata.g.cs index f38fb4e..fdeef80 100644 --- a/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.SetTaskMetadata.g.cs +++ b/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.SetTaskMetadata.g.cs @@ -378,17 +378,15 @@ partial void ProcessSetTaskMetadataResponseContent( } catch (global::System.Exception __ex) { - throw new global::ScaleAI.ApiException( + throw global::ScaleAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -425,17 +423,15 @@ partial void ProcessSetTaskMetadataResponseContent( { } - throw new global::ScaleAI.ApiException( + throw global::ScaleAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/ScaleAI/Generated/ScaleAI.ScaleAIClient.UnassignTeammates.g.cs b/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.UnassignTeammates.g.cs index f2e8384..68a5dce 100644 --- a/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.UnassignTeammates.g.cs +++ b/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.UnassignTeammates.g.cs @@ -367,17 +367,15 @@ partial void ProcessUnassignTeammatesResponseContent( } catch (global::System.Exception __ex) { - throw new global::ScaleAI.ApiException( + throw global::ScaleAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -412,17 +410,15 @@ partial void ProcessUnassignTeammatesResponseContent( { } - throw new global::ScaleAI.ApiException( + throw global::ScaleAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/ScaleAI/Generated/ScaleAI.ScaleAIClient.UpdateProjectParams.g.cs b/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.UpdateProjectParams.g.cs index 7546ee9..4fcf99d 100644 --- a/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.UpdateProjectParams.g.cs +++ b/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.UpdateProjectParams.g.cs @@ -378,17 +378,15 @@ partial void ProcessUpdateProjectParamsResponseContent( } catch (global::System.Exception __ex) { - throw new global::ScaleAI.ApiException( + throw global::ScaleAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -425,17 +423,15 @@ partial void ProcessUpdateProjectParamsResponseContent( { } - throw new global::ScaleAI.ApiException( + throw global::ScaleAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/ScaleAI/Generated/ScaleAI.ScaleAIClient.UpdateTaskUniqueId.g.cs b/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.UpdateTaskUniqueId.g.cs index 82e7c97..15ce15b 100644 --- a/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.UpdateTaskUniqueId.g.cs +++ b/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.UpdateTaskUniqueId.g.cs @@ -378,17 +378,15 @@ partial void ProcessUpdateTaskUniqueIdResponseContent( } catch (global::System.Exception __ex) { - throw new global::ScaleAI.ApiException( + throw global::ScaleAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -425,17 +423,15 @@ partial void ProcessUpdateTaskUniqueIdResponseContent( { } - throw new global::ScaleAI.ApiException( + throw global::ScaleAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/ScaleAI/Generated/ScaleAI.ScaleAIClient.UpdateTeamRole.g.cs b/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.UpdateTeamRole.g.cs index 8a7ac7c..ffe6bc3 100644 --- a/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.UpdateTeamRole.g.cs +++ b/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.UpdateTeamRole.g.cs @@ -369,17 +369,15 @@ partial void ProcessUpdateTeamRoleResponseContent( } catch (global::System.Exception __ex) { - throw new global::ScaleAI.ApiException( + throw global::ScaleAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -416,17 +414,15 @@ partial void ProcessUpdateTeamRoleResponseContent( { } - throw new global::ScaleAI.ApiException( + throw global::ScaleAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/ScaleAI/Generated/ScaleAI.ScaleAIClient.UploadFile.g.cs b/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.UploadFile.g.cs index 3f61840..b9e0aef 100644 --- a/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.UploadFile.g.cs +++ b/src/libs/ScaleAI/Generated/ScaleAI.ScaleAIClient.UploadFile.g.cs @@ -438,17 +438,15 @@ request.Filename is null } catch (global::System.Exception __ex) { - throw new global::ScaleAI.ApiException( + throw global::ScaleAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -485,17 +483,15 @@ request.Filename is null { } - throw new global::ScaleAI.ApiException( + throw global::ScaleAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } @@ -957,17 +953,15 @@ request.Filename is null } catch (global::System.Exception __ex) { - throw new global::ScaleAI.ApiException( + throw global::ScaleAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -1000,17 +994,15 @@ request.Filename is null { } - throw new global::ScaleAI.ApiException( + throw global::ScaleAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } @@ -1425,17 +1417,15 @@ request.Filename is null } catch (global::System.Exception __ex) { - throw new global::ScaleAI.ApiException( + throw global::ScaleAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -1472,17 +1462,15 @@ request.Filename is null { } - throw new global::ScaleAI.ApiException( + throw global::ScaleAI.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } }