diff --git a/src/libs/GroundX/Generated/GroundX.BucketsClient.BucketCreate.g.cs b/src/libs/GroundX/Generated/GroundX.BucketsClient.BucketCreate.g.cs
index 227b5ce..1dfbb65 100644
--- a/src/libs/GroundX/Generated/GroundX.BucketsClient.BucketCreate.g.cs
+++ b/src/libs/GroundX/Generated/GroundX.BucketsClient.BucketCreate.g.cs
@@ -360,17 +360,16 @@ partial void ProcessBucketCreateResponseContent(
__exception_400 = __ex;
}
- throw new global::GroundX.ApiException(
+
+ throw global::GroundX.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content_400 ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_400,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content_400,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content_400,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
if (__effectiveReadResponseAsString)
@@ -404,17 +403,15 @@ partial void ProcessBucketCreateResponseContent(
}
catch (global::System.Exception __ex)
{
- throw new global::GroundX.ApiException(
+ throw global::GroundX.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
@@ -451,17 +448,15 @@ partial void ProcessBucketCreateResponseContent(
{
}
- throw new global::GroundX.ApiException(
+ throw global::GroundX.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/GroundX/Generated/GroundX.BucketsClient.BucketDelete.g.cs b/src/libs/GroundX/Generated/GroundX.BucketsClient.BucketDelete.g.cs
index 142c961..7c2215d 100644
--- a/src/libs/GroundX/Generated/GroundX.BucketsClient.BucketDelete.g.cs
+++ b/src/libs/GroundX/Generated/GroundX.BucketsClient.BucketDelete.g.cs
@@ -349,17 +349,16 @@ partial void ProcessBucketDeleteResponseContent(
__exception_400 = __ex;
}
- throw new global::GroundX.ApiException(
+
+ throw global::GroundX.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content_400 ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_400,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content_400,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content_400,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
//
if ((int)__response.StatusCode == 401)
@@ -382,17 +381,16 @@ partial void ProcessBucketDeleteResponseContent(
__exception_401 = __ex;
}
- throw new global::GroundX.ApiException(
+
+ throw global::GroundX.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content_401 ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_401,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content_401,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content_401,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
if (__effectiveReadResponseAsString)
@@ -426,17 +424,15 @@ partial void ProcessBucketDeleteResponseContent(
}
catch (global::System.Exception __ex)
{
- throw new global::GroundX.ApiException(
+ throw global::GroundX.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
@@ -473,17 +469,15 @@ partial void ProcessBucketDeleteResponseContent(
{
}
- throw new global::GroundX.ApiException(
+ throw global::GroundX.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/GroundX/Generated/GroundX.BucketsClient.BucketGet.g.cs b/src/libs/GroundX/Generated/GroundX.BucketsClient.BucketGet.g.cs
index adaa0a8..4beee12 100644
--- a/src/libs/GroundX/Generated/GroundX.BucketsClient.BucketGet.g.cs
+++ b/src/libs/GroundX/Generated/GroundX.BucketsClient.BucketGet.g.cs
@@ -349,17 +349,16 @@ partial void ProcessBucketGetResponseContent(
__exception_400 = __ex;
}
- throw new global::GroundX.ApiException(
+
+ throw global::GroundX.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content_400 ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_400,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content_400,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content_400,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
//
if ((int)__response.StatusCode == 401)
@@ -382,17 +381,16 @@ partial void ProcessBucketGetResponseContent(
__exception_401 = __ex;
}
- throw new global::GroundX.ApiException(
+
+ throw global::GroundX.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content_401 ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_401,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content_401,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content_401,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
if (__effectiveReadResponseAsString)
@@ -426,17 +424,15 @@ partial void ProcessBucketGetResponseContent(
}
catch (global::System.Exception __ex)
{
- throw new global::GroundX.ApiException(
+ throw global::GroundX.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
@@ -473,17 +469,15 @@ partial void ProcessBucketGetResponseContent(
{
}
- throw new global::GroundX.ApiException(
+ throw global::GroundX.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/GroundX/Generated/GroundX.BucketsClient.BucketList.g.cs b/src/libs/GroundX/Generated/GroundX.BucketsClient.BucketList.g.cs
index e023bf9..bed63a0 100644
--- a/src/libs/GroundX/Generated/GroundX.BucketsClient.BucketList.g.cs
+++ b/src/libs/GroundX/Generated/GroundX.BucketsClient.BucketList.g.cs
@@ -373,17 +373,15 @@ partial void ProcessBucketListResponseContent(
}
catch (global::System.Exception __ex)
{
- throw new global::GroundX.ApiException(
+ throw global::GroundX.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
@@ -420,17 +418,15 @@ partial void ProcessBucketListResponseContent(
{
}
- throw new global::GroundX.ApiException(
+ throw global::GroundX.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/GroundX/Generated/GroundX.BucketsClient.BucketUpdate.g.cs b/src/libs/GroundX/Generated/GroundX.BucketsClient.BucketUpdate.g.cs
index 4c59b9a..896852e 100644
--- a/src/libs/GroundX/Generated/GroundX.BucketsClient.BucketUpdate.g.cs
+++ b/src/libs/GroundX/Generated/GroundX.BucketsClient.BucketUpdate.g.cs
@@ -369,17 +369,16 @@ partial void ProcessBucketUpdateResponseContent(
__exception_400 = __ex;
}
- throw new global::GroundX.ApiException(
+
+ throw global::GroundX.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content_400 ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_400,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content_400,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content_400,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
//
if ((int)__response.StatusCode == 401)
@@ -402,17 +401,16 @@ partial void ProcessBucketUpdateResponseContent(
__exception_401 = __ex;
}
- throw new global::GroundX.ApiException(
+
+ throw global::GroundX.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content_401 ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_401,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content_401,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content_401,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
if (__effectiveReadResponseAsString)
@@ -446,17 +444,15 @@ partial void ProcessBucketUpdateResponseContent(
}
catch (global::System.Exception __ex)
{
- throw new global::GroundX.ApiException(
+ throw global::GroundX.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
@@ -493,17 +489,15 @@ partial void ProcessBucketUpdateResponseContent(
{
}
- throw new global::GroundX.ApiException(
+ throw global::GroundX.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/GroundX/Generated/GroundX.CustomerClient.CustomerGet.g.cs b/src/libs/GroundX/Generated/GroundX.CustomerClient.CustomerGet.g.cs
index 81f9b78..0fb4b15 100644
--- a/src/libs/GroundX/Generated/GroundX.CustomerClient.CustomerGet.g.cs
+++ b/src/libs/GroundX/Generated/GroundX.CustomerClient.CustomerGet.g.cs
@@ -349,17 +349,15 @@ partial void ProcessCustomerGetResponseContent(
}
catch (global::System.Exception __ex)
{
- throw new global::GroundX.ApiException(
+ throw global::GroundX.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 ProcessCustomerGetResponseContent(
{
}
- throw new global::GroundX.ApiException(
+ throw global::GroundX.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/GroundX/Generated/GroundX.DocumentsClient.DocumentCrawlWebsite.g.cs b/src/libs/GroundX/Generated/GroundX.DocumentsClient.DocumentCrawlWebsite.g.cs
index 4585f3a..2144798 100644
--- a/src/libs/GroundX/Generated/GroundX.DocumentsClient.DocumentCrawlWebsite.g.cs
+++ b/src/libs/GroundX/Generated/GroundX.DocumentsClient.DocumentCrawlWebsite.g.cs
@@ -360,17 +360,16 @@ partial void ProcessDocumentCrawlWebsiteResponseContent(
__exception_400 = __ex;
}
- throw new global::GroundX.ApiException(
+
+ throw global::GroundX.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content_400 ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_400,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content_400,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content_400,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
//
if ((int)__response.StatusCode == 401)
@@ -393,17 +392,16 @@ partial void ProcessDocumentCrawlWebsiteResponseContent(
__exception_401 = __ex;
}
- throw new global::GroundX.ApiException(
+
+ throw global::GroundX.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content_401 ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_401,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content_401,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content_401,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
if (__effectiveReadResponseAsString)
@@ -437,17 +435,15 @@ partial void ProcessDocumentCrawlWebsiteResponseContent(
}
catch (global::System.Exception __ex)
{
- throw new global::GroundX.ApiException(
+ throw global::GroundX.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
@@ -484,17 +480,15 @@ partial void ProcessDocumentCrawlWebsiteResponseContent(
{
}
- throw new global::GroundX.ApiException(
+ throw global::GroundX.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/GroundX/Generated/GroundX.DocumentsClient.DocumentDelete1.g.cs b/src/libs/GroundX/Generated/GroundX.DocumentsClient.DocumentDelete1.g.cs
index 84d9caa..f89703a 100644
--- a/src/libs/GroundX/Generated/GroundX.DocumentsClient.DocumentDelete1.g.cs
+++ b/src/libs/GroundX/Generated/GroundX.DocumentsClient.DocumentDelete1.g.cs
@@ -349,17 +349,16 @@ partial void ProcessDocumentDelete1ResponseContent(
__exception_400 = __ex;
}
- throw new global::GroundX.ApiException(
+
+ throw global::GroundX.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content_400 ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_400,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content_400,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content_400,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
//
if ((int)__response.StatusCode == 401)
@@ -382,17 +381,16 @@ partial void ProcessDocumentDelete1ResponseContent(
__exception_401 = __ex;
}
- throw new global::GroundX.ApiException(
+
+ throw global::GroundX.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content_401 ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_401,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content_401,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content_401,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
if (__effectiveReadResponseAsString)
@@ -426,17 +424,15 @@ partial void ProcessDocumentDelete1ResponseContent(
}
catch (global::System.Exception __ex)
{
- throw new global::GroundX.ApiException(
+ throw global::GroundX.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
@@ -473,17 +469,15 @@ partial void ProcessDocumentDelete1ResponseContent(
{
}
- throw new global::GroundX.ApiException(
+ throw global::GroundX.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/GroundX/Generated/GroundX.DocumentsClient.DocumentGet.g.cs b/src/libs/GroundX/Generated/GroundX.DocumentsClient.DocumentGet.g.cs
index a4afe9b..8b6b0d4 100644
--- a/src/libs/GroundX/Generated/GroundX.DocumentsClient.DocumentGet.g.cs
+++ b/src/libs/GroundX/Generated/GroundX.DocumentsClient.DocumentGet.g.cs
@@ -349,17 +349,16 @@ partial void ProcessDocumentGetResponseContent(
__exception_400 = __ex;
}
- throw new global::GroundX.ApiException(
+
+ throw global::GroundX.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content_400 ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_400,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content_400,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content_400,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
//
if ((int)__response.StatusCode == 401)
@@ -382,17 +381,16 @@ partial void ProcessDocumentGetResponseContent(
__exception_401 = __ex;
}
- throw new global::GroundX.ApiException(
+
+ throw global::GroundX.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content_401 ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_401,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content_401,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content_401,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
if (__effectiveReadResponseAsString)
@@ -426,17 +424,15 @@ partial void ProcessDocumentGetResponseContent(
}
catch (global::System.Exception __ex)
{
- throw new global::GroundX.ApiException(
+ throw global::GroundX.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
@@ -473,17 +469,15 @@ partial void ProcessDocumentGetResponseContent(
{
}
- throw new global::GroundX.ApiException(
+ throw global::GroundX.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/GroundX/Generated/GroundX.DocumentsClient.DocumentGetProcessingStatusById.g.cs b/src/libs/GroundX/Generated/GroundX.DocumentsClient.DocumentGetProcessingStatusById.g.cs
index eb439a0..8621262 100644
--- a/src/libs/GroundX/Generated/GroundX.DocumentsClient.DocumentGetProcessingStatusById.g.cs
+++ b/src/libs/GroundX/Generated/GroundX.DocumentsClient.DocumentGetProcessingStatusById.g.cs
@@ -349,17 +349,16 @@ partial void ProcessDocumentGetProcessingStatusByIdResponseContent(
__exception_400 = __ex;
}
- throw new global::GroundX.ApiException(
+
+ throw global::GroundX.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content_400 ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_400,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content_400,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content_400,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
//
if ((int)__response.StatusCode == 401)
@@ -382,17 +381,16 @@ partial void ProcessDocumentGetProcessingStatusByIdResponseContent(
__exception_401 = __ex;
}
- throw new global::GroundX.ApiException(
+
+ throw global::GroundX.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content_401 ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_401,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content_401,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content_401,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
if (__effectiveReadResponseAsString)
@@ -426,17 +424,15 @@ partial void ProcessDocumentGetProcessingStatusByIdResponseContent(
}
catch (global::System.Exception __ex)
{
- throw new global::GroundX.ApiException(
+ throw global::GroundX.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
@@ -473,17 +469,15 @@ partial void ProcessDocumentGetProcessingStatusByIdResponseContent(
{
}
- throw new global::GroundX.ApiException(
+ throw global::GroundX.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/GroundX/Generated/GroundX.DocumentsClient.DocumentIngestLocal.g.cs b/src/libs/GroundX/Generated/GroundX.DocumentsClient.DocumentIngestLocal.g.cs
index def5a13..6303143 100644
--- a/src/libs/GroundX/Generated/GroundX.DocumentsClient.DocumentIngestLocal.g.cs
+++ b/src/libs/GroundX/Generated/GroundX.DocumentsClient.DocumentIngestLocal.g.cs
@@ -359,17 +359,16 @@ partial void ProcessDocumentIngestLocalResponseContent(
__exception_400 = __ex;
}
- throw new global::GroundX.ApiException(
+
+ throw global::GroundX.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content_400 ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_400,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content_400,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content_400,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
//
if ((int)__response.StatusCode == 401)
@@ -392,17 +391,16 @@ partial void ProcessDocumentIngestLocalResponseContent(
__exception_401 = __ex;
}
- throw new global::GroundX.ApiException(
+
+ throw global::GroundX.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content_401 ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_401,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content_401,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content_401,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
if (__effectiveReadResponseAsString)
@@ -436,17 +434,15 @@ partial void ProcessDocumentIngestLocalResponseContent(
}
catch (global::System.Exception __ex)
{
- throw new global::GroundX.ApiException(
+ throw global::GroundX.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
@@ -483,17 +479,15 @@ partial void ProcessDocumentIngestLocalResponseContent(
{
}
- throw new global::GroundX.ApiException(
+ throw global::GroundX.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/GroundX/Generated/GroundX.DocumentsClient.DocumentIngestRemote.g.cs b/src/libs/GroundX/Generated/GroundX.DocumentsClient.DocumentIngestRemote.g.cs
index c9065cd..895b990 100644
--- a/src/libs/GroundX/Generated/GroundX.DocumentsClient.DocumentIngestRemote.g.cs
+++ b/src/libs/GroundX/Generated/GroundX.DocumentsClient.DocumentIngestRemote.g.cs
@@ -360,17 +360,16 @@ partial void ProcessDocumentIngestRemoteResponseContent(
__exception_400 = __ex;
}
- throw new global::GroundX.ApiException(
+
+ throw global::GroundX.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content_400 ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_400,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content_400,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content_400,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
//
if ((int)__response.StatusCode == 401)
@@ -393,17 +392,16 @@ partial void ProcessDocumentIngestRemoteResponseContent(
__exception_401 = __ex;
}
- throw new global::GroundX.ApiException(
+
+ throw global::GroundX.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content_401 ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_401,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content_401,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content_401,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
if (__effectiveReadResponseAsString)
@@ -437,17 +435,15 @@ partial void ProcessDocumentIngestRemoteResponseContent(
}
catch (global::System.Exception __ex)
{
- throw new global::GroundX.ApiException(
+ throw global::GroundX.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
@@ -484,17 +480,15 @@ partial void ProcessDocumentIngestRemoteResponseContent(
{
}
- throw new global::GroundX.ApiException(
+ throw global::GroundX.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/GroundX/Generated/GroundX.DocumentsClient.DocumentList.g.cs b/src/libs/GroundX/Generated/GroundX.DocumentsClient.DocumentList.g.cs
index 8fedcbe..bf2e2ec 100644
--- a/src/libs/GroundX/Generated/GroundX.DocumentsClient.DocumentList.g.cs
+++ b/src/libs/GroundX/Generated/GroundX.DocumentsClient.DocumentList.g.cs
@@ -421,17 +421,15 @@ partial void ProcessDocumentListResponseContent(
}
catch (global::System.Exception __ex)
{
- throw new global::GroundX.ApiException(
+ throw global::GroundX.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 ProcessDocumentListResponseContent(
{
}
- throw new global::GroundX.ApiException(
+ throw global::GroundX.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/GroundX/Generated/GroundX.DocumentsClient.DocumentLookup.g.cs b/src/libs/GroundX/Generated/GroundX.DocumentsClient.DocumentLookup.g.cs
index cb478da..3bd9344 100644
--- a/src/libs/GroundX/Generated/GroundX.DocumentsClient.DocumentLookup.g.cs
+++ b/src/libs/GroundX/Generated/GroundX.DocumentsClient.DocumentLookup.g.cs
@@ -419,17 +419,16 @@ partial void ProcessDocumentLookupResponseContent(
__exception_400 = __ex;
}
- throw new global::GroundX.ApiException(
+
+ throw global::GroundX.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content_400 ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_400,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content_400,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content_400,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
//
if ((int)__response.StatusCode == 401)
@@ -452,17 +451,16 @@ partial void ProcessDocumentLookupResponseContent(
__exception_401 = __ex;
}
- throw new global::GroundX.ApiException(
+
+ throw global::GroundX.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content_401 ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_401,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content_401,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content_401,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
if (__effectiveReadResponseAsString)
@@ -496,17 +494,15 @@ partial void ProcessDocumentLookupResponseContent(
}
catch (global::System.Exception __ex)
{
- throw new global::GroundX.ApiException(
+ throw global::GroundX.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
@@ -543,17 +539,15 @@ partial void ProcessDocumentLookupResponseContent(
{
}
- throw new global::GroundX.ApiException(
+ throw global::GroundX.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/GroundX/Generated/GroundX.DocumentsClient.DocumentsDelete.g.cs b/src/libs/GroundX/Generated/GroundX.DocumentsClient.DocumentsDelete.g.cs
index 4ff4316..e34cec5 100644
--- a/src/libs/GroundX/Generated/GroundX.DocumentsClient.DocumentsDelete.g.cs
+++ b/src/libs/GroundX/Generated/GroundX.DocumentsClient.DocumentsDelete.g.cs
@@ -352,17 +352,16 @@ partial void ProcessDocumentsDeleteResponseContent(
__exception_400 = __ex;
}
- throw new global::GroundX.ApiException(
+
+ throw global::GroundX.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content_400 ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_400,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content_400,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content_400,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
//
if ((int)__response.StatusCode == 401)
@@ -385,17 +384,16 @@ partial void ProcessDocumentsDeleteResponseContent(
__exception_401 = __ex;
}
- throw new global::GroundX.ApiException(
+
+ throw global::GroundX.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content_401 ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_401,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content_401,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content_401,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
if (__effectiveReadResponseAsString)
@@ -429,17 +427,15 @@ partial void ProcessDocumentsDeleteResponseContent(
}
catch (global::System.Exception __ex)
{
- throw new global::GroundX.ApiException(
+ throw global::GroundX.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
@@ -476,17 +472,15 @@ partial void ProcessDocumentsDeleteResponseContent(
{
}
- throw new global::GroundX.ApiException(
+ throw global::GroundX.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/GroundX/Generated/GroundX.Exceptions.g.cs b/src/libs/GroundX/Generated/GroundX.Exceptions.g.cs
index 7eb4f9c..dda87f6 100644
--- a/src/libs/GroundX/Generated/GroundX.Exceptions.g.cs
+++ b/src/libs/GroundX/Generated/GroundX.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::GroundX.ApiException Create(
+ global::System.Net.HttpStatusCode statusCode,
+ string message,
+ global::System.Exception? innerException = null,
+ global::System.Collections.Generic.IDictionary>? responseHeaders = null)
+ {
+ return new global::GroundX.ApiException(message, innerException, statusCode);
+ }
+
+ ///
+ /// Convenience overload that constructs an with response body and headers populated.
+ ///
+ public static global::GroundX.ApiException Create(
+ global::System.Net.HttpStatusCode statusCode,
+ string message,
+ global::System.Exception? innerException,
+ string? responseBody,
+ global::System.Collections.Generic.Dictionary>? responseHeaders)
+ {
+ var exception = global::GroundX.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::GroundX.ApiException Create(
+ global::System.Net.HttpStatusCode statusCode,
+ string message,
+ global::System.Exception? innerException = null,
+ global::System.Collections.Generic.IDictionary>? responseHeaders = null)
+ {
+ return new global::GroundX.ApiException(message, innerException, statusCode);
+ }
+
+ ///
+ /// Convenience overload that constructs an with response body, object, and headers populated.
+ ///
+ public static global::GroundX.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::GroundX.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/GroundX/Generated/GroundX.GroupsClient.GroupAddBucket.g.cs b/src/libs/GroundX/Generated/GroundX.GroupsClient.GroupAddBucket.g.cs
index 35af3a9..e7de021 100644
--- a/src/libs/GroundX/Generated/GroundX.GroupsClient.GroupAddBucket.g.cs
+++ b/src/libs/GroundX/Generated/GroundX.GroupsClient.GroupAddBucket.g.cs
@@ -358,17 +358,16 @@ partial void ProcessGroupAddBucketResponseContent(
__exception_400 = __ex;
}
- throw new global::GroundX.ApiException(
+
+ throw global::GroundX.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content_400 ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_400,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content_400,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content_400,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
//
if ((int)__response.StatusCode == 401)
@@ -391,17 +390,16 @@ partial void ProcessGroupAddBucketResponseContent(
__exception_401 = __ex;
}
- throw new global::GroundX.ApiException(
+
+ throw global::GroundX.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content_401 ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_401,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content_401,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content_401,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
if (__effectiveReadResponseAsString)
@@ -435,17 +433,15 @@ partial void ProcessGroupAddBucketResponseContent(
}
catch (global::System.Exception __ex)
{
- throw new global::GroundX.ApiException(
+ throw global::GroundX.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
@@ -482,17 +478,15 @@ partial void ProcessGroupAddBucketResponseContent(
{
}
- throw new global::GroundX.ApiException(
+ throw global::GroundX.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/GroundX/Generated/GroundX.GroupsClient.GroupCreate.g.cs b/src/libs/GroundX/Generated/GroundX.GroupsClient.GroupCreate.g.cs
index 65dc940..9802305 100644
--- a/src/libs/GroundX/Generated/GroundX.GroupsClient.GroupCreate.g.cs
+++ b/src/libs/GroundX/Generated/GroundX.GroupsClient.GroupCreate.g.cs
@@ -360,17 +360,16 @@ partial void ProcessGroupCreateResponseContent(
__exception_400 = __ex;
}
- throw new global::GroundX.ApiException(
+
+ throw global::GroundX.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content_400 ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_400,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content_400,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content_400,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
if (__effectiveReadResponseAsString)
@@ -404,17 +403,15 @@ partial void ProcessGroupCreateResponseContent(
}
catch (global::System.Exception __ex)
{
- throw new global::GroundX.ApiException(
+ throw global::GroundX.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
@@ -451,17 +448,15 @@ partial void ProcessGroupCreateResponseContent(
{
}
- throw new global::GroundX.ApiException(
+ throw global::GroundX.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/GroundX/Generated/GroundX.GroupsClient.GroupDelete.g.cs b/src/libs/GroundX/Generated/GroundX.GroupsClient.GroupDelete.g.cs
index 9deeb67..46803dc 100644
--- a/src/libs/GroundX/Generated/GroundX.GroupsClient.GroupDelete.g.cs
+++ b/src/libs/GroundX/Generated/GroundX.GroupsClient.GroupDelete.g.cs
@@ -349,17 +349,16 @@ partial void ProcessGroupDeleteResponseContent(
__exception_400 = __ex;
}
- throw new global::GroundX.ApiException(
+
+ throw global::GroundX.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content_400 ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_400,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content_400,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content_400,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
//
if ((int)__response.StatusCode == 401)
@@ -382,17 +381,16 @@ partial void ProcessGroupDeleteResponseContent(
__exception_401 = __ex;
}
- throw new global::GroundX.ApiException(
+
+ throw global::GroundX.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content_401 ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_401,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content_401,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content_401,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
if (__effectiveReadResponseAsString)
@@ -426,17 +424,15 @@ partial void ProcessGroupDeleteResponseContent(
}
catch (global::System.Exception __ex)
{
- throw new global::GroundX.ApiException(
+ throw global::GroundX.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
@@ -473,17 +469,15 @@ partial void ProcessGroupDeleteResponseContent(
{
}
- throw new global::GroundX.ApiException(
+ throw global::GroundX.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/GroundX/Generated/GroundX.GroupsClient.GroupGet.g.cs b/src/libs/GroundX/Generated/GroundX.GroupsClient.GroupGet.g.cs
index 1ca6f40..2c44c4d 100644
--- a/src/libs/GroundX/Generated/GroundX.GroupsClient.GroupGet.g.cs
+++ b/src/libs/GroundX/Generated/GroundX.GroupsClient.GroupGet.g.cs
@@ -349,17 +349,16 @@ partial void ProcessGroupGetResponseContent(
__exception_400 = __ex;
}
- throw new global::GroundX.ApiException(
+
+ throw global::GroundX.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content_400 ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_400,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content_400,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content_400,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
//
if ((int)__response.StatusCode == 401)
@@ -382,17 +381,16 @@ partial void ProcessGroupGetResponseContent(
__exception_401 = __ex;
}
- throw new global::GroundX.ApiException(
+
+ throw global::GroundX.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content_401 ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_401,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content_401,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content_401,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
if (__effectiveReadResponseAsString)
@@ -426,17 +424,15 @@ partial void ProcessGroupGetResponseContent(
}
catch (global::System.Exception __ex)
{
- throw new global::GroundX.ApiException(
+ throw global::GroundX.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
@@ -473,17 +469,15 @@ partial void ProcessGroupGetResponseContent(
{
}
- throw new global::GroundX.ApiException(
+ throw global::GroundX.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/GroundX/Generated/GroundX.GroupsClient.GroupList.g.cs b/src/libs/GroundX/Generated/GroundX.GroupsClient.GroupList.g.cs
index 97bf74e..e91da19 100644
--- a/src/libs/GroundX/Generated/GroundX.GroupsClient.GroupList.g.cs
+++ b/src/libs/GroundX/Generated/GroundX.GroupsClient.GroupList.g.cs
@@ -373,17 +373,15 @@ partial void ProcessGroupListResponseContent(
}
catch (global::System.Exception __ex)
{
- throw new global::GroundX.ApiException(
+ throw global::GroundX.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
@@ -420,17 +418,15 @@ partial void ProcessGroupListResponseContent(
{
}
- throw new global::GroundX.ApiException(
+ throw global::GroundX.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/GroundX/Generated/GroundX.GroupsClient.GroupRemoveBucket.g.cs b/src/libs/GroundX/Generated/GroundX.GroupsClient.GroupRemoveBucket.g.cs
index b406208..9cca3c2 100644
--- a/src/libs/GroundX/Generated/GroundX.GroupsClient.GroupRemoveBucket.g.cs
+++ b/src/libs/GroundX/Generated/GroundX.GroupsClient.GroupRemoveBucket.g.cs
@@ -358,17 +358,16 @@ partial void ProcessGroupRemoveBucketResponseContent(
__exception_400 = __ex;
}
- throw new global::GroundX.ApiException(
+
+ throw global::GroundX.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content_400 ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_400,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content_400,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content_400,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
//
if ((int)__response.StatusCode == 401)
@@ -391,17 +390,16 @@ partial void ProcessGroupRemoveBucketResponseContent(
__exception_401 = __ex;
}
- throw new global::GroundX.ApiException(
+
+ throw global::GroundX.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content_401 ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_401,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content_401,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content_401,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
if (__effectiveReadResponseAsString)
@@ -435,17 +433,15 @@ partial void ProcessGroupRemoveBucketResponseContent(
}
catch (global::System.Exception __ex)
{
- throw new global::GroundX.ApiException(
+ throw global::GroundX.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
@@ -482,17 +478,15 @@ partial void ProcessGroupRemoveBucketResponseContent(
{
}
- throw new global::GroundX.ApiException(
+ throw global::GroundX.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/GroundX/Generated/GroundX.GroupsClient.GroupUpdate.g.cs b/src/libs/GroundX/Generated/GroundX.GroupsClient.GroupUpdate.g.cs
index 26fb944..df07396 100644
--- a/src/libs/GroundX/Generated/GroundX.GroupsClient.GroupUpdate.g.cs
+++ b/src/libs/GroundX/Generated/GroundX.GroupsClient.GroupUpdate.g.cs
@@ -369,17 +369,16 @@ partial void ProcessGroupUpdateResponseContent(
__exception_400 = __ex;
}
- throw new global::GroundX.ApiException(
+
+ throw global::GroundX.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content_400 ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_400,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content_400,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content_400,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
//
if ((int)__response.StatusCode == 401)
@@ -402,17 +401,16 @@ partial void ProcessGroupUpdateResponseContent(
__exception_401 = __ex;
}
- throw new global::GroundX.ApiException(
+
+ throw global::GroundX.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content_401 ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_401,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content_401,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content_401,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
if (__effectiveReadResponseAsString)
@@ -446,17 +444,15 @@ partial void ProcessGroupUpdateResponseContent(
}
catch (global::System.Exception __ex)
{
- throw new global::GroundX.ApiException(
+ throw global::GroundX.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
@@ -493,17 +489,15 @@ partial void ProcessGroupUpdateResponseContent(
{
}
- throw new global::GroundX.ApiException(
+ throw global::GroundX.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/GroundX/Generated/GroundX.HealthClient.HealthGet.g.cs b/src/libs/GroundX/Generated/GroundX.HealthClient.HealthGet.g.cs
index b8ed698..25a20e8 100644
--- a/src/libs/GroundX/Generated/GroundX.HealthClient.HealthGet.g.cs
+++ b/src/libs/GroundX/Generated/GroundX.HealthClient.HealthGet.g.cs
@@ -347,17 +347,16 @@ partial void ProcessHealthGetResponseContent(
__exception_400 = __ex;
}
- throw new global::GroundX.ApiException(
+
+ throw global::GroundX.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content_400 ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_400,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content_400,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content_400,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
if (__effectiveReadResponseAsString)
@@ -391,17 +390,15 @@ partial void ProcessHealthGetResponseContent(
}
catch (global::System.Exception __ex)
{
- throw new global::GroundX.ApiException(
+ throw global::GroundX.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
@@ -438,17 +435,15 @@ partial void ProcessHealthGetResponseContent(
{
}
- throw new global::GroundX.ApiException(
+ throw global::GroundX.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/GroundX/Generated/GroundX.HealthClient.HealthList.g.cs b/src/libs/GroundX/Generated/GroundX.HealthClient.HealthList.g.cs
index 7e3a63e..7314963 100644
--- a/src/libs/GroundX/Generated/GroundX.HealthClient.HealthList.g.cs
+++ b/src/libs/GroundX/Generated/GroundX.HealthClient.HealthList.g.cs
@@ -349,17 +349,15 @@ partial void ProcessHealthListResponseContent(
}
catch (global::System.Exception __ex)
{
- throw new global::GroundX.ApiException(
+ throw global::GroundX.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 ProcessHealthListResponseContent(
{
}
- throw new global::GroundX.ApiException(
+ throw global::GroundX.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/GroundX/Generated/GroundX.SearchClient.SearchContent.g.cs b/src/libs/GroundX/Generated/GroundX.SearchClient.SearchContent.g.cs
index fc08708..3d05261 100644
--- a/src/libs/GroundX/Generated/GroundX.SearchClient.SearchContent.g.cs
+++ b/src/libs/GroundX/Generated/GroundX.SearchClient.SearchContent.g.cs
@@ -411,17 +411,16 @@ partial void ProcessSearchContentResponseContent(
__exception_400 = __ex;
}
- throw new global::GroundX.ApiException(
+
+ throw global::GroundX.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content_400 ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_400,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content_400,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content_400,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
//
if ((int)__response.StatusCode == 401)
@@ -444,17 +443,16 @@ partial void ProcessSearchContentResponseContent(
__exception_401 = __ex;
}
- throw new global::GroundX.ApiException(
+
+ throw global::GroundX.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content_401 ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_401,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content_401,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content_401,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
if (__effectiveReadResponseAsString)
@@ -488,17 +486,15 @@ partial void ProcessSearchContentResponseContent(
}
catch (global::System.Exception __ex)
{
- throw new global::GroundX.ApiException(
+ throw global::GroundX.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
@@ -535,17 +531,15 @@ partial void ProcessSearchContentResponseContent(
{
}
- throw new global::GroundX.ApiException(
+ throw global::GroundX.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/GroundX/Generated/GroundX.SearchClient.SearchDocuments.g.cs b/src/libs/GroundX/Generated/GroundX.SearchClient.SearchDocuments.g.cs
index e38ee80..ecfab46 100644
--- a/src/libs/GroundX/Generated/GroundX.SearchClient.SearchDocuments.g.cs
+++ b/src/libs/GroundX/Generated/GroundX.SearchClient.SearchDocuments.g.cs
@@ -402,17 +402,16 @@ partial void ProcessSearchDocumentsResponseContent(
__exception_400 = __ex;
}
- throw new global::GroundX.ApiException(
+
+ throw global::GroundX.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content_400 ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_400,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content_400,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content_400,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
//
if ((int)__response.StatusCode == 401)
@@ -435,17 +434,16 @@ partial void ProcessSearchDocumentsResponseContent(
__exception_401 = __ex;
}
- throw new global::GroundX.ApiException(
+
+ throw global::GroundX.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content_401 ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_401,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content_401,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content_401,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
if (__effectiveReadResponseAsString)
@@ -479,17 +477,15 @@ partial void ProcessSearchDocumentsResponseContent(
}
catch (global::System.Exception __ex)
{
- throw new global::GroundX.ApiException(
+ throw global::GroundX.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
@@ -526,17 +522,15 @@ partial void ProcessSearchDocumentsResponseContent(
{
}
- throw new global::GroundX.ApiException(
+ throw global::GroundX.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));
}
}