diff --git a/src/libs/Leonardo/Generated/Leonardo.BlueprintsClient.ExecuteBlueprint.g.cs b/src/libs/Leonardo/Generated/Leonardo.BlueprintsClient.ExecuteBlueprint.g.cs index ec23f2b..b41ec94 100644 --- a/src/libs/Leonardo/Generated/Leonardo.BlueprintsClient.ExecuteBlueprint.g.cs +++ b/src/libs/Leonardo/Generated/Leonardo.BlueprintsClient.ExecuteBlueprint.g.cs @@ -362,18 +362,17 @@ partial void ProcessExecuteBlueprintResponseContent( __exception_400 = __ex; } - throw new global::Leonardo.ApiException( + + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content_400, + responseObject: __value_400, + 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 ProcessExecuteBlueprintResponseContent( } catch (global::System.Exception __ex) { - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 ProcessExecuteBlueprintResponseContent( { } - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Leonardo/Generated/Leonardo.BlueprintsClient.GetBlueprintById.g.cs b/src/libs/Leonardo/Generated/Leonardo.BlueprintsClient.GetBlueprintById.g.cs index 1b497df..fc2a4ef 100644 --- a/src/libs/Leonardo/Generated/Leonardo.BlueprintsClient.GetBlueprintById.g.cs +++ b/src/libs/Leonardo/Generated/Leonardo.BlueprintsClient.GetBlueprintById.g.cs @@ -358,17 +358,15 @@ partial void ProcessGetBlueprintByIdResponseContent( } catch (global::System.Exception __ex) { - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -405,17 +403,15 @@ partial void ProcessGetBlueprintByIdResponseContent( { } - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Leonardo/Generated/Leonardo.BlueprintsClient.GetBlueprintExecution.g.cs b/src/libs/Leonardo/Generated/Leonardo.BlueprintsClient.GetBlueprintExecution.g.cs index ad505b7..b858cdf 100644 --- a/src/libs/Leonardo/Generated/Leonardo.BlueprintsClient.GetBlueprintExecution.g.cs +++ b/src/libs/Leonardo/Generated/Leonardo.BlueprintsClient.GetBlueprintExecution.g.cs @@ -358,17 +358,15 @@ partial void ProcessGetBlueprintExecutionResponseContent( } catch (global::System.Exception __ex) { - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -405,17 +403,15 @@ partial void ProcessGetBlueprintExecutionResponseContent( { } - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Leonardo/Generated/Leonardo.BlueprintsClient.GetBlueprintExecutionGenerations.g.cs b/src/libs/Leonardo/Generated/Leonardo.BlueprintsClient.GetBlueprintExecutionGenerations.g.cs index fc0a4b5..d5e3999 100644 --- a/src/libs/Leonardo/Generated/Leonardo.BlueprintsClient.GetBlueprintExecutionGenerations.g.cs +++ b/src/libs/Leonardo/Generated/Leonardo.BlueprintsClient.GetBlueprintExecutionGenerations.g.cs @@ -408,17 +408,15 @@ partial void ProcessGetBlueprintExecutionGenerationsResponseContent( } catch (global::System.Exception __ex) { - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 +453,15 @@ partial void ProcessGetBlueprintExecutionGenerationsResponseContent( { } - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Leonardo/Generated/Leonardo.BlueprintsClient.GetBlueprintVersionsByBlueprintId.g.cs b/src/libs/Leonardo/Generated/Leonardo.BlueprintsClient.GetBlueprintVersionsByBlueprintId.g.cs index 4b42c19..bd9e8a3 100644 --- a/src/libs/Leonardo/Generated/Leonardo.BlueprintsClient.GetBlueprintVersionsByBlueprintId.g.cs +++ b/src/libs/Leonardo/Generated/Leonardo.BlueprintsClient.GetBlueprintVersionsByBlueprintId.g.cs @@ -358,17 +358,15 @@ partial void ProcessGetBlueprintVersionsByBlueprintIdResponseContent( } catch (global::System.Exception __ex) { - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -405,17 +403,15 @@ partial void ProcessGetBlueprintVersionsByBlueprintIdResponseContent( { } - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Leonardo/Generated/Leonardo.BlueprintsClient.ListBlueprints.g.cs b/src/libs/Leonardo/Generated/Leonardo.BlueprintsClient.ListBlueprints.g.cs index f1ff3b7..27df5fc 100644 --- a/src/libs/Leonardo/Generated/Leonardo.BlueprintsClient.ListBlueprints.g.cs +++ b/src/libs/Leonardo/Generated/Leonardo.BlueprintsClient.ListBlueprints.g.cs @@ -369,17 +369,15 @@ partial void ProcessListBlueprintsResponseContent( } catch (global::System.Exception __ex) { - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -416,17 +414,15 @@ partial void ProcessListBlueprintsResponseContent( { } - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Leonardo/Generated/Leonardo.DatasetClient.CreateDataset.g.cs b/src/libs/Leonardo/Generated/Leonardo.DatasetClient.CreateDataset.g.cs index 3829726..71e54da 100644 --- a/src/libs/Leonardo/Generated/Leonardo.DatasetClient.CreateDataset.g.cs +++ b/src/libs/Leonardo/Generated/Leonardo.DatasetClient.CreateDataset.g.cs @@ -369,17 +369,15 @@ partial void ProcessCreateDatasetResponseContent( } catch (global::System.Exception __ex) { - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -416,17 +414,15 @@ partial void ProcessCreateDatasetResponseContent( { } - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Leonardo/Generated/Leonardo.DatasetClient.DeleteDatasetById.g.cs b/src/libs/Leonardo/Generated/Leonardo.DatasetClient.DeleteDatasetById.g.cs index 02f8daa..ee59487 100644 --- a/src/libs/Leonardo/Generated/Leonardo.DatasetClient.DeleteDatasetById.g.cs +++ b/src/libs/Leonardo/Generated/Leonardo.DatasetClient.DeleteDatasetById.g.cs @@ -358,17 +358,15 @@ partial void ProcessDeleteDatasetByIdResponseContent( } catch (global::System.Exception __ex) { - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -405,17 +403,15 @@ partial void ProcessDeleteDatasetByIdResponseContent( { } - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Leonardo/Generated/Leonardo.DatasetClient.GetDatasetById.g.cs b/src/libs/Leonardo/Generated/Leonardo.DatasetClient.GetDatasetById.g.cs index fee512a..ed46483 100644 --- a/src/libs/Leonardo/Generated/Leonardo.DatasetClient.GetDatasetById.g.cs +++ b/src/libs/Leonardo/Generated/Leonardo.DatasetClient.GetDatasetById.g.cs @@ -358,17 +358,15 @@ partial void ProcessGetDatasetByIdResponseContent( } catch (global::System.Exception __ex) { - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -405,17 +403,15 @@ partial void ProcessGetDatasetByIdResponseContent( { } - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Leonardo/Generated/Leonardo.DatasetClient.UploadDatasetImage.g.cs b/src/libs/Leonardo/Generated/Leonardo.DatasetClient.UploadDatasetImage.g.cs index b2c7e1b..8f799e3 100644 --- a/src/libs/Leonardo/Generated/Leonardo.DatasetClient.UploadDatasetImage.g.cs +++ b/src/libs/Leonardo/Generated/Leonardo.DatasetClient.UploadDatasetImage.g.cs @@ -378,17 +378,15 @@ partial void ProcessUploadDatasetImageResponseContent( } catch (global::System.Exception __ex) { - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -425,17 +423,15 @@ partial void ProcessUploadDatasetImageResponseContent( { } - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Leonardo/Generated/Leonardo.DatasetClient.UploadDatasetImageFromGen.g.cs b/src/libs/Leonardo/Generated/Leonardo.DatasetClient.UploadDatasetImageFromGen.g.cs index a8e859f..4b4e09c 100644 --- a/src/libs/Leonardo/Generated/Leonardo.DatasetClient.UploadDatasetImageFromGen.g.cs +++ b/src/libs/Leonardo/Generated/Leonardo.DatasetClient.UploadDatasetImageFromGen.g.cs @@ -378,17 +378,15 @@ partial void ProcessUploadDatasetImageFromGenResponseContent( } catch (global::System.Exception __ex) { - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -425,17 +423,15 @@ partial void ProcessUploadDatasetImageFromGenResponseContent( { } - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Leonardo/Generated/Leonardo.ElementsClient.CreateElement.g.cs b/src/libs/Leonardo/Generated/Leonardo.ElementsClient.CreateElement.g.cs index 32a29d7..5e7231c 100644 --- a/src/libs/Leonardo/Generated/Leonardo.ElementsClient.CreateElement.g.cs +++ b/src/libs/Leonardo/Generated/Leonardo.ElementsClient.CreateElement.g.cs @@ -369,17 +369,15 @@ partial void ProcessCreateElementResponseContent( } catch (global::System.Exception __ex) { - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -416,17 +414,15 @@ partial void ProcessCreateElementResponseContent( { } - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Leonardo/Generated/Leonardo.ElementsClient.DeleteElementById.g.cs b/src/libs/Leonardo/Generated/Leonardo.ElementsClient.DeleteElementById.g.cs index 2531035..1a7d314 100644 --- a/src/libs/Leonardo/Generated/Leonardo.ElementsClient.DeleteElementById.g.cs +++ b/src/libs/Leonardo/Generated/Leonardo.ElementsClient.DeleteElementById.g.cs @@ -358,17 +358,15 @@ partial void ProcessDeleteElementByIdResponseContent( } catch (global::System.Exception __ex) { - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -405,17 +403,15 @@ partial void ProcessDeleteElementByIdResponseContent( { } - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Leonardo/Generated/Leonardo.ElementsClient.GetCustomElementsByUserId.g.cs b/src/libs/Leonardo/Generated/Leonardo.ElementsClient.GetCustomElementsByUserId.g.cs index e924adf..df0b955 100644 --- a/src/libs/Leonardo/Generated/Leonardo.ElementsClient.GetCustomElementsByUserId.g.cs +++ b/src/libs/Leonardo/Generated/Leonardo.ElementsClient.GetCustomElementsByUserId.g.cs @@ -358,17 +358,15 @@ partial void ProcessGetCustomElementsByUserIdResponseContent( } catch (global::System.Exception __ex) { - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -405,17 +403,15 @@ partial void ProcessGetCustomElementsByUserIdResponseContent( { } - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Leonardo/Generated/Leonardo.ElementsClient.GetElementById.g.cs b/src/libs/Leonardo/Generated/Leonardo.ElementsClient.GetElementById.g.cs index 41c290d..ea3f880 100644 --- a/src/libs/Leonardo/Generated/Leonardo.ElementsClient.GetElementById.g.cs +++ b/src/libs/Leonardo/Generated/Leonardo.ElementsClient.GetElementById.g.cs @@ -358,17 +358,15 @@ partial void ProcessGetElementByIdResponseContent( } catch (global::System.Exception __ex) { - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -405,17 +403,15 @@ partial void ProcessGetElementByIdResponseContent( { } - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Leonardo/Generated/Leonardo.ElementsClient.ListElements.g.cs b/src/libs/Leonardo/Generated/Leonardo.ElementsClient.ListElements.g.cs index dc56e18..05acc57 100644 --- a/src/libs/Leonardo/Generated/Leonardo.ElementsClient.ListElements.g.cs +++ b/src/libs/Leonardo/Generated/Leonardo.ElementsClient.ListElements.g.cs @@ -349,17 +349,15 @@ partial void ProcessListElementsResponseContent( } catch (global::System.Exception __ex) { - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -396,17 +394,15 @@ partial void ProcessListElementsResponseContent( { } - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Leonardo/Generated/Leonardo.Exceptions.g.cs b/src/libs/Leonardo/Generated/Leonardo.Exceptions.g.cs index 2271a45..a7593d0 100644 --- a/src/libs/Leonardo/Generated/Leonardo.Exceptions.g.cs +++ b/src/libs/Leonardo/Generated/Leonardo.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::Leonardo.ApiException Create( + global::System.Net.HttpStatusCode statusCode, + string message, + global::System.Exception? innerException = null, + global::System.Collections.Generic.IDictionary>? responseHeaders = null) + { + return new global::Leonardo.ApiException(message, innerException, statusCode); + } + + /// + /// Convenience overload that constructs an with response body and headers populated. + /// + public static global::Leonardo.ApiException Create( + global::System.Net.HttpStatusCode statusCode, + string message, + global::System.Exception? innerException, + string? responseBody, + global::System.Collections.Generic.Dictionary>? responseHeaders) + { + var exception = global::Leonardo.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::Leonardo.ApiException Create( + global::System.Net.HttpStatusCode statusCode, + string message, + global::System.Exception? innerException = null, + global::System.Collections.Generic.IDictionary>? responseHeaders = null) + { + return new global::Leonardo.ApiException(message, innerException, statusCode); + } + + /// + /// Convenience overload that constructs an with response body, object, and headers populated. + /// + public static global::Leonardo.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::Leonardo.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/Leonardo/Generated/Leonardo.IMediaClient.UploadMedia.g.cs b/src/libs/Leonardo/Generated/Leonardo.IMediaClient.UploadMedia.g.cs index 66819ed..e5c4b80 100644 --- a/src/libs/Leonardo/Generated/Leonardo.IMediaClient.UploadMedia.g.cs +++ b/src/libs/Leonardo/Generated/Leonardo.IMediaClient.UploadMedia.g.cs @@ -6,7 +6,7 @@ public partial interface IMediaClient { /// /// Upload media
- /// This endpoint returns presigned details to upload a media file to S3 + /// This endpoint returns presigned POST credentials to upload a video or audio file directly to S3. ///
/// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. @@ -19,7 +19,7 @@ public partial interface IMediaClient global::System.Threading.CancellationToken cancellationToken = default); /// /// Upload media
- /// This endpoint returns presigned details to upload a media file to S3 + /// This endpoint returns presigned POST credentials to upload a video or audio file directly to S3. ///
/// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. @@ -32,16 +32,24 @@ public partial interface IMediaClient global::System.Threading.CancellationToken cancellationToken = default); /// /// Upload media
- /// This endpoint returns presigned details to upload a media file to S3 + /// This endpoint returns presigned POST credentials to upload a video or audio file directly to S3. ///
/// - /// The file extension of the media file to upload. Supported extensions: mp4, mov. + /// The file extension of the media file to upload. Supported extensions for video: `mp4`, `mov`. Supported for audio: `mp3`, `wav`. + /// + /// + /// Original file name for display. Required for audio uploads (`mp3`, `wav`). Optional for video. + /// + /// + /// Optional team UUID. When set, the upload is associated with that team and the caller must be a member. /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// global::System.Threading.Tasks.Task UploadMediaAsync( string extension, + string? originalFilename = default, + string? teamId = default, global::Leonardo.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); } diff --git a/src/libs/Leonardo/Generated/Leonardo.IMotionClient.CreateSVDMotionGeneration.g.cs b/src/libs/Leonardo/Generated/Leonardo.IMotionClient.CreateSVDMotionGeneration.g.cs deleted file mode 100644 index c899d03..0000000 --- a/src/libs/Leonardo/Generated/Leonardo.IMotionClient.CreateSVDMotionGeneration.g.cs +++ /dev/null @@ -1,64 +0,0 @@ -#nullable enable - -namespace Leonardo -{ - public partial interface IMotionClient - { - /// - /// Create SVD Motion Generation
- /// This endpoint will generate a SVD motion generation. - ///
- /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task CreateSVDMotionGenerationAsync( - - global::Leonardo.CreateSVDMotionGenerationRequest request, - global::Leonardo.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - /// - /// Create SVD Motion Generation
- /// This endpoint will generate a SVD motion generation. - ///
- /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task> CreateSVDMotionGenerationAsResponseAsync( - - global::Leonardo.CreateSVDMotionGenerationRequest request, - global::Leonardo.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - /// - /// Create SVD Motion Generation
- /// This endpoint will generate a SVD motion generation. - ///
- /// - /// The ID of the image, supports generated images, variation images, and init images. - /// - /// - /// Whether the generation is public or not - /// - /// - /// If it is an init image uploaded by the user. This image is uploaded from endpoint: Upload init image. - /// - /// - /// If it is a variation image. - /// - /// - /// The motion strength. - /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task CreateSVDMotionGenerationAsync( - string imageId, - bool? isPublic = default, - bool? isInitImage = default, - bool? isVariation = default, - int? motionStrength = default, - global::Leonardo.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Leonardo/Generated/Leonardo.ImageClient.CreateGeneration.g.cs b/src/libs/Leonardo/Generated/Leonardo.ImageClient.CreateGeneration.g.cs index ced7bd2..8e917b8 100644 --- a/src/libs/Leonardo/Generated/Leonardo.ImageClient.CreateGeneration.g.cs +++ b/src/libs/Leonardo/Generated/Leonardo.ImageClient.CreateGeneration.g.cs @@ -371,17 +371,15 @@ partial void ProcessCreateGenerationResponseContent( } catch (global::System.Exception __ex) { - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -418,17 +416,15 @@ partial void ProcessCreateGenerationResponseContent( { } - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Leonardo/Generated/Leonardo.ImageClient.DeleteGenerationById.g.cs b/src/libs/Leonardo/Generated/Leonardo.ImageClient.DeleteGenerationById.g.cs index 43da5df..cde4fe3 100644 --- a/src/libs/Leonardo/Generated/Leonardo.ImageClient.DeleteGenerationById.g.cs +++ b/src/libs/Leonardo/Generated/Leonardo.ImageClient.DeleteGenerationById.g.cs @@ -358,17 +358,15 @@ partial void ProcessDeleteGenerationByIdResponseContent( } catch (global::System.Exception __ex) { - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -405,17 +403,15 @@ partial void ProcessDeleteGenerationByIdResponseContent( { } - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Leonardo/Generated/Leonardo.ImageClient.GetGenerationById.g.cs b/src/libs/Leonardo/Generated/Leonardo.ImageClient.GetGenerationById.g.cs index b78a38a..030ce4f 100644 --- a/src/libs/Leonardo/Generated/Leonardo.ImageClient.GetGenerationById.g.cs +++ b/src/libs/Leonardo/Generated/Leonardo.ImageClient.GetGenerationById.g.cs @@ -358,17 +358,15 @@ partial void ProcessGetGenerationByIdResponseContent( } catch (global::System.Exception __ex) { - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -405,17 +403,15 @@ partial void ProcessGetGenerationByIdResponseContent( { } - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Leonardo/Generated/Leonardo.ImageClient.GetGenerationsByUserId.g.cs b/src/libs/Leonardo/Generated/Leonardo.ImageClient.GetGenerationsByUserId.g.cs index 459a31b..3a78dc8 100644 --- a/src/libs/Leonardo/Generated/Leonardo.ImageClient.GetGenerationsByUserId.g.cs +++ b/src/libs/Leonardo/Generated/Leonardo.ImageClient.GetGenerationsByUserId.g.cs @@ -388,17 +388,15 @@ partial void ProcessGetGenerationsByUserIdResponseContent( } catch (global::System.Exception __ex) { - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 @@ -435,17 +433,15 @@ partial void ProcessGetGenerationsByUserIdResponseContent( { } - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Leonardo/Generated/Leonardo.InitImagesClient.DeleteInitImageById.g.cs b/src/libs/Leonardo/Generated/Leonardo.InitImagesClient.DeleteInitImageById.g.cs index 64a6efa..3b4d1ef 100644 --- a/src/libs/Leonardo/Generated/Leonardo.InitImagesClient.DeleteInitImageById.g.cs +++ b/src/libs/Leonardo/Generated/Leonardo.InitImagesClient.DeleteInitImageById.g.cs @@ -358,17 +358,15 @@ partial void ProcessDeleteInitImageByIdResponseContent( } catch (global::System.Exception __ex) { - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -405,17 +403,15 @@ partial void ProcessDeleteInitImageByIdResponseContent( { } - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Leonardo/Generated/Leonardo.InitImagesClient.GetInitImageById.g.cs b/src/libs/Leonardo/Generated/Leonardo.InitImagesClient.GetInitImageById.g.cs index caf3769..fe1ba78 100644 --- a/src/libs/Leonardo/Generated/Leonardo.InitImagesClient.GetInitImageById.g.cs +++ b/src/libs/Leonardo/Generated/Leonardo.InitImagesClient.GetInitImageById.g.cs @@ -358,17 +358,15 @@ partial void ProcessGetInitImageByIdResponseContent( } catch (global::System.Exception __ex) { - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -405,17 +403,15 @@ partial void ProcessGetInitImageByIdResponseContent( { } - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Leonardo/Generated/Leonardo.InitImagesClient.UploadCanvasInitImage.g.cs b/src/libs/Leonardo/Generated/Leonardo.InitImagesClient.UploadCanvasInitImage.g.cs index f7b5324..bf8d0b9 100644 --- a/src/libs/Leonardo/Generated/Leonardo.InitImagesClient.UploadCanvasInitImage.g.cs +++ b/src/libs/Leonardo/Generated/Leonardo.InitImagesClient.UploadCanvasInitImage.g.cs @@ -369,17 +369,15 @@ partial void ProcessUploadCanvasInitImageResponseContent( } catch (global::System.Exception __ex) { - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -416,17 +414,15 @@ partial void ProcessUploadCanvasInitImageResponseContent( { } - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Leonardo/Generated/Leonardo.InitImagesClient.UploadInitImage.g.cs b/src/libs/Leonardo/Generated/Leonardo.InitImagesClient.UploadInitImage.g.cs index ec5221b..8a67200 100644 --- a/src/libs/Leonardo/Generated/Leonardo.InitImagesClient.UploadInitImage.g.cs +++ b/src/libs/Leonardo/Generated/Leonardo.InitImagesClient.UploadInitImage.g.cs @@ -369,17 +369,15 @@ partial void ProcessUploadInitImageResponseContent( } catch (global::System.Exception __ex) { - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -416,17 +414,15 @@ partial void ProcessUploadInitImageResponseContent( { } - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Leonardo/Generated/Leonardo.JsonSerializerContext.g.cs b/src/libs/Leonardo/Generated/Leonardo.JsonSerializerContext.g.cs index 92dd855..4aa0ac6 100644 --- a/src/libs/Leonardo/Generated/Leonardo.JsonSerializerContext.g.cs +++ b/src/libs/Leonardo/Generated/Leonardo.JsonSerializerContext.g.cs @@ -216,7 +216,6 @@ namespace Leonardo [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Leonardo.CreateGenerationRequestTransparency), TypeInfoPropertyName = "CreateGenerationRequestTransparency2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Leonardo.CreateSVDMotionGenerationRequest))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Leonardo.CreateImageToVideoGenerationRequest))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Leonardo.CreateImageToVideoGenerationRequestImageType), TypeInfoPropertyName = "CreateImageToVideoGenerationRequestImageType2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Leonardo.CreateImageToVideoGenerationRequestEndFrameImage))] @@ -289,8 +288,6 @@ namespace Leonardo [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Leonardo.GetGenerationsByUserIdResponseGenerationGenerationElement))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Leonardo.GetGenerationsByUserIdResponseGenerationGenerationElementLora))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Leonardo.CreateSVDMotionGenerationResponse))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Leonardo.CreateSVDMotionGenerationResponseMotionSvdGenerationJob))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Leonardo.CreateImageToVideoGenerationResponse))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Leonardo.CreateImageToVideoGenerationResponseMotionVideoGenerationJob))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Leonardo.CreateTextToVideoGenerationResponse))] diff --git a/src/libs/Leonardo/Generated/Leonardo.JsonSerializerContextTypes.g.cs b/src/libs/Leonardo/Generated/Leonardo.JsonSerializerContextTypes.g.cs index da140b6..de1e340 100644 --- a/src/libs/Leonardo/Generated/Leonardo.JsonSerializerContextTypes.g.cs +++ b/src/libs/Leonardo/Generated/Leonardo.JsonSerializerContextTypes.g.cs @@ -308,739 +308,727 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::Leonardo.CreateSVDMotionGenerationRequest? Type70 { get; set; } + public global::Leonardo.CreateImageToVideoGenerationRequest? Type70 { get; set; } /// /// /// - public global::Leonardo.CreateImageToVideoGenerationRequest? Type71 { get; set; } + public global::Leonardo.CreateImageToVideoGenerationRequestImageType? Type71 { get; set; } /// /// /// - public global::Leonardo.CreateImageToVideoGenerationRequestImageType? Type72 { get; set; } + public global::Leonardo.CreateImageToVideoGenerationRequestEndFrameImage? Type72 { get; set; } /// /// /// - public global::Leonardo.CreateImageToVideoGenerationRequestEndFrameImage? Type73 { get; set; } + public global::Leonardo.CreateImageToVideoGenerationRequestEndFrameImageType? Type73 { get; set; } /// /// /// - public global::Leonardo.CreateImageToVideoGenerationRequestEndFrameImageType? Type74 { get; set; } + public global::Leonardo.CreateTextToVideoGenerationRequest? Type74 { get; set; } /// /// /// - public global::Leonardo.CreateTextToVideoGenerationRequest? Type75 { get; set; } + public global::Leonardo.CreateLCMGenerationRequest? Type75 { get; set; } /// /// /// - public global::Leonardo.CreateLCMGenerationRequest? Type76 { get; set; } + public global::Leonardo.PerformInstantRefineRequest? Type76 { get; set; } /// /// /// - public global::Leonardo.PerformInstantRefineRequest? Type77 { get; set; } + public global::Leonardo.PerformInpaintingLCMRequest? Type77 { get; set; } /// /// /// - public global::Leonardo.PerformInpaintingLCMRequest? Type78 { get; set; } + public global::Leonardo.PerformAlchemyUpscaleLCMRequest? Type78 { get; set; } /// /// /// - public global::Leonardo.PerformAlchemyUpscaleLCMRequest? Type79 { get; set; } + public global::Leonardo.UploadModelAssetRequest? Type79 { get; set; } /// /// /// - public global::Leonardo.UploadModelAssetRequest? Type80 { get; set; } + public global::Leonardo.Get3DModelsByUserIdRequest? Type80 { get; set; } /// /// /// - public global::Leonardo.Get3DModelsByUserIdRequest? Type81 { get; set; } + public global::Leonardo.Get3DModelByIdRequest? Type81 { get; set; } /// /// /// - public global::Leonardo.Get3DModelByIdRequest? Type82 { get; set; } + public global::Leonardo.Delete3DModelByIdRequest? Type82 { get; set; } /// /// /// - public global::Leonardo.Delete3DModelByIdRequest? Type83 { get; set; } + public global::Leonardo.UploadInitImageRequest? Type83 { get; set; } /// /// /// - public global::Leonardo.UploadInitImageRequest? Type84 { get; set; } + public global::Leonardo.UploadMediaRequest? Type84 { get; set; } /// /// /// - public global::Leonardo.UploadMediaRequest? Type85 { get; set; } + public global::Leonardo.UploadCanvasInitImageRequest? Type85 { get; set; } /// /// /// - public global::Leonardo.UploadCanvasInitImageRequest? Type86 { get; set; } + public global::Leonardo.CreateVariationUnzoomRequest? Type86 { get; set; } /// /// /// - public global::Leonardo.CreateVariationUnzoomRequest? Type87 { get; set; } + public global::Leonardo.CreateVariationUpscaleRequest? Type87 { get; set; } /// /// /// - public global::Leonardo.CreateVariationUpscaleRequest? Type88 { get; set; } + public global::Leonardo.CreateVariationNoBGRequest? Type88 { get; set; } /// /// /// - public global::Leonardo.CreateVariationNoBGRequest? Type89 { get; set; } + public global::Leonardo.CreateUniversalUpscalerJobRequest? Type89 { get; set; } /// /// /// - public global::Leonardo.CreateUniversalUpscalerJobRequest? Type90 { get; set; } + public global::Leonardo.CreateDatasetRequest? Type90 { get; set; } /// /// /// - public global::Leonardo.CreateDatasetRequest? Type91 { get; set; } + public global::Leonardo.UploadDatasetImageRequest? Type91 { get; set; } /// /// /// - public global::Leonardo.UploadDatasetImageRequest? Type92 { get; set; } + public global::Leonardo.UploadDatasetImageFromGenRequest? Type92 { get; set; } /// /// /// - public global::Leonardo.UploadDatasetImageFromGenRequest? Type93 { get; set; } + public global::Leonardo.CreateModelRequest? Type93 { get; set; } /// /// /// - public global::Leonardo.CreateModelRequest? Type94 { get; set; } + public global::Leonardo.CreateElementRequest? Type94 { get; set; } /// /// /// - public global::Leonardo.CreateElementRequest? Type95 { get; set; } + public global::Leonardo.CreateElementRequestSdVersion? Type95 { get; set; } /// /// /// - public global::Leonardo.CreateElementRequestSdVersion? Type96 { get; set; } + public global::Leonardo.PromptImproveRequest? Type96 { get; set; } /// /// /// - public global::Leonardo.PromptImproveRequest? Type97 { get; set; } + public global::Leonardo.PricingCalculatorRequest? Type97 { get; set; } /// /// /// - public global::Leonardo.PricingCalculatorRequest? Type98 { get; set; } + public global::Leonardo.PricingCalculatorRequestServiceParams? Type98 { get; set; } /// /// /// - public global::Leonardo.PricingCalculatorRequestServiceParams? Type99 { get; set; } + public global::Leonardo.PricingCalculatorRequestServiceParamsImageGeneration? Type99 { get; set; } /// /// /// - public global::Leonardo.PricingCalculatorRequestServiceParamsImageGeneration? Type100 { get; set; } + public global::Leonardo.PricingCalculatorRequestServiceParamsFantasyAvatarGeneration? Type100 { get; set; } /// /// /// - public global::Leonardo.PricingCalculatorRequestServiceParamsFantasyAvatarGeneration? Type101 { get; set; } + public global::Leonardo.PricingCalculatorRequestServiceParamsMotionVideoGeneration? Type101 { get; set; } /// /// /// - public global::Leonardo.PricingCalculatorRequestServiceParamsMotionVideoGeneration? Type102 { get; set; } + public global::Leonardo.PricingCalculatorRequestServiceParamsVeo3MotionVideoGeneration? Type102 { get; set; } /// /// /// - public global::Leonardo.PricingCalculatorRequestServiceParamsVeo3MotionVideoGeneration? Type103 { get; set; } + public global::Leonardo.PricingCalculatorRequestServiceParamsVeo3MotionVideoGenerationResolution? Type103 { get; set; } /// /// /// - public global::Leonardo.PricingCalculatorRequestServiceParamsVeo3MotionVideoGenerationResolution? Type104 { get; set; } + public global::Leonardo.PricingCalculatorRequestServiceParamsLcmGeneration? Type104 { get; set; } /// /// /// - public global::Leonardo.PricingCalculatorRequestServiceParamsLcmGeneration? Type105 { get; set; } + public global::Leonardo.PricingCalculatorRequestServiceParamsModelTraining? Type105 { get; set; } /// /// /// - public global::Leonardo.PricingCalculatorRequestServiceParamsModelTraining? Type106 { get; set; } + public global::Leonardo.PricingCalculatorRequestServiceParamsTextureGeneration? Type106 { get; set; } /// /// /// - public global::Leonardo.PricingCalculatorRequestServiceParamsTextureGeneration? Type107 { get; set; } + public global::Leonardo.PricingCalculatorRequestServiceParamsUniversalUpscaler? Type107 { get; set; } /// /// /// - public global::Leonardo.PricingCalculatorRequestServiceParamsUniversalUpscaler? Type108 { get; set; } + public global::Leonardo.PricingCalculatorRequestServiceParamsUniversalUpscalerUltra? Type108 { get; set; } /// /// /// - public global::Leonardo.PricingCalculatorRequestServiceParamsUniversalUpscalerUltra? Type109 { get; set; } + public global::Leonardo.ListBlueprintsRequest? Type109 { get; set; } /// /// /// - public global::Leonardo.ListBlueprintsRequest? Type110 { get; set; } + public global::System.Collections.Generic.IList? Type110 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type111 { get; set; } + public global::Leonardo.ListBlueprintsRequestPlatform? Type111 { get; set; } /// /// /// - public global::Leonardo.ListBlueprintsRequestPlatform? Type112 { get; set; } + public global::Leonardo.ExecuteBlueprintRequest? Type112 { get; set; } /// /// /// - public global::Leonardo.ExecuteBlueprintRequest? Type113 { get; set; } + public global::Leonardo.ExecuteBlueprintRequestInput? Type113 { get; set; } /// /// /// - public global::Leonardo.ExecuteBlueprintRequestInput? Type114 { get; set; } + public global::System.Collections.Generic.IList? Type114 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type115 { get; set; } + public global::Leonardo.GetUserSelfResponse? Type115 { get; set; } /// /// /// - public global::Leonardo.GetUserSelfResponse? Type116 { get; set; } + public global::System.Collections.Generic.IList? Type116 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type117 { get; set; } + public global::Leonardo.GetUserSelfResponseUserDetail? Type117 { get; set; } /// /// /// - public global::Leonardo.GetUserSelfResponseUserDetail? Type118 { get; set; } + public global::Leonardo.GetUserSelfResponseUserDetailUser? Type118 { get; set; } /// /// /// - public global::Leonardo.GetUserSelfResponseUserDetailUser? Type119 { get; set; } + public global::Leonardo.CreateGenerationResponse? Type119 { get; set; } /// /// /// - public global::Leonardo.CreateGenerationResponse? Type120 { get; set; } + public global::Leonardo.CreateGenerationResponseSdGenerationJob? Type120 { get; set; } /// /// /// - public global::Leonardo.CreateGenerationResponseSdGenerationJob? Type121 { get; set; } + public global::Leonardo.GetGenerationByIdResponse? Type121 { get; set; } /// /// /// - public global::Leonardo.GetGenerationByIdResponse? Type122 { get; set; } + public global::Leonardo.GetGenerationByIdResponseGenerationsByPk? Type122 { get; set; } /// /// /// - public global::Leonardo.GetGenerationByIdResponseGenerationsByPk? Type123 { get; set; } + public global::System.Collections.Generic.IList? Type123 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type124 { get; set; } + public global::Leonardo.GetGenerationByIdResponseGenerationsByPkGeneratedImage? Type124 { get; set; } /// /// /// - public global::Leonardo.GetGenerationByIdResponseGenerationsByPkGeneratedImage? Type125 { get; set; } + public global::System.Collections.Generic.IList? Type125 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type126 { get; set; } + public global::Leonardo.GetGenerationByIdResponseGenerationsByPkGeneratedImageGeneratedImageVariationGeneric? Type126 { get; set; } /// /// /// - public global::Leonardo.GetGenerationByIdResponseGenerationsByPkGeneratedImageGeneratedImageVariationGeneric? Type127 { get; set; } + public global::System.Collections.Generic.IList? Type127 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type128 { get; set; } + public global::Leonardo.GetGenerationByIdResponseGenerationsByPkGenerationElement? Type128 { get; set; } /// /// /// - public global::Leonardo.GetGenerationByIdResponseGenerationsByPkGenerationElement? Type129 { get; set; } + public global::Leonardo.GetGenerationByIdResponseGenerationsByPkGenerationElementLora? Type129 { get; set; } /// /// /// - public global::Leonardo.GetGenerationByIdResponseGenerationsByPkGenerationElementLora? Type130 { get; set; } + public global::Leonardo.DeleteGenerationByIdResponse? Type130 { get; set; } /// /// /// - public global::Leonardo.DeleteGenerationByIdResponse? Type131 { get; set; } + public global::Leonardo.DeleteGenerationByIdResponseDeleteGenerationsByPk? Type131 { get; set; } /// /// /// - public global::Leonardo.DeleteGenerationByIdResponseDeleteGenerationsByPk? Type132 { get; set; } + public global::Leonardo.GetGenerationsByUserIdResponse? Type132 { get; set; } /// /// /// - public global::Leonardo.GetGenerationsByUserIdResponse? Type133 { get; set; } + public global::System.Collections.Generic.IList? Type133 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type134 { get; set; } + public global::Leonardo.GetGenerationsByUserIdResponseGeneration? Type134 { get; set; } /// /// /// - public global::Leonardo.GetGenerationsByUserIdResponseGeneration? Type135 { get; set; } + public global::System.Collections.Generic.IList? Type135 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type136 { get; set; } + public global::Leonardo.GetGenerationsByUserIdResponseGenerationGeneratedImage? Type136 { get; set; } /// /// /// - public global::Leonardo.GetGenerationsByUserIdResponseGenerationGeneratedImage? Type137 { get; set; } + public global::System.Collections.Generic.IList? Type137 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type138 { get; set; } + public global::Leonardo.GetGenerationsByUserIdResponseGenerationGeneratedImageGeneratedImageVariationGeneric? Type138 { get; set; } /// /// /// - public global::Leonardo.GetGenerationsByUserIdResponseGenerationGeneratedImageGeneratedImageVariationGeneric? Type139 { get; set; } + public global::System.Collections.Generic.IList? Type139 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type140 { get; set; } + public global::Leonardo.GetGenerationsByUserIdResponseGenerationGenerationElement? Type140 { get; set; } /// /// /// - public global::Leonardo.GetGenerationsByUserIdResponseGenerationGenerationElement? Type141 { get; set; } + public global::Leonardo.GetGenerationsByUserIdResponseGenerationGenerationElementLora? Type141 { get; set; } /// /// /// - public global::Leonardo.GetGenerationsByUserIdResponseGenerationGenerationElementLora? Type142 { get; set; } + public global::Leonardo.CreateImageToVideoGenerationResponse? Type142 { get; set; } /// /// /// - public global::Leonardo.CreateSVDMotionGenerationResponse? Type143 { get; set; } + public global::Leonardo.CreateImageToVideoGenerationResponseMotionVideoGenerationJob? Type143 { get; set; } /// /// /// - public global::Leonardo.CreateSVDMotionGenerationResponseMotionSvdGenerationJob? Type144 { get; set; } + public global::Leonardo.CreateTextToVideoGenerationResponse? Type144 { get; set; } /// /// /// - public global::Leonardo.CreateImageToVideoGenerationResponse? Type145 { get; set; } + public global::Leonardo.CreateTextToVideoGenerationResponseMotionVideoGenerationJob? Type145 { get; set; } /// /// /// - public global::Leonardo.CreateImageToVideoGenerationResponseMotionVideoGenerationJob? Type146 { get; set; } + public global::Leonardo.CreateLCMGenerationResponse? Type146 { get; set; } /// /// /// - public global::Leonardo.CreateTextToVideoGenerationResponse? Type147 { get; set; } + public global::Leonardo.CreateLCMGenerationResponseLcmGenerationJob? Type147 { get; set; } /// /// /// - public global::Leonardo.CreateTextToVideoGenerationResponseMotionVideoGenerationJob? Type148 { get; set; } + public global::Leonardo.PerformInstantRefineResponse? Type148 { get; set; } /// /// /// - public global::Leonardo.CreateLCMGenerationResponse? Type149 { get; set; } + public global::Leonardo.PerformInstantRefineResponseLcmGenerationJob? Type149 { get; set; } /// /// /// - public global::Leonardo.CreateLCMGenerationResponseLcmGenerationJob? Type150 { get; set; } + public global::Leonardo.PerformInpaintingLCMResponse? Type150 { get; set; } /// /// /// - public global::Leonardo.PerformInstantRefineResponse? Type151 { get; set; } + public global::Leonardo.PerformInpaintingLCMResponseLcmGenerationJob? Type151 { get; set; } /// /// /// - public global::Leonardo.PerformInstantRefineResponseLcmGenerationJob? Type152 { get; set; } + public global::Leonardo.PerformAlchemyUpscaleLCMResponse? Type152 { get; set; } /// /// /// - public global::Leonardo.PerformInpaintingLCMResponse? Type153 { get; set; } + public global::Leonardo.PerformAlchemyUpscaleLCMResponseLcmGenerationJob? Type153 { get; set; } /// /// /// - public global::Leonardo.PerformInpaintingLCMResponseLcmGenerationJob? Type154 { get; set; } + public global::Leonardo.UploadModelAssetResponse? Type154 { get; set; } /// /// /// - public global::Leonardo.PerformAlchemyUpscaleLCMResponse? Type155 { get; set; } + public global::Leonardo.UploadModelAssetResponseUploadModelAsset? Type155 { get; set; } /// /// /// - public global::Leonardo.PerformAlchemyUpscaleLCMResponseLcmGenerationJob? Type156 { get; set; } + public global::Leonardo.Get3DModelsByUserIdResponse? Type156 { get; set; } /// /// /// - public global::Leonardo.UploadModelAssetResponse? Type157 { get; set; } + public global::System.Collections.Generic.IList? Type157 { get; set; } /// /// /// - public global::Leonardo.UploadModelAssetResponseUploadModelAsset? Type158 { get; set; } + public global::Leonardo.Get3DModelsByUserIdResponseModelAsset? Type158 { get; set; } /// /// /// - public global::Leonardo.Get3DModelsByUserIdResponse? Type159 { get; set; } + public global::Leonardo.Get3DModelByIdResponse? Type159 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type160 { get; set; } + public global::Leonardo.Get3DModelByIdResponseModelAssetsByPk? Type160 { get; set; } /// /// /// - public global::Leonardo.Get3DModelsByUserIdResponseModelAsset? Type161 { get; set; } + public global::Leonardo.Delete3DModelByIdResponse? Type161 { get; set; } /// /// /// - public global::Leonardo.Get3DModelByIdResponse? Type162 { get; set; } + public global::Leonardo.Delete3DModelByIdResponseDeleteModelAssetsByPk? Type162 { get; set; } /// /// /// - public global::Leonardo.Get3DModelByIdResponseModelAssetsByPk? Type163 { get; set; } + public global::Leonardo.UploadInitImageResponse? Type163 { get; set; } /// /// /// - public global::Leonardo.Delete3DModelByIdResponse? Type164 { get; set; } + public global::Leonardo.UploadInitImageResponseUploadInitImage? Type164 { get; set; } /// /// /// - public global::Leonardo.Delete3DModelByIdResponseDeleteModelAssetsByPk? Type165 { get; set; } + public global::Leonardo.UploadMediaResponse? Type165 { get; set; } /// /// /// - public global::Leonardo.UploadInitImageResponse? Type166 { get; set; } + public global::Leonardo.UploadMediaResponseUploadMedia? Type166 { get; set; } /// /// /// - public global::Leonardo.UploadInitImageResponseUploadInitImage? Type167 { get; set; } + public global::Leonardo.GetUploadedMediaByIdResponse? Type167 { get; set; } /// /// /// - public global::Leonardo.UploadMediaResponse? Type168 { get; set; } + public global::Leonardo.GetUploadedMediaByIdResponseUploadedMediaByPk? Type168 { get; set; } /// /// /// - public global::Leonardo.UploadMediaResponseUploadMedia? Type169 { get; set; } + public global::Leonardo.DeleteUploadedMediaByIdResponse? Type169 { get; set; } /// /// /// - public global::Leonardo.GetUploadedMediaByIdResponse? Type170 { get; set; } + public global::Leonardo.DeleteUploadedMediaByIdResponseDeleteUploadedMediaByPk? Type170 { get; set; } /// /// /// - public global::Leonardo.GetUploadedMediaByIdResponseUploadedMediaByPk? Type171 { get; set; } + public global::Leonardo.GetInitImageByIdResponse? Type171 { get; set; } /// /// /// - public global::Leonardo.DeleteUploadedMediaByIdResponse? Type172 { get; set; } + public global::Leonardo.GetInitImageByIdResponseInitImagesByPk? Type172 { get; set; } /// /// /// - public global::Leonardo.DeleteUploadedMediaByIdResponseDeleteUploadedMediaByPk? Type173 { get; set; } + public global::Leonardo.DeleteInitImageByIdResponse? Type173 { get; set; } /// /// /// - public global::Leonardo.GetInitImageByIdResponse? Type174 { get; set; } + public global::Leonardo.DeleteInitImageByIdResponseDeleteInitImagesByPk? Type174 { get; set; } /// /// /// - public global::Leonardo.GetInitImageByIdResponseInitImagesByPk? Type175 { get; set; } + public global::Leonardo.UploadCanvasInitImageResponse? Type175 { get; set; } /// /// /// - public global::Leonardo.DeleteInitImageByIdResponse? Type176 { get; set; } + public global::Leonardo.UploadCanvasInitImageResponseUploadCanvasInitImage? Type176 { get; set; } /// /// /// - public global::Leonardo.DeleteInitImageByIdResponseDeleteInitImagesByPk? Type177 { get; set; } + public global::Leonardo.CreateVariationUnzoomResponse? Type177 { get; set; } /// /// /// - public global::Leonardo.UploadCanvasInitImageResponse? Type178 { get; set; } + public global::Leonardo.CreateVariationUnzoomResponseSdUnzoomJob? Type178 { get; set; } /// /// /// - public global::Leonardo.UploadCanvasInitImageResponseUploadCanvasInitImage? Type179 { get; set; } + public global::Leonardo.CreateVariationUpscaleResponse? Type179 { get; set; } /// /// /// - public global::Leonardo.CreateVariationUnzoomResponse? Type180 { get; set; } + public global::Leonardo.CreateVariationUpscaleResponseSdUpscaleJob? Type180 { get; set; } /// /// /// - public global::Leonardo.CreateVariationUnzoomResponseSdUnzoomJob? Type181 { get; set; } + public global::Leonardo.CreateVariationNoBGResponse? Type181 { get; set; } /// /// /// - public global::Leonardo.CreateVariationUpscaleResponse? Type182 { get; set; } + public global::Leonardo.CreateVariationNoBGResponseSdNobgJob? Type182 { get; set; } /// /// /// - public global::Leonardo.CreateVariationUpscaleResponseSdUpscaleJob? Type183 { get; set; } + public global::Leonardo.CreateUniversalUpscalerJobResponse? Type183 { get; set; } /// /// /// - public global::Leonardo.CreateVariationNoBGResponse? Type184 { get; set; } + public global::Leonardo.CreateUniversalUpscalerJobResponseUniversalUpscaler? Type184 { get; set; } /// /// /// - public global::Leonardo.CreateVariationNoBGResponseSdNobgJob? Type185 { get; set; } + public global::Leonardo.GetVariationByIdResponse? Type185 { get; set; } /// /// /// - public global::Leonardo.CreateUniversalUpscalerJobResponse? Type186 { get; set; } + public global::System.Collections.Generic.IList? Type186 { get; set; } /// /// /// - public global::Leonardo.CreateUniversalUpscalerJobResponseUniversalUpscaler? Type187 { get; set; } + public global::Leonardo.GetVariationByIdResponseGeneratedImageVariationGenericItem? Type187 { get; set; } /// /// /// - public global::Leonardo.GetVariationByIdResponse? Type188 { get; set; } + public global::Leonardo.GetMotionVariationByIdResponse? Type188 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type189 { get; set; } + public global::System.Collections.Generic.IList? Type189 { get; set; } /// /// /// - public global::Leonardo.GetVariationByIdResponseGeneratedImageVariationGenericItem? Type190 { get; set; } + public global::Leonardo.GetMotionVariationByIdResponseGeneratedImageVariationMotionItem? Type190 { get; set; } /// /// /// - public global::Leonardo.GetMotionVariationByIdResponse? Type191 { get; set; } + public global::Leonardo.CreateDatasetResponse? Type191 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type192 { get; set; } + public global::Leonardo.CreateDatasetResponseInsertDatasetsOne? Type192 { get; set; } /// /// /// - public global::Leonardo.GetMotionVariationByIdResponseGeneratedImageVariationMotionItem? Type193 { get; set; } + public global::Leonardo.GetDatasetByIdResponse? Type193 { get; set; } /// /// /// - public global::Leonardo.CreateDatasetResponse? Type194 { get; set; } + public global::Leonardo.GetDatasetByIdResponseDatasetsByPk? Type194 { get; set; } /// /// /// - public global::Leonardo.CreateDatasetResponseInsertDatasetsOne? Type195 { get; set; } + public global::System.Collections.Generic.IList? Type195 { get; set; } /// /// /// - public global::Leonardo.GetDatasetByIdResponse? Type196 { get; set; } + public global::Leonardo.GetDatasetByIdResponseDatasetsByPkDatasetImage? Type196 { get; set; } /// /// /// - public global::Leonardo.GetDatasetByIdResponseDatasetsByPk? Type197 { get; set; } + public global::Leonardo.DeleteDatasetByIdResponse? Type197 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type198 { get; set; } + public global::Leonardo.DeleteDatasetByIdResponseDeleteDatasetsByPk? Type198 { get; set; } /// /// /// - public global::Leonardo.GetDatasetByIdResponseDatasetsByPkDatasetImage? Type199 { get; set; } + public global::Leonardo.UploadDatasetImageResponse? Type199 { get; set; } /// /// /// - public global::Leonardo.DeleteDatasetByIdResponse? Type200 { get; set; } + public global::Leonardo.UploadDatasetImageResponseUploadDatasetImage? Type200 { get; set; } /// /// /// - public global::Leonardo.DeleteDatasetByIdResponseDeleteDatasetsByPk? Type201 { get; set; } + public global::Leonardo.UploadDatasetImageFromGenResponse? Type201 { get; set; } /// /// /// - public global::Leonardo.UploadDatasetImageResponse? Type202 { get; set; } + public global::Leonardo.UploadDatasetImageFromGenResponseUploadDatasetImageFromGen? Type202 { get; set; } /// /// /// - public global::Leonardo.UploadDatasetImageResponseUploadDatasetImage? Type203 { get; set; } + public global::Leonardo.CreateModelResponse? Type203 { get; set; } /// /// /// - public global::Leonardo.UploadDatasetImageFromGenResponse? Type204 { get; set; } + public global::Leonardo.CreateModelResponseSdTrainingJob? Type204 { get; set; } /// /// /// - public global::Leonardo.UploadDatasetImageFromGenResponseUploadDatasetImageFromGen? Type205 { get; set; } + public global::Leonardo.GetModelByIdResponse? Type205 { get; set; } /// /// /// - public global::Leonardo.CreateModelResponse? Type206 { get; set; } + public global::Leonardo.GetModelByIdResponseCustomModelsByPk? Type206 { get; set; } /// /// /// - public global::Leonardo.CreateModelResponseSdTrainingJob? Type207 { get; set; } + public global::Leonardo.DeleteModelByIdResponse? Type207 { get; set; } /// /// /// - public global::Leonardo.GetModelByIdResponse? Type208 { get; set; } + public global::Leonardo.DeleteModelByIdResponseDeleteCustomModelsByPk? Type208 { get; set; } /// /// /// - public global::Leonardo.GetModelByIdResponseCustomModelsByPk? Type209 { get; set; } + public global::Leonardo.GetCustomModelsByUserIdResponse? Type209 { get; set; } /// /// /// - public global::Leonardo.DeleteModelByIdResponse? Type210 { get; set; } + public global::System.Collections.Generic.IList? Type210 { get; set; } /// /// /// - public global::Leonardo.DeleteModelByIdResponseDeleteCustomModelsByPk? Type211 { get; set; } + public global::Leonardo.GetCustomModelsByUserIdResponseCustomModel? Type211 { get; set; } /// /// /// - public global::Leonardo.GetCustomModelsByUserIdResponse? Type212 { get; set; } + public global::Leonardo.ListPlatformModelsResponse? Type212 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type213 { get; set; } + public global::System.Collections.Generic.IList? Type213 { get; set; } /// /// /// - public global::Leonardo.GetCustomModelsByUserIdResponseCustomModel? Type214 { get; set; } + public global::Leonardo.ListPlatformModelsResponseCustomModel? Type214 { get; set; } /// /// /// - public global::Leonardo.ListPlatformModelsResponse? Type215 { get; set; } + public global::Leonardo.ListPlatformModelsResponseCustomModelGeneratedImage? Type215 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type216 { get; set; } + public global::Leonardo.GetElementByIdResponse? Type216 { get; set; } /// /// /// - public global::Leonardo.ListPlatformModelsResponseCustomModel? Type217 { get; set; } + public global::Leonardo.GetElementByIdResponseUserLorasByPk? Type217 { get; set; } /// /// /// - public global::Leonardo.ListPlatformModelsResponseCustomModelGeneratedImage? Type218 { get; set; } + public global::Leonardo.DeleteElementByIdResponse? Type218 { get; set; } /// /// /// - public global::Leonardo.GetElementByIdResponse? Type219 { get; set; } + public global::Leonardo.DeleteElementByIdResponseDeleteUserLorasByPk? Type219 { get; set; } /// /// /// - public global::Leonardo.GetElementByIdResponseUserLorasByPk? Type220 { get; set; } + public global::Leonardo.GetCustomElementsByUserIdResponse? Type220 { get; set; } /// /// /// - public global::Leonardo.DeleteElementByIdResponse? Type221 { get; set; } + public global::System.Collections.Generic.IList? Type221 { get; set; } /// /// /// - public global::Leonardo.DeleteElementByIdResponseDeleteUserLorasByPk? Type222 { get; set; } + public global::Leonardo.GetCustomElementsByUserIdResponseUserLora? Type222 { get; set; } /// /// /// - public global::Leonardo.GetCustomElementsByUserIdResponse? Type223 { get; set; } + public global::Leonardo.CreateElementResponse? Type223 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type224 { get; set; } + public global::Leonardo.CreateElementResponseSdTrainingJob? Type224 { get; set; } /// /// /// - public global::Leonardo.GetCustomElementsByUserIdResponseUserLora? Type225 { get; set; } + public global::Leonardo.ListElementsResponse? Type225 { get; set; } /// /// /// - public global::Leonardo.CreateElementResponse? Type226 { get; set; } + public global::System.Collections.Generic.IList? Type226 { get; set; } /// /// /// - public global::Leonardo.CreateElementResponseSdTrainingJob? Type227 { get; set; } + public global::Leonardo.ListElementsResponseLora? Type227 { get; set; } /// /// /// - public global::Leonardo.ListElementsResponse? Type228 { get; set; } + public global::Leonardo.PromptRandomResponse? Type228 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type229 { get; set; } + public global::Leonardo.PromptRandomResponsePromptGeneration? Type229 { get; set; } /// /// /// - public global::Leonardo.ListElementsResponseLora? Type230 { get; set; } + public global::Leonardo.PromptImproveResponse? Type230 { get; set; } /// /// /// - public global::Leonardo.PromptRandomResponse? Type231 { get; set; } + public global::Leonardo.PromptImproveResponsePromptGeneration? Type231 { get; set; } /// /// /// - public global::Leonardo.PromptRandomResponsePromptGeneration? Type232 { get; set; } + public global::Leonardo.PricingCalculatorResponse? Type232 { get; set; } /// /// /// - public global::Leonardo.PromptImproveResponse? Type233 { get; set; } + public global::Leonardo.PricingCalculatorResponseCalculateProductionApiServiceCost? Type233 { get; set; } /// /// /// - public global::Leonardo.PromptImproveResponsePromptGeneration? Type234 { get; set; } + public global::Leonardo.OneOf>? Type234 { get; set; } /// /// /// - public global::Leonardo.PricingCalculatorResponse? Type235 { get; set; } + public global::Leonardo.ListBlueprintsResponse2? Type235 { get; set; } /// /// /// - public global::Leonardo.PricingCalculatorResponseCalculateProductionApiServiceCost? Type236 { get; set; } + public global::Leonardo.ListBlueprintsResponseBlueprints? Type236 { get; set; } /// /// /// - public global::Leonardo.OneOf>? Type237 { get; set; } + public global::System.Collections.Generic.IList? Type237 { get; set; } /// /// /// - public global::Leonardo.ListBlueprintsResponse2? Type238 { get; set; } + public global::Leonardo.ListBlueprintsResponseBlueprintsEdge? Type238 { get; set; } /// /// /// - public global::Leonardo.ListBlueprintsResponseBlueprints? Type239 { get; set; } + public global::System.Collections.Generic.IList? Type239 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type240 { get; set; } + public global::Leonardo.OneOf>? Type240 { get; set; } /// /// /// - public global::Leonardo.ListBlueprintsResponseBlueprintsEdge? Type241 { get; set; } + public global::Leonardo.GetBlueprintByIdResponse2? Type241 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type242 { get; set; } + public global::Leonardo.OneOf>? Type242 { get; set; } /// /// /// - public global::Leonardo.OneOf>? Type243 { get; set; } + public global::Leonardo.GetBlueprintVersionsByBlueprintIdResponse2? Type243 { get; set; } /// /// /// - public global::Leonardo.GetBlueprintByIdResponse2? Type244 { get; set; } + public global::Leonardo.OneOf>? Type244 { get; set; } /// /// /// - public global::Leonardo.OneOf>? Type245 { get; set; } + public global::Leonardo.ExecuteBlueprintResponse2? Type245 { get; set; } /// /// /// - public global::Leonardo.GetBlueprintVersionsByBlueprintIdResponse2? Type246 { get; set; } + public global::Leonardo.ExecuteBlueprintResponseExecuteBlueprint? Type246 { get; set; } /// /// /// - public global::Leonardo.OneOf>? Type247 { get; set; } + public global::Leonardo.ExecuteBlueprintResponse3? Type247 { get; set; } /// /// /// - public global::Leonardo.ExecuteBlueprintResponse2? Type248 { get; set; } + public global::Leonardo.OneOf>? Type248 { get; set; } /// /// /// - public global::Leonardo.ExecuteBlueprintResponseExecuteBlueprint? Type249 { get; set; } + public global::Leonardo.GetBlueprintExecutionResponse2? Type249 { get; set; } /// /// /// - public global::Leonardo.ExecuteBlueprintResponse3? Type250 { get; set; } - /// - /// - /// - public global::Leonardo.OneOf>? Type251 { get; set; } - /// - /// - /// - public global::Leonardo.GetBlueprintExecutionResponse2? Type252 { get; set; } - /// - /// - /// - public global::Leonardo.GetBlueprintExecutionGenerationsResponse? Type253 { get; set; } + public global::Leonardo.GetBlueprintExecutionGenerationsResponse? Type250 { get; set; } /// /// diff --git a/src/libs/Leonardo/Generated/Leonardo.MediaClient.DeleteUploadedMediaById.g.cs b/src/libs/Leonardo/Generated/Leonardo.MediaClient.DeleteUploadedMediaById.g.cs index 5f05a2a..4af34b9 100644 --- a/src/libs/Leonardo/Generated/Leonardo.MediaClient.DeleteUploadedMediaById.g.cs +++ b/src/libs/Leonardo/Generated/Leonardo.MediaClient.DeleteUploadedMediaById.g.cs @@ -358,17 +358,15 @@ partial void ProcessDeleteUploadedMediaByIdResponseContent( } catch (global::System.Exception __ex) { - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -405,17 +403,15 @@ partial void ProcessDeleteUploadedMediaByIdResponseContent( { } - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Leonardo/Generated/Leonardo.MediaClient.GetUploadedMediaById.g.cs b/src/libs/Leonardo/Generated/Leonardo.MediaClient.GetUploadedMediaById.g.cs index 75642d7..93b4799 100644 --- a/src/libs/Leonardo/Generated/Leonardo.MediaClient.GetUploadedMediaById.g.cs +++ b/src/libs/Leonardo/Generated/Leonardo.MediaClient.GetUploadedMediaById.g.cs @@ -358,17 +358,15 @@ partial void ProcessGetUploadedMediaByIdResponseContent( } catch (global::System.Exception __ex) { - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -405,17 +403,15 @@ partial void ProcessGetUploadedMediaByIdResponseContent( { } - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Leonardo/Generated/Leonardo.MediaClient.UploadMedia.g.cs b/src/libs/Leonardo/Generated/Leonardo.MediaClient.UploadMedia.g.cs index f57544f..a3b41d9 100644 --- a/src/libs/Leonardo/Generated/Leonardo.MediaClient.UploadMedia.g.cs +++ b/src/libs/Leonardo/Generated/Leonardo.MediaClient.UploadMedia.g.cs @@ -43,7 +43,7 @@ partial void ProcessUploadMediaResponseContent( /// /// Upload media
- /// This endpoint returns presigned details to upload a media file to S3 + /// This endpoint returns presigned POST credentials to upload a video or audio file directly to S3. ///
/// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. @@ -66,7 +66,7 @@ partial void ProcessUploadMediaResponseContent( } /// /// Upload media
- /// This endpoint returns presigned details to upload a media file to S3 + /// This endpoint returns presigned POST credentials to upload a video or audio file directly to S3. ///
/// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. @@ -369,17 +369,15 @@ partial void ProcessUploadMediaResponseContent( } catch (global::System.Exception __ex) { - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -416,17 +414,15 @@ partial void ProcessUploadMediaResponseContent( { } - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } @@ -439,22 +435,32 @@ partial void ProcessUploadMediaResponseContent( } /// /// Upload media
- /// This endpoint returns presigned details to upload a media file to S3 + /// This endpoint returns presigned POST credentials to upload a video or audio file directly to S3. ///
/// - /// The file extension of the media file to upload. Supported extensions: mp4, mov. + /// The file extension of the media file to upload. Supported extensions for video: `mp4`, `mov`. Supported for audio: `mp3`, `wav`. + /// + /// + /// Original file name for display. Required for audio uploads (`mp3`, `wav`). Optional for video. + /// + /// + /// Optional team UUID. When set, the upload is associated with that team and the caller must be a member. /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task UploadMediaAsync( string extension, + string? originalFilename = default, + string? teamId = default, global::Leonardo.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) { var __request = new global::Leonardo.UploadMediaRequest { Extension = extension, + OriginalFilename = originalFilename, + TeamId = teamId, }; return await UploadMediaAsync( diff --git a/src/libs/Leonardo/Generated/Leonardo.Models.CreateSVDMotionGenerationRequest.Json.g.cs b/src/libs/Leonardo/Generated/Leonardo.Models.CreateSVDMotionGenerationRequest.Json.g.cs deleted file mode 100644 index c0566d2..0000000 --- a/src/libs/Leonardo/Generated/Leonardo.Models.CreateSVDMotionGenerationRequest.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Leonardo -{ - public sealed partial class CreateSVDMotionGenerationRequest - { - /// - /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. - /// - public string ToJson( - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Serialize( - this, - this.GetType(), - jsonSerializerContext); - } - - /// - /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. - /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] - [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] -#endif - public string ToJson( - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Serialize( - this, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON string using the provided JsonSerializerContext. - /// - public static global::Leonardo.CreateSVDMotionGenerationRequest? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Leonardo.CreateSVDMotionGenerationRequest), - jsonSerializerContext) as global::Leonardo.CreateSVDMotionGenerationRequest; - } - - /// - /// Deserializes a JSON string using the provided JsonSerializerOptions. - /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] - [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] -#endif - public static global::Leonardo.CreateSVDMotionGenerationRequest? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::Leonardo.CreateSVDMotionGenerationRequest), - jsonSerializerContext).ConfigureAwait(false)) as global::Leonardo.CreateSVDMotionGenerationRequest; - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. - /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] - [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] -#endif - public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/Leonardo/Generated/Leonardo.Models.CreateSVDMotionGenerationRequest.g.cs b/src/libs/Leonardo/Generated/Leonardo.Models.CreateSVDMotionGenerationRequest.g.cs deleted file mode 100644 index e007239..0000000 --- a/src/libs/Leonardo/Generated/Leonardo.Models.CreateSVDMotionGenerationRequest.g.cs +++ /dev/null @@ -1,91 +0,0 @@ - -#nullable enable - -namespace Leonardo -{ - /// - /// - /// - public sealed partial class CreateSVDMotionGenerationRequest - { - /// - /// The ID of the image, supports generated images, variation images, and init images. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("imageId")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string ImageId { get; set; } - - /// - /// Whether the generation is public or not - /// - [global::System.Text.Json.Serialization.JsonPropertyName("isPublic")] - public bool? IsPublic { get; set; } - - /// - /// If it is an init image uploaded by the user. This image is uploaded from endpoint: Upload init image. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("isInitImage")] - public bool? IsInitImage { get; set; } - - /// - /// If it is a variation image. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("isVariation")] - public bool? IsVariation { get; set; } - - /// - /// The motion strength. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("motionStrength")] - public int? MotionStrength { get; set; } - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// The ID of the image, supports generated images, variation images, and init images. - /// - /// - /// Whether the generation is public or not - /// - /// - /// If it is an init image uploaded by the user. This image is uploaded from endpoint: Upload init image. - /// - /// - /// If it is a variation image. - /// - /// - /// The motion strength. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public CreateSVDMotionGenerationRequest( - string imageId, - bool? isPublic, - bool? isInitImage, - bool? isVariation, - int? motionStrength) - { - this.ImageId = imageId ?? throw new global::System.ArgumentNullException(nameof(imageId)); - this.IsPublic = isPublic; - this.IsInitImage = isInitImage; - this.IsVariation = isVariation; - this.MotionStrength = motionStrength; - } - - /// - /// Initializes a new instance of the class. - /// - public CreateSVDMotionGenerationRequest() - { - } - - } -} \ No newline at end of file diff --git a/src/libs/Leonardo/Generated/Leonardo.Models.CreateSVDMotionGenerationResponse.Json.g.cs b/src/libs/Leonardo/Generated/Leonardo.Models.CreateSVDMotionGenerationResponse.Json.g.cs deleted file mode 100644 index 894a0a4..0000000 --- a/src/libs/Leonardo/Generated/Leonardo.Models.CreateSVDMotionGenerationResponse.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Leonardo -{ - public sealed partial class CreateSVDMotionGenerationResponse - { - /// - /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. - /// - public string ToJson( - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Serialize( - this, - this.GetType(), - jsonSerializerContext); - } - - /// - /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. - /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] - [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] -#endif - public string ToJson( - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Serialize( - this, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON string using the provided JsonSerializerContext. - /// - public static global::Leonardo.CreateSVDMotionGenerationResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Leonardo.CreateSVDMotionGenerationResponse), - jsonSerializerContext) as global::Leonardo.CreateSVDMotionGenerationResponse; - } - - /// - /// Deserializes a JSON string using the provided JsonSerializerOptions. - /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] - [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] -#endif - public static global::Leonardo.CreateSVDMotionGenerationResponse? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::Leonardo.CreateSVDMotionGenerationResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::Leonardo.CreateSVDMotionGenerationResponse; - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. - /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] - [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] -#endif - public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/Leonardo/Generated/Leonardo.Models.CreateSVDMotionGenerationResponse.g.cs b/src/libs/Leonardo/Generated/Leonardo.Models.CreateSVDMotionGenerationResponse.g.cs deleted file mode 100644 index 4741b99..0000000 --- a/src/libs/Leonardo/Generated/Leonardo.Models.CreateSVDMotionGenerationResponse.g.cs +++ /dev/null @@ -1,44 +0,0 @@ - -#nullable enable - -namespace Leonardo -{ - /// - /// - /// - public sealed partial class CreateSVDMotionGenerationResponse - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("motionSvdGenerationJob")] - public global::Leonardo.CreateSVDMotionGenerationResponseMotionSvdGenerationJob? MotionSvdGenerationJob { get; set; } - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public CreateSVDMotionGenerationResponse( - global::Leonardo.CreateSVDMotionGenerationResponseMotionSvdGenerationJob? motionSvdGenerationJob) - { - this.MotionSvdGenerationJob = motionSvdGenerationJob; - } - - /// - /// Initializes a new instance of the class. - /// - public CreateSVDMotionGenerationResponse() - { - } - - } -} \ No newline at end of file diff --git a/src/libs/Leonardo/Generated/Leonardo.Models.CreateSVDMotionGenerationResponseMotionSvdGenerationJob.Json.g.cs b/src/libs/Leonardo/Generated/Leonardo.Models.CreateSVDMotionGenerationResponseMotionSvdGenerationJob.Json.g.cs deleted file mode 100644 index fb76de2..0000000 --- a/src/libs/Leonardo/Generated/Leonardo.Models.CreateSVDMotionGenerationResponseMotionSvdGenerationJob.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Leonardo -{ - public sealed partial class CreateSVDMotionGenerationResponseMotionSvdGenerationJob - { - /// - /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. - /// - public string ToJson( - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Serialize( - this, - this.GetType(), - jsonSerializerContext); - } - - /// - /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. - /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] - [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] -#endif - public string ToJson( - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Serialize( - this, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON string using the provided JsonSerializerContext. - /// - public static global::Leonardo.CreateSVDMotionGenerationResponseMotionSvdGenerationJob? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Leonardo.CreateSVDMotionGenerationResponseMotionSvdGenerationJob), - jsonSerializerContext) as global::Leonardo.CreateSVDMotionGenerationResponseMotionSvdGenerationJob; - } - - /// - /// Deserializes a JSON string using the provided JsonSerializerOptions. - /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] - [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] -#endif - public static global::Leonardo.CreateSVDMotionGenerationResponseMotionSvdGenerationJob? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - jsonSerializerOptions); - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerContext. - /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::Leonardo.CreateSVDMotionGenerationResponseMotionSvdGenerationJob), - jsonSerializerContext).ConfigureAwait(false)) as global::Leonardo.CreateSVDMotionGenerationResponseMotionSvdGenerationJob; - } - - /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. - /// -#if NET8_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] - [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] -#endif - public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } -} diff --git a/src/libs/Leonardo/Generated/Leonardo.Models.CreateSVDMotionGenerationResponseMotionSvdGenerationJob.g.cs b/src/libs/Leonardo/Generated/Leonardo.Models.CreateSVDMotionGenerationResponseMotionSvdGenerationJob.g.cs deleted file mode 100644 index a92c83f..0000000 --- a/src/libs/Leonardo/Generated/Leonardo.Models.CreateSVDMotionGenerationResponseMotionSvdGenerationJob.g.cs +++ /dev/null @@ -1,64 +0,0 @@ - -#pragma warning disable CS0618 // Type or member is obsolete - -#nullable enable - -namespace Leonardo -{ - /// - /// - /// - public sealed partial class CreateSVDMotionGenerationResponseMotionSvdGenerationJob - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("generationId")] - public string? GenerationId { get; set; } - - /// - /// API credits cost, available for Production API users. Note: it will be deprecated. Please use the cost instead. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("apiCreditCost")] - [global::System.Obsolete("This property marked as deprecated.")] - public int? ApiCreditCost { get; set; } - - /// - /// The cost of the operation. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("cost")] - public global::Leonardo.Cost? Cost { get; set; } - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// - /// The cost of the operation. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public CreateSVDMotionGenerationResponseMotionSvdGenerationJob( - string? generationId, - global::Leonardo.Cost? cost) - { - this.GenerationId = generationId; - this.Cost = cost; - } - - /// - /// Initializes a new instance of the class. - /// - public CreateSVDMotionGenerationResponseMotionSvdGenerationJob() - { - } - - } -} \ No newline at end of file diff --git a/src/libs/Leonardo/Generated/Leonardo.Models.UploadMediaRequest.g.cs b/src/libs/Leonardo/Generated/Leonardo.Models.UploadMediaRequest.g.cs index 75dca98..f943767 100644 --- a/src/libs/Leonardo/Generated/Leonardo.Models.UploadMediaRequest.g.cs +++ b/src/libs/Leonardo/Generated/Leonardo.Models.UploadMediaRequest.g.cs @@ -9,12 +9,24 @@ namespace Leonardo public sealed partial class UploadMediaRequest { /// - /// The file extension of the media file to upload. Supported extensions: mp4, mov. + /// The file extension of the media file to upload. Supported extensions for video: `mp4`, `mov`. Supported for audio: `mp3`, `wav`. /// [global::System.Text.Json.Serialization.JsonPropertyName("extension")] [global::System.Text.Json.Serialization.JsonRequired] public required string Extension { get; set; } + /// + /// Original file name for display. Required for audio uploads (`mp3`, `wav`). Optional for video. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("originalFilename")] + public string? OriginalFilename { get; set; } + + /// + /// Optional team UUID. When set, the upload is associated with that team and the caller must be a member. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("teamId")] + public string? TeamId { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -25,15 +37,25 @@ public sealed partial class UploadMediaRequest /// Initializes a new instance of the class. ///
/// - /// The file extension of the media file to upload. Supported extensions: mp4, mov. + /// The file extension of the media file to upload. Supported extensions for video: `mp4`, `mov`. Supported for audio: `mp3`, `wav`. + /// + /// + /// Original file name for display. Required for audio uploads (`mp3`, `wav`). Optional for video. + /// + /// + /// Optional team UUID. When set, the upload is associated with that team and the caller must be a member. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public UploadMediaRequest( - string extension) + string extension, + string? originalFilename, + string? teamId) { this.Extension = extension ?? throw new global::System.ArgumentNullException(nameof(extension)); + this.OriginalFilename = originalFilename; + this.TeamId = teamId; } /// diff --git a/src/libs/Leonardo/Generated/Leonardo.ModelsClient.CreateModel.g.cs b/src/libs/Leonardo/Generated/Leonardo.ModelsClient.CreateModel.g.cs index 70b6f80..7a4d2d2 100644 --- a/src/libs/Leonardo/Generated/Leonardo.ModelsClient.CreateModel.g.cs +++ b/src/libs/Leonardo/Generated/Leonardo.ModelsClient.CreateModel.g.cs @@ -369,17 +369,15 @@ partial void ProcessCreateModelResponseContent( } catch (global::System.Exception __ex) { - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -416,17 +414,15 @@ partial void ProcessCreateModelResponseContent( { } - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Leonardo/Generated/Leonardo.ModelsClient.DeleteModelById.g.cs b/src/libs/Leonardo/Generated/Leonardo.ModelsClient.DeleteModelById.g.cs index a33fcfa..40b408c 100644 --- a/src/libs/Leonardo/Generated/Leonardo.ModelsClient.DeleteModelById.g.cs +++ b/src/libs/Leonardo/Generated/Leonardo.ModelsClient.DeleteModelById.g.cs @@ -358,17 +358,15 @@ partial void ProcessDeleteModelByIdResponseContent( } catch (global::System.Exception __ex) { - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -405,17 +403,15 @@ partial void ProcessDeleteModelByIdResponseContent( { } - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Leonardo/Generated/Leonardo.ModelsClient.GetCustomModelsByUserId.g.cs b/src/libs/Leonardo/Generated/Leonardo.ModelsClient.GetCustomModelsByUserId.g.cs index bc1259e..a93c172 100644 --- a/src/libs/Leonardo/Generated/Leonardo.ModelsClient.GetCustomModelsByUserId.g.cs +++ b/src/libs/Leonardo/Generated/Leonardo.ModelsClient.GetCustomModelsByUserId.g.cs @@ -358,17 +358,15 @@ partial void ProcessGetCustomModelsByUserIdResponseContent( } catch (global::System.Exception __ex) { - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -405,17 +403,15 @@ partial void ProcessGetCustomModelsByUserIdResponseContent( { } - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Leonardo/Generated/Leonardo.ModelsClient.GetModelById.g.cs b/src/libs/Leonardo/Generated/Leonardo.ModelsClient.GetModelById.g.cs index f281d39..02393f5 100644 --- a/src/libs/Leonardo/Generated/Leonardo.ModelsClient.GetModelById.g.cs +++ b/src/libs/Leonardo/Generated/Leonardo.ModelsClient.GetModelById.g.cs @@ -358,17 +358,15 @@ partial void ProcessGetModelByIdResponseContent( } catch (global::System.Exception __ex) { - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -405,17 +403,15 @@ partial void ProcessGetModelByIdResponseContent( { } - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Leonardo/Generated/Leonardo.ModelsClient.ListPlatformModels.g.cs b/src/libs/Leonardo/Generated/Leonardo.ModelsClient.ListPlatformModels.g.cs index 12cbfa2..baffd3b 100644 --- a/src/libs/Leonardo/Generated/Leonardo.ModelsClient.ListPlatformModels.g.cs +++ b/src/libs/Leonardo/Generated/Leonardo.ModelsClient.ListPlatformModels.g.cs @@ -349,17 +349,15 @@ partial void ProcessListPlatformModelsResponseContent( } catch (global::System.Exception __ex) { - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -396,17 +394,15 @@ partial void ProcessListPlatformModelsResponseContent( { } - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Leonardo/Generated/Leonardo.MotionClient.CreateImageToVideoGeneration.g.cs b/src/libs/Leonardo/Generated/Leonardo.MotionClient.CreateImageToVideoGeneration.g.cs index be8df98..c18cea1 100644 --- a/src/libs/Leonardo/Generated/Leonardo.MotionClient.CreateImageToVideoGeneration.g.cs +++ b/src/libs/Leonardo/Generated/Leonardo.MotionClient.CreateImageToVideoGeneration.g.cs @@ -369,17 +369,15 @@ partial void ProcessCreateImageToVideoGenerationResponseContent( } catch (global::System.Exception __ex) { - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -416,17 +414,15 @@ partial void ProcessCreateImageToVideoGenerationResponseContent( { } - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Leonardo/Generated/Leonardo.MotionClient.CreateSVDMotionGeneration.g.cs b/src/libs/Leonardo/Generated/Leonardo.MotionClient.CreateSVDMotionGeneration.g.cs deleted file mode 100644 index 0cb352f..0000000 --- a/src/libs/Leonardo/Generated/Leonardo.MotionClient.CreateSVDMotionGeneration.g.cs +++ /dev/null @@ -1,486 +0,0 @@ - -#nullable enable - -namespace Leonardo -{ - public partial class MotionClient - { - - - private static readonly global::Leonardo.EndPointSecurityRequirement s_CreateSVDMotionGenerationSecurityRequirement0 = - new global::Leonardo.EndPointSecurityRequirement - { - Authorizations = new global::Leonardo.EndPointAuthorizationRequirement[] - { new global::Leonardo.EndPointAuthorizationRequirement - { - Type = "Http", - SchemeId = "BearerAuth", - Location = "Header", - Name = "Bearer", - FriendlyName = "Bearer", - }, - }, - }; - private static readonly global::Leonardo.EndPointSecurityRequirement[] s_CreateSVDMotionGenerationSecurityRequirements = - new global::Leonardo.EndPointSecurityRequirement[] - { s_CreateSVDMotionGenerationSecurityRequirement0, - }; - partial void PrepareCreateSVDMotionGenerationArguments( - global::System.Net.Http.HttpClient httpClient, - global::Leonardo.CreateSVDMotionGenerationRequest request); - partial void PrepareCreateSVDMotionGenerationRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - global::Leonardo.CreateSVDMotionGenerationRequest request); - partial void ProcessCreateSVDMotionGenerationResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessCreateSVDMotionGenerationResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// Create SVD Motion Generation
- /// This endpoint will generate a SVD motion generation. - ///
- /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task CreateSVDMotionGenerationAsync( - - global::Leonardo.CreateSVDMotionGenerationRequest request, - global::Leonardo.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - var __response = await CreateSVDMotionGenerationAsResponseAsync( - - request: request, - requestOptions: requestOptions, - cancellationToken: cancellationToken - ).ConfigureAwait(false); - - return __response.Body; - } - /// - /// Create SVD Motion Generation
- /// This endpoint will generate a SVD motion generation. - ///
- /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task> CreateSVDMotionGenerationAsResponseAsync( - - global::Leonardo.CreateSVDMotionGenerationRequest request, - global::Leonardo.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - request = request ?? throw new global::System.ArgumentNullException(nameof(request)); - - PrepareArguments( - client: HttpClient); - PrepareCreateSVDMotionGenerationArguments( - httpClient: HttpClient, - request: request); - - - var __authorizations = global::Leonardo.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_CreateSVDMotionGenerationSecurityRequirements, - operationName: "CreateSVDMotionGenerationAsync"); - - using var __timeoutCancellationTokenSource = global::Leonardo.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( - clientOptions: Options, - requestOptions: requestOptions, - cancellationToken: cancellationToken); - var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; - var __effectiveReadResponseAsString = global::Leonardo.AutoSDKRequestOptionsSupport.GetReadResponseAsString( - clientOptions: Options, - requestOptions: requestOptions, - fallbackValue: ReadResponseAsString); - var __maxAttempts = global::Leonardo.AutoSDKRequestOptionsSupport.GetMaxAttempts( - clientOptions: Options, - requestOptions: requestOptions, - supportsRetry: true); - - global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() - { - - var __pathBuilder = new global::Leonardo.PathBuilder( - path: "/generations-motion-svd", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - __path = global::Leonardo.AutoSDKRequestOptionsSupport.AppendQueryParameters( - path: __path, - clientParameters: Options.QueryParameters, - requestParameters: requestOptions?.QueryParameters); - var __httpRequest = new global::System.Net.Http.HttpRequestMessage( - method: global::System.Net.Http.HttpMethod.Post, - requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); -#if NET6_0_OR_GREATER - __httpRequest.Version = global::System.Net.HttpVersion.Version11; - __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; -#endif - - foreach (var __authorization in __authorizations) - { - if (__authorization.Type == "Http" || - __authorization.Type == "OAuth2" || - __authorization.Type == "OpenIdConnect") - { - __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: __authorization.Name, - parameter: __authorization.Value); - } - else if (__authorization.Type == "ApiKey" && - __authorization.Location == "Header") - { - __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); - } - } - var __httpRequestContentBody = request.ToJson(JsonSerializerContext); - var __httpRequestContent = new global::System.Net.Http.StringContent( - content: __httpRequestContentBody, - encoding: global::System.Text.Encoding.UTF8, - mediaType: "application/json"); - __httpRequest.Content = __httpRequestContent; - global::Leonardo.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareCreateSVDMotionGenerationRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - request: request); - - return __httpRequest; - } - - global::System.Net.Http.HttpRequestMessage? __httpRequest = null; - global::System.Net.Http.HttpResponseMessage? __response = null; - var __attemptNumber = 0; - try - { - for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) - { - __attemptNumber = __attempt; - __httpRequest = __CreateHttpRequest(); - await global::Leonardo.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Leonardo.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "CreateSVDMotionGeneration", - methodName: "CreateSVDMotionGenerationAsync", - pathTemplate: "\"/generations-motion-svd\"", - httpMethod: "POST", - baseUri: BaseUri, - request: __httpRequest!, - response: null, - exception: null, - clientOptions: Options, - requestOptions: requestOptions, - attempt: __attempt, - maxAttempts: __maxAttempts, - willRetry: false, - retryDelay: null, - retryReason: global::System.String.Empty, - cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); - try - { - __response = await HttpClient.SendAsync( - request: __httpRequest, - completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - } - catch (global::System.Net.Http.HttpRequestException __exception) - { - var __retryDelay = global::Leonardo.AutoSDKRequestOptionsSupport.GetRetryDelay( - clientOptions: Options, - requestOptions: requestOptions, - response: null, - attempt: __attempt); - var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; - await global::Leonardo.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Leonardo.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "CreateSVDMotionGeneration", - methodName: "CreateSVDMotionGenerationAsync", - pathTemplate: "\"/generations-motion-svd\"", - httpMethod: "POST", - baseUri: BaseUri, - request: __httpRequest!, - response: null, - exception: __exception, - clientOptions: Options, - requestOptions: requestOptions, - attempt: __attempt, - maxAttempts: __maxAttempts, - willRetry: __willRetry, - retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, - retryReason: "exception", - cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); - if (!__willRetry) - { - throw; - } - - __httpRequest.Dispose(); - __httpRequest = null; - await global::Leonardo.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - retryDelay: __retryDelay, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - if (__response != null && - __attempt < __maxAttempts && - global::Leonardo.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) - { - var __retryDelay = global::Leonardo.AutoSDKRequestOptionsSupport.GetRetryDelay( - clientOptions: Options, - requestOptions: requestOptions, - response: __response, - attempt: __attempt); - await global::Leonardo.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Leonardo.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "CreateSVDMotionGeneration", - methodName: "CreateSVDMotionGenerationAsync", - pathTemplate: "\"/generations-motion-svd\"", - httpMethod: "POST", - baseUri: BaseUri, - request: __httpRequest!, - response: __response, - exception: null, - clientOptions: Options, - requestOptions: requestOptions, - attempt: __attempt, - maxAttempts: __maxAttempts, - willRetry: true, - retryDelay: __retryDelay, - retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), - cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); - __response.Dispose(); - __response = null; - __httpRequest.Dispose(); - __httpRequest = null; - await global::Leonardo.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - retryDelay: __retryDelay, - cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); - continue; - } - - break; - } - - if (__response == null) - { - throw new global::System.InvalidOperationException("No response received."); - } - - using (__response) - { - - ProcessResponse( - client: HttpClient, - response: __response); - ProcessCreateSVDMotionGenerationResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Leonardo.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Leonardo.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "CreateSVDMotionGeneration", - methodName: "CreateSVDMotionGenerationAsync", - pathTemplate: "\"/generations-motion-svd\"", - httpMethod: "POST", - baseUri: BaseUri, - request: __httpRequest!, - response: __response, - exception: null, - clientOptions: Options, - requestOptions: requestOptions, - attempt: __attemptNumber, - maxAttempts: __maxAttempts, - willRetry: false, - retryDelay: null, - retryReason: global::System.String.Empty, - cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); - } - else - { - await global::Leonardo.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( - clientOptions: Options, - context: global::Leonardo.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "CreateSVDMotionGeneration", - methodName: "CreateSVDMotionGenerationAsync", - pathTemplate: "\"/generations-motion-svd\"", - httpMethod: "POST", - baseUri: BaseUri, - request: __httpRequest!, - response: __response, - exception: null, - clientOptions: Options, - requestOptions: requestOptions, - attempt: __attemptNumber, - maxAttempts: __maxAttempts, - willRetry: false, - retryDelay: null, - retryReason: global::System.String.Empty, - cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); - } - - if (__effectiveReadResponseAsString) - { - var __content = await __response.Content.ReadAsStringAsync( - #if NET5_0_OR_GREATER - __effectiveCancellationToken - #endif - ).ConfigureAwait(false); - - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessCreateSVDMotionGenerationResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - var __value = global::Leonardo.CreateSVDMotionGenerationResponse.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - return new global::Leonardo.AutoSDKHttpResponse( - statusCode: __response.StatusCode, - headers: global::Leonardo.AutoSDKHttpResponse.CreateHeaders(__response), - requestUri: __response.RequestMessage?.RequestUri, - body: __value); - } - catch (global::System.Exception __ex) - { - throw new global::Leonardo.ApiException( - message: __content ?? __response.ReasonPhrase ?? string.Empty, - innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( - __response.Headers, - h => h.Key, - h => h.Value), - }; - } - } - else - { - try - { - __response.EnsureSuccessStatusCode(); - using var __content = await __response.Content.ReadAsStreamAsync( - #if NET5_0_OR_GREATER - __effectiveCancellationToken - #endif - ).ConfigureAwait(false); - - var __value = await global::Leonardo.CreateSVDMotionGenerationResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? - throw new global::System.InvalidOperationException("Response deserialization failed."); - return new global::Leonardo.AutoSDKHttpResponse( - statusCode: __response.StatusCode, - headers: global::Leonardo.AutoSDKHttpResponse.CreateHeaders(__response), - requestUri: __response.RequestMessage?.RequestUri, - body: __value); - } - catch (global::System.Exception __ex) - { - string? __content = null; - try - { - __content = await __response.Content.ReadAsStringAsync( - #if NET5_0_OR_GREATER - __effectiveCancellationToken - #endif - ).ConfigureAwait(false); - } - catch (global::System.Exception) - { - } - - throw new global::Leonardo.ApiException( - message: __content ?? __response.ReasonPhrase ?? string.Empty, - innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( - __response.Headers, - h => h.Key, - h => h.Value), - }; - } - } - - } - } - finally - { - __httpRequest?.Dispose(); - } - } - /// - /// Create SVD Motion Generation
- /// This endpoint will generate a SVD motion generation. - ///
- /// - /// The ID of the image, supports generated images, variation images, and init images. - /// - /// - /// Whether the generation is public or not - /// - /// - /// If it is an init image uploaded by the user. This image is uploaded from endpoint: Upload init image. - /// - /// - /// If it is a variation image. - /// - /// - /// The motion strength. - /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task CreateSVDMotionGenerationAsync( - string imageId, - bool? isPublic = default, - bool? isInitImage = default, - bool? isVariation = default, - int? motionStrength = default, - global::Leonardo.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - var __request = new global::Leonardo.CreateSVDMotionGenerationRequest - { - ImageId = imageId, - IsPublic = isPublic, - IsInitImage = isInitImage, - IsVariation = isVariation, - MotionStrength = motionStrength, - }; - - return await CreateSVDMotionGenerationAsync( - request: __request, - requestOptions: requestOptions, - cancellationToken: cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/src/libs/Leonardo/Generated/Leonardo.MotionClient.CreateTextToVideoGeneration.g.cs b/src/libs/Leonardo/Generated/Leonardo.MotionClient.CreateTextToVideoGeneration.g.cs index 67aab5f..12ec494 100644 --- a/src/libs/Leonardo/Generated/Leonardo.MotionClient.CreateTextToVideoGeneration.g.cs +++ b/src/libs/Leonardo/Generated/Leonardo.MotionClient.CreateTextToVideoGeneration.g.cs @@ -369,17 +369,15 @@ partial void ProcessCreateTextToVideoGenerationResponseContent( } catch (global::System.Exception __ex) { - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -416,17 +414,15 @@ partial void ProcessCreateTextToVideoGenerationResponseContent( { } - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Leonardo/Generated/Leonardo.PricingCalculatorClient.PricingCalculator.g.cs b/src/libs/Leonardo/Generated/Leonardo.PricingCalculatorClient.PricingCalculator.g.cs index d9a2469..cdabf7b 100644 --- a/src/libs/Leonardo/Generated/Leonardo.PricingCalculatorClient.PricingCalculator.g.cs +++ b/src/libs/Leonardo/Generated/Leonardo.PricingCalculatorClient.PricingCalculator.g.cs @@ -369,17 +369,15 @@ partial void ProcessPricingCalculatorResponseContent( } catch (global::System.Exception __ex) { - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -416,17 +414,15 @@ partial void ProcessPricingCalculatorResponseContent( { } - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Leonardo/Generated/Leonardo.PromptClient.PromptImprove.g.cs b/src/libs/Leonardo/Generated/Leonardo.PromptClient.PromptImprove.g.cs index 2297457..651ba5f 100644 --- a/src/libs/Leonardo/Generated/Leonardo.PromptClient.PromptImprove.g.cs +++ b/src/libs/Leonardo/Generated/Leonardo.PromptClient.PromptImprove.g.cs @@ -369,17 +369,15 @@ partial void ProcessPromptImproveResponseContent( } catch (global::System.Exception __ex) { - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -416,17 +414,15 @@ partial void ProcessPromptImproveResponseContent( { } - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Leonardo/Generated/Leonardo.PromptClient.PromptRandom.g.cs b/src/libs/Leonardo/Generated/Leonardo.PromptClient.PromptRandom.g.cs index a2d473e..fa2cd13 100644 --- a/src/libs/Leonardo/Generated/Leonardo.PromptClient.PromptRandom.g.cs +++ b/src/libs/Leonardo/Generated/Leonardo.PromptClient.PromptRandom.g.cs @@ -349,17 +349,15 @@ partial void ProcessPromptRandomResponseContent( } catch (global::System.Exception __ex) { - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -396,17 +394,15 @@ partial void ProcessPromptRandomResponseContent( { } - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Leonardo/Generated/Leonardo.RealtimeCanvasClient.CreateLCMGeneration.g.cs b/src/libs/Leonardo/Generated/Leonardo.RealtimeCanvasClient.CreateLCMGeneration.g.cs index d7eb6b4..a9b3d33 100644 --- a/src/libs/Leonardo/Generated/Leonardo.RealtimeCanvasClient.CreateLCMGeneration.g.cs +++ b/src/libs/Leonardo/Generated/Leonardo.RealtimeCanvasClient.CreateLCMGeneration.g.cs @@ -369,17 +369,15 @@ partial void ProcessCreateLCMGenerationResponseContent( } catch (global::System.Exception __ex) { - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -416,17 +414,15 @@ partial void ProcessCreateLCMGenerationResponseContent( { } - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Leonardo/Generated/Leonardo.RealtimeCanvasClient.PerformAlchemyUpscaleLCM.g.cs b/src/libs/Leonardo/Generated/Leonardo.RealtimeCanvasClient.PerformAlchemyUpscaleLCM.g.cs index 98e4cd0..990a4ec 100644 --- a/src/libs/Leonardo/Generated/Leonardo.RealtimeCanvasClient.PerformAlchemyUpscaleLCM.g.cs +++ b/src/libs/Leonardo/Generated/Leonardo.RealtimeCanvasClient.PerformAlchemyUpscaleLCM.g.cs @@ -369,17 +369,15 @@ partial void ProcessPerformAlchemyUpscaleLCMResponseContent( } catch (global::System.Exception __ex) { - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -416,17 +414,15 @@ partial void ProcessPerformAlchemyUpscaleLCMResponseContent( { } - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Leonardo/Generated/Leonardo.RealtimeCanvasClient.PerformInpaintingLCM.g.cs b/src/libs/Leonardo/Generated/Leonardo.RealtimeCanvasClient.PerformInpaintingLCM.g.cs index 222463e..c610838 100644 --- a/src/libs/Leonardo/Generated/Leonardo.RealtimeCanvasClient.PerformInpaintingLCM.g.cs +++ b/src/libs/Leonardo/Generated/Leonardo.RealtimeCanvasClient.PerformInpaintingLCM.g.cs @@ -369,17 +369,15 @@ partial void ProcessPerformInpaintingLCMResponseContent( } catch (global::System.Exception __ex) { - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -416,17 +414,15 @@ partial void ProcessPerformInpaintingLCMResponseContent( { } - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Leonardo/Generated/Leonardo.RealtimeCanvasClient.PerformInstantRefine.g.cs b/src/libs/Leonardo/Generated/Leonardo.RealtimeCanvasClient.PerformInstantRefine.g.cs index 6f0e96d..1c00136 100644 --- a/src/libs/Leonardo/Generated/Leonardo.RealtimeCanvasClient.PerformInstantRefine.g.cs +++ b/src/libs/Leonardo/Generated/Leonardo.RealtimeCanvasClient.PerformInstantRefine.g.cs @@ -369,17 +369,15 @@ partial void ProcessPerformInstantRefineResponseContent( } catch (global::System.Exception __ex) { - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -416,17 +414,15 @@ partial void ProcessPerformInstantRefineResponseContent( { } - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Leonardo/Generated/Leonardo.UserClient.GetUserSelf.g.cs b/src/libs/Leonardo/Generated/Leonardo.UserClient.GetUserSelf.g.cs index 82fd14c..0d3026c 100644 --- a/src/libs/Leonardo/Generated/Leonardo.UserClient.GetUserSelf.g.cs +++ b/src/libs/Leonardo/Generated/Leonardo.UserClient.GetUserSelf.g.cs @@ -349,17 +349,15 @@ partial void ProcessGetUserSelfResponseContent( } catch (global::System.Exception __ex) { - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -396,17 +394,15 @@ partial void ProcessGetUserSelfResponseContent( { } - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Leonardo/Generated/Leonardo.VariationClient.CreateUniversalUpscalerJob.g.cs b/src/libs/Leonardo/Generated/Leonardo.VariationClient.CreateUniversalUpscalerJob.g.cs index 1778743..02e08eb 100644 --- a/src/libs/Leonardo/Generated/Leonardo.VariationClient.CreateUniversalUpscalerJob.g.cs +++ b/src/libs/Leonardo/Generated/Leonardo.VariationClient.CreateUniversalUpscalerJob.g.cs @@ -369,17 +369,15 @@ partial void ProcessCreateUniversalUpscalerJobResponseContent( } catch (global::System.Exception __ex) { - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -416,17 +414,15 @@ partial void ProcessCreateUniversalUpscalerJobResponseContent( { } - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Leonardo/Generated/Leonardo.VariationClient.CreateVariationNoBG.g.cs b/src/libs/Leonardo/Generated/Leonardo.VariationClient.CreateVariationNoBG.g.cs index a237e8e..fd5f1e8 100644 --- a/src/libs/Leonardo/Generated/Leonardo.VariationClient.CreateVariationNoBG.g.cs +++ b/src/libs/Leonardo/Generated/Leonardo.VariationClient.CreateVariationNoBG.g.cs @@ -369,17 +369,15 @@ partial void ProcessCreateVariationNoBGResponseContent( } catch (global::System.Exception __ex) { - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -416,17 +414,15 @@ partial void ProcessCreateVariationNoBGResponseContent( { } - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Leonardo/Generated/Leonardo.VariationClient.CreateVariationUnzoom.g.cs b/src/libs/Leonardo/Generated/Leonardo.VariationClient.CreateVariationUnzoom.g.cs index 118c3cb..d5ae233 100644 --- a/src/libs/Leonardo/Generated/Leonardo.VariationClient.CreateVariationUnzoom.g.cs +++ b/src/libs/Leonardo/Generated/Leonardo.VariationClient.CreateVariationUnzoom.g.cs @@ -369,17 +369,15 @@ partial void ProcessCreateVariationUnzoomResponseContent( } catch (global::System.Exception __ex) { - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -416,17 +414,15 @@ partial void ProcessCreateVariationUnzoomResponseContent( { } - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Leonardo/Generated/Leonardo.VariationClient.CreateVariationUpscale.g.cs b/src/libs/Leonardo/Generated/Leonardo.VariationClient.CreateVariationUpscale.g.cs index 8a7c28d..63b0e69 100644 --- a/src/libs/Leonardo/Generated/Leonardo.VariationClient.CreateVariationUpscale.g.cs +++ b/src/libs/Leonardo/Generated/Leonardo.VariationClient.CreateVariationUpscale.g.cs @@ -369,17 +369,15 @@ partial void ProcessCreateVariationUpscaleResponseContent( } catch (global::System.Exception __ex) { - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -416,17 +414,15 @@ partial void ProcessCreateVariationUpscaleResponseContent( { } - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Leonardo/Generated/Leonardo.VariationClient.GetMotionVariationById.g.cs b/src/libs/Leonardo/Generated/Leonardo.VariationClient.GetMotionVariationById.g.cs index e2e6124..23e58a3 100644 --- a/src/libs/Leonardo/Generated/Leonardo.VariationClient.GetMotionVariationById.g.cs +++ b/src/libs/Leonardo/Generated/Leonardo.VariationClient.GetMotionVariationById.g.cs @@ -358,17 +358,15 @@ partial void ProcessGetMotionVariationByIdResponseContent( } catch (global::System.Exception __ex) { - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -405,17 +403,15 @@ partial void ProcessGetMotionVariationByIdResponseContent( { } - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Leonardo/Generated/Leonardo.VariationClient.GetVariationById.g.cs b/src/libs/Leonardo/Generated/Leonardo.VariationClient.GetVariationById.g.cs index dc6c6c2..e972c8d 100644 --- a/src/libs/Leonardo/Generated/Leonardo.VariationClient.GetVariationById.g.cs +++ b/src/libs/Leonardo/Generated/Leonardo.VariationClient.GetVariationById.g.cs @@ -358,17 +358,15 @@ partial void ProcessGetVariationByIdResponseContent( } catch (global::System.Exception __ex) { - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -405,17 +403,15 @@ partial void ProcessGetVariationByIdResponseContent( { } - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Leonardo/Generated/Leonardo.x3dModelAssetsClient.Delete3DModelById.g.cs b/src/libs/Leonardo/Generated/Leonardo.x3dModelAssetsClient.Delete3DModelById.g.cs index eac2516..1a0707b 100644 --- a/src/libs/Leonardo/Generated/Leonardo.x3dModelAssetsClient.Delete3DModelById.g.cs +++ b/src/libs/Leonardo/Generated/Leonardo.x3dModelAssetsClient.Delete3DModelById.g.cs @@ -378,17 +378,15 @@ partial void ProcessDelete3DModelByIdResponseContent( } catch (global::System.Exception __ex) { - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -425,17 +423,15 @@ partial void ProcessDelete3DModelByIdResponseContent( { } - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Leonardo/Generated/Leonardo.x3dModelAssetsClient.Get3DModelById.g.cs b/src/libs/Leonardo/Generated/Leonardo.x3dModelAssetsClient.Get3DModelById.g.cs index 7f3b866..812ad42 100644 --- a/src/libs/Leonardo/Generated/Leonardo.x3dModelAssetsClient.Get3DModelById.g.cs +++ b/src/libs/Leonardo/Generated/Leonardo.x3dModelAssetsClient.Get3DModelById.g.cs @@ -408,17 +408,15 @@ partial void ProcessGet3DModelByIdResponseContent( } catch (global::System.Exception __ex) { - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 +453,15 @@ partial void ProcessGet3DModelByIdResponseContent( { } - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Leonardo/Generated/Leonardo.x3dModelAssetsClient.Get3DModelsByUserId.g.cs b/src/libs/Leonardo/Generated/Leonardo.x3dModelAssetsClient.Get3DModelsByUserId.g.cs index 72e8926..cb08057 100644 --- a/src/libs/Leonardo/Generated/Leonardo.x3dModelAssetsClient.Get3DModelsByUserId.g.cs +++ b/src/libs/Leonardo/Generated/Leonardo.x3dModelAssetsClient.Get3DModelsByUserId.g.cs @@ -408,17 +408,15 @@ partial void ProcessGet3DModelsByUserIdResponseContent( } catch (global::System.Exception __ex) { - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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 +453,15 @@ partial void ProcessGet3DModelsByUserIdResponseContent( { } - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Leonardo/Generated/Leonardo.x3dModelAssetsClient.UploadModelAsset.g.cs b/src/libs/Leonardo/Generated/Leonardo.x3dModelAssetsClient.UploadModelAsset.g.cs index 11f5dda..df2b16e 100644 --- a/src/libs/Leonardo/Generated/Leonardo.x3dModelAssetsClient.UploadModelAsset.g.cs +++ b/src/libs/Leonardo/Generated/Leonardo.x3dModelAssetsClient.UploadModelAsset.g.cs @@ -369,17 +369,15 @@ partial void ProcessUploadModelAssetResponseContent( } catch (global::System.Exception __ex) { - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( __response.Headers, h => h.Key, - h => h.Value), - }; + h => h.Value)); } } else @@ -416,17 +414,15 @@ partial void ProcessUploadModelAssetResponseContent( { } - throw new global::Leonardo.ApiException( + throw global::Leonardo.ApiException.Create( + statusCode: __response.StatusCode, message: __content ?? __response.ReasonPhrase ?? string.Empty, innerException: __ex, - statusCode: __response.StatusCode) - { - ResponseBody = __content, - ResponseHeaders = 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/Leonardo/Generated/autosdk.generated-examples.json b/src/libs/Leonardo/Generated/autosdk.generated-examples.json index 7d5bcc9..6e57a3f 100644 --- a/src/libs/Leonardo/Generated/autosdk.generated-examples.json +++ b/src/libs/Leonardo/Generated/autosdk.generated-examples.json @@ -112,17 +112,6 @@ }, { "Order": 11, - "Title": "Create SVD Motion Generation", - "Slug": "createsvdmotiongeneration", - "Description": "This endpoint will generate a SVD motion generation.", - "Language": "http", - "Code": "### Create SVD Motion Generation\n# @name createSVDMotionGeneration\nPOST {{host}}/generations-motion-svd\nAuthorization: Bearer {{token}}\nContent-Type: application/json\nAccept: application/json\n\n{\n \u0022imageId\u0022: \u0022string\u0022,\n \u0022isPublic\u0022: true,\n \u0022isInitImage\u0022: true,\n \u0022isVariation\u0022: true,\n \u0022motionStrength\u0022: 0\n}\n\n## Responses\n# 200\n# Description: Responses for POST /generations-motion-svd\n# Content-Type: application/json", - "Format": "http", - "OperationId": "createSVDMotionGeneration", - "Setup": null - }, - { - "Order": 12, "Title": "Create a video generation from a text prompt", "Slug": "createtexttovideogeneration", "Description": "This endpoint will generate a video using a text prompt", @@ -133,7 +122,7 @@ "Setup": null }, { - "Order": 13, + "Order": 12, "Title": "Improve a Prompt", "Slug": "promptimprove", "Description": "This endpoint returns a improved prompt", @@ -144,7 +133,7 @@ "Setup": null }, { - "Order": 14, + "Order": 13, "Title": "Generate a Random prompt", "Slug": "promptrandom", "Description": "This endpoint returns a random prompt", @@ -155,7 +144,7 @@ "Setup": "This example assumes \u0060using Leonardo;\u0060 is in scope and \u0060apiKey\u0060 contains the required credential." }, { - "Order": 15, + "Order": 14, "Title": "Create LCM Generation", "Slug": "createlcmgeneration", "Description": "This endpoint will generate a LCM image generation.", @@ -166,7 +155,7 @@ "Setup": null }, { - "Order": 16, + "Order": 15, "Title": "Perform Alchemy Upscale on a LCM image", "Slug": "performalchemyupscalelcm", "Description": "This endpoint will perform Alchemy Upscale on a LCM image", @@ -177,7 +166,7 @@ "Setup": null }, { - "Order": 17, + "Order": 16, "Title": "Perform inpainting on a LCM image", "Slug": "performinpaintinglcm", "Description": "This endpoint will perform a inpainting on a LCM image", @@ -188,7 +177,7 @@ "Setup": null }, { - "Order": 18, + "Order": 17, "Title": "Perform instant refine on a LCM image", "Slug": "performinstantrefine", "Description": "This endpoint will perform instant refine on a LCM image", @@ -199,7 +188,7 @@ "Setup": null }, { - "Order": 19, + "Order": 18, "Title": "Create using Universal Upscaler", "Slug": "createuniversalupscalerjob", "Description": "This endpoint will create a high resolution image using Universal Upscaler", @@ -210,7 +199,7 @@ "Setup": null }, { - "Order": 20, + "Order": 19, "Title": "Create no background", "Slug": "createvariationnobg", "Description": "This endpoint will create a no background variation of the provided image ID", @@ -221,7 +210,7 @@ "Setup": null }, { - "Order": 21, + "Order": 20, "Title": "Create unzoom", "Slug": "createvariationunzoom", "Description": "This endpoint will create an unzoom variation for the provided image ID", @@ -232,7 +221,7 @@ "Setup": null }, { - "Order": 22, + "Order": 21, "Title": "Create upscale", "Slug": "createvariationupscale", "Description": "This endpoint will create an upscale for the provided image ID", diff --git a/src/libs/Leonardo/openapi.json b/src/libs/Leonardo/openapi.json index 4f19c84..8ab5e3d 100644 --- a/src/libs/Leonardo/openapi.json +++ b/src/libs/Leonardo/openapi.json @@ -1054,88 +1054,6 @@ } } }, - "/generations-motion-svd": { - "post": { - "tags": ["Motion"], - "summary": "Create SVD Motion Generation", - "description": "This endpoint will generate a SVD motion generation.", - "operationId": "createSVDMotionGeneration", - "requestBody": { - "content": { - "application/json": { - "schema": { - "properties": { - "imageId": { - "nullable": false, - "title": "String", - "type": "string", - "description": "The ID of the image, supports generated images, variation images, and init images." - }, - "isPublic": { - "$ref": "#/components/schemas/public" - }, - "isInitImage": { - "$ref": "#/components/schemas/isInitImage" - }, - "isVariation": { - "$ref": "#/components/schemas/isVariation" - }, - "motionStrength": { - "$ref": "#/components/schemas/motionStrength" - } - }, - "type": "object", - "required": ["imageId"] - } - } - }, - "description": "Query parameters can also be provided in the request body as a JSON object", - "required": false - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "motionSvdGenerationJob": { - "nullable": true, - "properties": { - "generationId": { - "nullable": false, - "title": "String", - "type": "string" - }, - "apiCreditCost": { - "$ref": "#/components/schemas/apiCreditCost" - }, - "cost": { - "$ref": "#/components/schemas/cost" - } - }, - "title": "MotionSvdGenerationOutput", - "type": "object" - } - } - }, - "example": { - "motionSvdGenerationJob": { - "generationId": "h7i8j9k0-l1m2-n3o4-pqrs-tu6789012345", - "apiCreditCost": null, - "cost": { - "amount": "0.0147", - "unit": "DOLLARS" - } - } - } - } - }, - "description": "Responses for POST /generations-motion-svd" - } - } - } - }, "/generations-image-to-video": { "post": { "tags": ["Motion"], @@ -2025,9 +1943,7 @@ "imageDataUrl": [ "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAAAAAAAD..." ], - "variationId": [ - "var234567-8901-bcde-fghi-jklmnopqrstu" - ], + "variationId": ["var234567-8901-bcde-fghi-jklmnopqrstu"], "generatedImageId": "l1m2n3o4-p5q6-r7s8-tuvw-xy0123456789", "requestTimestamp": "1234567893", "apiCreditCost": null, @@ -2440,7 +2356,7 @@ "post": { "tags": ["Media"], "summary": "Upload media", - "description": "This endpoint returns presigned details to upload a media file to S3", + "description": "This endpoint returns presigned POST credentials to upload a video or audio file directly to S3.", "operationId": "uploadMedia", "requestBody": { "content": { @@ -2451,7 +2367,19 @@ "nullable": false, "title": "String", "type": "string", - "description": "The file extension of the media file to upload. Supported extensions: mp4, mov." + "description": "The file extension of the media file to upload. Supported extensions for video: `mp4`, `mov`. Supported for audio: `mp3`, `wav`." + }, + "originalFilename": { + "nullable": true, + "title": "String", + "type": "string", + "description": "Original file name for display. Required for audio uploads (`mp3`, `wav`). Optional for video." + }, + "teamId": { + "nullable": true, + "title": "String", + "type": "string", + "description": "Optional team UUID. When set, the upload is associated with that team and the caller must be a member." } }, "required": ["extension"],