diff --git a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminCreateBot.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminCreateBot.g.cs index 9243972..b3b3944 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminCreateBot.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminCreateBot.g.cs @@ -354,17 +354,16 @@ await AdminCreateBotAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -391,17 +390,15 @@ await AdminCreateBotAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -429,17 +426,15 @@ await AdminCreateBotAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.AdminClient.AdminCreateIntegration.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminCreateIntegration.g.cs index 214a297..7c8ee71 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminCreateIntegration.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminCreateIntegration.g.cs @@ -354,17 +354,16 @@ await AdminCreateIntegrationAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -391,17 +390,15 @@ await AdminCreateIntegrationAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -429,17 +426,15 @@ await AdminCreateIntegrationAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.AdminClient.AdminCreateWorkspace.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminCreateWorkspace.g.cs index b17f14d..a1c1bef 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminCreateWorkspace.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminCreateWorkspace.g.cs @@ -344,17 +344,16 @@ await AdminCreateWorkspaceAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -381,17 +380,15 @@ await AdminCreateWorkspaceAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -419,17 +416,15 @@ await AdminCreateWorkspaceAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.AdminClient.AdminCreateWorkspaceMember.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminCreateWorkspaceMember.g.cs index 97f725b..f3fb11a 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminCreateWorkspaceMember.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminCreateWorkspaceMember.g.cs @@ -354,17 +354,16 @@ await AdminCreateWorkspaceMemberAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -391,17 +390,15 @@ await AdminCreateWorkspaceMemberAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -429,17 +426,15 @@ await AdminCreateWorkspaceMemberAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.AdminClient.AdminDeleteBot.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminDeleteBot.g.cs index 75f0d7d..3912985 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminDeleteBot.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminDeleteBot.g.cs @@ -363,17 +363,16 @@ await AdminDeleteBotAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -400,17 +399,15 @@ await AdminDeleteBotAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ await AdminDeleteBotAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.AdminClient.AdminDeleteBotIssue.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminDeleteBotIssue.g.cs index e091835..2a9c8f5 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminDeleteBotIssue.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminDeleteBotIssue.g.cs @@ -372,17 +372,16 @@ await AdminDeleteBotIssueAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -409,17 +408,15 @@ await AdminDeleteBotIssueAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -447,17 +444,15 @@ await AdminDeleteBotIssueAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.AdminClient.AdminDeleteIntegration.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminDeleteIntegration.g.cs index 3c6c77c..123bb2a 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminDeleteIntegration.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminDeleteIntegration.g.cs @@ -363,17 +363,16 @@ await AdminDeleteIntegrationAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -400,17 +399,15 @@ await AdminDeleteIntegrationAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ await AdminDeleteIntegrationAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.AdminClient.AdminDeleteWorkspace.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminDeleteWorkspace.g.cs index 80b2806..9fa2eec 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminDeleteWorkspace.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminDeleteWorkspace.g.cs @@ -353,17 +353,16 @@ await AdminDeleteWorkspaceAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -390,17 +389,15 @@ await AdminDeleteWorkspaceAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -428,17 +425,15 @@ await AdminDeleteWorkspaceAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.AdminClient.AdminDeleteWorkspaceMember.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminDeleteWorkspaceMember.g.cs index b2f68f8..2453ad1 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminDeleteWorkspaceMember.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminDeleteWorkspaceMember.g.cs @@ -363,17 +363,16 @@ await AdminDeleteWorkspaceMemberAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -400,17 +399,15 @@ await AdminDeleteWorkspaceMemberAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ await AdminDeleteWorkspaceMemberAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.AdminClient.AdminGetAccount.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetAccount.g.cs index bf6f8dd..3e9b0f7 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetAccount.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetAccount.g.cs @@ -344,17 +344,16 @@ await AdminGetAccountAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -381,17 +380,15 @@ await AdminGetAccountAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -419,17 +416,15 @@ await AdminGetAccountAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.AdminClient.AdminGetAuditRecords.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetAuditRecords.g.cs index ff29e4c..89b1f39 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetAuditRecords.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetAuditRecords.g.cs @@ -365,17 +365,16 @@ await AdminGetAuditRecordsAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -402,17 +401,15 @@ await AdminGetAuditRecordsAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -440,17 +437,15 @@ await AdminGetAuditRecordsAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.AdminClient.AdminGetBot.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetBot.g.cs index f1bc19a..bbbfc7b 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetBot.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetBot.g.cs @@ -375,17 +375,16 @@ await AdminGetBotAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -412,17 +411,15 @@ await AdminGetBotAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -450,17 +447,15 @@ await AdminGetBotAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.AdminClient.AdminGetBotAnalytics.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetBotAnalytics.g.cs index 214b20d..c6b6c84 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetBotAnalytics.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetBotAnalytics.g.cs @@ -385,17 +385,16 @@ await AdminGetBotAnalyticsAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -422,17 +421,15 @@ await AdminGetBotAnalyticsAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -460,17 +457,15 @@ await AdminGetBotAnalyticsAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.AdminClient.AdminGetBotIssue.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetBotIssue.g.cs index c186fbd..d83902c 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetBotIssue.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetBotIssue.g.cs @@ -372,17 +372,16 @@ await AdminGetBotIssueAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -409,17 +408,15 @@ await AdminGetBotIssueAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -447,17 +444,15 @@ await AdminGetBotIssueAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.AdminClient.AdminGetBotLogs.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetBotLogs.g.cs index dd58299..fa31fd5 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetBotLogs.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetBotLogs.g.cs @@ -445,17 +445,16 @@ await AdminGetBotLogsAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -482,17 +481,15 @@ await AdminGetBotLogsAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -520,17 +517,15 @@ await AdminGetBotLogsAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.AdminClient.AdminGetIntegration.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetIntegration.g.cs index cb6914e..a7398b0 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetIntegration.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetIntegration.g.cs @@ -363,17 +363,16 @@ await AdminGetIntegrationAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -400,17 +399,15 @@ await AdminGetIntegrationAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ await AdminGetIntegrationAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.AdminClient.AdminGetIntegrationByName.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetIntegrationByName.g.cs index 71034dd..2584b3b 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetIntegrationByName.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetIntegrationByName.g.cs @@ -372,17 +372,16 @@ await AdminGetIntegrationByNameAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -409,17 +408,15 @@ await AdminGetIntegrationByNameAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -447,17 +444,15 @@ await AdminGetIntegrationByNameAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.AdminClient.AdminGetIntegrationLogs.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetIntegrationLogs.g.cs index fcb6fb4..9ca418d 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetIntegrationLogs.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetIntegrationLogs.g.cs @@ -435,17 +435,16 @@ await AdminGetIntegrationLogsAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -472,17 +471,15 @@ await AdminGetIntegrationLogsAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -510,17 +507,15 @@ await AdminGetIntegrationLogsAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.AdminClient.AdminGetPublicIntegration.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetPublicIntegration.g.cs index ae60cbd..c7732f4 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetPublicIntegration.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetPublicIntegration.g.cs @@ -362,17 +362,16 @@ await AdminGetPublicIntegrationAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -399,17 +398,15 @@ await AdminGetPublicIntegrationAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -437,17 +434,15 @@ await AdminGetPublicIntegrationAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.AdminClient.AdminGetPublicIntegrationById.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetPublicIntegrationById.g.cs index cd2bf39..53abcb2 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetPublicIntegrationById.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetPublicIntegrationById.g.cs @@ -353,17 +353,16 @@ await AdminGetPublicIntegrationByIdAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -390,17 +389,15 @@ await AdminGetPublicIntegrationByIdAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -428,17 +425,15 @@ await AdminGetPublicIntegrationByIdAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.AdminClient.AdminGetPublicWorkspace.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetPublicWorkspace.g.cs index f0659d0..39655f7 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetPublicWorkspace.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetPublicWorkspace.g.cs @@ -353,17 +353,16 @@ await AdminGetPublicWorkspaceAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -390,17 +389,15 @@ await AdminGetPublicWorkspaceAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -428,17 +425,15 @@ await AdminGetPublicWorkspaceAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.AdminClient.AdminGetWorkspace.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetWorkspace.g.cs index 8e4d4e2..2b52617 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetWorkspace.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetWorkspace.g.cs @@ -353,17 +353,16 @@ await AdminGetWorkspaceAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -390,17 +389,15 @@ await AdminGetWorkspaceAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -428,17 +425,15 @@ await AdminGetWorkspaceAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.AdminClient.AdminGetWorkspaceMember.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetWorkspaceMember.g.cs index 696c154..1fe42fe 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetWorkspaceMember.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminGetWorkspaceMember.g.cs @@ -354,17 +354,16 @@ await AdminGetWorkspaceMemberAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -391,17 +390,15 @@ await AdminGetWorkspaceMemberAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -429,17 +426,15 @@ await AdminGetWorkspaceMemberAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.AdminClient.AdminListBotIssueEvents.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminListBotIssueEvents.g.cs index 66272ee..761be7d 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminListBotIssueEvents.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminListBotIssueEvents.g.cs @@ -372,17 +372,16 @@ await AdminListBotIssueEventsAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -409,17 +408,15 @@ await AdminListBotIssueEventsAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -447,17 +444,15 @@ await AdminListBotIssueEventsAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.AdminClient.AdminListBotIssues.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminListBotIssues.g.cs index 33a2f84..117ac8d 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminListBotIssues.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminListBotIssues.g.cs @@ -375,17 +375,16 @@ await AdminListBotIssuesAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -412,17 +411,15 @@ await AdminListBotIssuesAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -450,17 +447,15 @@ await AdminListBotIssuesAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.AdminClient.AdminListBots.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminListBots.g.cs index a20f52a..c22f142 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminListBots.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminListBots.g.cs @@ -406,17 +406,16 @@ await AdminListBotsAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -443,17 +442,15 @@ await AdminListBotsAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -481,17 +478,15 @@ await AdminListBotsAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.AdminClient.AdminListIntegrations.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminListIntegrations.g.cs index 9612369..9514be6 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminListIntegrations.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminListIntegrations.g.cs @@ -486,17 +486,16 @@ await AdminListIntegrationsAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -523,17 +522,15 @@ await AdminListIntegrationsAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -561,17 +558,15 @@ await AdminListIntegrationsAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.AdminClient.AdminListPublicIntegrations.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminListPublicIntegrations.g.cs index 63b876b..40a872a 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminListPublicIntegrations.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminListPublicIntegrations.g.cs @@ -456,17 +456,16 @@ await AdminListPublicIntegrationsAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -493,17 +492,15 @@ await AdminListPublicIntegrationsAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -531,17 +528,15 @@ await AdminListPublicIntegrationsAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.AdminClient.AdminListPublicWorkspaces.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminListPublicWorkspaces.g.cs index 6278d7c..c026245 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminListPublicWorkspaces.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminListPublicWorkspaces.g.cs @@ -376,17 +376,16 @@ await AdminListPublicWorkspacesAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -413,17 +412,15 @@ await AdminListPublicWorkspacesAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ await AdminListPublicWorkspacesAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.AdminClient.AdminListWorkspaceMembers.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminListWorkspaceMembers.g.cs index 529d98c..cc256b4 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminListWorkspaceMembers.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminListWorkspaceMembers.g.cs @@ -366,17 +366,16 @@ await AdminListWorkspaceMembersAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -403,17 +402,15 @@ await AdminListWorkspaceMembersAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -441,17 +438,15 @@ await AdminListWorkspaceMembersAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.AdminClient.AdminListWorkspaces.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminListWorkspaces.g.cs index e1312af..cff8e10 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminListWorkspaces.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminListWorkspaces.g.cs @@ -366,17 +366,16 @@ await AdminListWorkspacesAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -403,17 +402,15 @@ await AdminListWorkspacesAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -441,17 +438,15 @@ await AdminListWorkspacesAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.AdminClient.AdminUpdateAccount.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminUpdateAccount.g.cs index 35f35d3..5bcb8c5 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminUpdateAccount.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminUpdateAccount.g.cs @@ -344,17 +344,16 @@ await AdminUpdateAccountAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -381,17 +380,15 @@ await AdminUpdateAccountAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -419,17 +416,15 @@ await AdminUpdateAccountAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.AdminClient.AdminUpdateBot.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminUpdateBot.g.cs index cc27f8e..5b0b2be 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminUpdateBot.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminUpdateBot.g.cs @@ -363,17 +363,16 @@ await AdminUpdateBotAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -400,17 +399,15 @@ await AdminUpdateBotAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ await AdminUpdateBotAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.AdminClient.AdminUpdateIntegration.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminUpdateIntegration.g.cs index 8687864..5f55816 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminUpdateIntegration.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminUpdateIntegration.g.cs @@ -363,17 +363,16 @@ await AdminUpdateIntegrationAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -400,17 +399,15 @@ await AdminUpdateIntegrationAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ await AdminUpdateIntegrationAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.AdminClient.AdminUpdateWorkspace.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminUpdateWorkspace.g.cs index 355e583..0360714 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminUpdateWorkspace.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminUpdateWorkspace.g.cs @@ -353,17 +353,16 @@ await AdminUpdateWorkspaceAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -390,17 +389,15 @@ await AdminUpdateWorkspaceAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -428,17 +425,15 @@ await AdminUpdateWorkspaceAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.AdminClient.AdminUpdateWorkspaceMember.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminUpdateWorkspaceMember.g.cs index 4d24dd6..b2f00ed 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminUpdateWorkspaceMember.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminUpdateWorkspaceMember.g.cs @@ -363,17 +363,16 @@ await AdminUpdateWorkspaceMemberAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -400,17 +399,15 @@ await AdminUpdateWorkspaceMemberAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ await AdminUpdateWorkspaceMemberAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.AdminClient.AdminValidateIntegrationCreation.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminValidateIntegrationCreation.g.cs index 04add42..5a30c72 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminValidateIntegrationCreation.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminValidateIntegrationCreation.g.cs @@ -354,17 +354,16 @@ await AdminValidateIntegrationCreationAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -391,17 +390,15 @@ await AdminValidateIntegrationCreationAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -429,17 +426,15 @@ await AdminValidateIntegrationCreationAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.AdminClient.AdminValidateIntegrationUpdate.g.cs b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminValidateIntegrationUpdate.g.cs index 55fef0c..4e1c139 100644 --- a/src/libs/Botpress/Generated/Botpress.AdminClient.AdminValidateIntegrationUpdate.g.cs +++ b/src/libs/Botpress/Generated/Botpress.AdminClient.AdminValidateIntegrationUpdate.g.cs @@ -363,17 +363,16 @@ await AdminValidateIntegrationUpdateAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -400,17 +399,15 @@ await AdminValidateIntegrationUpdateAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ await AdminValidateIntegrationUpdateAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.ChatClient.ChatAddParticipant.g.cs b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatAddParticipant.g.cs index 1aa30e8..701a11c 100644 --- a/src/libs/Botpress/Generated/Botpress.ChatClient.ChatAddParticipant.g.cs +++ b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatAddParticipant.g.cs @@ -383,18 +383,17 @@ partial void ProcessChatAddParticipantResponseContent( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseObject = __value_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseObject: __value_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -428,17 +427,15 @@ partial void ProcessChatAddParticipantResponseContent( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -475,17 +472,15 @@ partial void ProcessChatAddParticipantResponseContent( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.ChatClient.ChatCreateConversation.g.cs b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatCreateConversation.g.cs index f8e836b..a7a9433 100644 --- a/src/libs/Botpress/Generated/Botpress.ChatClient.ChatCreateConversation.g.cs +++ b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatCreateConversation.g.cs @@ -374,18 +374,17 @@ partial void ProcessChatCreateConversationResponseContent( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseObject = __value_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseObject: __value_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -419,17 +418,15 @@ partial void ProcessChatCreateConversationResponseContent( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -466,17 +463,15 @@ partial void ProcessChatCreateConversationResponseContent( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.ChatClient.ChatCreateEvent.g.cs b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatCreateEvent.g.cs index e025e22..f1dbb9a 100644 --- a/src/libs/Botpress/Generated/Botpress.ChatClient.ChatCreateEvent.g.cs +++ b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatCreateEvent.g.cs @@ -374,18 +374,17 @@ partial void ProcessChatCreateEventResponseContent( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseObject = __value_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseObject: __value_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -419,17 +418,15 @@ partial void ProcessChatCreateEventResponseContent( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -466,17 +463,15 @@ partial void ProcessChatCreateEventResponseContent( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.ChatClient.ChatCreateMessage.g.cs b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatCreateMessage.g.cs index c5cb7a9..61009be 100644 --- a/src/libs/Botpress/Generated/Botpress.ChatClient.ChatCreateMessage.g.cs +++ b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatCreateMessage.g.cs @@ -374,18 +374,17 @@ partial void ProcessChatCreateMessageResponseContent( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseObject = __value_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseObject: __value_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -419,17 +418,15 @@ partial void ProcessChatCreateMessageResponseContent( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -466,17 +463,15 @@ partial void ProcessChatCreateMessageResponseContent( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.ChatClient.ChatCreateUser.g.cs b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatCreateUser.g.cs index ba5793b..6170ba5 100644 --- a/src/libs/Botpress/Generated/Botpress.ChatClient.ChatCreateUser.g.cs +++ b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatCreateUser.g.cs @@ -362,18 +362,17 @@ partial void ProcessChatCreateUserResponseContent( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseObject = __value_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseObject: __value_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -407,17 +406,15 @@ partial void ProcessChatCreateUserResponseContent( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -454,17 +451,15 @@ partial void ProcessChatCreateUserResponseContent( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.ChatClient.ChatDeleteConversation.g.cs b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatDeleteConversation.g.cs index 7df14f9..e121132 100644 --- a/src/libs/Botpress/Generated/Botpress.ChatClient.ChatDeleteConversation.g.cs +++ b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatDeleteConversation.g.cs @@ -363,18 +363,17 @@ partial void ProcessChatDeleteConversationResponseContent( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseObject = __value_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseObject: __value_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -408,17 +407,15 @@ partial void ProcessChatDeleteConversationResponseContent( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -455,17 +452,15 @@ partial void ProcessChatDeleteConversationResponseContent( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.ChatClient.ChatDeleteMessage.g.cs b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatDeleteMessage.g.cs index c94b272..4f90eb7 100644 --- a/src/libs/Botpress/Generated/Botpress.ChatClient.ChatDeleteMessage.g.cs +++ b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatDeleteMessage.g.cs @@ -363,18 +363,17 @@ partial void ProcessChatDeleteMessageResponseContent( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseObject = __value_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseObject: __value_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -408,17 +407,15 @@ partial void ProcessChatDeleteMessageResponseContent( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -455,17 +452,15 @@ partial void ProcessChatDeleteMessageResponseContent( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.ChatClient.ChatDeleteUser.g.cs b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatDeleteUser.g.cs index 6713015..001c1ae 100644 --- a/src/libs/Botpress/Generated/Botpress.ChatClient.ChatDeleteUser.g.cs +++ b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatDeleteUser.g.cs @@ -354,18 +354,17 @@ partial void ProcessChatDeleteUserResponseContent( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseObject = __value_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseObject: __value_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -399,17 +398,15 @@ partial void ProcessChatDeleteUserResponseContent( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -446,17 +443,15 @@ partial void ProcessChatDeleteUserResponseContent( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.ChatClient.ChatGetConversation.g.cs b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatGetConversation.g.cs index 1c93dae..b00c350 100644 --- a/src/libs/Botpress/Generated/Botpress.ChatClient.ChatGetConversation.g.cs +++ b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatGetConversation.g.cs @@ -363,18 +363,17 @@ partial void ProcessChatGetConversationResponseContent( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseObject = __value_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseObject: __value_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -408,17 +407,15 @@ partial void ProcessChatGetConversationResponseContent( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -455,17 +452,15 @@ partial void ProcessChatGetConversationResponseContent( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.ChatClient.ChatGetEvent.g.cs b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatGetEvent.g.cs index 915cc9b..cc625fc 100644 --- a/src/libs/Botpress/Generated/Botpress.ChatClient.ChatGetEvent.g.cs +++ b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatGetEvent.g.cs @@ -363,18 +363,17 @@ partial void ProcessChatGetEventResponseContent( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseObject = __value_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseObject: __value_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -408,17 +407,15 @@ partial void ProcessChatGetEventResponseContent( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -455,17 +452,15 @@ partial void ProcessChatGetEventResponseContent( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.ChatClient.ChatGetMessage.g.cs b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatGetMessage.g.cs index 939492c..3de3028 100644 --- a/src/libs/Botpress/Generated/Botpress.ChatClient.ChatGetMessage.g.cs +++ b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatGetMessage.g.cs @@ -363,18 +363,17 @@ partial void ProcessChatGetMessageResponseContent( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseObject = __value_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseObject: __value_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -408,17 +407,15 @@ partial void ProcessChatGetMessageResponseContent( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -455,17 +452,15 @@ partial void ProcessChatGetMessageResponseContent( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.ChatClient.ChatGetOrCreateConversation.g.cs b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatGetOrCreateConversation.g.cs index 32ceb84..a9b41be 100644 --- a/src/libs/Botpress/Generated/Botpress.ChatClient.ChatGetOrCreateConversation.g.cs +++ b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatGetOrCreateConversation.g.cs @@ -374,18 +374,17 @@ partial void ProcessChatGetOrCreateConversationResponseContent( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseObject = __value_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseObject: __value_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -419,17 +418,15 @@ partial void ProcessChatGetOrCreateConversationResponseContent( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -466,17 +463,15 @@ partial void ProcessChatGetOrCreateConversationResponseContent( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.ChatClient.ChatGetOrCreateUser.g.cs b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatGetOrCreateUser.g.cs index 39198cf..71c95c8 100644 --- a/src/libs/Botpress/Generated/Botpress.ChatClient.ChatGetOrCreateUser.g.cs +++ b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatGetOrCreateUser.g.cs @@ -374,18 +374,17 @@ partial void ProcessChatGetOrCreateUserResponseContent( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseObject = __value_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseObject: __value_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -419,17 +418,15 @@ partial void ProcessChatGetOrCreateUserResponseContent( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -466,17 +463,15 @@ partial void ProcessChatGetOrCreateUserResponseContent( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.ChatClient.ChatGetParticipant.g.cs b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatGetParticipant.g.cs index 2a54317..66d633a 100644 --- a/src/libs/Botpress/Generated/Botpress.ChatClient.ChatGetParticipant.g.cs +++ b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatGetParticipant.g.cs @@ -372,18 +372,17 @@ partial void ProcessChatGetParticipantResponseContent( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseObject = __value_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseObject: __value_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -417,17 +416,15 @@ partial void ProcessChatGetParticipantResponseContent( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -464,17 +461,15 @@ partial void ProcessChatGetParticipantResponseContent( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.ChatClient.ChatGetUser.g.cs b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatGetUser.g.cs index 2bfb407..7816057 100644 --- a/src/libs/Botpress/Generated/Botpress.ChatClient.ChatGetUser.g.cs +++ b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatGetUser.g.cs @@ -354,18 +354,17 @@ partial void ProcessChatGetUserResponseContent( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseObject = __value_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseObject: __value_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -399,17 +398,15 @@ partial void ProcessChatGetUserResponseContent( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -446,17 +443,15 @@ partial void ProcessChatGetUserResponseContent( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.ChatClient.ChatListConversations.g.cs b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatListConversations.g.cs index d6bc142..320711f 100644 --- a/src/libs/Botpress/Generated/Botpress.ChatClient.ChatListConversations.g.cs +++ b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatListConversations.g.cs @@ -366,18 +366,17 @@ partial void ProcessChatListConversationsResponseContent( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseObject = __value_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseObject: __value_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -411,17 +410,15 @@ partial void ProcessChatListConversationsResponseContent( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -458,17 +455,15 @@ partial void ProcessChatListConversationsResponseContent( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.ChatClient.ChatListMessages.g.cs b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatListMessages.g.cs index 0e4b4e1..dd49632 100644 --- a/src/libs/Botpress/Generated/Botpress.ChatClient.ChatListMessages.g.cs +++ b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatListMessages.g.cs @@ -375,18 +375,17 @@ partial void ProcessChatListMessagesResponseContent( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseObject = __value_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseObject: __value_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -420,17 +419,15 @@ partial void ProcessChatListMessagesResponseContent( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -467,17 +464,15 @@ partial void ProcessChatListMessagesResponseContent( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.ChatClient.ChatListParticipants.g.cs b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatListParticipants.g.cs index 78c1194..e7c0379 100644 --- a/src/libs/Botpress/Generated/Botpress.ChatClient.ChatListParticipants.g.cs +++ b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatListParticipants.g.cs @@ -375,18 +375,17 @@ partial void ProcessChatListParticipantsResponseContent( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseObject = __value_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseObject: __value_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -420,17 +419,15 @@ partial void ProcessChatListParticipantsResponseContent( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -467,17 +464,15 @@ partial void ProcessChatListParticipantsResponseContent( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.ChatClient.ChatListenConversation.g.cs b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatListenConversation.g.cs index 4a52ea8..759ca4a 100644 --- a/src/libs/Botpress/Generated/Botpress.ChatClient.ChatListenConversation.g.cs +++ b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatListenConversation.g.cs @@ -363,18 +363,17 @@ partial void ProcessChatListenConversationResponseContent( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseObject = __value_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseObject: __value_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -408,17 +407,15 @@ partial void ProcessChatListenConversationResponseContent( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -455,17 +452,15 @@ partial void ProcessChatListenConversationResponseContent( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.ChatClient.ChatRemoveParticipant.g.cs b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatRemoveParticipant.g.cs index eb738b4..69cf3e5 100644 --- a/src/libs/Botpress/Generated/Botpress.ChatClient.ChatRemoveParticipant.g.cs +++ b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatRemoveParticipant.g.cs @@ -372,18 +372,17 @@ partial void ProcessChatRemoveParticipantResponseContent( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseObject = __value_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseObject: __value_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -417,17 +416,15 @@ partial void ProcessChatRemoveParticipantResponseContent( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -464,17 +461,15 @@ partial void ProcessChatRemoveParticipantResponseContent( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.ChatClient.ChatUpdateUser.g.cs b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatUpdateUser.g.cs index fbea2cb..4a1fb5c 100644 --- a/src/libs/Botpress/Generated/Botpress.ChatClient.ChatUpdateUser.g.cs +++ b/src/libs/Botpress/Generated/Botpress.ChatClient.ChatUpdateUser.g.cs @@ -374,18 +374,17 @@ partial void ProcessChatUpdateUserResponseContent( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseObject = __value_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseObject: __value_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -419,17 +418,15 @@ partial void ProcessChatUpdateUserResponseContent( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -466,17 +463,15 @@ partial void ProcessChatUpdateUserResponseContent( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.Exceptions.g.cs b/src/libs/Botpress/Generated/Botpress.Exceptions.g.cs index 91c44c8..12b8a20 100644 --- a/src/libs/Botpress/Generated/Botpress.Exceptions.g.cs +++ b/src/libs/Botpress/Generated/Botpress.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::Botpress.ApiException Create( + global::System.Net.HttpStatusCode statusCode, + string message, + global::System.Exception? innerException = null, + global::System.Collections.Generic.IDictionary>? responseHeaders = null) + { + return new global::Botpress.ApiException(message, innerException, statusCode); + } + + /// + /// Convenience overload that constructs an with response body and headers populated. + /// + public static global::Botpress.ApiException Create( + global::System.Net.HttpStatusCode statusCode, + string message, + global::System.Exception? innerException, + string? responseBody, + global::System.Collections.Generic.Dictionary>? responseHeaders) + { + var exception = global::Botpress.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::Botpress.ApiException Create( + global::System.Net.HttpStatusCode statusCode, + string message, + global::System.Exception? innerException = null, + global::System.Collections.Generic.IDictionary>? responseHeaders = null) + { + return new global::Botpress.ApiException(message, innerException, statusCode); + } + + /// + /// Convenience overload that constructs an with response body, object, and headers populated. + /// + public static global::Botpress.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::Botpress.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/Botpress/Generated/Botpress.FilesClient.FilesCopyFile.g.cs b/src/libs/Botpress/Generated/Botpress.FilesClient.FilesCopyFile.g.cs index f914315..7213649 100644 --- a/src/libs/Botpress/Generated/Botpress.FilesClient.FilesCopyFile.g.cs +++ b/src/libs/Botpress/Generated/Botpress.FilesClient.FilesCopyFile.g.cs @@ -437,17 +437,16 @@ await FilesCopyFileAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -474,17 +473,15 @@ await FilesCopyFileAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -512,17 +509,15 @@ await FilesCopyFileAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.FilesClient.FilesDeleteFile.g.cs b/src/libs/Botpress/Generated/Botpress.FilesClient.FilesDeleteFile.g.cs index 1935126..2fc6e74 100644 --- a/src/libs/Botpress/Generated/Botpress.FilesClient.FilesDeleteFile.g.cs +++ b/src/libs/Botpress/Generated/Botpress.FilesClient.FilesDeleteFile.g.cs @@ -415,17 +415,16 @@ await FilesDeleteFileAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -452,17 +451,15 @@ await FilesDeleteFileAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -490,17 +487,15 @@ await FilesDeleteFileAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.FilesClient.FilesGetFile.g.cs b/src/libs/Botpress/Generated/Botpress.FilesClient.FilesGetFile.g.cs index 8440280..00f3ea9 100644 --- a/src/libs/Botpress/Generated/Botpress.FilesClient.FilesGetFile.g.cs +++ b/src/libs/Botpress/Generated/Botpress.FilesClient.FilesGetFile.g.cs @@ -415,17 +415,16 @@ await FilesGetFileAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -452,17 +451,15 @@ await FilesGetFileAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -490,17 +487,15 @@ await FilesGetFileAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.FilesClient.FilesListFilePassages.g.cs b/src/libs/Botpress/Generated/Botpress.FilesClient.FilesListFilePassages.g.cs index a27a8ba..a6b047c 100644 --- a/src/libs/Botpress/Generated/Botpress.FilesClient.FilesListFilePassages.g.cs +++ b/src/libs/Botpress/Generated/Botpress.FilesClient.FilesListFilePassages.g.cs @@ -437,17 +437,16 @@ await FilesListFilePassagesAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -474,17 +473,15 @@ await FilesListFilePassagesAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -512,17 +509,15 @@ await FilesListFilePassagesAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.FilesClient.FilesListFileTagValues.g.cs b/src/libs/Botpress/Generated/Botpress.FilesClient.FilesListFileTagValues.g.cs index 3ae808e..9e19699 100644 --- a/src/libs/Botpress/Generated/Botpress.FilesClient.FilesListFileTagValues.g.cs +++ b/src/libs/Botpress/Generated/Botpress.FilesClient.FilesListFileTagValues.g.cs @@ -427,17 +427,16 @@ await FilesListFileTagValuesAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -464,17 +463,15 @@ await FilesListFileTagValuesAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -502,17 +499,15 @@ await FilesListFileTagValuesAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.FilesClient.FilesListFileTags.g.cs b/src/libs/Botpress/Generated/Botpress.FilesClient.FilesListFileTags.g.cs index 447b6fc..31c7225 100644 --- a/src/libs/Botpress/Generated/Botpress.FilesClient.FilesListFileTags.g.cs +++ b/src/libs/Botpress/Generated/Botpress.FilesClient.FilesListFileTags.g.cs @@ -418,17 +418,16 @@ await FilesListFileTagsAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -455,17 +454,15 @@ await FilesListFileTagsAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 +490,15 @@ await FilesListFileTagsAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.FilesClient.FilesListFiles.g.cs b/src/libs/Botpress/Generated/Botpress.FilesClient.FilesListFiles.g.cs index e3efe5f..db898df 100644 --- a/src/libs/Botpress/Generated/Botpress.FilesClient.FilesListFiles.g.cs +++ b/src/libs/Botpress/Generated/Botpress.FilesClient.FilesListFiles.g.cs @@ -468,17 +468,16 @@ await FilesListFilesAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -505,17 +504,15 @@ await FilesListFilesAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 +540,15 @@ await FilesListFilesAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.FilesClient.FilesSearchFiles.g.cs b/src/libs/Botpress/Generated/Botpress.FilesClient.FilesSearchFiles.g.cs index 27ed6e6..64e2733 100644 --- a/src/libs/Botpress/Generated/Botpress.FilesClient.FilesSearchFiles.g.cs +++ b/src/libs/Botpress/Generated/Botpress.FilesClient.FilesSearchFiles.g.cs @@ -478,17 +478,16 @@ await FilesSearchFilesAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -515,17 +514,15 @@ await FilesSearchFilesAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -553,17 +550,15 @@ await FilesSearchFilesAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.FilesClient.FilesUpdateFileMetadata.g.cs b/src/libs/Botpress/Generated/Botpress.FilesClient.FilesUpdateFileMetadata.g.cs index 7549a8f..51f9cf3 100644 --- a/src/libs/Botpress/Generated/Botpress.FilesClient.FilesUpdateFileMetadata.g.cs +++ b/src/libs/Botpress/Generated/Botpress.FilesClient.FilesUpdateFileMetadata.g.cs @@ -415,17 +415,16 @@ await FilesUpdateFileMetadataAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -452,17 +451,15 @@ await FilesUpdateFileMetadataAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -490,17 +487,15 @@ await FilesUpdateFileMetadataAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.FilesClient.FilesUpsertFile.g.cs b/src/libs/Botpress/Generated/Botpress.FilesClient.FilesUpsertFile.g.cs index 09c0cfa..58dfaa7 100644 --- a/src/libs/Botpress/Generated/Botpress.FilesClient.FilesUpsertFile.g.cs +++ b/src/libs/Botpress/Generated/Botpress.FilesClient.FilesUpsertFile.g.cs @@ -406,17 +406,16 @@ await FilesUpsertFileAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -443,17 +442,15 @@ await FilesUpsertFileAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -481,17 +478,15 @@ await FilesUpsertFileAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.RuntimeClient.RuntimeAddParticipant.g.cs b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeAddParticipant.g.cs index a30d9a9..d2c113c 100644 --- a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeAddParticipant.g.cs +++ b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeAddParticipant.g.cs @@ -376,17 +376,16 @@ await RuntimeAddParticipantAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -413,17 +412,15 @@ await RuntimeAddParticipantAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ await RuntimeAddParticipantAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.RuntimeClient.RuntimeCallAction.g.cs b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeCallAction.g.cs index 6934e61..91fadac 100644 --- a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeCallAction.g.cs +++ b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeCallAction.g.cs @@ -367,17 +367,16 @@ await RuntimeCallActionAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -404,17 +403,15 @@ await RuntimeCallActionAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -442,17 +439,15 @@ await RuntimeCallActionAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.RuntimeClient.RuntimeCancelScheduledEvent.g.cs b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeCancelScheduledEvent.g.cs index 10ee60b..32c625d 100644 --- a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeCancelScheduledEvent.g.cs +++ b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeCancelScheduledEvent.g.cs @@ -376,17 +376,16 @@ await RuntimeCancelScheduledEventAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -413,17 +412,15 @@ await RuntimeCancelScheduledEventAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ await RuntimeCancelScheduledEventAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.RuntimeClient.RuntimeConfigureIntegration.g.cs b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeConfigureIntegration.g.cs index 3ec7662..07c09c3 100644 --- a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeConfigureIntegration.g.cs +++ b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeConfigureIntegration.g.cs @@ -367,17 +367,16 @@ await RuntimeConfigureIntegrationAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -404,17 +403,15 @@ await RuntimeConfigureIntegrationAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -442,17 +439,15 @@ await RuntimeConfigureIntegrationAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.RuntimeClient.RuntimeCreateConversation.g.cs b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeCreateConversation.g.cs index 7547bda..015a1c3 100644 --- a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeCreateConversation.g.cs +++ b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeCreateConversation.g.cs @@ -367,17 +367,16 @@ await RuntimeCreateConversationAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -404,17 +403,15 @@ await RuntimeCreateConversationAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -442,17 +439,15 @@ await RuntimeCreateConversationAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.RuntimeClient.RuntimeCreateEvent.g.cs b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeCreateEvent.g.cs index a8ad752..3cd918e 100644 --- a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeCreateEvent.g.cs +++ b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeCreateEvent.g.cs @@ -367,17 +367,16 @@ await RuntimeCreateEventAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -404,17 +403,15 @@ await RuntimeCreateEventAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -442,17 +439,15 @@ await RuntimeCreateEventAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.RuntimeClient.RuntimeCreateMessage.g.cs b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeCreateMessage.g.cs index ff433b2..56d9d71 100644 --- a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeCreateMessage.g.cs +++ b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeCreateMessage.g.cs @@ -367,17 +367,16 @@ await RuntimeCreateMessageAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -404,17 +403,15 @@ await RuntimeCreateMessageAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -442,17 +439,15 @@ await RuntimeCreateMessageAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.RuntimeClient.RuntimeCreateUser.g.cs b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeCreateUser.g.cs index dfa0e63..936fc47 100644 --- a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeCreateUser.g.cs +++ b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeCreateUser.g.cs @@ -367,17 +367,16 @@ await RuntimeCreateUserAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -404,17 +403,15 @@ await RuntimeCreateUserAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -442,17 +439,15 @@ await RuntimeCreateUserAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.RuntimeClient.RuntimeDeleteConversation.g.cs b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeDeleteConversation.g.cs index 278c1eb..e82ff91 100644 --- a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeDeleteConversation.g.cs +++ b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeDeleteConversation.g.cs @@ -376,17 +376,16 @@ await RuntimeDeleteConversationAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -413,17 +412,15 @@ await RuntimeDeleteConversationAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ await RuntimeDeleteConversationAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.RuntimeClient.RuntimeDeleteMessage.g.cs b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeDeleteMessage.g.cs index 2130832..4fc6425 100644 --- a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeDeleteMessage.g.cs +++ b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeDeleteMessage.g.cs @@ -376,17 +376,16 @@ await RuntimeDeleteMessageAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -413,17 +412,15 @@ await RuntimeDeleteMessageAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ await RuntimeDeleteMessageAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.RuntimeClient.RuntimeDeleteUser.g.cs b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeDeleteUser.g.cs index 76620d2..969e402 100644 --- a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeDeleteUser.g.cs +++ b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeDeleteUser.g.cs @@ -376,17 +376,16 @@ await RuntimeDeleteUserAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -413,17 +412,15 @@ await RuntimeDeleteUserAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ await RuntimeDeleteUserAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetConversation.g.cs b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetConversation.g.cs index 47c1c1b..ffbfc9f 100644 --- a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetConversation.g.cs +++ b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetConversation.g.cs @@ -376,17 +376,16 @@ await RuntimeGetConversationAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -413,17 +412,15 @@ await RuntimeGetConversationAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ await RuntimeGetConversationAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetEvent.g.cs b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetEvent.g.cs index 8fb5fc2..3ffda2d 100644 --- a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetEvent.g.cs +++ b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetEvent.g.cs @@ -376,17 +376,16 @@ await RuntimeGetEventAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -413,17 +412,15 @@ await RuntimeGetEventAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ await RuntimeGetEventAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetMessage.g.cs b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetMessage.g.cs index 028225c..8525864 100644 --- a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetMessage.g.cs +++ b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetMessage.g.cs @@ -376,17 +376,16 @@ await RuntimeGetMessageAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -413,17 +412,15 @@ await RuntimeGetMessageAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ await RuntimeGetMessageAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetOrCreateConversation.g.cs b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetOrCreateConversation.g.cs index 4c47a68..fff08ad 100644 --- a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetOrCreateConversation.g.cs +++ b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetOrCreateConversation.g.cs @@ -367,17 +367,16 @@ await RuntimeGetOrCreateConversationAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -404,17 +403,15 @@ await RuntimeGetOrCreateConversationAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -442,17 +439,15 @@ await RuntimeGetOrCreateConversationAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetOrCreateMessage.g.cs b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetOrCreateMessage.g.cs index 7243858..40eaa6f 100644 --- a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetOrCreateMessage.g.cs +++ b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetOrCreateMessage.g.cs @@ -367,17 +367,16 @@ await RuntimeGetOrCreateMessageAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -404,17 +403,15 @@ await RuntimeGetOrCreateMessageAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -442,17 +439,15 @@ await RuntimeGetOrCreateMessageAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetOrCreateUser.g.cs b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetOrCreateUser.g.cs index 29b1ca2..768b09d 100644 --- a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetOrCreateUser.g.cs +++ b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetOrCreateUser.g.cs @@ -367,17 +367,16 @@ await RuntimeGetOrCreateUserAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -404,17 +403,15 @@ await RuntimeGetOrCreateUserAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -442,17 +439,15 @@ await RuntimeGetOrCreateUserAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetOrSetState.g.cs b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetOrSetState.g.cs index f915791..6768c50 100644 --- a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetOrSetState.g.cs +++ b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetOrSetState.g.cs @@ -394,17 +394,16 @@ await RuntimeGetOrSetStateAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -431,17 +430,15 @@ await RuntimeGetOrSetStateAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -469,17 +466,15 @@ await RuntimeGetOrSetStateAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetParticipant.g.cs b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetParticipant.g.cs index cc7ad0a..52d268e 100644 --- a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetParticipant.g.cs +++ b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetParticipant.g.cs @@ -385,17 +385,16 @@ await RuntimeGetParticipantAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -422,17 +421,15 @@ await RuntimeGetParticipantAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -460,17 +457,15 @@ await RuntimeGetParticipantAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetState.g.cs b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetState.g.cs index 494ab21..06a6d1c 100644 --- a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetState.g.cs +++ b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetState.g.cs @@ -394,17 +394,16 @@ await RuntimeGetStateAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -431,17 +430,15 @@ await RuntimeGetStateAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -469,17 +466,15 @@ await RuntimeGetStateAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetUser.g.cs b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetUser.g.cs index 4669afd..8a9138d 100644 --- a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetUser.g.cs +++ b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeGetUser.g.cs @@ -376,17 +376,16 @@ await RuntimeGetUserAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -413,17 +412,15 @@ await RuntimeGetUserAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ await RuntimeGetUserAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.RuntimeClient.RuntimeListConversations.g.cs b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeListConversations.g.cs index d6f1291..bd21a20 100644 --- a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeListConversations.g.cs +++ b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeListConversations.g.cs @@ -459,17 +459,16 @@ await RuntimeListConversationsAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -496,17 +495,15 @@ await RuntimeListConversationsAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -534,17 +531,15 @@ await RuntimeListConversationsAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.RuntimeClient.RuntimeListEvents.g.cs b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeListEvents.g.cs index f4fbd3c..c1615d1 100644 --- a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeListEvents.g.cs +++ b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeListEvents.g.cs @@ -439,17 +439,16 @@ await RuntimeListEventsAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -476,17 +475,15 @@ await RuntimeListEventsAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -514,17 +511,15 @@ await RuntimeListEventsAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.RuntimeClient.RuntimeListMessages.g.cs b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeListMessages.g.cs index 454056b..8a7d695 100644 --- a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeListMessages.g.cs +++ b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeListMessages.g.cs @@ -419,17 +419,16 @@ await RuntimeListMessagesAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -456,17 +455,15 @@ await RuntimeListMessagesAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -494,17 +491,15 @@ await RuntimeListMessagesAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.RuntimeClient.RuntimeListParticipants.g.cs b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeListParticipants.g.cs index 1518614..d033b81 100644 --- a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeListParticipants.g.cs +++ b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeListParticipants.g.cs @@ -388,17 +388,16 @@ await RuntimeListParticipantsAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -425,17 +424,15 @@ await RuntimeListParticipantsAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ await RuntimeListParticipantsAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.RuntimeClient.RuntimeListTagValues.g.cs b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeListTagValues.g.cs index addda5f..49927f9 100644 --- a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeListTagValues.g.cs +++ b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeListTagValues.g.cs @@ -398,17 +398,16 @@ await RuntimeListTagValuesAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -435,17 +434,15 @@ await RuntimeListTagValuesAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 +470,15 @@ await RuntimeListTagValuesAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.RuntimeClient.RuntimeListUsers.g.cs b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeListUsers.g.cs index ae37f0a..f766117 100644 --- a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeListUsers.g.cs +++ b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeListUsers.g.cs @@ -449,17 +449,16 @@ await RuntimeListUsersAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -486,17 +485,15 @@ await RuntimeListUsersAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -524,17 +521,15 @@ await RuntimeListUsersAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.RuntimeClient.RuntimePatchState.g.cs b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimePatchState.g.cs index 74689b7..136b7ad 100644 --- a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimePatchState.g.cs +++ b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimePatchState.g.cs @@ -394,17 +394,16 @@ await RuntimePatchStateAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -431,17 +430,15 @@ await RuntimePatchStateAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -469,17 +466,15 @@ await RuntimePatchStateAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.RuntimeClient.RuntimeRemoveParticipant.g.cs b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeRemoveParticipant.g.cs index 1102eb6..a850b29 100644 --- a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeRemoveParticipant.g.cs +++ b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeRemoveParticipant.g.cs @@ -385,17 +385,16 @@ await RuntimeRemoveParticipantAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -422,17 +421,15 @@ await RuntimeRemoveParticipantAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -460,17 +457,15 @@ await RuntimeRemoveParticipantAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.RuntimeClient.RuntimeSetState.g.cs b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeSetState.g.cs index 6078108..3f261b9 100644 --- a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeSetState.g.cs +++ b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeSetState.g.cs @@ -394,17 +394,16 @@ await RuntimeSetStateAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -431,17 +430,15 @@ await RuntimeSetStateAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -469,17 +466,15 @@ await RuntimeSetStateAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.RuntimeClient.RuntimeSetStateExpiry.g.cs b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeSetStateExpiry.g.cs index 946b03f..20cc5db 100644 --- a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeSetStateExpiry.g.cs +++ b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeSetStateExpiry.g.cs @@ -394,17 +394,16 @@ await RuntimeSetStateExpiryAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -431,17 +430,15 @@ await RuntimeSetStateExpiryAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -469,17 +466,15 @@ await RuntimeSetStateExpiryAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.RuntimeClient.RuntimeUpdateConversation.g.cs b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeUpdateConversation.g.cs index 348f58c..4352ce3 100644 --- a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeUpdateConversation.g.cs +++ b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeUpdateConversation.g.cs @@ -376,17 +376,16 @@ await RuntimeUpdateConversationAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -413,17 +412,15 @@ await RuntimeUpdateConversationAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ await RuntimeUpdateConversationAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.RuntimeClient.RuntimeUpdateMessage.g.cs b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeUpdateMessage.g.cs index 8289142..6302c11 100644 --- a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeUpdateMessage.g.cs +++ b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeUpdateMessage.g.cs @@ -376,17 +376,16 @@ await RuntimeUpdateMessageAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -413,17 +412,15 @@ await RuntimeUpdateMessageAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ await RuntimeUpdateMessageAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.RuntimeClient.RuntimeUpdateUser.g.cs b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeUpdateUser.g.cs index 346ef87..cb053bb 100644 --- a/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeUpdateUser.g.cs +++ b/src/libs/Botpress/Generated/Botpress.RuntimeClient.RuntimeUpdateUser.g.cs @@ -376,17 +376,16 @@ await RuntimeUpdateUserAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -413,17 +412,15 @@ await RuntimeUpdateUserAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ await RuntimeUpdateUserAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.TablesClient.TablesCreateTable.g.cs b/src/libs/Botpress/Generated/Botpress.TablesClient.TablesCreateTable.g.cs index 0525f53..56cf228 100644 --- a/src/libs/Botpress/Generated/Botpress.TablesClient.TablesCreateTable.g.cs +++ b/src/libs/Botpress/Generated/Botpress.TablesClient.TablesCreateTable.g.cs @@ -406,17 +406,16 @@ await TablesCreateTableAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -443,17 +442,15 @@ await TablesCreateTableAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -481,17 +478,15 @@ await TablesCreateTableAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.TablesClient.TablesCreateTableRows.g.cs b/src/libs/Botpress/Generated/Botpress.TablesClient.TablesCreateTableRows.g.cs index 05cf4ce..dcd10aa 100644 --- a/src/libs/Botpress/Generated/Botpress.TablesClient.TablesCreateTableRows.g.cs +++ b/src/libs/Botpress/Generated/Botpress.TablesClient.TablesCreateTableRows.g.cs @@ -415,17 +415,16 @@ await TablesCreateTableRowsAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -452,17 +451,15 @@ await TablesCreateTableRowsAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -490,17 +487,15 @@ await TablesCreateTableRowsAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.TablesClient.TablesDeleteTable.g.cs b/src/libs/Botpress/Generated/Botpress.TablesClient.TablesDeleteTable.g.cs index 39c6745..5906fe9 100644 --- a/src/libs/Botpress/Generated/Botpress.TablesClient.TablesDeleteTable.g.cs +++ b/src/libs/Botpress/Generated/Botpress.TablesClient.TablesDeleteTable.g.cs @@ -415,17 +415,16 @@ await TablesDeleteTableAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -452,17 +451,15 @@ await TablesDeleteTableAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -490,17 +487,15 @@ await TablesDeleteTableAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.TablesClient.TablesDeleteTableRows.g.cs b/src/libs/Botpress/Generated/Botpress.TablesClient.TablesDeleteTableRows.g.cs index 013f2c7..0b26126 100644 --- a/src/libs/Botpress/Generated/Botpress.TablesClient.TablesDeleteTableRows.g.cs +++ b/src/libs/Botpress/Generated/Botpress.TablesClient.TablesDeleteTableRows.g.cs @@ -415,17 +415,16 @@ await TablesDeleteTableRowsAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -452,17 +451,15 @@ await TablesDeleteTableRowsAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -490,17 +487,15 @@ await TablesDeleteTableRowsAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.TablesClient.TablesDuplicateTable.g.cs b/src/libs/Botpress/Generated/Botpress.TablesClient.TablesDuplicateTable.g.cs index 53a3789..4fcc24f 100644 --- a/src/libs/Botpress/Generated/Botpress.TablesClient.TablesDuplicateTable.g.cs +++ b/src/libs/Botpress/Generated/Botpress.TablesClient.TablesDuplicateTable.g.cs @@ -415,17 +415,16 @@ await TablesDuplicateTableAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -452,17 +451,15 @@ await TablesDuplicateTableAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -490,17 +487,15 @@ await TablesDuplicateTableAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.TablesClient.TablesFindTableRows.g.cs b/src/libs/Botpress/Generated/Botpress.TablesClient.TablesFindTableRows.g.cs index 0e6a589..5f5b7a2 100644 --- a/src/libs/Botpress/Generated/Botpress.TablesClient.TablesFindTableRows.g.cs +++ b/src/libs/Botpress/Generated/Botpress.TablesClient.TablesFindTableRows.g.cs @@ -415,17 +415,16 @@ await TablesFindTableRowsAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -452,17 +451,15 @@ await TablesFindTableRowsAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -490,17 +487,15 @@ await TablesFindTableRowsAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.TablesClient.TablesGetOrCreateTable.g.cs b/src/libs/Botpress/Generated/Botpress.TablesClient.TablesGetOrCreateTable.g.cs index 6afcf2c..d025052 100644 --- a/src/libs/Botpress/Generated/Botpress.TablesClient.TablesGetOrCreateTable.g.cs +++ b/src/libs/Botpress/Generated/Botpress.TablesClient.TablesGetOrCreateTable.g.cs @@ -415,17 +415,16 @@ await TablesGetOrCreateTableAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -452,17 +451,15 @@ await TablesGetOrCreateTableAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -490,17 +487,15 @@ await TablesGetOrCreateTableAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.TablesClient.TablesGetTable.g.cs b/src/libs/Botpress/Generated/Botpress.TablesClient.TablesGetTable.g.cs index a115ec6..4756edf 100644 --- a/src/libs/Botpress/Generated/Botpress.TablesClient.TablesGetTable.g.cs +++ b/src/libs/Botpress/Generated/Botpress.TablesClient.TablesGetTable.g.cs @@ -415,17 +415,16 @@ await TablesGetTableAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -452,17 +451,15 @@ await TablesGetTableAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -490,17 +487,15 @@ await TablesGetTableAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.TablesClient.TablesGetTableRow.g.cs b/src/libs/Botpress/Generated/Botpress.TablesClient.TablesGetTableRow.g.cs index ab83093..d1540ef 100644 --- a/src/libs/Botpress/Generated/Botpress.TablesClient.TablesGetTableRow.g.cs +++ b/src/libs/Botpress/Generated/Botpress.TablesClient.TablesGetTableRow.g.cs @@ -427,17 +427,16 @@ await TablesGetTableRowAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -464,17 +463,15 @@ await TablesGetTableRowAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -502,17 +499,15 @@ await TablesGetTableRowAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.TablesClient.TablesListTables.g.cs b/src/libs/Botpress/Generated/Botpress.TablesClient.TablesListTables.g.cs index c1f2b07..ef02620 100644 --- a/src/libs/Botpress/Generated/Botpress.TablesClient.TablesListTables.g.cs +++ b/src/libs/Botpress/Generated/Botpress.TablesClient.TablesListTables.g.cs @@ -418,17 +418,16 @@ await TablesListTablesAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -455,17 +454,15 @@ await TablesListTablesAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 +490,15 @@ await TablesListTablesAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.TablesClient.TablesRenameTableColumn.g.cs b/src/libs/Botpress/Generated/Botpress.TablesClient.TablesRenameTableColumn.g.cs index bbe712b..c4268ec 100644 --- a/src/libs/Botpress/Generated/Botpress.TablesClient.TablesRenameTableColumn.g.cs +++ b/src/libs/Botpress/Generated/Botpress.TablesClient.TablesRenameTableColumn.g.cs @@ -415,17 +415,16 @@ await TablesRenameTableColumnAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -452,17 +451,15 @@ await TablesRenameTableColumnAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -490,17 +487,15 @@ await TablesRenameTableColumnAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.TablesClient.TablesUpdateTable.g.cs b/src/libs/Botpress/Generated/Botpress.TablesClient.TablesUpdateTable.g.cs index 346e76e..4f7af2d 100644 --- a/src/libs/Botpress/Generated/Botpress.TablesClient.TablesUpdateTable.g.cs +++ b/src/libs/Botpress/Generated/Botpress.TablesClient.TablesUpdateTable.g.cs @@ -415,17 +415,16 @@ await TablesUpdateTableAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -452,17 +451,15 @@ await TablesUpdateTableAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -490,17 +487,15 @@ await TablesUpdateTableAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.TablesClient.TablesUpdateTableRows.g.cs b/src/libs/Botpress/Generated/Botpress.TablesClient.TablesUpdateTableRows.g.cs index d85471e..8bb569b 100644 --- a/src/libs/Botpress/Generated/Botpress.TablesClient.TablesUpdateTableRows.g.cs +++ b/src/libs/Botpress/Generated/Botpress.TablesClient.TablesUpdateTableRows.g.cs @@ -415,17 +415,16 @@ await TablesUpdateTableRowsAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -452,17 +451,15 @@ await TablesUpdateTableRowsAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -490,17 +487,15 @@ await TablesUpdateTableRowsAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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/Botpress/Generated/Botpress.TablesClient.TablesUpsertTableRows.g.cs b/src/libs/Botpress/Generated/Botpress.TablesClient.TablesUpsertTableRows.g.cs index b5f4911..01e05f6 100644 --- a/src/libs/Botpress/Generated/Botpress.TablesClient.TablesUpsertTableRows.g.cs +++ b/src/libs/Botpress/Generated/Botpress.TablesClient.TablesUpsertTableRows.g.cs @@ -415,17 +415,16 @@ await TablesUpsertTableRowsAsResponseAsync( __exception_default = __ex; } - throw new global::Botpress.ApiException( + + throw global::Botpress.ApiException.Create( + statusCode: __response.StatusCode, message: __content_default ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_default, - statusCode: __response.StatusCode) - { - ResponseBody = __content_default, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_default, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } if (__effectiveReadResponseAsString) @@ -452,17 +451,15 @@ await TablesUpsertTableRowsAsResponseAsync( } catch (global::System.Exception __ex) { - throw new global::Botpress.ApiException( + throw global::Botpress.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 @@ -490,17 +487,15 @@ await TablesUpsertTableRowsAsResponseAsync( { } - throw new global::Botpress.ApiException( + throw global::Botpress.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)); } }