From 736bbf43c97c77865fd8376a46e630800ab83bc4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 24 May 2026 06:33:03 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- .../Generated/WorldLabs.Exceptions.g.cs | 134 ++++++++++++++++++ ...eleteWorldMarbleV1WorldsWorldIdDelete.g.cs | 39 +++-- ...nerateWorldMarbleV1WorldsGeneratePost.g.cs | 39 +++-- ...setMarbleV1MediaAssetsMediaAssetIdGet.g.cs | 39 +++-- ...ationMarbleV1OperationsOperationIdGet.g.cs | 39 +++-- ...ient.GetWorldMarbleV1WorldsWorldIdGet.g.cs | 39 +++-- ...abs.WorldLabsClient.HealthzHealthzGet.g.cs | 24 ++-- ...ient.ListWorldsMarbleV1WorldsListPost.g.cs | 39 +++-- ...oDepthToRgbMarbleV1PanoDepthToRgbPost.g.cs | 39 +++-- ...dMarbleV1MediaAssetsPrepareUploadPost.g.cs | 39 +++-- 10 files changed, 280 insertions(+), 190 deletions(-) diff --git a/src/libs/WorldLabs/Generated/WorldLabs.Exceptions.g.cs b/src/libs/WorldLabs/Generated/WorldLabs.Exceptions.g.cs index cb5af1a..20e37fb 100644 --- a/src/libs/WorldLabs/Generated/WorldLabs.Exceptions.g.cs +++ b/src/libs/WorldLabs/Generated/WorldLabs.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::WorldLabs.ApiException Create( + global::System.Net.HttpStatusCode statusCode, + string message, + global::System.Exception? innerException = null, + global::System.Collections.Generic.IDictionary>? responseHeaders = null) + { + return new global::WorldLabs.ApiException(message, innerException, statusCode); + } + + /// + /// Convenience overload that constructs an with response body and headers populated. + /// + public static global::WorldLabs.ApiException Create( + global::System.Net.HttpStatusCode statusCode, + string message, + global::System.Exception? innerException, + string? responseBody, + global::System.Collections.Generic.Dictionary>? responseHeaders) + { + var exception = global::WorldLabs.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::WorldLabs.ApiException Create( + global::System.Net.HttpStatusCode statusCode, + string message, + global::System.Exception? innerException = null, + global::System.Collections.Generic.IDictionary>? responseHeaders = null) + { + return new global::WorldLabs.ApiException(message, innerException, statusCode); + } + + /// + /// Convenience overload that constructs an with response body, object, and headers populated. + /// + public static global::WorldLabs.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::WorldLabs.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/WorldLabs/Generated/WorldLabs.WorldLabsClient.DeleteWorldMarbleV1WorldsWorldIdDelete.g.cs b/src/libs/WorldLabs/Generated/WorldLabs.WorldLabsClient.DeleteWorldMarbleV1WorldsWorldIdDelete.g.cs index 3ab8f70..95ac42b 100644 --- a/src/libs/WorldLabs/Generated/WorldLabs.WorldLabsClient.DeleteWorldMarbleV1WorldsWorldIdDelete.g.cs +++ b/src/libs/WorldLabs/Generated/WorldLabs.WorldLabsClient.DeleteWorldMarbleV1WorldsWorldIdDelete.g.cs @@ -371,18 +371,17 @@ partial void ProcessDeleteWorldMarbleV1WorldsWorldIdDeleteResponseContent( __exception_422 = __ex; } - throw new global::WorldLabs.ApiException( + + throw global::WorldLabs.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + 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 ProcessDeleteWorldMarbleV1WorldsWorldIdDeleteResponseContent( } catch (global::System.Exception __ex) { - throw new global::WorldLabs.ApiException( + throw global::WorldLabs.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 ProcessDeleteWorldMarbleV1WorldsWorldIdDeleteResponseContent( { } - throw new global::WorldLabs.ApiException( + throw global::WorldLabs.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/WorldLabs/Generated/WorldLabs.WorldLabsClient.GenerateWorldMarbleV1WorldsGeneratePost.g.cs b/src/libs/WorldLabs/Generated/WorldLabs.WorldLabsClient.GenerateWorldMarbleV1WorldsGeneratePost.g.cs index 948ec6c..1ae9c11 100644 --- a/src/libs/WorldLabs/Generated/WorldLabs.WorldLabsClient.GenerateWorldMarbleV1WorldsGeneratePost.g.cs +++ b/src/libs/WorldLabs/Generated/WorldLabs.WorldLabsClient.GenerateWorldMarbleV1WorldsGeneratePost.g.cs @@ -388,18 +388,17 @@ partial void ProcessGenerateWorldMarbleV1WorldsGeneratePostResponseContent( __exception_422 = __ex; } - throw new global::WorldLabs.ApiException( + + throw global::WorldLabs.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -433,17 +432,15 @@ partial void ProcessGenerateWorldMarbleV1WorldsGeneratePostResponseContent( } catch (global::System.Exception __ex) { - throw new global::WorldLabs.ApiException( + throw global::WorldLabs.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 @@ -480,17 +477,15 @@ partial void ProcessGenerateWorldMarbleV1WorldsGeneratePostResponseContent( { } - throw new global::WorldLabs.ApiException( + throw global::WorldLabs.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/WorldLabs/Generated/WorldLabs.WorldLabsClient.GetMediaAssetMarbleV1MediaAssetsMediaAssetIdGet.g.cs b/src/libs/WorldLabs/Generated/WorldLabs.WorldLabsClient.GetMediaAssetMarbleV1MediaAssetsMediaAssetIdGet.g.cs index 9af6b85..e897a25 100644 --- a/src/libs/WorldLabs/Generated/WorldLabs.WorldLabsClient.GetMediaAssetMarbleV1MediaAssetsMediaAssetIdGet.g.cs +++ b/src/libs/WorldLabs/Generated/WorldLabs.WorldLabsClient.GetMediaAssetMarbleV1MediaAssetsMediaAssetIdGet.g.cs @@ -367,18 +367,17 @@ partial void ProcessGetMediaAssetMarbleV1MediaAssetsMediaAssetIdGetResponseConte __exception_422 = __ex; } - throw new global::WorldLabs.ApiException( + + throw global::WorldLabs.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -412,17 +411,15 @@ partial void ProcessGetMediaAssetMarbleV1MediaAssetsMediaAssetIdGetResponseConte } catch (global::System.Exception __ex) { - throw new global::WorldLabs.ApiException( + throw global::WorldLabs.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 @@ -459,17 +456,15 @@ partial void ProcessGetMediaAssetMarbleV1MediaAssetsMediaAssetIdGetResponseConte { } - throw new global::WorldLabs.ApiException( + throw global::WorldLabs.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/WorldLabs/Generated/WorldLabs.WorldLabsClient.GetOperationMarbleV1OperationsOperationIdGet.g.cs b/src/libs/WorldLabs/Generated/WorldLabs.WorldLabsClient.GetOperationMarbleV1OperationsOperationIdGet.g.cs index f047867..0bfda84 100644 --- a/src/libs/WorldLabs/Generated/WorldLabs.WorldLabsClient.GetOperationMarbleV1OperationsOperationIdGet.g.cs +++ b/src/libs/WorldLabs/Generated/WorldLabs.WorldLabsClient.GetOperationMarbleV1OperationsOperationIdGet.g.cs @@ -387,18 +387,17 @@ partial void ProcessGetOperationMarbleV1OperationsOperationIdGetResponseContent( __exception_422 = __ex; } - throw new global::WorldLabs.ApiException( + + throw global::WorldLabs.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -432,17 +431,15 @@ partial void ProcessGetOperationMarbleV1OperationsOperationIdGetResponseContent( } catch (global::System.Exception __ex) { - throw new global::WorldLabs.ApiException( + throw global::WorldLabs.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 @@ -479,17 +476,15 @@ partial void ProcessGetOperationMarbleV1OperationsOperationIdGetResponseContent( { } - throw new global::WorldLabs.ApiException( + throw global::WorldLabs.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/WorldLabs/Generated/WorldLabs.WorldLabsClient.GetWorldMarbleV1WorldsWorldIdGet.g.cs b/src/libs/WorldLabs/Generated/WorldLabs.WorldLabsClient.GetWorldMarbleV1WorldsWorldIdGet.g.cs index d5d3e19..771dec5 100644 --- a/src/libs/WorldLabs/Generated/WorldLabs.WorldLabsClient.GetWorldMarbleV1WorldsWorldIdGet.g.cs +++ b/src/libs/WorldLabs/Generated/WorldLabs.WorldLabsClient.GetWorldMarbleV1WorldsWorldIdGet.g.cs @@ -369,18 +369,17 @@ partial void ProcessGetWorldMarbleV1WorldsWorldIdGetResponseContent( __exception_422 = __ex; } - throw new global::WorldLabs.ApiException( + + throw global::WorldLabs.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -414,17 +413,15 @@ partial void ProcessGetWorldMarbleV1WorldsWorldIdGetResponseContent( } catch (global::System.Exception __ex) { - throw new global::WorldLabs.ApiException( + throw global::WorldLabs.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 @@ -461,17 +458,15 @@ partial void ProcessGetWorldMarbleV1WorldsWorldIdGetResponseContent( { } - throw new global::WorldLabs.ApiException( + throw global::WorldLabs.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/WorldLabs/Generated/WorldLabs.WorldLabsClient.HealthzHealthzGet.g.cs b/src/libs/WorldLabs/Generated/WorldLabs.WorldLabsClient.HealthzHealthzGet.g.cs index 0bbb43a..eb94264 100644 --- a/src/libs/WorldLabs/Generated/WorldLabs.WorldLabsClient.HealthzHealthzGet.g.cs +++ b/src/libs/WorldLabs/Generated/WorldLabs.WorldLabsClient.HealthzHealthzGet.g.cs @@ -347,17 +347,15 @@ partial void ProcessHealthzHealthzGetResponseContent( } catch (global::System.Exception __ex) { - throw new global::WorldLabs.ApiException( + throw global::WorldLabs.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 ProcessHealthzHealthzGetResponseContent( { } - throw new global::WorldLabs.ApiException( + throw global::WorldLabs.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/WorldLabs/Generated/WorldLabs.WorldLabsClient.ListWorldsMarbleV1WorldsListPost.g.cs b/src/libs/WorldLabs/Generated/WorldLabs.WorldLabsClient.ListWorldsMarbleV1WorldsListPost.g.cs index 591ca8a..80b8a5b 100644 --- a/src/libs/WorldLabs/Generated/WorldLabs.WorldLabsClient.ListWorldsMarbleV1WorldsListPost.g.cs +++ b/src/libs/WorldLabs/Generated/WorldLabs.WorldLabsClient.ListWorldsMarbleV1WorldsListPost.g.cs @@ -396,18 +396,17 @@ partial void ProcessListWorldsMarbleV1WorldsListPostResponseContent( __exception_422 = __ex; } - throw new global::WorldLabs.ApiException( + + throw global::WorldLabs.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -441,17 +440,15 @@ partial void ProcessListWorldsMarbleV1WorldsListPostResponseContent( } catch (global::System.Exception __ex) { - throw new global::WorldLabs.ApiException( + throw global::WorldLabs.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 @@ -488,17 +485,15 @@ partial void ProcessListWorldsMarbleV1WorldsListPostResponseContent( { } - throw new global::WorldLabs.ApiException( + throw global::WorldLabs.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/WorldLabs/Generated/WorldLabs.WorldLabsClient.PanoDepthToRgbMarbleV1PanoDepthToRgbPost.g.cs b/src/libs/WorldLabs/Generated/WorldLabs.WorldLabsClient.PanoDepthToRgbMarbleV1PanoDepthToRgbPost.g.cs index f79a148..15a9736 100644 --- a/src/libs/WorldLabs/Generated/WorldLabs.WorldLabsClient.PanoDepthToRgbMarbleV1PanoDepthToRgbPost.g.cs +++ b/src/libs/WorldLabs/Generated/WorldLabs.WorldLabsClient.PanoDepthToRgbMarbleV1PanoDepthToRgbPost.g.cs @@ -404,18 +404,17 @@ partial void ProcessPanoDepthToRgbMarbleV1PanoDepthToRgbPostResponseContent( __exception_422 = __ex; } - throw new global::WorldLabs.ApiException( + + throw global::WorldLabs.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -449,17 +448,15 @@ partial void ProcessPanoDepthToRgbMarbleV1PanoDepthToRgbPostResponseContent( } catch (global::System.Exception __ex) { - throw new global::WorldLabs.ApiException( + throw global::WorldLabs.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 @@ -496,17 +493,15 @@ partial void ProcessPanoDepthToRgbMarbleV1PanoDepthToRgbPostResponseContent( { } - throw new global::WorldLabs.ApiException( + throw global::WorldLabs.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/WorldLabs/Generated/WorldLabs.WorldLabsClient.PrepareMediaAssetUploadMarbleV1MediaAssetsPrepareUploadPost.g.cs b/src/libs/WorldLabs/Generated/WorldLabs.WorldLabsClient.PrepareMediaAssetUploadMarbleV1MediaAssetsPrepareUploadPost.g.cs index a398eed..f3f1c58 100644 --- a/src/libs/WorldLabs/Generated/WorldLabs.WorldLabsClient.PrepareMediaAssetUploadMarbleV1MediaAssetsPrepareUploadPost.g.cs +++ b/src/libs/WorldLabs/Generated/WorldLabs.WorldLabsClient.PrepareMediaAssetUploadMarbleV1MediaAssetsPrepareUploadPost.g.cs @@ -450,18 +450,17 @@ partial void ProcessPrepareMediaAssetUploadMarbleV1MediaAssetsPrepareUploadPostR __exception_422 = __ex; } - throw new global::WorldLabs.ApiException( + + throw global::WorldLabs.ApiException.Create( + statusCode: __response.StatusCode, message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_422, - statusCode: __response.StatusCode) - { - ResponseBody = __content_422, - ResponseObject = __value_422, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -495,17 +494,15 @@ partial void ProcessPrepareMediaAssetUploadMarbleV1MediaAssetsPrepareUploadPostR } catch (global::System.Exception __ex) { - throw new global::WorldLabs.ApiException( + throw global::WorldLabs.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 @@ -542,17 +539,15 @@ partial void ProcessPrepareMediaAssetUploadMarbleV1MediaAssetsPrepareUploadPostR { } - throw new global::WorldLabs.ApiException( + throw global::WorldLabs.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)); } }