diff --git a/src/libs/DeepInfra/Generated/AnyOf.2.Json.g.cs b/src/libs/DeepInfra/Generated/AnyOf.2.Json.g.cs new file mode 100644 index 0000000..652472d --- /dev/null +++ b/src/libs/DeepInfra/Generated/AnyOf.2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public readonly partial struct AnyOf + { + /// + /// 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::DeepInfra.AnyOf? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.AnyOf), + jsonSerializerContext) as global::DeepInfra.AnyOf?; + } + + /// + /// 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::DeepInfra.AnyOf? 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::DeepInfra.AnyOf), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.AnyOf?; + } + + /// + /// 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/DeepInfra/Generated/AnyOf.2.g.cs b/src/libs/DeepInfra/Generated/AnyOf.2.g.cs index 7124975..a6b5701 100644 --- a/src/libs/DeepInfra/Generated/AnyOf.2.g.cs +++ b/src/libs/DeepInfra/Generated/AnyOf.2.g.cs @@ -1,4 +1,3 @@ -using System.Linq; #nullable enable @@ -172,7 +171,8 @@ public override int GetHashCode() static int HashCodeAggregator(int hashCode, object? value) => value == null ? (hashCode ^ 0) * prime : (hashCode ^ value.GetHashCode()) * prime; - return fields.Aggregate(offset, HashCodeAggregator); + + return global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); } /// @@ -209,92 +209,5 @@ public override bool Equals(object? obj) { return obj is AnyOf o && Equals(o); } - - - /// - /// 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::DeepInfra.AnyOf? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.AnyOf), - jsonSerializerContext) as global::DeepInfra.AnyOf?; - } - - /// - /// 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::DeepInfra.AnyOf? 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?> FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.AnyOf), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.AnyOf?; - } - - /// - /// 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?> FromJsonStream( - 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/DeepInfra/Generated/AnyOf.4.Json.g.cs b/src/libs/DeepInfra/Generated/AnyOf.4.Json.g.cs new file mode 100644 index 0000000..f4266c0 --- /dev/null +++ b/src/libs/DeepInfra/Generated/AnyOf.4.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public readonly partial struct AnyOf + { + /// + /// 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::DeepInfra.AnyOf? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.AnyOf), + jsonSerializerContext) as global::DeepInfra.AnyOf?; + } + + /// + /// 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::DeepInfra.AnyOf? 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::DeepInfra.AnyOf), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.AnyOf?; + } + + /// + /// 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/DeepInfra/Generated/AnyOf.4.g.cs b/src/libs/DeepInfra/Generated/AnyOf.4.g.cs index f8b6781..38f9f62 100644 --- a/src/libs/DeepInfra/Generated/AnyOf.4.g.cs +++ b/src/libs/DeepInfra/Generated/AnyOf.4.g.cs @@ -1,4 +1,3 @@ -using System.Linq; #nullable enable @@ -272,7 +271,8 @@ public override int GetHashCode() static int HashCodeAggregator(int hashCode, object? value) => value == null ? (hashCode ^ 0) * prime : (hashCode ^ value.GetHashCode()) * prime; - return fields.Aggregate(offset, HashCodeAggregator); + + return global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); } /// @@ -311,92 +311,5 @@ public override bool Equals(object? obj) { return obj is AnyOf o && Equals(o); } - - - /// - /// 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::DeepInfra.AnyOf? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.AnyOf), - jsonSerializerContext) as global::DeepInfra.AnyOf?; - } - - /// - /// 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::DeepInfra.AnyOf? 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?> FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.AnyOf), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.AnyOf?; - } - - /// - /// 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?> FromJsonStream( - 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/DeepInfra/Generated/AnyOf.7.Json.g.cs b/src/libs/DeepInfra/Generated/AnyOf.7.Json.g.cs new file mode 100644 index 0000000..aaac306 --- /dev/null +++ b/src/libs/DeepInfra/Generated/AnyOf.7.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public readonly partial struct AnyOf + { + /// + /// 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::DeepInfra.AnyOf? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.AnyOf), + jsonSerializerContext) as global::DeepInfra.AnyOf?; + } + + /// + /// 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::DeepInfra.AnyOf? 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::DeepInfra.AnyOf), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.AnyOf?; + } + + /// + /// 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/DeepInfra/Generated/AnyOf.7.g.cs b/src/libs/DeepInfra/Generated/AnyOf.7.g.cs index de5e542..7f37567 100644 --- a/src/libs/DeepInfra/Generated/AnyOf.7.g.cs +++ b/src/libs/DeepInfra/Generated/AnyOf.7.g.cs @@ -1,4 +1,3 @@ -using System.Linq; #nullable enable @@ -422,7 +421,8 @@ public override int GetHashCode() static int HashCodeAggregator(int hashCode, object? value) => value == null ? (hashCode ^ 0) * prime : (hashCode ^ value.GetHashCode()) * prime; - return fields.Aggregate(offset, HashCodeAggregator); + + return global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); } /// @@ -464,92 +464,5 @@ public override bool Equals(object? obj) { return obj is AnyOf o && Equals(o); } - - - /// - /// 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::DeepInfra.AnyOf? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.AnyOf), - jsonSerializerContext) as global::DeepInfra.AnyOf?; - } - - /// - /// 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::DeepInfra.AnyOf? 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?> FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.AnyOf), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.AnyOf?; - } - - /// - /// 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?> FromJsonStream( - 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/DeepInfra/Generated/DeepInfra.DeepInfraApi.AccountEmailValues.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.AccountEmailValues.g.cs index a765b6d..462366b 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.AccountEmailValues.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.AccountEmailValues.g.cs @@ -26,7 +26,7 @@ partial void ProcessAccountEmailValuesResponseContent( /// /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task AccountEmailValuesAsync( string? xiApiKey = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -86,30 +86,127 @@ partial void ProcessAccountEmailValuesResponseContent( ProcessAccountEmailValuesResponse( httpClient: HttpClient, httpResponseMessage: __response); + // Not Found + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::DeepInfra.DeepError? __value_404 = null; + if (ReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_404 = global::DeepInfra.DeepError.FromJson(__content_404, JsonSerializerContext); + } + else + { + var __contentStream_404 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_404 = await global::DeepInfra.DeepError.FromJsonStreamAsync(__contentStream_404, JsonSerializerContext).ConfigureAwait(false); + } - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_404, + ResponseObject = __value_404, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::DeepInfra.HTTPValidationError? __value_422 = null; + if (ReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_422 = global::DeepInfra.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_422 = await global::DeepInfra.HTTPValidationError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); + } - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessAccountEmailValuesResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } - try + if (ReadResponseAsString) { - __response.EnsureSuccessStatusCode(); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessAccountEmailValuesResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.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), + }; + } + + return + global::DeepInfra.EmailsOut.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } - catch (global::System.Net.Http.HttpRequestException __ex) + else { - throw new global::System.InvalidOperationException(__content, __ex); - } + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } - return - global::DeepInfra.EmailsOut.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + + var __responseValue = await global::DeepInfra.EmailsOut.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false); + + return + __responseValue ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } } } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.AccountRateLimit.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.AccountRateLimit.g.cs index 3e3165d..6713387 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.AccountRateLimit.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.AccountRateLimit.g.cs @@ -26,7 +26,7 @@ partial void ProcessAccountRateLimitResponseContent( /// /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task AccountRateLimitAsync( string? xiApiKey = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -86,30 +86,127 @@ partial void ProcessAccountRateLimitResponseContent( ProcessAccountRateLimitResponse( httpClient: HttpClient, httpResponseMessage: __response); + // Not Found + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::DeepInfra.DeepError? __value_404 = null; + if (ReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_404 = global::DeepInfra.DeepError.FromJson(__content_404, JsonSerializerContext); + } + else + { + var __contentStream_404 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_404 = await global::DeepInfra.DeepError.FromJsonStreamAsync(__contentStream_404, JsonSerializerContext).ConfigureAwait(false); + } - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_404, + ResponseObject = __value_404, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::DeepInfra.HTTPValidationError? __value_422 = null; + if (ReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_422 = global::DeepInfra.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_422 = await global::DeepInfra.HTTPValidationError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); + } - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessAccountRateLimitResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } - try + if (ReadResponseAsString) { - __response.EnsureSuccessStatusCode(); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessAccountRateLimitResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.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), + }; + } + + return + global::DeepInfra.RateLimitOut.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } - catch (global::System.Net.Http.HttpRequestException __ex) + else { - throw new global::System.InvalidOperationException(__content, __ex); - } + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } - return - global::DeepInfra.RateLimitOut.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + + var __responseValue = await global::DeepInfra.RateLimitOut.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false); + + return + __responseValue ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } } } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.AccountSetUsername.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.AccountSetUsername.g.cs index 3c050d5..9e2c773 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.AccountSetUsername.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.AccountSetUsername.g.cs @@ -29,7 +29,7 @@ partial void ProcessAccountSetUsernameResponseContent( /// /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task AccountSetUsernameAsync( global::DeepInfra.MeUsername request, string? xiApiKey = default, @@ -100,28 +100,153 @@ partial void ProcessAccountSetUsernameResponseContent( ProcessAccountSetUsernameResponse( httpClient: HttpClient, httpResponseMessage: __response); + // Not Found + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::DeepInfra.DeepError? __value_404 = null; + if (ReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_404 = global::DeepInfra.DeepError.FromJson(__content_404, JsonSerializerContext); + } + else + { + var __contentStream_404 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_404 = await global::DeepInfra.DeepError.FromJsonStreamAsync(__contentStream_404, JsonSerializerContext).ConfigureAwait(false); + } - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessAccountSetUsernameResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_404, + ResponseObject = __value_404, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Conflict + if ((int)__response.StatusCode == 409) + { + string? __content_409 = null; + global::DeepInfra.DeepError? __value_409 = null; + if (ReadResponseAsString) + { + __content_409 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_409 = global::DeepInfra.DeepError.FromJson(__content_409, JsonSerializerContext); + } + else + { + var __contentStream_409 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_409 = await global::DeepInfra.DeepError.FromJsonStreamAsync(__contentStream_409, JsonSerializerContext).ConfigureAwait(false); + } - try + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_409, + ResponseObject = __value_409, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Validation Error + if ((int)__response.StatusCode == 422) { - __response.EnsureSuccessStatusCode(); + string? __content_422 = null; + global::DeepInfra.HTTPValidationError? __value_422 = null; + if (ReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_422 = global::DeepInfra.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_422 = await global::DeepInfra.HTTPValidationError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); + } + + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; } - catch (global::System.Net.Http.HttpRequestException __ex) + + if (ReadResponseAsString) { - throw new global::System.InvalidOperationException(__content, __ex); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessAccountSetUsernameResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.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), + }; + } + + return __content; } + else + { + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - return __content; + var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(string), JsonSerializerContext).ConfigureAwait(false) as string; + + return + __responseValue ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } } /// diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.AccountUpdateDetails.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.AccountUpdateDetails.g.cs index db1982e..3866c34 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.AccountUpdateDetails.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.AccountUpdateDetails.g.cs @@ -29,7 +29,7 @@ partial void ProcessAccountUpdateDetailsResponseContent( /// /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task AccountUpdateDetailsAsync( global::DeepInfra.MeIn request, string? xiApiKey = default, @@ -100,28 +100,153 @@ partial void ProcessAccountUpdateDetailsResponseContent( ProcessAccountUpdateDetailsResponse( httpClient: HttpClient, httpResponseMessage: __response); + // Not Found + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::DeepInfra.DeepError? __value_404 = null; + if (ReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_404 = global::DeepInfra.DeepError.FromJson(__content_404, JsonSerializerContext); + } + else + { + var __contentStream_404 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_404 = await global::DeepInfra.DeepError.FromJsonStreamAsync(__contentStream_404, JsonSerializerContext).ConfigureAwait(false); + } - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessAccountUpdateDetailsResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_404, + ResponseObject = __value_404, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Conflict + if ((int)__response.StatusCode == 409) + { + string? __content_409 = null; + global::DeepInfra.DeepError? __value_409 = null; + if (ReadResponseAsString) + { + __content_409 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_409 = global::DeepInfra.DeepError.FromJson(__content_409, JsonSerializerContext); + } + else + { + var __contentStream_409 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_409 = await global::DeepInfra.DeepError.FromJsonStreamAsync(__contentStream_409, JsonSerializerContext).ConfigureAwait(false); + } - try + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_409, + ResponseObject = __value_409, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Unprocessable Entity + if ((int)__response.StatusCode == 422) { - __response.EnsureSuccessStatusCode(); + string? __content_422 = null; + global::DeepInfra.DeepError? __value_422 = null; + if (ReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_422 = global::DeepInfra.DeepError.FromJson(__content_422, JsonSerializerContext); + } + else + { + var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_422 = await global::DeepInfra.DeepError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); + } + + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; } - catch (global::System.Net.Http.HttpRequestException __ex) + + if (ReadResponseAsString) { - throw new global::System.InvalidOperationException(__content, __ex); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessAccountUpdateDetailsResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.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), + }; + } + + return __content; } + else + { + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - return __content; + var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(string), JsonSerializerContext).ConfigureAwait(false) as string; + + return + __responseValue ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } } /// diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.BillingPortal.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.BillingPortal.g.cs index 436104d..f97cc77 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.BillingPortal.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.BillingPortal.g.cs @@ -31,7 +31,7 @@ partial void ProcessBillingPortalResponseContent( /// /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task BillingPortalAsync( string? returnUrl = default, string? session = default, @@ -91,30 +91,99 @@ partial void ProcessBillingPortalResponseContent( ProcessBillingPortalResponse( httpClient: HttpClient, httpResponseMessage: __response); + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::DeepInfra.HTTPValidationError? __value_422 = null; + if (ReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_422 = global::DeepInfra.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_422 = await global::DeepInfra.HTTPValidationError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); + } - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessBillingPortalResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } - try + if (ReadResponseAsString) { - __response.EnsureSuccessStatusCode(); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessBillingPortalResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.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), + }; + } + + return + global::DeepInfra.BillingPortalOut.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } - catch (global::System.Net.Http.HttpRequestException __ex) + else { - throw new global::System.InvalidOperationException(__content, __ex); - } + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } - return - global::DeepInfra.BillingPortalOut.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + + var __responseValue = await global::DeepInfra.BillingPortalOut.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false); + + return + __responseValue ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } } } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.CliVersion.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.CliVersion.g.cs index 2efd2c3..1277901 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.CliVersion.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.CliVersion.g.cs @@ -26,7 +26,7 @@ partial void ProcessCliVersionResponseContent( /// /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task CliVersionAsync( string version, global::System.Threading.CancellationToken cancellationToken = default) @@ -83,28 +83,97 @@ partial void ProcessCliVersionResponseContent( ProcessCliVersionResponse( httpClient: HttpClient, httpResponseMessage: __response); + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::DeepInfra.HTTPValidationError? __value_422 = null; + if (ReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_422 = global::DeepInfra.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_422 = await global::DeepInfra.HTTPValidationError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); + } - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessCliVersionResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } - try + if (ReadResponseAsString) { - __response.EnsureSuccessStatusCode(); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessCliVersionResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.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), + }; + } + + return __content; } - catch (global::System.Net.Http.HttpRequestException __ex) + else { - throw new global::System.InvalidOperationException(__content, __ex); - } + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } - return __content; + using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + + var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(string), JsonSerializerContext).ConfigureAwait(false) as string; + + return + __responseValue ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } } } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.CreateApiToken.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.CreateApiToken.g.cs index defd41d..11bedc7 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.CreateApiToken.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.CreateApiToken.g.cs @@ -29,7 +29,7 @@ partial void ProcessCreateApiTokenResponseContent( /// /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task CreateApiTokenAsync( global::DeepInfra.ApiTokenIn request, string? xiApiKey = default, @@ -100,30 +100,127 @@ partial void ProcessCreateApiTokenResponseContent( ProcessCreateApiTokenResponse( httpClient: HttpClient, httpResponseMessage: __response); + // Conflict + if ((int)__response.StatusCode == 409) + { + string? __content_409 = null; + global::DeepInfra.DeepError? __value_409 = null; + if (ReadResponseAsString) + { + __content_409 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_409 = global::DeepInfra.DeepError.FromJson(__content_409, JsonSerializerContext); + } + else + { + var __contentStream_409 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_409 = await global::DeepInfra.DeepError.FromJsonStreamAsync(__contentStream_409, JsonSerializerContext).ConfigureAwait(false); + } - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_409, + ResponseObject = __value_409, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::DeepInfra.HTTPValidationError? __value_422 = null; + if (ReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_422 = global::DeepInfra.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_422 = await global::DeepInfra.HTTPValidationError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); + } - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessCreateApiTokenResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } - try + if (ReadResponseAsString) { - __response.EnsureSuccessStatusCode(); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessCreateApiTokenResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.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), + }; + } + + return + global::DeepInfra.ApiToken.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } - catch (global::System.Net.Http.HttpRequestException __ex) + else { - throw new global::System.InvalidOperationException(__content, __ex); - } + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } - return - global::DeepInfra.ApiToken.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + + var __responseValue = await global::DeepInfra.ApiToken.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false); + + return + __responseValue ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } } /// diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.CreateVoice.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.CreateVoice.g.cs index 47dda10..3585ead 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.CreateVoice.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.CreateVoice.g.cs @@ -30,7 +30,7 @@ partial void ProcessCreateVoiceResponseContent( /// /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task CreateVoiceAsync( global::DeepInfra.BodyCreateVoiceV1VoicesAddPost request, string? xiApiKey = default, @@ -112,30 +112,127 @@ partial void ProcessCreateVoiceResponseContent( ProcessCreateVoiceResponse( httpClient: HttpClient, httpResponseMessage: __response); + // Bad Request + if ((int)__response.StatusCode == 400) + { + string? __content_400 = null; + global::DeepInfra.DeepError? __value_400 = null; + if (ReadResponseAsString) + { + __content_400 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_400 = global::DeepInfra.DeepError.FromJson(__content_400, JsonSerializerContext); + } + else + { + var __contentStream_400 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_400 = await global::DeepInfra.DeepError.FromJsonStreamAsync(__contentStream_400, JsonSerializerContext).ConfigureAwait(false); + } - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_400, + ResponseObject = __value_400, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::DeepInfra.HTTPValidationError? __value_422 = null; + if (ReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_422 = global::DeepInfra.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_422 = await global::DeepInfra.HTTPValidationError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); + } - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessCreateVoiceResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } - try + if (ReadResponseAsString) { - __response.EnsureSuccessStatusCode(); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessCreateVoiceResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.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), + }; + } + + return + global::DeepInfra.Voice.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } - catch (global::System.Net.Http.HttpRequestException __ex) + else { - throw new global::System.InvalidOperationException(__content, __ex); - } + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - return - global::DeepInfra.Voice.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + var __responseValue = await global::DeepInfra.Voice.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false); + + return + __responseValue ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } } /// diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeepstartApply.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeepstartApply.g.cs index 108e633..1e48f75 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeepstartApply.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeepstartApply.g.cs @@ -29,7 +29,7 @@ partial void ProcessDeepstartApplyResponseContent( /// /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task DeepstartApplyAsync( global::DeepInfra.DeepStartApplicationIn request, string? session = default, @@ -94,30 +94,99 @@ partial void ProcessDeepstartApplyResponseContent( ProcessDeepstartApplyResponse( httpClient: HttpClient, httpResponseMessage: __response); + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::DeepInfra.HTTPValidationError? __value_422 = null; + if (ReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_422 = global::DeepInfra.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_422 = await global::DeepInfra.HTTPValidationError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); + } - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessDeepstartApplyResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } - try + if (ReadResponseAsString) { - __response.EnsureSuccessStatusCode(); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessDeepstartApplyResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.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), + }; + } + + return + global::DeepInfra.DeepStartApplicationOut.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } - catch (global::System.Net.Http.HttpRequestException __ex) + else { - throw new global::System.InvalidOperationException(__content, __ex); - } + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } - return - global::DeepInfra.DeepStartApplicationOut.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + + var __responseValue = await global::DeepInfra.DeepStartApplicationOut.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false); + + return + __responseValue ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } } /// diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeleteAccount.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeleteAccount.g.cs index 75100a5..92adc86 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeleteAccount.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeleteAccount.g.cs @@ -26,7 +26,7 @@ partial void ProcessDeleteAccountResponseContent( /// /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task DeleteAccountAsync( string? xiApiKey = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -86,30 +86,99 @@ partial void ProcessDeleteAccountResponseContent( ProcessDeleteAccountResponse( httpClient: HttpClient, httpResponseMessage: __response); + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::DeepInfra.HTTPValidationError? __value_422 = null; + if (ReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_422 = global::DeepInfra.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_422 = await global::DeepInfra.HTTPValidationError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); + } - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessDeleteAccountResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } - try + if (ReadResponseAsString) { - __response.EnsureSuccessStatusCode(); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessDeleteAccountResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.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), + }; + } + + return + global::DeepInfra.Me.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } - catch (global::System.Net.Http.HttpRequestException __ex) + else { - throw new global::System.InvalidOperationException(__content, __ex); - } + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } - return - global::DeepInfra.Me.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + + var __responseValue = await global::DeepInfra.Me.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false); + + return + __responseValue ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } } } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeleteApiToken.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeleteApiToken.g.cs index 6d70ad9..2185594 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeleteApiToken.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeleteApiToken.g.cs @@ -29,7 +29,7 @@ partial void ProcessDeleteApiTokenResponseContent( /// /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task DeleteApiTokenAsync( string apiToken, string? xiApiKey = default, @@ -92,28 +92,125 @@ partial void ProcessDeleteApiTokenResponseContent( ProcessDeleteApiTokenResponse( httpClient: HttpClient, httpResponseMessage: __response); + // Not Found + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::DeepInfra.DeepError? __value_404 = null; + if (ReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_404 = global::DeepInfra.DeepError.FromJson(__content_404, JsonSerializerContext); + } + else + { + var __contentStream_404 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_404 = await global::DeepInfra.DeepError.FromJsonStreamAsync(__contentStream_404, JsonSerializerContext).ConfigureAwait(false); + } - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_404, + ResponseObject = __value_404, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::DeepInfra.HTTPValidationError? __value_422 = null; + if (ReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_422 = global::DeepInfra.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_422 = await global::DeepInfra.HTTPValidationError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); + } - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessDeleteApiTokenResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } - try + if (ReadResponseAsString) { - __response.EnsureSuccessStatusCode(); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessDeleteApiTokenResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.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), + }; + } + + return __content; } - catch (global::System.Net.Http.HttpRequestException __ex) + else { - throw new global::System.InvalidOperationException(__content, __ex); - } + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } - return __content; + using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + + var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(string), JsonSerializerContext).ConfigureAwait(false) as string; + + return + __responseValue ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } } } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeleteVoice.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeleteVoice.g.cs index 2830fa8..a795e52 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeleteVoice.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeleteVoice.g.cs @@ -29,7 +29,7 @@ partial void ProcessDeleteVoiceResponseContent( /// /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task DeleteVoiceAsync( string voiceId, string? xiApiKey = default, @@ -92,28 +92,153 @@ partial void ProcessDeleteVoiceResponseContent( ProcessDeleteVoiceResponse( httpClient: HttpClient, httpResponseMessage: __response); + // Bad Request + if ((int)__response.StatusCode == 400) + { + string? __content_400 = null; + global::DeepInfra.DeepError? __value_400 = null; + if (ReadResponseAsString) + { + __content_400 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_400 = global::DeepInfra.DeepError.FromJson(__content_400, JsonSerializerContext); + } + else + { + var __contentStream_400 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_400 = await global::DeepInfra.DeepError.FromJsonStreamAsync(__contentStream_400, JsonSerializerContext).ConfigureAwait(false); + } - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessDeleteVoiceResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_400, + ResponseObject = __value_400, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Not Found + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::DeepInfra.DeepError? __value_404 = null; + if (ReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_404 = global::DeepInfra.DeepError.FromJson(__content_404, JsonSerializerContext); + } + else + { + var __contentStream_404 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_404 = await global::DeepInfra.DeepError.FromJsonStreamAsync(__contentStream_404, JsonSerializerContext).ConfigureAwait(false); + } - try + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_404, + ResponseObject = __value_404, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Validation Error + if ((int)__response.StatusCode == 422) { - __response.EnsureSuccessStatusCode(); + string? __content_422 = null; + global::DeepInfra.HTTPValidationError? __value_422 = null; + if (ReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_422 = global::DeepInfra.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_422 = await global::DeepInfra.HTTPValidationError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); + } + + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; } - catch (global::System.Net.Http.HttpRequestException __ex) + + if (ReadResponseAsString) { - throw new global::System.InvalidOperationException(__content, __ex); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessDeleteVoiceResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.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), + }; + } + + return __content; } + else + { + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - return __content; + var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(string), JsonSerializerContext).ConfigureAwait(false) as string; + + return + __responseValue ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } } } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeployCreate.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeployCreate.g.cs index a669583..6110617 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeployCreate.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeployCreate.g.cs @@ -29,7 +29,7 @@ partial void ProcessDeployCreateResponseContent( /// /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task DeployCreateAsync( global::DeepInfra.DeployModelIn request, string? xiApiKey = default, @@ -100,30 +100,183 @@ partial void ProcessDeployCreateResponseContent( ProcessDeployCreateResponse( httpClient: HttpClient, httpResponseMessage: __response); + // Not Found + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::DeepInfra.DeepError? __value_404 = null; + if (ReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_404 = global::DeepInfra.DeepError.FromJson(__content_404, JsonSerializerContext); + } + else + { + var __contentStream_404 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_404 = await global::DeepInfra.DeepError.FromJsonStreamAsync(__contentStream_404, JsonSerializerContext).ConfigureAwait(false); + } - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_404, + ResponseObject = __value_404, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Conflict + if ((int)__response.StatusCode == 409) + { + string? __content_409 = null; + global::DeepInfra.DeepError? __value_409 = null; + if (ReadResponseAsString) + { + __content_409 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_409 = global::DeepInfra.DeepError.FromJson(__content_409, JsonSerializerContext); + } + else + { + var __contentStream_409 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_409 = await global::DeepInfra.DeepError.FromJsonStreamAsync(__contentStream_409, JsonSerializerContext).ConfigureAwait(false); + } - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessDeployCreateResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_409, + ResponseObject = __value_409, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Locked + if ((int)__response.StatusCode == 423) + { + string? __content_423 = null; + global::DeepInfra.DeepError? __value_423 = null; + if (ReadResponseAsString) + { + __content_423 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_423 = global::DeepInfra.DeepError.FromJson(__content_423, JsonSerializerContext); + } + else + { + var __contentStream_423 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_423 = await global::DeepInfra.DeepError.FromJsonStreamAsync(__contentStream_423, JsonSerializerContext).ConfigureAwait(false); + } - try + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_423, + ResponseObject = __value_423, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Validation Error + if ((int)__response.StatusCode == 422) { - __response.EnsureSuccessStatusCode(); + string? __content_422 = null; + global::DeepInfra.HTTPValidationError? __value_422 = null; + if (ReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_422 = global::DeepInfra.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_422 = await global::DeepInfra.HTTPValidationError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); + } + + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; } - catch (global::System.Net.Http.HttpRequestException __ex) + + if (ReadResponseAsString) { - throw new global::System.InvalidOperationException(__content, __ex); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessDeployCreateResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.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), + }; + } + + return + global::DeepInfra.DeployResult.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } + else + { + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - return - global::DeepInfra.DeployResult.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + var __responseValue = await global::DeepInfra.DeployResult.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false); + + return + __responseValue ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } } /// diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeployCreateHf.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeployCreateHf.g.cs index 1e37886..d7659b2 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeployCreateHf.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeployCreateHf.g.cs @@ -29,7 +29,7 @@ partial void ProcessDeployCreateHfResponseContent( /// /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task DeployCreateHfAsync( global::DeepInfra.HFModel request, string? xiApiKey = default, @@ -100,30 +100,183 @@ partial void ProcessDeployCreateHfResponseContent( ProcessDeployCreateHfResponse( httpClient: HttpClient, httpResponseMessage: __response); + // Not Found + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::DeepInfra.DeepError? __value_404 = null; + if (ReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_404 = global::DeepInfra.DeepError.FromJson(__content_404, JsonSerializerContext); + } + else + { + var __contentStream_404 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_404 = await global::DeepInfra.DeepError.FromJsonStreamAsync(__contentStream_404, JsonSerializerContext).ConfigureAwait(false); + } - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_404, + ResponseObject = __value_404, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Conflict + if ((int)__response.StatusCode == 409) + { + string? __content_409 = null; + global::DeepInfra.DeepError? __value_409 = null; + if (ReadResponseAsString) + { + __content_409 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_409 = global::DeepInfra.DeepError.FromJson(__content_409, JsonSerializerContext); + } + else + { + var __contentStream_409 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_409 = await global::DeepInfra.DeepError.FromJsonStreamAsync(__contentStream_409, JsonSerializerContext).ConfigureAwait(false); + } - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessDeployCreateHfResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_409, + ResponseObject = __value_409, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Locked + if ((int)__response.StatusCode == 423) + { + string? __content_423 = null; + global::DeepInfra.DeepError? __value_423 = null; + if (ReadResponseAsString) + { + __content_423 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_423 = global::DeepInfra.DeepError.FromJson(__content_423, JsonSerializerContext); + } + else + { + var __contentStream_423 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_423 = await global::DeepInfra.DeepError.FromJsonStreamAsync(__contentStream_423, JsonSerializerContext).ConfigureAwait(false); + } - try + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_423, + ResponseObject = __value_423, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Validation Error + if ((int)__response.StatusCode == 422) { - __response.EnsureSuccessStatusCode(); + string? __content_422 = null; + global::DeepInfra.HTTPValidationError? __value_422 = null; + if (ReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_422 = global::DeepInfra.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_422 = await global::DeepInfra.HTTPValidationError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); + } + + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; } - catch (global::System.Net.Http.HttpRequestException __ex) + + if (ReadResponseAsString) { - throw new global::System.InvalidOperationException(__content, __ex); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessDeployCreateHfResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.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), + }; + } + + return + global::DeepInfra.DeployResult.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } + else + { + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - return - global::DeepInfra.DeployResult.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + var __responseValue = await global::DeepInfra.DeployResult.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false); + + return + __responseValue ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } } /// diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeployCreateLlm.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeployCreateLlm.g.cs index 1f9fcec..60d6575 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeployCreateLlm.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeployCreateLlm.g.cs @@ -29,7 +29,7 @@ partial void ProcessDeployCreateLlmResponseContent( /// /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task DeployCreateLlmAsync( global::DeepInfra.DeployLLMIn request, string? xiApiKey = default, @@ -100,30 +100,155 @@ partial void ProcessDeployCreateLlmResponseContent( ProcessDeployCreateLlmResponse( httpClient: HttpClient, httpResponseMessage: __response); + // Payment Required + if ((int)__response.StatusCode == 402) + { + string? __content_402 = null; + global::DeepInfra.DeepError? __value_402 = null; + if (ReadResponseAsString) + { + __content_402 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_402 = global::DeepInfra.DeepError.FromJson(__content_402, JsonSerializerContext); + } + else + { + var __contentStream_402 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_402 = await global::DeepInfra.DeepError.FromJsonStreamAsync(__contentStream_402, JsonSerializerContext).ConfigureAwait(false); + } - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessDeployCreateLlmResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_402, + ResponseObject = __value_402, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Conflict + if ((int)__response.StatusCode == 409) + { + string? __content_409 = null; + global::DeepInfra.DeepError? __value_409 = null; + if (ReadResponseAsString) + { + __content_409 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_409 = global::DeepInfra.DeepError.FromJson(__content_409, JsonSerializerContext); + } + else + { + var __contentStream_409 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_409 = await global::DeepInfra.DeepError.FromJsonStreamAsync(__contentStream_409, JsonSerializerContext).ConfigureAwait(false); + } - try + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_409, + ResponseObject = __value_409, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Unprocessable Entity + if ((int)__response.StatusCode == 422) { - __response.EnsureSuccessStatusCode(); + string? __content_422 = null; + global::DeepInfra.DeepError? __value_422 = null; + if (ReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_422 = global::DeepInfra.DeepError.FromJson(__content_422, JsonSerializerContext); + } + else + { + var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_422 = await global::DeepInfra.DeepError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); + } + + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; } - catch (global::System.Net.Http.HttpRequestException __ex) + + if (ReadResponseAsString) { - throw new global::System.InvalidOperationException(__content, __ex); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessDeployCreateLlmResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.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), + }; + } + + return + global::DeepInfra.DeploymentOut.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } + else + { + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - return - global::DeepInfra.DeploymentOut.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + var __responseValue = await global::DeepInfra.DeploymentOut.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false); + + return + __responseValue ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } } /// diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeployDelete.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeployDelete.g.cs index 8d1d8c9..7bc2e22 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeployDelete.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeployDelete.g.cs @@ -29,7 +29,7 @@ partial void ProcessDeployDeleteResponseContent( /// /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task DeployDeleteAsync( string deployId, string? xiApiKey = default, @@ -92,30 +92,127 @@ partial void ProcessDeployDeleteResponseContent( ProcessDeployDeleteResponse( httpClient: HttpClient, httpResponseMessage: __response); + // Not Found + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::DeepInfra.DeepError? __value_404 = null; + if (ReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_404 = global::DeepInfra.DeepError.FromJson(__content_404, JsonSerializerContext); + } + else + { + var __contentStream_404 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_404 = await global::DeepInfra.DeepError.FromJsonStreamAsync(__contentStream_404, JsonSerializerContext).ConfigureAwait(false); + } - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_404, + ResponseObject = __value_404, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::DeepInfra.HTTPValidationError? __value_422 = null; + if (ReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_422 = global::DeepInfra.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_422 = await global::DeepInfra.HTTPValidationError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); + } - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessDeployDeleteResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } - try + if (ReadResponseAsString) { - __response.EnsureSuccessStatusCode(); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessDeployDeleteResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.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), + }; + } + + return + global::DeepInfra.DeployDelete.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } - catch (global::System.Net.Http.HttpRequestException __ex) + else { - throw new global::System.InvalidOperationException(__content, __ex); - } + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } - return - global::DeepInfra.DeployDelete.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + + var __responseValue = await global::DeepInfra.DeployDelete.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false); + + return + __responseValue ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } } } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeployDetailedStats.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeployDetailedStats.g.cs index 03eec72..9fb09c5 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeployDetailedStats.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeployDetailedStats.g.cs @@ -40,7 +40,7 @@ partial void ProcessDeployDetailedStatsResponseContent( /// /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task DeployDetailedStatsAsync( string deployId, string from, @@ -113,30 +113,155 @@ partial void ProcessDeployDetailedStatsResponseContent( ProcessDeployDetailedStatsResponse( httpClient: HttpClient, httpResponseMessage: __response); + // Not Found + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::DeepInfra.DeepError? __value_404 = null; + if (ReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_404 = global::DeepInfra.DeepError.FromJson(__content_404, JsonSerializerContext); + } + else + { + var __contentStream_404 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_404 = await global::DeepInfra.DeepError.FromJsonStreamAsync(__contentStream_404, JsonSerializerContext).ConfigureAwait(false); + } - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessDeployDetailedStatsResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_404, + ResponseObject = __value_404, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Gone + if ((int)__response.StatusCode == 410) + { + string? __content_410 = null; + global::DeepInfra.DeepError? __value_410 = null; + if (ReadResponseAsString) + { + __content_410 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_410 = global::DeepInfra.DeepError.FromJson(__content_410, JsonSerializerContext); + } + else + { + var __contentStream_410 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_410 = await global::DeepInfra.DeepError.FromJsonStreamAsync(__contentStream_410, JsonSerializerContext).ConfigureAwait(false); + } - try + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_410, + ResponseObject = __value_410, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Validation Error + if ((int)__response.StatusCode == 422) { - __response.EnsureSuccessStatusCode(); + string? __content_422 = null; + global::DeepInfra.HTTPValidationError? __value_422 = null; + if (ReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_422 = global::DeepInfra.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_422 = await global::DeepInfra.HTTPValidationError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); + } + + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; } - catch (global::System.Net.Http.HttpRequestException __ex) + + if (ReadResponseAsString) { - throw new global::System.InvalidOperationException(__content, __ex); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessDeployDetailedStatsResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.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), + }; + } + + return + global::DeepInfra.DetailedDeploymentStatsOut.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } + else + { + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - return - global::DeepInfra.DetailedDeploymentStatsOut.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + var __responseValue = await global::DeepInfra.DetailedDeploymentStatsOut.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false); + + return + __responseValue ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } } } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeployGpuAvailability.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeployGpuAvailability.g.cs index 1b6571c..4fd88e4 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeployGpuAvailability.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeployGpuAvailability.g.cs @@ -29,7 +29,7 @@ partial void ProcessDeployGpuAvailabilityResponseContent( /// /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task DeployGpuAvailabilityAsync( string? source = default, string? xiApiKey = default, @@ -95,30 +95,99 @@ partial void ProcessDeployGpuAvailabilityResponseContent( ProcessDeployGpuAvailabilityResponse( httpClient: HttpClient, httpResponseMessage: __response); + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::DeepInfra.HTTPValidationError? __value_422 = null; + if (ReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_422 = global::DeepInfra.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_422 = await global::DeepInfra.HTTPValidationError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); + } - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessDeployGpuAvailabilityResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } - try + if (ReadResponseAsString) { - __response.EnsureSuccessStatusCode(); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessDeployGpuAvailabilityResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.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), + }; + } + + return + global::DeepInfra.DeployGPUAvailability.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } - catch (global::System.Net.Http.HttpRequestException __ex) + else { - throw new global::System.InvalidOperationException(__content, __ex); - } + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } - return - global::DeepInfra.DeployGPUAvailability.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + + var __responseValue = await global::DeepInfra.DeployGPUAvailability.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false); + + return + __responseValue ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } } } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeployList2.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeployList2.g.cs index 1058336..79127ff 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeployList2.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeployList2.g.cs @@ -31,7 +31,7 @@ partial void ProcessDeployList2ResponseContent( /// /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task> DeployList2Async( string? status = default, string? xiApiKey = default, @@ -97,30 +97,127 @@ partial void ProcessDeployList2ResponseContent( ProcessDeployList2Response( httpClient: HttpClient, httpResponseMessage: __response); + // Bad Request + if ((int)__response.StatusCode == 400) + { + string? __content_400 = null; + global::DeepInfra.DeepError? __value_400 = null; + if (ReadResponseAsString) + { + __content_400 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_400 = global::DeepInfra.DeepError.FromJson(__content_400, JsonSerializerContext); + } + else + { + var __contentStream_400 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_400 = await global::DeepInfra.DeepError.FromJsonStreamAsync(__contentStream_400, JsonSerializerContext).ConfigureAwait(false); + } - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_400, + ResponseObject = __value_400, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::DeepInfra.HTTPValidationError? __value_422 = null; + if (ReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_422 = global::DeepInfra.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_422 = await global::DeepInfra.HTTPValidationError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); + } - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessDeployList2ResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } - try + if (ReadResponseAsString) { - __response.EnsureSuccessStatusCode(); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessDeployList2ResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.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), + }; + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) as global::System.Collections.Generic.IList ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } - catch (global::System.Net.Http.HttpRequestException __ex) + else { - throw new global::System.InvalidOperationException(__content, __ex); - } + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } - return - global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) as global::System.Collections.Generic.IList ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + + var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) as global::System.Collections.Generic.IList; + + return + __responseValue ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } } } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeployStats.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeployStats.g.cs index 9e2b1e3..28032ad 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeployStats.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeployStats.g.cs @@ -40,7 +40,7 @@ partial void ProcessDeployStatsResponseContent( /// /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task DeployStatsAsync( string deployId, string from, @@ -113,30 +113,155 @@ partial void ProcessDeployStatsResponseContent( ProcessDeployStatsResponse( httpClient: HttpClient, httpResponseMessage: __response); + // Not Found + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::DeepInfra.DeepError? __value_404 = null; + if (ReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_404 = global::DeepInfra.DeepError.FromJson(__content_404, JsonSerializerContext); + } + else + { + var __contentStream_404 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_404 = await global::DeepInfra.DeepError.FromJsonStreamAsync(__contentStream_404, JsonSerializerContext).ConfigureAwait(false); + } - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessDeployStatsResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_404, + ResponseObject = __value_404, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Gone + if ((int)__response.StatusCode == 410) + { + string? __content_410 = null; + global::DeepInfra.DeepError? __value_410 = null; + if (ReadResponseAsString) + { + __content_410 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_410 = global::DeepInfra.DeepError.FromJson(__content_410, JsonSerializerContext); + } + else + { + var __contentStream_410 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_410 = await global::DeepInfra.DeepError.FromJsonStreamAsync(__contentStream_410, JsonSerializerContext).ConfigureAwait(false); + } - try + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_410, + ResponseObject = __value_410, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Validation Error + if ((int)__response.StatusCode == 422) { - __response.EnsureSuccessStatusCode(); + string? __content_422 = null; + global::DeepInfra.HTTPValidationError? __value_422 = null; + if (ReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_422 = global::DeepInfra.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_422 = await global::DeepInfra.HTTPValidationError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); + } + + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; } - catch (global::System.Net.Http.HttpRequestException __ex) + + if (ReadResponseAsString) { - throw new global::System.InvalidOperationException(__content, __ex); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessDeployStatsResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.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), + }; + } + + return + global::DeepInfra.DeploymentStatsOut.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } + else + { + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - return - global::DeepInfra.DeploymentStatsOut.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + var __responseValue = await global::DeepInfra.DeploymentStatsOut.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false); + + return + __responseValue ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } } } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeployStatus.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeployStatus.g.cs index 597e194..2989691 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeployStatus.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeployStatus.g.cs @@ -29,7 +29,7 @@ partial void ProcessDeployStatusResponseContent( /// /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task DeployStatusAsync( string deployId, string? xiApiKey = default, @@ -92,30 +92,127 @@ partial void ProcessDeployStatusResponseContent( ProcessDeployStatusResponse( httpClient: HttpClient, httpResponseMessage: __response); + // Not Found + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::DeepInfra.DeepError? __value_404 = null; + if (ReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_404 = global::DeepInfra.DeepError.FromJson(__content_404, JsonSerializerContext); + } + else + { + var __contentStream_404 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_404 = await global::DeepInfra.DeepError.FromJsonStreamAsync(__contentStream_404, JsonSerializerContext).ConfigureAwait(false); + } - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_404, + ResponseObject = __value_404, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::DeepInfra.HTTPValidationError? __value_422 = null; + if (ReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_422 = global::DeepInfra.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_422 = await global::DeepInfra.HTTPValidationError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); + } - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessDeployStatusResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } - try + if (ReadResponseAsString) { - __response.EnsureSuccessStatusCode(); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessDeployStatusResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.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), + }; + } + + return + global::DeepInfra.DeploymentOut.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } - catch (global::System.Net.Http.HttpRequestException __ex) + else { - throw new global::System.InvalidOperationException(__content, __ex); - } + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } - return - global::DeepInfra.DeploymentOut.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + + var __responseValue = await global::DeepInfra.DeploymentOut.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false); + + return + __responseValue ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } } } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeployUpdate.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeployUpdate.g.cs index 79d0432..4582447 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeployUpdate.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeployUpdate.g.cs @@ -32,7 +32,7 @@ partial void ProcessDeployUpdateResponseContent( /// /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task DeployUpdateAsync( string deployId, global::DeepInfra.DeployLLMUpdateIn request, @@ -106,30 +106,183 @@ partial void ProcessDeployUpdateResponseContent( ProcessDeployUpdateResponse( httpClient: HttpClient, httpResponseMessage: __response); + // Bad Request + if ((int)__response.StatusCode == 400) + { + string? __content_400 = null; + global::DeepInfra.DeepError? __value_400 = null; + if (ReadResponseAsString) + { + __content_400 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_400 = global::DeepInfra.DeepError.FromJson(__content_400, JsonSerializerContext); + } + else + { + var __contentStream_400 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_400 = await global::DeepInfra.DeepError.FromJsonStreamAsync(__contentStream_400, JsonSerializerContext).ConfigureAwait(false); + } - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_400, + ResponseObject = __value_400, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Unauthorized + if ((int)__response.StatusCode == 401) + { + string? __content_401 = null; + global::DeepInfra.DeepError? __value_401 = null; + if (ReadResponseAsString) + { + __content_401 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_401 = global::DeepInfra.DeepError.FromJson(__content_401, JsonSerializerContext); + } + else + { + var __contentStream_401 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_401 = await global::DeepInfra.DeepError.FromJsonStreamAsync(__contentStream_401, JsonSerializerContext).ConfigureAwait(false); + } - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessDeployUpdateResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_401, + ResponseObject = __value_401, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Not Found + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::DeepInfra.DeepError? __value_404 = null; + if (ReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_404 = global::DeepInfra.DeepError.FromJson(__content_404, JsonSerializerContext); + } + else + { + var __contentStream_404 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_404 = await global::DeepInfra.DeepError.FromJsonStreamAsync(__contentStream_404, JsonSerializerContext).ConfigureAwait(false); + } - try + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_404, + ResponseObject = __value_404, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Validation Error + if ((int)__response.StatusCode == 422) { - __response.EnsureSuccessStatusCode(); + string? __content_422 = null; + global::DeepInfra.HTTPValidationError? __value_422 = null; + if (ReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_422 = global::DeepInfra.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_422 = await global::DeepInfra.HTTPValidationError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); + } + + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; } - catch (global::System.Net.Http.HttpRequestException __ex) + + if (ReadResponseAsString) { - throw new global::System.InvalidOperationException(__content, __ex); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessDeployUpdateResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.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), + }; + } + + return + global::DeepInfra.DeployStatusOut.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } + else + { + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - return - global::DeepInfra.DeployStatusOut.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + var __responseValue = await global::DeepInfra.DeployStatusOut.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false); + + return + __responseValue ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } } /// diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeploymentLogsQuery.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeploymentLogsQuery.g.cs index 3378332..4c93242 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeploymentLogsQuery.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeploymentLogsQuery.g.cs @@ -58,7 +58,7 @@ partial void ProcessDeploymentLogsQueryResponseContent( /// /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task DeploymentLogsQueryAsync( string deployId, string? podName = default, @@ -140,30 +140,155 @@ partial void ProcessDeploymentLogsQueryResponseContent( ProcessDeploymentLogsQueryResponse( httpClient: HttpClient, httpResponseMessage: __response); + // Bad Request + if ((int)__response.StatusCode == 400) + { + string? __content_400 = null; + global::DeepInfra.DeepError? __value_400 = null; + if (ReadResponseAsString) + { + __content_400 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_400 = global::DeepInfra.DeepError.FromJson(__content_400, JsonSerializerContext); + } + else + { + var __contentStream_400 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_400 = await global::DeepInfra.DeepError.FromJsonStreamAsync(__contentStream_400, JsonSerializerContext).ConfigureAwait(false); + } - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessDeploymentLogsQueryResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_400, + ResponseObject = __value_400, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Not Found + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::DeepInfra.DeepError? __value_404 = null; + if (ReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_404 = global::DeepInfra.DeepError.FromJson(__content_404, JsonSerializerContext); + } + else + { + var __contentStream_404 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_404 = await global::DeepInfra.DeepError.FromJsonStreamAsync(__contentStream_404, JsonSerializerContext).ConfigureAwait(false); + } - try + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_404, + ResponseObject = __value_404, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Validation Error + if ((int)__response.StatusCode == 422) { - __response.EnsureSuccessStatusCode(); + string? __content_422 = null; + global::DeepInfra.HTTPValidationError? __value_422 = null; + if (ReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_422 = global::DeepInfra.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_422 = await global::DeepInfra.HTTPValidationError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); + } + + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; } - catch (global::System.Net.Http.HttpRequestException __ex) + + if (ReadResponseAsString) { - throw new global::System.InvalidOperationException(__content, __ex); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessDeploymentLogsQueryResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.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), + }; + } + + return + global::DeepInfra.DeploymentLogQueryOut.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } + else + { + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - return - global::DeepInfra.DeploymentLogQueryOut.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + var __responseValue = await global::DeepInfra.DeploymentLogQueryOut.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false); + + return + __responseValue ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } } } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.GetApiToken.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.GetApiToken.g.cs index b4d17e5..25837de 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.GetApiToken.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.GetApiToken.g.cs @@ -29,7 +29,7 @@ partial void ProcessGetApiTokenResponseContent( /// /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task GetApiTokenAsync( string apiToken, string? xiApiKey = default, @@ -92,30 +92,127 @@ partial void ProcessGetApiTokenResponseContent( ProcessGetApiTokenResponse( httpClient: HttpClient, httpResponseMessage: __response); + // Not Found + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::DeepInfra.DeepError? __value_404 = null; + if (ReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_404 = global::DeepInfra.DeepError.FromJson(__content_404, JsonSerializerContext); + } + else + { + var __contentStream_404 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_404 = await global::DeepInfra.DeepError.FromJsonStreamAsync(__contentStream_404, JsonSerializerContext).ConfigureAwait(false); + } - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_404, + ResponseObject = __value_404, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::DeepInfra.HTTPValidationError? __value_422 = null; + if (ReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_422 = global::DeepInfra.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_422 = await global::DeepInfra.HTTPValidationError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); + } - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessGetApiTokenResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } - try + if (ReadResponseAsString) { - __response.EnsureSuccessStatusCode(); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessGetApiTokenResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.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), + }; + } + + return + global::DeepInfra.ApiToken.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } - catch (global::System.Net.Http.HttpRequestException __ex) + else { - throw new global::System.InvalidOperationException(__content, __ex); - } + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } - return - global::DeepInfra.ApiToken.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + + var __responseValue = await global::DeepInfra.ApiToken.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false); + + return + __responseValue ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } } } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.GetApiTokens.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.GetApiTokens.g.cs index f447424..f6ed2a4 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.GetApiTokens.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.GetApiTokens.g.cs @@ -26,7 +26,7 @@ partial void ProcessGetApiTokensResponseContent( /// /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task> GetApiTokensAsync( string? xiApiKey = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -86,30 +86,99 @@ partial void ProcessGetApiTokensResponseContent( ProcessGetApiTokensResponse( httpClient: HttpClient, httpResponseMessage: __response); + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::DeepInfra.HTTPValidationError? __value_422 = null; + if (ReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_422 = global::DeepInfra.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_422 = await global::DeepInfra.HTTPValidationError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); + } - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessGetApiTokensResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } - try + if (ReadResponseAsString) { - __response.EnsureSuccessStatusCode(); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessGetApiTokensResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.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), + }; + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) as global::System.Collections.Generic.IList ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } - catch (global::System.Net.Http.HttpRequestException __ex) + else { - throw new global::System.InvalidOperationException(__content, __ex); - } + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } - return - global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) as global::System.Collections.Generic.IList ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + + var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) as global::System.Collections.Generic.IList; + + return + __responseValue ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } } } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.GetChecklist.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.GetChecklist.g.cs index 6da8c47..7410bd9 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.GetChecklist.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.GetChecklist.g.cs @@ -26,7 +26,7 @@ partial void ProcessGetChecklistResponseContent( /// /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task GetChecklistAsync( string? session = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -80,30 +80,99 @@ partial void ProcessGetChecklistResponseContent( ProcessGetChecklistResponse( httpClient: HttpClient, httpResponseMessage: __response); + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::DeepInfra.HTTPValidationError? __value_422 = null; + if (ReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_422 = global::DeepInfra.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_422 = await global::DeepInfra.HTTPValidationError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); + } - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessGetChecklistResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } - try + if (ReadResponseAsString) { - __response.EnsureSuccessStatusCode(); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessGetChecklistResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.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), + }; + } + + return + global::DeepInfra.Checklist.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } - catch (global::System.Net.Http.HttpRequestException __ex) + else { - throw new global::System.InvalidOperationException(__content, __ex); - } + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } - return - global::DeepInfra.Checklist.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + + var __responseValue = await global::DeepInfra.Checklist.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false); + + return + __responseValue ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } } } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.GetConfig.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.GetConfig.g.cs index 2b97e43..6e7923f 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.GetConfig.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.GetConfig.g.cs @@ -26,7 +26,7 @@ partial void ProcessGetConfigResponseContent( /// /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task GetConfigAsync( string? session = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -80,30 +80,99 @@ partial void ProcessGetConfigResponseContent( ProcessGetConfigResponse( httpClient: HttpClient, httpResponseMessage: __response); + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::DeepInfra.HTTPValidationError? __value_422 = null; + if (ReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_422 = global::DeepInfra.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_422 = await global::DeepInfra.HTTPValidationError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); + } - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessGetConfigResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } - try + if (ReadResponseAsString) { - __response.EnsureSuccessStatusCode(); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessGetConfigResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.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), + }; + } + + return + global::DeepInfra.ConfigOut.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } - catch (global::System.Net.Http.HttpRequestException __ex) + else { - throw new global::System.InvalidOperationException(__content, __ex); - } + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } - return - global::DeepInfra.ConfigOut.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + + var __responseValue = await global::DeepInfra.ConfigOut.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false); + + return + __responseValue ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } } } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.GetVoice.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.GetVoice.g.cs index e7f965f..3018106 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.GetVoice.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.GetVoice.g.cs @@ -30,7 +30,7 @@ partial void ProcessGetVoiceResponseContent( /// /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task GetVoiceAsync( string voiceId, string? xiApiKey = default, @@ -93,30 +93,127 @@ partial void ProcessGetVoiceResponseContent( ProcessGetVoiceResponse( httpClient: HttpClient, httpResponseMessage: __response); + // Not Found + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::DeepInfra.DeepError? __value_404 = null; + if (ReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_404 = global::DeepInfra.DeepError.FromJson(__content_404, JsonSerializerContext); + } + else + { + var __contentStream_404 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_404 = await global::DeepInfra.DeepError.FromJsonStreamAsync(__contentStream_404, JsonSerializerContext).ConfigureAwait(false); + } - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_404, + ResponseObject = __value_404, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::DeepInfra.HTTPValidationError? __value_422 = null; + if (ReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_422 = global::DeepInfra.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_422 = await global::DeepInfra.HTTPValidationError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); + } - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessGetVoiceResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } - try + if (ReadResponseAsString) { - __response.EnsureSuccessStatusCode(); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessGetVoiceResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.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), + }; + } + + return + global::DeepInfra.Voice.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } - catch (global::System.Net.Http.HttpRequestException __ex) + else { - throw new global::System.InvalidOperationException(__content, __ex); - } + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } - return - global::DeepInfra.Voice.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + + var __responseValue = await global::DeepInfra.Voice.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false); + + return + __responseValue ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } } } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.GetVoices.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.GetVoices.g.cs index 8cb1a6b..4288c28 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.GetVoices.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.GetVoices.g.cs @@ -27,7 +27,7 @@ partial void ProcessGetVoicesResponseContent( /// /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task GetVoicesAsync( string? xiApiKey = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -87,30 +87,127 @@ partial void ProcessGetVoicesResponseContent( ProcessGetVoicesResponse( httpClient: HttpClient, httpResponseMessage: __response); + // Not Found + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::DeepInfra.DeepError? __value_404 = null; + if (ReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_404 = global::DeepInfra.DeepError.FromJson(__content_404, JsonSerializerContext); + } + else + { + var __contentStream_404 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_404 = await global::DeepInfra.DeepError.FromJsonStreamAsync(__contentStream_404, JsonSerializerContext).ConfigureAwait(false); + } - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_404, + ResponseObject = __value_404, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::DeepInfra.HTTPValidationError? __value_422 = null; + if (ReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_422 = global::DeepInfra.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_422 = await global::DeepInfra.HTTPValidationError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); + } - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessGetVoicesResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } - try + if (ReadResponseAsString) { - __response.EnsureSuccessStatusCode(); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessGetVoicesResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.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), + }; + } + + return + global::DeepInfra.GetVoicesOut.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } - catch (global::System.Net.Http.HttpRequestException __ex) + else { - throw new global::System.InvalidOperationException(__content, __ex); - } + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } - return - global::DeepInfra.GetVoicesOut.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + + var __responseValue = await global::DeepInfra.GetVoicesOut.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false); + + return + __responseValue ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } } } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.GithubCliLogin.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.GithubCliLogin.g.cs index 9dd8b2f..7779270 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.GithubCliLogin.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.GithubCliLogin.g.cs @@ -28,7 +28,7 @@ partial void ProcessGithubCliLoginResponseContent( /// /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task GithubCliLoginAsync( string loginId, global::System.Threading.CancellationToken cancellationToken = default) @@ -85,28 +85,97 @@ partial void ProcessGithubCliLoginResponseContent( ProcessGithubCliLoginResponse( httpClient: HttpClient, httpResponseMessage: __response); + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::DeepInfra.HTTPValidationError? __value_422 = null; + if (ReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_422 = global::DeepInfra.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_422 = await global::DeepInfra.HTTPValidationError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); + } - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessGithubCliLoginResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } - try + if (ReadResponseAsString) { - __response.EnsureSuccessStatusCode(); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessGithubCliLoginResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.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), + }; + } + + return __content; } - catch (global::System.Net.Http.HttpRequestException __ex) + else { - throw new global::System.InvalidOperationException(__content, __ex); - } + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } - return __content; + using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + + var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(string), JsonSerializerContext).ConfigureAwait(false) as string; + + return + __responseValue ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } } } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.GithubLogin.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.GithubLogin.g.cs index 603d5db..5965f9d 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.GithubLogin.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.GithubLogin.g.cs @@ -36,7 +36,7 @@ partial void ProcessGithubLoginResponseContent( /// /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task GithubLoginAsync( string? loginId = default, string? origin = default, @@ -105,28 +105,97 @@ partial void ProcessGithubLoginResponseContent( ProcessGithubLoginResponse( httpClient: HttpClient, httpResponseMessage: __response); + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::DeepInfra.HTTPValidationError? __value_422 = null; + if (ReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_422 = global::DeepInfra.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_422 = await global::DeepInfra.HTTPValidationError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); + } - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessGithubLoginResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } - try + if (ReadResponseAsString) { - __response.EnsureSuccessStatusCode(); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessGithubLoginResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.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), + }; + } + + return __content; } - catch (global::System.Net.Http.HttpRequestException __ex) + else { - throw new global::System.InvalidOperationException(__content, __ex); - } + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } - return __content; + using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + + var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(string), JsonSerializerContext).ConfigureAwait(false) as string; + + return + __responseValue ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } } } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.InferenceDeploy.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.InferenceDeploy.g.cs index 3e2ba10..a19c4c5 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.InferenceDeploy.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.InferenceDeploy.g.cs @@ -35,7 +35,7 @@ partial void ProcessInferenceDeployResponseContent( /// /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task InferenceDeployAsync( string deployId, string? xDeepinfraSource = default, @@ -112,28 +112,125 @@ partial void ProcessInferenceDeployResponseContent( ProcessInferenceDeployResponse( httpClient: HttpClient, httpResponseMessage: __response); + // Not Found + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::DeepInfra.DeepError? __value_404 = null; + if (ReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_404 = global::DeepInfra.DeepError.FromJson(__content_404, JsonSerializerContext); + } + else + { + var __contentStream_404 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_404 = await global::DeepInfra.DeepError.FromJsonStreamAsync(__contentStream_404, JsonSerializerContext).ConfigureAwait(false); + } - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_404, + ResponseObject = __value_404, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::DeepInfra.HTTPValidationError? __value_422 = null; + if (ReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_422 = global::DeepInfra.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_422 = await global::DeepInfra.HTTPValidationError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); + } - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessInferenceDeployResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } - try + if (ReadResponseAsString) { - __response.EnsureSuccessStatusCode(); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessInferenceDeployResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.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), + }; + } + + return __content; } - catch (global::System.Net.Http.HttpRequestException __ex) + else { - throw new global::System.InvalidOperationException(__content, __ex); - } + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } - return __content; + using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + + var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(string), JsonSerializerContext).ConfigureAwait(false) as string; + + return + __responseValue ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } } } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.InferenceModel.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.InferenceModel.g.cs index 18a9519..82ddc47 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.InferenceModel.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.InferenceModel.g.cs @@ -40,7 +40,7 @@ partial void ProcessInferenceModelResponseContent( /// /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task InferenceModelAsync( string modelName, string? version = default, @@ -123,28 +123,181 @@ partial void ProcessInferenceModelResponseContent( ProcessInferenceModelResponse( httpClient: HttpClient, httpResponseMessage: __response); + // Forbidden + if ((int)__response.StatusCode == 403) + { + string? __content_403 = null; + global::DeepInfra.DeepError? __value_403 = null; + if (ReadResponseAsString) + { + __content_403 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_403 = global::DeepInfra.DeepError.FromJson(__content_403, JsonSerializerContext); + } + else + { + var __contentStream_403 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_403 = await global::DeepInfra.DeepError.FromJsonStreamAsync(__contentStream_403, JsonSerializerContext).ConfigureAwait(false); + } - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_403, + ResponseObject = __value_403, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Not Found + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::DeepInfra.DeepError? __value_404 = null; + if (ReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_404 = global::DeepInfra.DeepError.FromJson(__content_404, JsonSerializerContext); + } + else + { + var __contentStream_404 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_404 = await global::DeepInfra.DeepError.FromJsonStreamAsync(__contentStream_404, JsonSerializerContext).ConfigureAwait(false); + } - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessInferenceModelResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_404, + ResponseObject = __value_404, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Locked + if ((int)__response.StatusCode == 423) + { + string? __content_423 = null; + global::DeepInfra.DeepError? __value_423 = null; + if (ReadResponseAsString) + { + __content_423 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_423 = global::DeepInfra.DeepError.FromJson(__content_423, JsonSerializerContext); + } + else + { + var __contentStream_423 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_423 = await global::DeepInfra.DeepError.FromJsonStreamAsync(__contentStream_423, JsonSerializerContext).ConfigureAwait(false); + } - try + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_423, + ResponseObject = __value_423, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Validation Error + if ((int)__response.StatusCode == 422) { - __response.EnsureSuccessStatusCode(); + string? __content_422 = null; + global::DeepInfra.HTTPValidationError? __value_422 = null; + if (ReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_422 = global::DeepInfra.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_422 = await global::DeepInfra.HTTPValidationError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); + } + + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; } - catch (global::System.Net.Http.HttpRequestException __ex) + + if (ReadResponseAsString) { - throw new global::System.InvalidOperationException(__content, __ex); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessInferenceModelResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.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), + }; + } + + return __content; } + else + { + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - return __content; + var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(string), JsonSerializerContext).ConfigureAwait(false) as string; + + return + __responseValue ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } } } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.LogsQuery.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.LogsQuery.g.cs index 02df2a1..4c0733c 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.LogsQuery.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.LogsQuery.g.cs @@ -53,7 +53,7 @@ partial void ProcessLogsQueryResponseContent( /// /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task LogsQueryAsync( string deployId, string? from = default, @@ -131,30 +131,155 @@ partial void ProcessLogsQueryResponseContent( ProcessLogsQueryResponse( httpClient: HttpClient, httpResponseMessage: __response); + // Bad Request + if ((int)__response.StatusCode == 400) + { + string? __content_400 = null; + global::DeepInfra.DeepError? __value_400 = null; + if (ReadResponseAsString) + { + __content_400 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_400 = global::DeepInfra.DeepError.FromJson(__content_400, JsonSerializerContext); + } + else + { + var __contentStream_400 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_400 = await global::DeepInfra.DeepError.FromJsonStreamAsync(__contentStream_400, JsonSerializerContext).ConfigureAwait(false); + } - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessLogsQueryResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_400, + ResponseObject = __value_400, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Not Found + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::DeepInfra.DeepError? __value_404 = null; + if (ReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_404 = global::DeepInfra.DeepError.FromJson(__content_404, JsonSerializerContext); + } + else + { + var __contentStream_404 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_404 = await global::DeepInfra.DeepError.FromJsonStreamAsync(__contentStream_404, JsonSerializerContext).ConfigureAwait(false); + } - try + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_404, + ResponseObject = __value_404, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Validation Error + if ((int)__response.StatusCode == 422) { - __response.EnsureSuccessStatusCode(); + string? __content_422 = null; + global::DeepInfra.HTTPValidationError? __value_422 = null; + if (ReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_422 = global::DeepInfra.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_422 = await global::DeepInfra.HTTPValidationError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); + } + + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; } - catch (global::System.Net.Http.HttpRequestException __ex) + + if (ReadResponseAsString) { - throw new global::System.InvalidOperationException(__content, __ex); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessLogsQueryResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.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), + }; + } + + return + global::DeepInfra.LogQueryOut.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } + else + { + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - return - global::DeepInfra.LogQueryOut.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + var __responseValue = await global::DeepInfra.LogQueryOut.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false); + + return + __responseValue ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } } } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.Me.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.Me.g.cs index 536f8ac..ce5899d 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.Me.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.Me.g.cs @@ -26,7 +26,7 @@ partial void ProcessMeResponseContent( /// /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task MeAsync( string? xiApiKey = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -86,30 +86,99 @@ partial void ProcessMeResponseContent( ProcessMeResponse( httpClient: HttpClient, httpResponseMessage: __response); + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::DeepInfra.HTTPValidationError? __value_422 = null; + if (ReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_422 = global::DeepInfra.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_422 = await global::DeepInfra.HTTPValidationError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); + } - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessMeResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } - try + if (ReadResponseAsString) { - __response.EnsureSuccessStatusCode(); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessMeResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.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), + }; + } + + return + global::DeepInfra.Me.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } - catch (global::System.Net.Http.HttpRequestException __ex) + else { - throw new global::System.InvalidOperationException(__content, __ex); - } + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } - return - global::DeepInfra.Me.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + + var __responseValue = await global::DeepInfra.Me.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false); + + return + __responseValue ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } } } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.ModelDelete.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.ModelDelete.g.cs index 095f7a1..dbd9b9b 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.ModelDelete.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.ModelDelete.g.cs @@ -34,7 +34,7 @@ partial void ProcessModelDeleteResponseContent( /// /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task ModelDeleteAsync( string modelName, string version, @@ -103,28 +103,153 @@ partial void ProcessModelDeleteResponseContent( ProcessModelDeleteResponse( httpClient: HttpClient, httpResponseMessage: __response); + // Not Found + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::DeepInfra.DeepError? __value_404 = null; + if (ReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_404 = global::DeepInfra.DeepError.FromJson(__content_404, JsonSerializerContext); + } + else + { + var __contentStream_404 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_404 = await global::DeepInfra.DeepError.FromJsonStreamAsync(__contentStream_404, JsonSerializerContext).ConfigureAwait(false); + } - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessModelDeleteResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_404, + ResponseObject = __value_404, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Unauthorized + if ((int)__response.StatusCode == 401) + { + string? __content_401 = null; + global::DeepInfra.DeepError? __value_401 = null; + if (ReadResponseAsString) + { + __content_401 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_401 = global::DeepInfra.DeepError.FromJson(__content_401, JsonSerializerContext); + } + else + { + var __contentStream_401 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_401 = await global::DeepInfra.DeepError.FromJsonStreamAsync(__contentStream_401, JsonSerializerContext).ConfigureAwait(false); + } - try + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_401, + ResponseObject = __value_401, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Validation Error + if ((int)__response.StatusCode == 422) { - __response.EnsureSuccessStatusCode(); + string? __content_422 = null; + global::DeepInfra.HTTPValidationError? __value_422 = null; + if (ReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_422 = global::DeepInfra.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_422 = await global::DeepInfra.HTTPValidationError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); + } + + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; } - catch (global::System.Net.Http.HttpRequestException __ex) + + if (ReadResponseAsString) { - throw new global::System.InvalidOperationException(__content, __ex); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessModelDeleteResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.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), + }; + } + + return __content; } + else + { + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - return __content; + var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(string), JsonSerializerContext).ConfigureAwait(false) as string; + + return + __responseValue ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } } } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.ModelMetaUpdate.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.ModelMetaUpdate.g.cs index 3a795bd..e4bb9a1 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.ModelMetaUpdate.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.ModelMetaUpdate.g.cs @@ -32,7 +32,7 @@ partial void ProcessModelMetaUpdateResponseContent( /// /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task ModelMetaUpdateAsync( string modelName, global::DeepInfra.ModelMetaIn request, @@ -106,28 +106,153 @@ partial void ProcessModelMetaUpdateResponseContent( ProcessModelMetaUpdateResponse( httpClient: HttpClient, httpResponseMessage: __response); + // Not Found + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::DeepInfra.DeepError? __value_404 = null; + if (ReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_404 = global::DeepInfra.DeepError.FromJson(__content_404, JsonSerializerContext); + } + else + { + var __contentStream_404 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_404 = await global::DeepInfra.DeepError.FromJsonStreamAsync(__contentStream_404, JsonSerializerContext).ConfigureAwait(false); + } - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessModelMetaUpdateResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_404, + ResponseObject = __value_404, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Unauthorized + if ((int)__response.StatusCode == 401) + { + string? __content_401 = null; + global::DeepInfra.DeepError? __value_401 = null; + if (ReadResponseAsString) + { + __content_401 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_401 = global::DeepInfra.DeepError.FromJson(__content_401, JsonSerializerContext); + } + else + { + var __contentStream_401 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_401 = await global::DeepInfra.DeepError.FromJsonStreamAsync(__contentStream_401, JsonSerializerContext).ConfigureAwait(false); + } - try + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_401, + ResponseObject = __value_401, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Validation Error + if ((int)__response.StatusCode == 422) { - __response.EnsureSuccessStatusCode(); + string? __content_422 = null; + global::DeepInfra.HTTPValidationError? __value_422 = null; + if (ReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_422 = global::DeepInfra.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_422 = await global::DeepInfra.HTTPValidationError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); + } + + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; } - catch (global::System.Net.Http.HttpRequestException __ex) + + if (ReadResponseAsString) { - throw new global::System.InvalidOperationException(__content, __ex); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessModelMetaUpdateResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.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), + }; + } + + return __content; } + else + { + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - return __content; + var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(string), JsonSerializerContext).ConfigureAwait(false) as string; + + return + __responseValue ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } } /// diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.ModelPublicity.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.ModelPublicity.g.cs index 3996782..562b0ae 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.ModelPublicity.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.ModelPublicity.g.cs @@ -32,7 +32,7 @@ partial void ProcessModelPublicityResponseContent( /// /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task ModelPublicityAsync( string modelName, global::DeepInfra.ModelPublicityIn request, @@ -106,28 +106,153 @@ partial void ProcessModelPublicityResponseContent( ProcessModelPublicityResponse( httpClient: HttpClient, httpResponseMessage: __response); + // Not Found + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::DeepInfra.DeepError? __value_404 = null; + if (ReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_404 = global::DeepInfra.DeepError.FromJson(__content_404, JsonSerializerContext); + } + else + { + var __contentStream_404 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_404 = await global::DeepInfra.DeepError.FromJsonStreamAsync(__contentStream_404, JsonSerializerContext).ConfigureAwait(false); + } - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessModelPublicityResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_404, + ResponseObject = __value_404, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Unauthorized + if ((int)__response.StatusCode == 401) + { + string? __content_401 = null; + global::DeepInfra.DeepError? __value_401 = null; + if (ReadResponseAsString) + { + __content_401 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_401 = global::DeepInfra.DeepError.FromJson(__content_401, JsonSerializerContext); + } + else + { + var __contentStream_401 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_401 = await global::DeepInfra.DeepError.FromJsonStreamAsync(__contentStream_401, JsonSerializerContext).ConfigureAwait(false); + } - try + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_401, + ResponseObject = __value_401, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Validation Error + if ((int)__response.StatusCode == 422) { - __response.EnsureSuccessStatusCode(); + string? __content_422 = null; + global::DeepInfra.HTTPValidationError? __value_422 = null; + if (ReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_422 = global::DeepInfra.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_422 = await global::DeepInfra.HTTPValidationError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); + } + + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; } - catch (global::System.Net.Http.HttpRequestException __ex) + + if (ReadResponseAsString) { - throw new global::System.InvalidOperationException(__content, __ex); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessModelPublicityResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.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), + }; + } + + return __content; } + else + { + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - return __content; + var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(string), JsonSerializerContext).ConfigureAwait(false) as string; + + return + __responseValue ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } } /// diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.ModelSchema.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.ModelSchema.g.cs index aa2eb14..43a6613 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.ModelSchema.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.ModelSchema.g.cs @@ -37,7 +37,7 @@ partial void ProcessModelSchemaResponseContent( /// /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task ModelSchemaAsync( string modelName, global::DeepInfra.SchemaVariantKey variantKey, @@ -109,30 +109,183 @@ partial void ProcessModelSchemaResponseContent( ProcessModelSchemaResponse( httpClient: HttpClient, httpResponseMessage: __response); + // Forbidden + if ((int)__response.StatusCode == 403) + { + string? __content_403 = null; + global::DeepInfra.DeepError? __value_403 = null; + if (ReadResponseAsString) + { + __content_403 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_403 = global::DeepInfra.DeepError.FromJson(__content_403, JsonSerializerContext); + } + else + { + var __contentStream_403 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_403 = await global::DeepInfra.DeepError.FromJsonStreamAsync(__contentStream_403, JsonSerializerContext).ConfigureAwait(false); + } - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_403, + ResponseObject = __value_403, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Not Found + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::DeepInfra.DeepError? __value_404 = null; + if (ReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_404 = global::DeepInfra.DeepError.FromJson(__content_404, JsonSerializerContext); + } + else + { + var __contentStream_404 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_404 = await global::DeepInfra.DeepError.FromJsonStreamAsync(__contentStream_404, JsonSerializerContext).ConfigureAwait(false); + } - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessModelSchemaResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_404, + ResponseObject = __value_404, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Locked + if ((int)__response.StatusCode == 423) + { + string? __content_423 = null; + global::DeepInfra.DeepError? __value_423 = null; + if (ReadResponseAsString) + { + __content_423 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_423 = global::DeepInfra.DeepError.FromJson(__content_423, JsonSerializerContext); + } + else + { + var __contentStream_423 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_423 = await global::DeepInfra.DeepError.FromJsonStreamAsync(__contentStream_423, JsonSerializerContext).ConfigureAwait(false); + } - try + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_423, + ResponseObject = __value_423, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Validation Error + if ((int)__response.StatusCode == 422) { - __response.EnsureSuccessStatusCode(); + string? __content_422 = null; + global::DeepInfra.HTTPValidationError? __value_422 = null; + if (ReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_422 = global::DeepInfra.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_422 = await global::DeepInfra.HTTPValidationError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); + } + + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; } - catch (global::System.Net.Http.HttpRequestException __ex) + + if (ReadResponseAsString) { - throw new global::System.InvalidOperationException(__content, __ex); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessModelSchemaResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.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), + }; + } + + return + global::DeepInfra.SchemaOut.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } + else + { + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - return - global::DeepInfra.SchemaOut.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + var __responseValue = await global::DeepInfra.SchemaOut.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false); + + return + __responseValue ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } } } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.ModelVersions.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.ModelVersions.g.cs index a9a16a8..bd40557 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.ModelVersions.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.ModelVersions.g.cs @@ -29,7 +29,7 @@ partial void ProcessModelVersionsResponseContent( /// /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task> ModelVersionsAsync( string modelName, string? xiApiKey = default, @@ -92,30 +92,127 @@ partial void ProcessModelVersionsResponseContent( ProcessModelVersionsResponse( httpClient: HttpClient, httpResponseMessage: __response); + // Not Found + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::DeepInfra.DeepError? __value_404 = null; + if (ReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_404 = global::DeepInfra.DeepError.FromJson(__content_404, JsonSerializerContext); + } + else + { + var __contentStream_404 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_404 = await global::DeepInfra.DeepError.FromJsonStreamAsync(__contentStream_404, JsonSerializerContext).ConfigureAwait(false); + } - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_404, + ResponseObject = __value_404, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::DeepInfra.HTTPValidationError? __value_422 = null; + if (ReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_422 = global::DeepInfra.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_422 = await global::DeepInfra.HTTPValidationError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); + } - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessModelVersionsResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } - try + if (ReadResponseAsString) { - __response.EnsureSuccessStatusCode(); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessModelVersionsResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.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), + }; + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) as global::System.Collections.Generic.IList ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } - catch (global::System.Net.Http.HttpRequestException __ex) + else { - throw new global::System.InvalidOperationException(__content, __ex); - } + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } - return - global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) as global::System.Collections.Generic.IList ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + + var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) as global::System.Collections.Generic.IList; + + return + __responseValue ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } } } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.ModelsFeatured.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.ModelsFeatured.g.cs index ba1af03..4f9ec42 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.ModelsFeatured.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.ModelsFeatured.g.cs @@ -23,7 +23,7 @@ partial void ProcessModelsFeaturedResponseContent( /// Models Featured /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task> ModelsFeaturedAsync( global::System.Threading.CancellationToken cancellationToken = default) { @@ -75,29 +75,70 @@ partial void ProcessModelsFeaturedResponseContent( httpClient: HttpClient, httpResponseMessage: __response); - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessModelsFeaturedResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessModelsFeaturedResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); - try - { - __response.EnsureSuccessStatusCode(); + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.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), + }; + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) as global::System.Collections.Generic.IList ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } - catch (global::System.Net.Http.HttpRequestException __ex) + else { - throw new global::System.InvalidOperationException(__content, __ex); - } + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - return - global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) as global::System.Collections.Generic.IList ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) as global::System.Collections.Generic.IList; + + return + __responseValue ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } } } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.ModelsInfo.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.ModelsInfo.g.cs index 84c197f..6dbdc16 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.ModelsInfo.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.ModelsInfo.g.cs @@ -32,7 +32,7 @@ partial void ProcessModelsInfoResponseContent( /// /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task ModelsInfoAsync( string modelName, string? version = default, @@ -101,30 +101,127 @@ partial void ProcessModelsInfoResponseContent( ProcessModelsInfoResponse( httpClient: HttpClient, httpResponseMessage: __response); + // Not Found + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::DeepInfra.DeepError? __value_404 = null; + if (ReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_404 = global::DeepInfra.DeepError.FromJson(__content_404, JsonSerializerContext); + } + else + { + var __contentStream_404 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_404 = await global::DeepInfra.DeepError.FromJsonStreamAsync(__contentStream_404, JsonSerializerContext).ConfigureAwait(false); + } - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_404, + ResponseObject = __value_404, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::DeepInfra.HTTPValidationError? __value_422 = null; + if (ReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_422 = global::DeepInfra.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_422 = await global::DeepInfra.HTTPValidationError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); + } - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessModelsInfoResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } - try + if (ReadResponseAsString) { - __response.EnsureSuccessStatusCode(); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessModelsInfoResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.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), + }; + } + + return + global::DeepInfra.ModelInfoOut.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } - catch (global::System.Net.Http.HttpRequestException __ex) + else { - throw new global::System.InvalidOperationException(__content, __ex); - } + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } - return - global::DeepInfra.ModelInfoOut.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + + var __responseValue = await global::DeepInfra.ModelInfoOut.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false); + + return + __responseValue ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } } } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.ModelsList.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.ModelsList.g.cs index edcf758..d0dadc6 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.ModelsList.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.ModelsList.g.cs @@ -23,7 +23,7 @@ partial void ProcessModelsListResponseContent( /// Models List /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task> ModelsListAsync( global::System.Threading.CancellationToken cancellationToken = default) { @@ -75,29 +75,70 @@ partial void ProcessModelsListResponseContent( httpClient: HttpClient, httpResponseMessage: __response); - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessModelsListResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessModelsListResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); - try - { - __response.EnsureSuccessStatusCode(); + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.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), + }; + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) as global::System.Collections.Generic.IList ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } - catch (global::System.Net.Http.HttpRequestException __ex) + else { - throw new global::System.InvalidOperationException(__content, __ex); - } + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - return - global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) as global::System.Collections.Generic.IList ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) as global::System.Collections.Generic.IList; + + return + __responseValue ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } } } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.OpenaiAudioSpeech.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.OpenaiAudioSpeech.g.cs index f721d9b..3dfc476 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.OpenaiAudioSpeech.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.OpenaiAudioSpeech.g.cs @@ -32,7 +32,7 @@ partial void ProcessOpenaiAudioSpeechResponseContent( /// /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task OpenaiAudioSpeechAsync( global::DeepInfra.OpenAITextToSpeechIn request, string? xDeepinfraSource = default, @@ -110,28 +110,97 @@ partial void ProcessOpenaiAudioSpeechResponseContent( ProcessOpenaiAudioSpeechResponse( httpClient: HttpClient, httpResponseMessage: __response); + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::DeepInfra.HTTPValidationError? __value_422 = null; + if (ReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_422 = global::DeepInfra.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_422 = await global::DeepInfra.HTTPValidationError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); + } - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessOpenaiAudioSpeechResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } - try + if (ReadResponseAsString) { - __response.EnsureSuccessStatusCode(); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessOpenaiAudioSpeechResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.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), + }; + } + + return __content; } - catch (global::System.Net.Http.HttpRequestException __ex) + else { - throw new global::System.InvalidOperationException(__content, __ex); - } + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } - return __content; + using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + + var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(string), JsonSerializerContext).ConfigureAwait(false) as string; + + return + __responseValue ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } } /// diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.OpenaiChatCompletions.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.OpenaiChatCompletions.g.cs index 84fcdbb..db0e335 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.OpenaiChatCompletions.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.OpenaiChatCompletions.g.cs @@ -35,7 +35,7 @@ partial void ProcessOpenaiChatCompletionsResponseContent( /// /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task OpenaiChatCompletionsAsync( global::DeepInfra.OpenAIChatCompletionsIn request, string? xDeepinfraSource = default, @@ -120,28 +120,97 @@ partial void ProcessOpenaiChatCompletionsResponseContent( ProcessOpenaiChatCompletionsResponse( httpClient: HttpClient, httpResponseMessage: __response); + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::DeepInfra.HTTPValidationError? __value_422 = null; + if (ReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_422 = global::DeepInfra.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_422 = await global::DeepInfra.HTTPValidationError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); + } - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessOpenaiChatCompletionsResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } - try + if (ReadResponseAsString) { - __response.EnsureSuccessStatusCode(); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessOpenaiChatCompletionsResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.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), + }; + } + + return __content; } - catch (global::System.Net.Http.HttpRequestException __ex) + else { - throw new global::System.InvalidOperationException(__content, __ex); - } + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } - return __content; + using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + + var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(string), JsonSerializerContext).ConfigureAwait(false) as string; + + return + __responseValue ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } } /// diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.OpenaiCompletions.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.OpenaiCompletions.g.cs index 8141618..a083432 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.OpenaiCompletions.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.OpenaiCompletions.g.cs @@ -35,7 +35,7 @@ partial void ProcessOpenaiCompletionsResponseContent( /// /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task OpenaiCompletionsAsync( global::DeepInfra.OpenAICompletionsIn request, string? xDeepinfraSource = default, @@ -120,28 +120,97 @@ partial void ProcessOpenaiCompletionsResponseContent( ProcessOpenaiCompletionsResponse( httpClient: HttpClient, httpResponseMessage: __response); + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::DeepInfra.HTTPValidationError? __value_422 = null; + if (ReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_422 = global::DeepInfra.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_422 = await global::DeepInfra.HTTPValidationError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); + } - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessOpenaiCompletionsResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } - try + if (ReadResponseAsString) { - __response.EnsureSuccessStatusCode(); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessOpenaiCompletionsResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.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), + }; + } + + return __content; } - catch (global::System.Net.Http.HttpRequestException __ex) + else { - throw new global::System.InvalidOperationException(__content, __ex); - } + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } - return __content; + using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + + var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(string), JsonSerializerContext).ConfigureAwait(false) as string; + + return + __responseValue ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } } /// diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.OpenaiEmbeddings.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.OpenaiEmbeddings.g.cs index 50a4bf1..ab063c9 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.OpenaiEmbeddings.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.OpenaiEmbeddings.g.cs @@ -35,7 +35,7 @@ partial void ProcessOpenaiEmbeddingsResponseContent( /// /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task OpenaiEmbeddingsAsync( global::DeepInfra.OpenAIEmbeddingsIn request, string? xDeepinfraSource = default, @@ -120,28 +120,97 @@ partial void ProcessOpenaiEmbeddingsResponseContent( ProcessOpenaiEmbeddingsResponse( httpClient: HttpClient, httpResponseMessage: __response); + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::DeepInfra.HTTPValidationError? __value_422 = null; + if (ReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_422 = global::DeepInfra.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_422 = await global::DeepInfra.HTTPValidationError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); + } - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessOpenaiEmbeddingsResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } - try + if (ReadResponseAsString) { - __response.EnsureSuccessStatusCode(); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessOpenaiEmbeddingsResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.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), + }; + } + + return __content; } - catch (global::System.Net.Http.HttpRequestException __ex) + else { - throw new global::System.InvalidOperationException(__content, __ex); - } + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } - return __content; + using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + + var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(string), JsonSerializerContext).ConfigureAwait(false) as string; + + return + __responseValue ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } } /// diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.OpenaiFiles.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.OpenaiFiles.g.cs index 9cbd5a7..270e589 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.OpenaiFiles.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.OpenaiFiles.g.cs @@ -29,7 +29,7 @@ partial void ProcessOpenaiFilesResponseContent( /// /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task OpenaiFilesAsync( global::DeepInfra.BodyOpenaiFilesV1OpenaiFilesPost request, string? xiApiKey = default, @@ -108,28 +108,97 @@ partial void ProcessOpenaiFilesResponseContent( ProcessOpenaiFilesResponse( httpClient: HttpClient, httpResponseMessage: __response); + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::DeepInfra.HTTPValidationError? __value_422 = null; + if (ReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_422 = global::DeepInfra.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_422 = await global::DeepInfra.HTTPValidationError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); + } - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessOpenaiFilesResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } - try + if (ReadResponseAsString) { - __response.EnsureSuccessStatusCode(); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessOpenaiFilesResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.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), + }; + } + + return __content; } - catch (global::System.Net.Http.HttpRequestException __ex) + else { - throw new global::System.InvalidOperationException(__content, __ex); - } + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } - return __content; + using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + + var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(string), JsonSerializerContext).ConfigureAwait(false) as string; + + return + __responseValue ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } } /// diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.OpenaiModels.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.OpenaiModels.g.cs index 6706fb1..7f99fde 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.OpenaiModels.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.OpenaiModels.g.cs @@ -26,7 +26,7 @@ partial void ProcessOpenaiModelsResponseContent( /// /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task OpenaiModelsAsync( string? xiApiKey = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -86,30 +86,99 @@ partial void ProcessOpenaiModelsResponseContent( ProcessOpenaiModelsResponse( httpClient: HttpClient, httpResponseMessage: __response); + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::DeepInfra.HTTPValidationError? __value_422 = null; + if (ReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_422 = global::DeepInfra.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_422 = await global::DeepInfra.HTTPValidationError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); + } - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessOpenaiModelsResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } - try + if (ReadResponseAsString) { - __response.EnsureSuccessStatusCode(); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessOpenaiModelsResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.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), + }; + } + + return + global::DeepInfra.OpenAIModelsOut.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } - catch (global::System.Net.Http.HttpRequestException __ex) + else { - throw new global::System.InvalidOperationException(__content, __ex); - } + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } - return - global::DeepInfra.OpenAIModelsOut.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + + var __responseValue = await global::DeepInfra.OpenAIModelsOut.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false); + + return + __responseValue ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } } } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.PrivateModelsList.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.PrivateModelsList.g.cs index 6548422..a759248 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.PrivateModelsList.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.PrivateModelsList.g.cs @@ -26,7 +26,7 @@ partial void ProcessPrivateModelsListResponseContent( /// /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task> PrivateModelsListAsync( string? xiApiKey = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -86,30 +86,99 @@ partial void ProcessPrivateModelsListResponseContent( ProcessPrivateModelsListResponse( httpClient: HttpClient, httpResponseMessage: __response); + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::DeepInfra.HTTPValidationError? __value_422 = null; + if (ReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_422 = global::DeepInfra.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_422 = await global::DeepInfra.HTTPValidationError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); + } - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessPrivateModelsListResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } - try + if (ReadResponseAsString) { - __response.EnsureSuccessStatusCode(); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessPrivateModelsListResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.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), + }; + } + + return + global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) as global::System.Collections.Generic.IList ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } - catch (global::System.Net.Http.HttpRequestException __ex) + else { - throw new global::System.InvalidOperationException(__content, __ex); - } + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } - return - global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) as global::System.Collections.Generic.IList ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + + var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) as global::System.Collections.Generic.IList; + + return + __responseValue ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } } } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.RequestRateLimitIncrease.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.RequestRateLimitIncrease.g.cs index 4f9e14b..34c8da0 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.RequestRateLimitIncrease.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.RequestRateLimitIncrease.g.cs @@ -29,7 +29,7 @@ partial void ProcessRequestRateLimitIncreaseResponseContent( /// /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task RequestRateLimitIncreaseAsync( global::DeepInfra.RateLimitRequestIn request, string? xiApiKey = default, @@ -100,28 +100,153 @@ partial void ProcessRequestRateLimitIncreaseResponseContent( ProcessRequestRateLimitIncreaseResponse( httpClient: HttpClient, httpResponseMessage: __response); + // Forbidden + if ((int)__response.StatusCode == 403) + { + string? __content_403 = null; + global::DeepInfra.DeepError? __value_403 = null; + if (ReadResponseAsString) + { + __content_403 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_403 = global::DeepInfra.DeepError.FromJson(__content_403, JsonSerializerContext); + } + else + { + var __contentStream_403 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_403 = await global::DeepInfra.DeepError.FromJsonStreamAsync(__contentStream_403, JsonSerializerContext).ConfigureAwait(false); + } - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessRequestRateLimitIncreaseResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_403, + ResponseObject = __value_403, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Not Found + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::DeepInfra.DeepError? __value_404 = null; + if (ReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_404 = global::DeepInfra.DeepError.FromJson(__content_404, JsonSerializerContext); + } + else + { + var __contentStream_404 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_404 = await global::DeepInfra.DeepError.FromJsonStreamAsync(__contentStream_404, JsonSerializerContext).ConfigureAwait(false); + } - try + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_404, + ResponseObject = __value_404, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Validation Error + if ((int)__response.StatusCode == 422) { - __response.EnsureSuccessStatusCode(); + string? __content_422 = null; + global::DeepInfra.HTTPValidationError? __value_422 = null; + if (ReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_422 = global::DeepInfra.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_422 = await global::DeepInfra.HTTPValidationError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); + } + + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; } - catch (global::System.Net.Http.HttpRequestException __ex) + + if (ReadResponseAsString) { - throw new global::System.InvalidOperationException(__content, __ex); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessRequestRateLimitIncreaseResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.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), + }; + } + + return __content; } + else + { + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - return __content; + var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(string), JsonSerializerContext).ConfigureAwait(false) as string; + + return + __responseValue ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } } /// diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.SetConfig.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.SetConfig.g.cs index e432046..a38203e 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.SetConfig.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.SetConfig.g.cs @@ -29,7 +29,7 @@ partial void ProcessSetConfigResponseContent( /// /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task SetConfigAsync( global::DeepInfra.ConfigIn request, string? session = default, @@ -94,30 +94,99 @@ partial void ProcessSetConfigResponseContent( ProcessSetConfigResponse( httpClient: HttpClient, httpResponseMessage: __response); + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::DeepInfra.HTTPValidationError? __value_422 = null; + if (ReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_422 = global::DeepInfra.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_422 = await global::DeepInfra.HTTPValidationError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); + } - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessSetConfigResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } - try + if (ReadResponseAsString) { - __response.EnsureSuccessStatusCode(); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessSetConfigResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.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), + }; + } + + return + global::DeepInfra.ConfigOut.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } - catch (global::System.Net.Http.HttpRequestException __ex) + else { - throw new global::System.InvalidOperationException(__content, __ex); - } + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } - return - global::DeepInfra.ConfigOut.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + + var __responseValue = await global::DeepInfra.ConfigOut.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false); + + return + __responseValue ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } } /// diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.SubmitFeedback.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.SubmitFeedback.g.cs index cbae041..545b93e 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.SubmitFeedback.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.SubmitFeedback.g.cs @@ -30,7 +30,7 @@ partial void ProcessSubmitFeedbackResponseContent( /// /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task SubmitFeedbackAsync( global::DeepInfra.FeedbackIn request, string? xiApiKey = default, @@ -101,28 +101,125 @@ partial void ProcessSubmitFeedbackResponseContent( ProcessSubmitFeedbackResponse( httpClient: HttpClient, httpResponseMessage: __response); + // Forbidden + if ((int)__response.StatusCode == 403) + { + string? __content_403 = null; + global::DeepInfra.DeepError? __value_403 = null; + if (ReadResponseAsString) + { + __content_403 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_403 = global::DeepInfra.DeepError.FromJson(__content_403, JsonSerializerContext); + } + else + { + var __contentStream_403 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_403 = await global::DeepInfra.DeepError.FromJsonStreamAsync(__contentStream_403, JsonSerializerContext).ConfigureAwait(false); + } - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_403, + ResponseObject = __value_403, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::DeepInfra.HTTPValidationError? __value_422 = null; + if (ReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_422 = global::DeepInfra.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_422 = await global::DeepInfra.HTTPValidationError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); + } - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessSubmitFeedbackResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } - try + if (ReadResponseAsString) { - __response.EnsureSuccessStatusCode(); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessSubmitFeedbackResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.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), + }; + } + + return __content; } - catch (global::System.Net.Http.HttpRequestException __ex) + else { - throw new global::System.InvalidOperationException(__content, __ex); - } + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - return __content; + var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(string), JsonSerializerContext).ConfigureAwait(false) as string; + + return + __responseValue ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } } /// diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.TextToSpeech.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.TextToSpeech.g.cs index 547e1c1..01bb985 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.TextToSpeech.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.TextToSpeech.g.cs @@ -35,7 +35,7 @@ partial void ProcessTextToSpeechResponseContent( /// /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task TextToSpeechAsync( string voiceId, global::DeepInfra.ElevenLabsTextToSpeechIn request, @@ -116,28 +116,97 @@ partial void ProcessTextToSpeechResponseContent( ProcessTextToSpeechResponse( httpClient: HttpClient, httpResponseMessage: __response); + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::DeepInfra.HTTPValidationError? __value_422 = null; + if (ReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_422 = global::DeepInfra.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_422 = await global::DeepInfra.HTTPValidationError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); + } - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessTextToSpeechResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } - try + if (ReadResponseAsString) { - __response.EnsureSuccessStatusCode(); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessTextToSpeechResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.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), + }; + } + + return __content; } - catch (global::System.Net.Http.HttpRequestException __ex) + else { - throw new global::System.InvalidOperationException(__content, __ex); - } + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } - return __content; + using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + + var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(string), JsonSerializerContext).ConfigureAwait(false) as string; + + return + __responseValue ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } } /// diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.UpdateVoice.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.UpdateVoice.g.cs index cce197d..e7fb3d2 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.UpdateVoice.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.UpdateVoice.g.cs @@ -32,7 +32,7 @@ partial void ProcessUpdateVoiceResponseContent( /// /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task UpdateVoiceAsync( string voiceId, global::DeepInfra.BodyUpdateVoiceV1VoicesVoiceIdEditPost request, @@ -106,30 +106,155 @@ partial void ProcessUpdateVoiceResponseContent( ProcessUpdateVoiceResponse( httpClient: HttpClient, httpResponseMessage: __response); + // Bad Request + if ((int)__response.StatusCode == 400) + { + string? __content_400 = null; + global::DeepInfra.DeepError? __value_400 = null; + if (ReadResponseAsString) + { + __content_400 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_400 = global::DeepInfra.DeepError.FromJson(__content_400, JsonSerializerContext); + } + else + { + var __contentStream_400 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_400 = await global::DeepInfra.DeepError.FromJsonStreamAsync(__contentStream_400, JsonSerializerContext).ConfigureAwait(false); + } - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessUpdateVoiceResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_400, + ResponseObject = __value_400, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Not Found + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::DeepInfra.DeepError? __value_404 = null; + if (ReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_404 = global::DeepInfra.DeepError.FromJson(__content_404, JsonSerializerContext); + } + else + { + var __contentStream_404 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_404 = await global::DeepInfra.DeepError.FromJsonStreamAsync(__contentStream_404, JsonSerializerContext).ConfigureAwait(false); + } - try + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_404, + ResponseObject = __value_404, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Validation Error + if ((int)__response.StatusCode == 422) { - __response.EnsureSuccessStatusCode(); + string? __content_422 = null; + global::DeepInfra.HTTPValidationError? __value_422 = null; + if (ReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_422 = global::DeepInfra.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_422 = await global::DeepInfra.HTTPValidationError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); + } + + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; } - catch (global::System.Net.Http.HttpRequestException __ex) + + if (ReadResponseAsString) { - throw new global::System.InvalidOperationException(__content, __ex); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessUpdateVoiceResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.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), + }; + } + + return + global::DeepInfra.Voice.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } + else + { + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - return - global::DeepInfra.Voice.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + var __responseValue = await global::DeepInfra.Voice.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false); + + return + __responseValue ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } } /// diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.Usage.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.Usage.g.cs index 095d3f2..ee80c38 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.Usage.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.Usage.g.cs @@ -36,7 +36,7 @@ partial void ProcessUsageResponseContent( /// /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task UsageAsync( string from, string? to = default, @@ -100,30 +100,99 @@ partial void ProcessUsageResponseContent( ProcessUsageResponse( httpClient: HttpClient, httpResponseMessage: __response); + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::DeepInfra.HTTPValidationError? __value_422 = null; + if (ReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_422 = global::DeepInfra.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_422 = await global::DeepInfra.HTTPValidationError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); + } - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessUsageResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } - try + if (ReadResponseAsString) { - __response.EnsureSuccessStatusCode(); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessUsageResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.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), + }; + } + + return + global::DeepInfra.UsageOut.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } - catch (global::System.Net.Http.HttpRequestException __ex) + else { - throw new global::System.InvalidOperationException(__content, __ex); - } + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } - return - global::DeepInfra.UsageOut.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + + var __responseValue = await global::DeepInfra.UsageOut.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false); + + return + __responseValue ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } } } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.UsageApiToken.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.UsageApiToken.g.cs index af55409..b176778 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.UsageApiToken.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.UsageApiToken.g.cs @@ -39,7 +39,7 @@ partial void ProcessUsageApiTokenResponseContent( /// /// /// The token to cancel the operation with - /// + /// public async global::System.Threading.Tasks.Task UsageApiTokenAsync( string apiToken, string from, @@ -106,30 +106,99 @@ partial void ProcessUsageApiTokenResponseContent( ProcessUsageApiTokenResponse( httpClient: HttpClient, httpResponseMessage: __response); + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::DeepInfra.HTTPValidationError? __value_422 = null; + if (ReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_422 = global::DeepInfra.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_422 = await global::DeepInfra.HTTPValidationError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); + } - var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessUsageApiTokenResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } - try + if (ReadResponseAsString) { - __response.EnsureSuccessStatusCode(); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessUsageApiTokenResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.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), + }; + } + + return + global::DeepInfra.UsageOut.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); } - catch (global::System.Net.Http.HttpRequestException __ex) + else { - throw new global::System.InvalidOperationException(__content, __ex); - } + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::DeepInfra.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } - return - global::DeepInfra.UsageOut.FromJson(__content, JsonSerializerContext) ?? - throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + + var __responseValue = await global::DeepInfra.UsageOut.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false); + + return + __responseValue ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } } } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.g.cs index 5760b7d..de1270b 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.g.cs @@ -25,6 +25,11 @@ public sealed partial class DeepInfraApi : global::DeepInfra.IDeepInfraApi, glob /// public global::System.Collections.Generic.List Authorizations { get; } + /// + public bool ReadResponseAsString { get; set; } +#if DEBUG + = true; +#endif /// /// /// diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Exceptions.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Exceptions.g.cs new file mode 100644 index 0000000..abac2a1 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Exceptions.g.cs @@ -0,0 +1,90 @@ +#nullable enable + +namespace DeepInfra +{ + /// + /// Represents an exception thrown by the API. + /// + [global::System.Serializable] + public partial class ApiException : global::System.Exception + { + /// + /// The HTTP status code of the response. + /// + public global::System.Net.HttpStatusCode StatusCode { get; } + /// + /// The response body. + /// + public string? ResponseBody { get; set; } + /// + /// The response headers. + /// + public global::System.Collections.Generic.Dictionary>? ResponseHeaders { get; set; } + /// + /// Initializes a new instance of the class. + /// + public ApiException() + { + } + + /// + /// Initializes a new instance of the class with a specified error message. + /// + /// The message that describes the error. + /// The HTTP status code of the response. + public ApiException(string message, global::System.Net.HttpStatusCode statusCode) : base(message) + { + StatusCode = statusCode; + } + + /// + /// Initializes a new instance of the class with a specified error message and a reference to the inner exception that is the cause of this exception. + /// + /// The error message that explains the reason for the exception. + /// The exception that is the cause of the current exception, or a null reference if no inner exception is specified. + /// The HTTP status code of the response. + public ApiException(string message, global::System.Exception innerException, global::System.Net.HttpStatusCode statusCode) : base(message, innerException) + { + StatusCode = statusCode; + } + } + + /// + /// Represents an exception thrown by the API. + /// + /// + [global::System.Serializable] + public partial class ApiException : ApiException + { + /// + /// The response object. + /// + public T? ResponseObject { get; set; } + + /// + /// Initializes a new instance of the class. + /// + public ApiException() + { + } + + /// + /// Initializes a new instance of the class with a specified error message. + /// + /// The message that describes the error. + /// The HTTP status code of the response. + public ApiException(string message, global::System.Net.HttpStatusCode statusCode) : base(message, statusCode) + { + } + + /// + /// Initializes a new instance of the class with a specified error message and a reference to the inner exception that is the cause of this exception. + /// + /// The error message that explains the reason for the exception. + /// The exception that is the cause of the current exception, or a null reference if no inner exception is specified. + /// The HTTP status code of the response. + public ApiException(string message, global::System.Exception innerException, global::System.Net.HttpStatusCode statusCode) : base(message, innerException, statusCode) + { + } + } +} \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.AccountEmailValues.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.AccountEmailValues.g.cs index 0ab3427..b2f6ff8 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.AccountEmailValues.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.AccountEmailValues.g.cs @@ -9,7 +9,7 @@ public partial interface IDeepInfraApi /// /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task AccountEmailValuesAsync( string? xiApiKey = default, global::System.Threading.CancellationToken cancellationToken = default); diff --git a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.AccountRateLimit.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.AccountRateLimit.g.cs index e5d6163..b12e95c 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.AccountRateLimit.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.AccountRateLimit.g.cs @@ -9,7 +9,7 @@ public partial interface IDeepInfraApi /// /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task AccountRateLimitAsync( string? xiApiKey = default, global::System.Threading.CancellationToken cancellationToken = default); diff --git a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.AccountSetUsername.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.AccountSetUsername.g.cs index 57cffbd..60e53fd 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.AccountSetUsername.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.AccountSetUsername.g.cs @@ -10,7 +10,7 @@ public partial interface IDeepInfraApi /// /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task AccountSetUsernameAsync( global::DeepInfra.MeUsername request, string? xiApiKey = default, diff --git a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.AccountUpdateDetails.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.AccountUpdateDetails.g.cs index 1af2cfb..957b1b6 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.AccountUpdateDetails.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.AccountUpdateDetails.g.cs @@ -10,7 +10,7 @@ public partial interface IDeepInfraApi /// /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task AccountUpdateDetailsAsync( global::DeepInfra.MeIn request, string? xiApiKey = default, diff --git a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.BillingPortal.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.BillingPortal.g.cs index 212c977..473675a 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.BillingPortal.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.BillingPortal.g.cs @@ -12,7 +12,7 @@ public partial interface IDeepInfraApi /// /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task BillingPortalAsync( string? returnUrl = default, string? session = default, diff --git a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.CliVersion.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.CliVersion.g.cs index fafb410..48c1baf 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.CliVersion.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.CliVersion.g.cs @@ -9,7 +9,7 @@ public partial interface IDeepInfraApi /// /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task CliVersionAsync( string version, global::System.Threading.CancellationToken cancellationToken = default); diff --git a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.CreateApiToken.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.CreateApiToken.g.cs index fa5dc83..fc6e097 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.CreateApiToken.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.CreateApiToken.g.cs @@ -10,7 +10,7 @@ public partial interface IDeepInfraApi /// /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task CreateApiTokenAsync( global::DeepInfra.ApiTokenIn request, string? xiApiKey = default, diff --git a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.CreateVoice.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.CreateVoice.g.cs index 34f2d7f..11ab2c1 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.CreateVoice.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.CreateVoice.g.cs @@ -11,7 +11,7 @@ public partial interface IDeepInfraApi /// /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task CreateVoiceAsync( global::DeepInfra.BodyCreateVoiceV1VoicesAddPost request, string? xiApiKey = default, diff --git a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.DeepstartApply.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.DeepstartApply.g.cs index bdb80a9..872f58d 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.DeepstartApply.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.DeepstartApply.g.cs @@ -10,7 +10,7 @@ public partial interface IDeepInfraApi /// /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task DeepstartApplyAsync( global::DeepInfra.DeepStartApplicationIn request, string? session = default, diff --git a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.DeleteAccount.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.DeleteAccount.g.cs index e133fe0..a9c0526 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.DeleteAccount.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.DeleteAccount.g.cs @@ -9,7 +9,7 @@ public partial interface IDeepInfraApi /// /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task DeleteAccountAsync( string? xiApiKey = default, global::System.Threading.CancellationToken cancellationToken = default); diff --git a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.DeleteApiToken.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.DeleteApiToken.g.cs index 3584ded..eade4da 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.DeleteApiToken.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.DeleteApiToken.g.cs @@ -10,7 +10,7 @@ public partial interface IDeepInfraApi /// /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task DeleteApiTokenAsync( string apiToken, string? xiApiKey = default, diff --git a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.DeleteVoice.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.DeleteVoice.g.cs index f05686d..b8fdf59 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.DeleteVoice.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.DeleteVoice.g.cs @@ -10,7 +10,7 @@ public partial interface IDeepInfraApi /// /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task DeleteVoiceAsync( string voiceId, string? xiApiKey = default, diff --git a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.DeployCreate.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.DeployCreate.g.cs index dc66e68..80b5635 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.DeployCreate.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.DeployCreate.g.cs @@ -10,7 +10,7 @@ public partial interface IDeepInfraApi /// /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task DeployCreateAsync( global::DeepInfra.DeployModelIn request, string? xiApiKey = default, diff --git a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.DeployCreateHf.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.DeployCreateHf.g.cs index a4e5cb2..6410454 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.DeployCreateHf.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.DeployCreateHf.g.cs @@ -10,7 +10,7 @@ public partial interface IDeepInfraApi /// /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task DeployCreateHfAsync( global::DeepInfra.HFModel request, string? xiApiKey = default, diff --git a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.DeployCreateLlm.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.DeployCreateLlm.g.cs index 9e7be46..c6f384b 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.DeployCreateLlm.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.DeployCreateLlm.g.cs @@ -10,7 +10,7 @@ public partial interface IDeepInfraApi /// /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task DeployCreateLlmAsync( global::DeepInfra.DeployLLMIn request, string? xiApiKey = default, diff --git a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.DeployDelete.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.DeployDelete.g.cs index df792b5..565f321 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.DeployDelete.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.DeployDelete.g.cs @@ -10,7 +10,7 @@ public partial interface IDeepInfraApi /// /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task DeployDeleteAsync( string deployId, string? xiApiKey = default, diff --git a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.DeployDetailedStats.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.DeployDetailedStats.g.cs index fc32c0e..b9ad0c1 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.DeployDetailedStats.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.DeployDetailedStats.g.cs @@ -17,7 +17,7 @@ public partial interface IDeepInfraApi /// /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task DeployDetailedStatsAsync( string deployId, string from, diff --git a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.DeployGpuAvailability.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.DeployGpuAvailability.g.cs index 57332e1..083f325 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.DeployGpuAvailability.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.DeployGpuAvailability.g.cs @@ -10,7 +10,7 @@ public partial interface IDeepInfraApi /// /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task DeployGpuAvailabilityAsync( string? source = default, string? xiApiKey = default, diff --git a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.DeployList2.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.DeployList2.g.cs index 6048d74..01df59c 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.DeployList2.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.DeployList2.g.cs @@ -12,7 +12,7 @@ public partial interface IDeepInfraApi /// /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task> DeployList2Async( string? status = default, string? xiApiKey = default, diff --git a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.DeployStats.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.DeployStats.g.cs index 0f262de..45ea14c 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.DeployStats.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.DeployStats.g.cs @@ -17,7 +17,7 @@ public partial interface IDeepInfraApi /// /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task DeployStatsAsync( string deployId, string from, diff --git a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.DeployStatus.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.DeployStatus.g.cs index c767b47..3a52160 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.DeployStatus.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.DeployStatus.g.cs @@ -10,7 +10,7 @@ public partial interface IDeepInfraApi /// /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task DeployStatusAsync( string deployId, string? xiApiKey = default, diff --git a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.DeployUpdate.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.DeployUpdate.g.cs index 467c4ed..51d2022 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.DeployUpdate.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.DeployUpdate.g.cs @@ -11,7 +11,7 @@ public partial interface IDeepInfraApi /// /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task DeployUpdateAsync( string deployId, global::DeepInfra.DeployLLMUpdateIn request, diff --git a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.DeploymentLogsQuery.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.DeploymentLogsQuery.g.cs index 57c23a3..7b76f84 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.DeploymentLogsQuery.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.DeploymentLogsQuery.g.cs @@ -31,7 +31,7 @@ public partial interface IDeepInfraApi /// /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task DeploymentLogsQueryAsync( string deployId, string? podName = default, diff --git a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.GetApiToken.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.GetApiToken.g.cs index 3030404..aa7acfd 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.GetApiToken.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.GetApiToken.g.cs @@ -10,7 +10,7 @@ public partial interface IDeepInfraApi /// /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task GetApiTokenAsync( string apiToken, string? xiApiKey = default, diff --git a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.GetApiTokens.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.GetApiTokens.g.cs index 5c215ef..c273def 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.GetApiTokens.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.GetApiTokens.g.cs @@ -9,7 +9,7 @@ public partial interface IDeepInfraApi /// /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task> GetApiTokensAsync( string? xiApiKey = default, global::System.Threading.CancellationToken cancellationToken = default); diff --git a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.GetChecklist.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.GetChecklist.g.cs index 28a62ed..827f15a 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.GetChecklist.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.GetChecklist.g.cs @@ -9,7 +9,7 @@ public partial interface IDeepInfraApi /// /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task GetChecklistAsync( string? session = default, global::System.Threading.CancellationToken cancellationToken = default); diff --git a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.GetConfig.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.GetConfig.g.cs index 514394a..d8cd08b 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.GetConfig.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.GetConfig.g.cs @@ -9,7 +9,7 @@ public partial interface IDeepInfraApi /// /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task GetConfigAsync( string? session = default, global::System.Threading.CancellationToken cancellationToken = default); diff --git a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.GetVoice.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.GetVoice.g.cs index 88c4889..4bd8b68 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.GetVoice.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.GetVoice.g.cs @@ -11,7 +11,7 @@ public partial interface IDeepInfraApi /// /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task GetVoiceAsync( string voiceId, string? xiApiKey = default, diff --git a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.GetVoices.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.GetVoices.g.cs index 005e316..d127b34 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.GetVoices.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.GetVoices.g.cs @@ -10,7 +10,7 @@ public partial interface IDeepInfraApi /// /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task GetVoicesAsync( string? xiApiKey = default, global::System.Threading.CancellationToken cancellationToken = default); diff --git a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.GithubCliLogin.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.GithubCliLogin.g.cs index e8237fd..d738c75 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.GithubCliLogin.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.GithubCliLogin.g.cs @@ -11,7 +11,7 @@ public partial interface IDeepInfraApi /// /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task GithubCliLoginAsync( string loginId, global::System.Threading.CancellationToken cancellationToken = default); diff --git a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.GithubLogin.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.GithubLogin.g.cs index 645509c..b81c0bc 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.GithubLogin.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.GithubLogin.g.cs @@ -13,7 +13,7 @@ public partial interface IDeepInfraApi /// /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task GithubLoginAsync( string? loginId = default, string? origin = default, diff --git a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.InferenceDeploy.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.InferenceDeploy.g.cs index 737d875..62d81b1 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.InferenceDeploy.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.InferenceDeploy.g.cs @@ -12,7 +12,7 @@ public partial interface IDeepInfraApi /// /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task InferenceDeployAsync( string deployId, string? xDeepinfraSource = default, diff --git a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.InferenceModel.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.InferenceModel.g.cs index 78f741c..1b09ccf 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.InferenceModel.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.InferenceModel.g.cs @@ -15,7 +15,7 @@ public partial interface IDeepInfraApi /// /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task InferenceModelAsync( string modelName, string? version = default, diff --git a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.LogsQuery.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.LogsQuery.g.cs index e578394..2c75f8c 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.LogsQuery.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.LogsQuery.g.cs @@ -28,7 +28,7 @@ public partial interface IDeepInfraApi /// /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task LogsQueryAsync( string deployId, string? from = default, diff --git a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.Me.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.Me.g.cs index e805a83..6bc7f7e 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.Me.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.Me.g.cs @@ -9,7 +9,7 @@ public partial interface IDeepInfraApi /// /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task MeAsync( string? xiApiKey = default, global::System.Threading.CancellationToken cancellationToken = default); diff --git a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.ModelDelete.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.ModelDelete.g.cs index 9099216..cf1c3f4 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.ModelDelete.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.ModelDelete.g.cs @@ -13,7 +13,7 @@ public partial interface IDeepInfraApi /// /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task ModelDeleteAsync( string modelName, string version, diff --git a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.ModelMetaUpdate.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.ModelMetaUpdate.g.cs index 8804b48..8d798dc 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.ModelMetaUpdate.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.ModelMetaUpdate.g.cs @@ -11,7 +11,7 @@ public partial interface IDeepInfraApi /// /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task ModelMetaUpdateAsync( string modelName, global::DeepInfra.ModelMetaIn request, diff --git a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.ModelPublicity.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.ModelPublicity.g.cs index 5c9f59d..f8aabbc 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.ModelPublicity.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.ModelPublicity.g.cs @@ -11,7 +11,7 @@ public partial interface IDeepInfraApi /// /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task ModelPublicityAsync( string modelName, global::DeepInfra.ModelPublicityIn request, diff --git a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.ModelSchema.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.ModelSchema.g.cs index 396a8b7..818b548 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.ModelSchema.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.ModelSchema.g.cs @@ -14,7 +14,7 @@ public partial interface IDeepInfraApi /// /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task ModelSchemaAsync( string modelName, global::DeepInfra.SchemaVariantKey variantKey, diff --git a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.ModelVersions.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.ModelVersions.g.cs index 559945f..42f99f0 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.ModelVersions.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.ModelVersions.g.cs @@ -10,7 +10,7 @@ public partial interface IDeepInfraApi /// /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task> ModelVersionsAsync( string modelName, string? xiApiKey = default, diff --git a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.ModelsFeatured.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.ModelsFeatured.g.cs index 5bc41cb..8272197 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.ModelsFeatured.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.ModelsFeatured.g.cs @@ -8,7 +8,7 @@ public partial interface IDeepInfraApi /// Models Featured /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task> ModelsFeaturedAsync( global::System.Threading.CancellationToken cancellationToken = default); } diff --git a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.ModelsInfo.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.ModelsInfo.g.cs index 53d453d..a601739 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.ModelsInfo.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.ModelsInfo.g.cs @@ -11,7 +11,7 @@ public partial interface IDeepInfraApi /// /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task ModelsInfoAsync( string modelName, string? version = default, diff --git a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.ModelsList.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.ModelsList.g.cs index f53b827..bbecc80 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.ModelsList.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.ModelsList.g.cs @@ -8,7 +8,7 @@ public partial interface IDeepInfraApi /// Models List /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task> ModelsListAsync( global::System.Threading.CancellationToken cancellationToken = default); } diff --git a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.OpenaiAudioSpeech.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.OpenaiAudioSpeech.g.cs index aca45d9..0b094e8 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.OpenaiAudioSpeech.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.OpenaiAudioSpeech.g.cs @@ -11,7 +11,7 @@ public partial interface IDeepInfraApi /// /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task OpenaiAudioSpeechAsync( global::DeepInfra.OpenAITextToSpeechIn request, string? xDeepinfraSource = default, diff --git a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.OpenaiChatCompletions.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.OpenaiChatCompletions.g.cs index ec4c925..ffef49e 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.OpenaiChatCompletions.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.OpenaiChatCompletions.g.cs @@ -12,7 +12,7 @@ public partial interface IDeepInfraApi /// /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task OpenaiChatCompletionsAsync( global::DeepInfra.OpenAIChatCompletionsIn request, string? xDeepinfraSource = default, diff --git a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.OpenaiCompletions.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.OpenaiCompletions.g.cs index 28e206e..3dd3629 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.OpenaiCompletions.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.OpenaiCompletions.g.cs @@ -12,7 +12,7 @@ public partial interface IDeepInfraApi /// /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task OpenaiCompletionsAsync( global::DeepInfra.OpenAICompletionsIn request, string? xDeepinfraSource = default, diff --git a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.OpenaiEmbeddings.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.OpenaiEmbeddings.g.cs index 6f8020e..2058ab6 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.OpenaiEmbeddings.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.OpenaiEmbeddings.g.cs @@ -12,7 +12,7 @@ public partial interface IDeepInfraApi /// /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task OpenaiEmbeddingsAsync( global::DeepInfra.OpenAIEmbeddingsIn request, string? xDeepinfraSource = default, diff --git a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.OpenaiFiles.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.OpenaiFiles.g.cs index c02394a..bfe3c46 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.OpenaiFiles.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.OpenaiFiles.g.cs @@ -10,7 +10,7 @@ public partial interface IDeepInfraApi /// /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task OpenaiFilesAsync( global::DeepInfra.BodyOpenaiFilesV1OpenaiFilesPost request, string? xiApiKey = default, diff --git a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.OpenaiModels.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.OpenaiModels.g.cs index b2becde..2f1d089 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.OpenaiModels.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.OpenaiModels.g.cs @@ -9,7 +9,7 @@ public partial interface IDeepInfraApi /// /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task OpenaiModelsAsync( string? xiApiKey = default, global::System.Threading.CancellationToken cancellationToken = default); diff --git a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.PrivateModelsList.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.PrivateModelsList.g.cs index e6293ff..b379076 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.PrivateModelsList.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.PrivateModelsList.g.cs @@ -9,7 +9,7 @@ public partial interface IDeepInfraApi /// /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task> PrivateModelsListAsync( string? xiApiKey = default, global::System.Threading.CancellationToken cancellationToken = default); diff --git a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.RequestRateLimitIncrease.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.RequestRateLimitIncrease.g.cs index 60468fe..778908c 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.RequestRateLimitIncrease.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.RequestRateLimitIncrease.g.cs @@ -10,7 +10,7 @@ public partial interface IDeepInfraApi /// /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task RequestRateLimitIncreaseAsync( global::DeepInfra.RateLimitRequestIn request, string? xiApiKey = default, diff --git a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.SetConfig.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.SetConfig.g.cs index f655b58..c601e5a 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.SetConfig.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.SetConfig.g.cs @@ -10,7 +10,7 @@ public partial interface IDeepInfraApi /// /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task SetConfigAsync( global::DeepInfra.ConfigIn request, string? session = default, diff --git a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.SubmitFeedback.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.SubmitFeedback.g.cs index 8f00939..d67d0a2 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.SubmitFeedback.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.SubmitFeedback.g.cs @@ -11,7 +11,7 @@ public partial interface IDeepInfraApi /// /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task SubmitFeedbackAsync( global::DeepInfra.FeedbackIn request, string? xiApiKey = default, diff --git a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.TextToSpeech.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.TextToSpeech.g.cs index aaf8263..305b875 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.TextToSpeech.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.TextToSpeech.g.cs @@ -12,7 +12,7 @@ public partial interface IDeepInfraApi /// /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task TextToSpeechAsync( string voiceId, global::DeepInfra.ElevenLabsTextToSpeechIn request, diff --git a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.UpdateVoice.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.UpdateVoice.g.cs index 71fce63..175a258 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.UpdateVoice.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.UpdateVoice.g.cs @@ -11,7 +11,7 @@ public partial interface IDeepInfraApi /// /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task UpdateVoiceAsync( string voiceId, global::DeepInfra.BodyUpdateVoiceV1VoicesVoiceIdEditPost request, diff --git a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.Usage.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.Usage.g.cs index e3dd7cf..a1b72c6 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.Usage.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.Usage.g.cs @@ -15,7 +15,7 @@ public partial interface IDeepInfraApi /// /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task UsageAsync( string from, string? to = default, diff --git a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.UsageApiToken.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.UsageApiToken.g.cs index b6ef957..ae2e6de 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.UsageApiToken.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.UsageApiToken.g.cs @@ -16,7 +16,7 @@ public partial interface IDeepInfraApi /// /// /// The token to cancel the operation with - /// + /// global::System.Threading.Tasks.Task UsageApiTokenAsync( string apiToken, string from, diff --git a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.g.cs index ab1eca3..f0b3815 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.g.cs @@ -24,6 +24,12 @@ public partial interface IDeepInfraApi : global::System.IDisposable /// public global::System.Collections.Generic.List Authorizations { get; } + /// + /// Gets or sets a value indicating whether the response content should be read as a string. + /// True by default in debug builds, false otherwise. + /// + public bool ReadResponseAsString { get; set; } + /// /// /// diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.AccountSetUsernameV1MeUsernamePatchResponse.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.AccountSetUsernameV1MeUsernamePatchResponse.Json.g.cs new file mode 100644 index 0000000..4cfa9c3 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.AccountSetUsernameV1MeUsernamePatchResponse.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class AccountSetUsernameV1MeUsernamePatchResponse + { + /// + /// 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::DeepInfra.AccountSetUsernameV1MeUsernamePatchResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.AccountSetUsernameV1MeUsernamePatchResponse), + jsonSerializerContext) as global::DeepInfra.AccountSetUsernameV1MeUsernamePatchResponse; + } + + /// + /// 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::DeepInfra.AccountSetUsernameV1MeUsernamePatchResponse? 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::DeepInfra.AccountSetUsernameV1MeUsernamePatchResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.AccountSetUsernameV1MeUsernamePatchResponse; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.AccountSetUsernameV1MeUsernamePatchResponse.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.AccountSetUsernameV1MeUsernamePatchResponse.g.cs index 0e6f05c..75b9f92 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.AccountSetUsernameV1MeUsernamePatchResponse.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.AccountSetUsernameV1MeUsernamePatchResponse.g.cs @@ -15,91 +15,13 @@ public sealed partial class AccountSetUsernameV1MeUsernamePatchResponse [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// - public static global::DeepInfra.AccountSetUsernameV1MeUsernamePatchResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public AccountSetUsernameV1MeUsernamePatchResponse( + ) { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.AccountSetUsernameV1MeUsernamePatchResponse), - jsonSerializerContext) as global::DeepInfra.AccountSetUsernameV1MeUsernamePatchResponse; } - - /// - /// 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::DeepInfra.AccountSetUsernameV1MeUsernamePatchResponse? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.AccountSetUsernameV1MeUsernamePatchResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.AccountSetUsernameV1MeUsernamePatchResponse; - } - - /// - /// 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.AccountUpdateDetailsV1MePatchResponse.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.AccountUpdateDetailsV1MePatchResponse.Json.g.cs new file mode 100644 index 0000000..032777b --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.AccountUpdateDetailsV1MePatchResponse.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class AccountUpdateDetailsV1MePatchResponse + { + /// + /// 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::DeepInfra.AccountUpdateDetailsV1MePatchResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.AccountUpdateDetailsV1MePatchResponse), + jsonSerializerContext) as global::DeepInfra.AccountUpdateDetailsV1MePatchResponse; + } + + /// + /// 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::DeepInfra.AccountUpdateDetailsV1MePatchResponse? 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::DeepInfra.AccountUpdateDetailsV1MePatchResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.AccountUpdateDetailsV1MePatchResponse; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.AccountUpdateDetailsV1MePatchResponse.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.AccountUpdateDetailsV1MePatchResponse.g.cs index a13e749..19bc7b8 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.AccountUpdateDetailsV1MePatchResponse.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.AccountUpdateDetailsV1MePatchResponse.g.cs @@ -15,91 +15,13 @@ public sealed partial class AccountUpdateDetailsV1MePatchResponse [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// - public static global::DeepInfra.AccountUpdateDetailsV1MePatchResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public AccountUpdateDetailsV1MePatchResponse( + ) { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.AccountUpdateDetailsV1MePatchResponse), - jsonSerializerContext) as global::DeepInfra.AccountUpdateDetailsV1MePatchResponse; } - - /// - /// 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::DeepInfra.AccountUpdateDetailsV1MePatchResponse? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.AccountUpdateDetailsV1MePatchResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.AccountUpdateDetailsV1MePatchResponse; - } - - /// - /// 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.ApiToken.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ApiToken.Json.g.cs new file mode 100644 index 0000000..ddbdf50 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ApiToken.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class ApiToken + { + /// + /// 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::DeepInfra.ApiToken? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.ApiToken), + jsonSerializerContext) as global::DeepInfra.ApiToken; + } + + /// + /// 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::DeepInfra.ApiToken? 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::DeepInfra.ApiToken), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ApiToken; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.ApiToken.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ApiToken.g.cs index 487cd92..fef6351 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.ApiToken.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ApiToken.g.cs @@ -36,91 +36,30 @@ public sealed partial class ApiToken [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// -#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::DeepInfra.ApiToken? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.ApiToken), - jsonSerializerContext) as global::DeepInfra.ApiToken; - } - - /// - /// 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::DeepInfra.ApiToken? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// + /// creation unix timestamp + /// + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public ApiToken( + string token, + global::System.DateTimeOffset createdAt, + string name) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.ApiToken), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ApiToken; + this.Token = token ?? throw new global::System.ArgumentNullException(nameof(token)); + this.CreatedAt = createdAt; + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public ApiToken() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.ApiTokenIn.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ApiTokenIn.Json.g.cs new file mode 100644 index 0000000..10f5f02 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ApiTokenIn.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class ApiTokenIn + { + /// + /// 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::DeepInfra.ApiTokenIn? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.ApiTokenIn), + jsonSerializerContext) as global::DeepInfra.ApiTokenIn; + } + + /// + /// 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::DeepInfra.ApiTokenIn? 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::DeepInfra.ApiTokenIn), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ApiTokenIn; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.ApiTokenIn.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ApiTokenIn.g.cs index b7e04c6..5ca2caa 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.ApiTokenIn.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ApiTokenIn.g.cs @@ -21,91 +21,22 @@ public sealed partial class ApiTokenIn [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// - public static global::DeepInfra.ApiTokenIn? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public ApiTokenIn( + string name) { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.ApiTokenIn), - jsonSerializerContext) as global::DeepInfra.ApiTokenIn; + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); } /// - /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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::DeepInfra.ApiTokenIn? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public ApiTokenIn() { - 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.ApiTokenIn), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ApiTokenIn; - } - - /// - /// 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.BillingPortalOut.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.BillingPortalOut.Json.g.cs new file mode 100644 index 0000000..8e9a156 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.BillingPortalOut.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class BillingPortalOut + { + /// + /// 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::DeepInfra.BillingPortalOut? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.BillingPortalOut), + jsonSerializerContext) as global::DeepInfra.BillingPortalOut; + } + + /// + /// 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::DeepInfra.BillingPortalOut? 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::DeepInfra.BillingPortalOut), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.BillingPortalOut; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.BillingPortalOut.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.BillingPortalOut.g.cs index e81ae46..036fe10 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.BillingPortalOut.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.BillingPortalOut.g.cs @@ -21,91 +21,22 @@ public sealed partial class BillingPortalOut [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// - public static global::DeepInfra.BillingPortalOut? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public BillingPortalOut( + string url) { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.BillingPortalOut), - jsonSerializerContext) as global::DeepInfra.BillingPortalOut; + this.Url = url ?? throw new global::System.ArgumentNullException(nameof(url)); } /// - /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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::DeepInfra.BillingPortalOut? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public BillingPortalOut() { - 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.BillingPortalOut), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.BillingPortalOut; - } - - /// - /// 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.BodyCreateVoiceV1VoicesAddPost.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.BodyCreateVoiceV1VoicesAddPost.Json.g.cs new file mode 100644 index 0000000..fe70498 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.BodyCreateVoiceV1VoicesAddPost.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class BodyCreateVoiceV1VoicesAddPost + { + /// + /// 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::DeepInfra.BodyCreateVoiceV1VoicesAddPost? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.BodyCreateVoiceV1VoicesAddPost), + jsonSerializerContext) as global::DeepInfra.BodyCreateVoiceV1VoicesAddPost; + } + + /// + /// 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::DeepInfra.BodyCreateVoiceV1VoicesAddPost? 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::DeepInfra.BodyCreateVoiceV1VoicesAddPost), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.BodyCreateVoiceV1VoicesAddPost; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.BodyCreateVoiceV1VoicesAddPost.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.BodyCreateVoiceV1VoicesAddPost.g.cs index bb035de..a2cbf48 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.BodyCreateVoiceV1VoicesAddPost.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.BodyCreateVoiceV1VoicesAddPost.g.cs @@ -35,91 +35,28 @@ public sealed partial class BodyCreateVoiceV1VoicesAddPost [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// - public static global::DeepInfra.BodyCreateVoiceV1VoicesAddPost? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public BodyCreateVoiceV1VoicesAddPost( + string name, + string description, + global::System.Collections.Generic.IList files) { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.BodyCreateVoiceV1VoicesAddPost), - jsonSerializerContext) as global::DeepInfra.BodyCreateVoiceV1VoicesAddPost; + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.Description = description ?? throw new global::System.ArgumentNullException(nameof(description)); + this.Files = files ?? throw new global::System.ArgumentNullException(nameof(files)); } /// - /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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::DeepInfra.BodyCreateVoiceV1VoicesAddPost? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public BodyCreateVoiceV1VoicesAddPost() { - 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.BodyCreateVoiceV1VoicesAddPost), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.BodyCreateVoiceV1VoicesAddPost; - } - - /// - /// 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.BodyOpenaiFilesV1OpenaiFilesPost.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.BodyOpenaiFilesV1OpenaiFilesPost.Json.g.cs new file mode 100644 index 0000000..10447d5 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.BodyOpenaiFilesV1OpenaiFilesPost.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class BodyOpenaiFilesV1OpenaiFilesPost + { + /// + /// 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::DeepInfra.BodyOpenaiFilesV1OpenaiFilesPost? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.BodyOpenaiFilesV1OpenaiFilesPost), + jsonSerializerContext) as global::DeepInfra.BodyOpenaiFilesV1OpenaiFilesPost; + } + + /// + /// 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::DeepInfra.BodyOpenaiFilesV1OpenaiFilesPost? 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::DeepInfra.BodyOpenaiFilesV1OpenaiFilesPost), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.BodyOpenaiFilesV1OpenaiFilesPost; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.BodyOpenaiFilesV1OpenaiFilesPost.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.BodyOpenaiFilesV1OpenaiFilesPost.g.cs index dd7a72e..423da81 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.BodyOpenaiFilesV1OpenaiFilesPost.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.BodyOpenaiFilesV1OpenaiFilesPost.g.cs @@ -28,91 +28,25 @@ public sealed partial class BodyOpenaiFilesV1OpenaiFilesPost [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// - public static global::DeepInfra.BodyOpenaiFilesV1OpenaiFilesPost? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public BodyOpenaiFilesV1OpenaiFilesPost( + string purpose, + global::System.Collections.Generic.IList file) { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.BodyOpenaiFilesV1OpenaiFilesPost), - jsonSerializerContext) as global::DeepInfra.BodyOpenaiFilesV1OpenaiFilesPost; + this.Purpose = purpose ?? throw new global::System.ArgumentNullException(nameof(purpose)); + this.File = file ?? throw new global::System.ArgumentNullException(nameof(file)); } /// - /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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::DeepInfra.BodyOpenaiFilesV1OpenaiFilesPost? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public BodyOpenaiFilesV1OpenaiFilesPost() { - 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.BodyOpenaiFilesV1OpenaiFilesPost), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.BodyOpenaiFilesV1OpenaiFilesPost; - } - - /// - /// 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.BodyUpdateVoiceV1VoicesVoiceIdEditPost.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.BodyUpdateVoiceV1VoicesVoiceIdEditPost.Json.g.cs new file mode 100644 index 0000000..7b1dfbc --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.BodyUpdateVoiceV1VoicesVoiceIdEditPost.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class BodyUpdateVoiceV1VoicesVoiceIdEditPost + { + /// + /// 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::DeepInfra.BodyUpdateVoiceV1VoicesVoiceIdEditPost? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.BodyUpdateVoiceV1VoicesVoiceIdEditPost), + jsonSerializerContext) as global::DeepInfra.BodyUpdateVoiceV1VoicesVoiceIdEditPost; + } + + /// + /// 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::DeepInfra.BodyUpdateVoiceV1VoicesVoiceIdEditPost? 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::DeepInfra.BodyUpdateVoiceV1VoicesVoiceIdEditPost), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.BodyUpdateVoiceV1VoicesVoiceIdEditPost; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.BodyUpdateVoiceV1VoicesVoiceIdEditPost.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.BodyUpdateVoiceV1VoicesVoiceIdEditPost.g.cs index 4d1ff40..4af11cc 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.BodyUpdateVoiceV1VoicesVoiceIdEditPost.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.BodyUpdateVoiceV1VoicesVoiceIdEditPost.g.cs @@ -28,91 +28,25 @@ public sealed partial class BodyUpdateVoiceV1VoicesVoiceIdEditPost [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// - public static global::DeepInfra.BodyUpdateVoiceV1VoicesVoiceIdEditPost? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public BodyUpdateVoiceV1VoicesVoiceIdEditPost( + string name, + string description) { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.BodyUpdateVoiceV1VoicesVoiceIdEditPost), - jsonSerializerContext) as global::DeepInfra.BodyUpdateVoiceV1VoicesVoiceIdEditPost; + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.Description = description ?? throw new global::System.ArgumentNullException(nameof(description)); } /// - /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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::DeepInfra.BodyUpdateVoiceV1VoicesVoiceIdEditPost? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public BodyUpdateVoiceV1VoicesVoiceIdEditPost() { - 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.BodyUpdateVoiceV1VoicesVoiceIdEditPost), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.BodyUpdateVoiceV1VoicesVoiceIdEditPost; - } - - /// - /// 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.ChatCompletionAssistantMessage.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ChatCompletionAssistantMessage.Json.g.cs new file mode 100644 index 0000000..6f6de9c --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ChatCompletionAssistantMessage.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class ChatCompletionAssistantMessage + { + /// + /// 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::DeepInfra.ChatCompletionAssistantMessage? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.ChatCompletionAssistantMessage), + jsonSerializerContext) as global::DeepInfra.ChatCompletionAssistantMessage; + } + + /// + /// 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::DeepInfra.ChatCompletionAssistantMessage? 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::DeepInfra.ChatCompletionAssistantMessage), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ChatCompletionAssistantMessage; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.ChatCompletionAssistantMessage.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ChatCompletionAssistantMessage.g.cs index cc9d1d8..d4533f3 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.ChatCompletionAssistantMessage.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ChatCompletionAssistantMessage.g.cs @@ -40,91 +40,38 @@ public sealed partial class ChatCompletionAssistantMessage [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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::DeepInfra.ChatCompletionAssistantMessage? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.ChatCompletionAssistantMessage), - jsonSerializerContext) as global::DeepInfra.ChatCompletionAssistantMessage; - } - /// - /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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::DeepInfra.ChatCompletionAssistantMessage? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// the role of the author of this message
+ /// Default Value: assistant + /// + /// + /// the message content + /// + /// + /// + /// the tool calls generated by the mode + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public ChatCompletionAssistantMessage( + global::DeepInfra.ChatCompletionAssistantMessageRole? role, + string? content, + string? name, + global::System.Collections.Generic.IList? toolCalls) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.ChatCompletionAssistantMessage), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ChatCompletionAssistantMessage; + this.Role = role; + this.Content = content; + this.Name = name; + this.ToolCalls = toolCalls; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public ChatCompletionAssistantMessage() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.ChatCompletionContentPartImage.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ChatCompletionContentPartImage.Json.g.cs new file mode 100644 index 0000000..395bba8 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ChatCompletionContentPartImage.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class ChatCompletionContentPartImage + { + /// + /// 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::DeepInfra.ChatCompletionContentPartImage? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.ChatCompletionContentPartImage), + jsonSerializerContext) as global::DeepInfra.ChatCompletionContentPartImage; + } + + /// + /// 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::DeepInfra.ChatCompletionContentPartImage? 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::DeepInfra.ChatCompletionContentPartImage), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ChatCompletionContentPartImage; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.ChatCompletionContentPartImage.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ChatCompletionContentPartImage.g.cs index 078928e..3254038 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.ChatCompletionContentPartImage.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ChatCompletionContentPartImage.g.cs @@ -28,91 +28,25 @@ public sealed partial class ChatCompletionContentPartImage [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// - public static global::DeepInfra.ChatCompletionContentPartImage? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public ChatCompletionContentPartImage( + global::DeepInfra.ImageURL imageUrl, + global::DeepInfra.ChatCompletionContentPartImageType type) { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.ChatCompletionContentPartImage), - jsonSerializerContext) as global::DeepInfra.ChatCompletionContentPartImage; + this.ImageUrl = imageUrl ?? throw new global::System.ArgumentNullException(nameof(imageUrl)); + this.Type = type; } /// - /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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::DeepInfra.ChatCompletionContentPartImage? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public ChatCompletionContentPartImage() { - 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.ChatCompletionContentPartImage), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ChatCompletionContentPartImage; - } - - /// - /// 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.ChatCompletionContentPartText.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ChatCompletionContentPartText.Json.g.cs new file mode 100644 index 0000000..da5c150 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ChatCompletionContentPartText.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class ChatCompletionContentPartText + { + /// + /// 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::DeepInfra.ChatCompletionContentPartText? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.ChatCompletionContentPartText), + jsonSerializerContext) as global::DeepInfra.ChatCompletionContentPartText; + } + + /// + /// 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::DeepInfra.ChatCompletionContentPartText? 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::DeepInfra.ChatCompletionContentPartText), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ChatCompletionContentPartText; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.ChatCompletionContentPartText.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ChatCompletionContentPartText.g.cs index b2b1ad5..4350e94 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.ChatCompletionContentPartText.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ChatCompletionContentPartText.g.cs @@ -28,91 +28,25 @@ public sealed partial class ChatCompletionContentPartText [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// - public static global::DeepInfra.ChatCompletionContentPartText? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public ChatCompletionContentPartText( + string text, + global::DeepInfra.ChatCompletionContentPartTextType type) { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.ChatCompletionContentPartText), - jsonSerializerContext) as global::DeepInfra.ChatCompletionContentPartText; + this.Text = text ?? throw new global::System.ArgumentNullException(nameof(text)); + this.Type = type; } /// - /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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::DeepInfra.ChatCompletionContentPartText? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public ChatCompletionContentPartText() { - 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.ChatCompletionContentPartText), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ChatCompletionContentPartText; - } - - /// - /// 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.ChatCompletionMessageToolCall.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ChatCompletionMessageToolCall.Json.g.cs new file mode 100644 index 0000000..6fea52e --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ChatCompletionMessageToolCall.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class ChatCompletionMessageToolCall + { + /// + /// 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::DeepInfra.ChatCompletionMessageToolCall? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.ChatCompletionMessageToolCall), + jsonSerializerContext) as global::DeepInfra.ChatCompletionMessageToolCall; + } + + /// + /// 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::DeepInfra.ChatCompletionMessageToolCall? 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::DeepInfra.ChatCompletionMessageToolCall), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ChatCompletionMessageToolCall; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.ChatCompletionMessageToolCall.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ChatCompletionMessageToolCall.g.cs index 55398d0..c44d50f 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.ChatCompletionMessageToolCall.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ChatCompletionMessageToolCall.g.cs @@ -35,91 +35,34 @@ public sealed partial class ChatCompletionMessageToolCall [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - /// - /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// Initializes a new instance of the class. /// - 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::DeepInfra.ChatCompletionMessageToolCall? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.ChatCompletionMessageToolCall), - jsonSerializerContext) as global::DeepInfra.ChatCompletionMessageToolCall; - } - - /// - /// 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::DeepInfra.ChatCompletionMessageToolCall? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// the id of the tool call + /// + /// + /// the type of the tool call. only function is supported currently + /// + /// + /// the function that the model called + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public ChatCompletionMessageToolCall( + string id, + string type, + global::DeepInfra.Function function) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.ChatCompletionMessageToolCall), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ChatCompletionMessageToolCall; + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); + this.Function = function ?? throw new global::System.ArgumentNullException(nameof(function)); } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public ChatCompletionMessageToolCall() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.ChatCompletionSystemMessage.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ChatCompletionSystemMessage.Json.g.cs new file mode 100644 index 0000000..4655ed2 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ChatCompletionSystemMessage.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class ChatCompletionSystemMessage + { + /// + /// 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::DeepInfra.ChatCompletionSystemMessage? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.ChatCompletionSystemMessage), + jsonSerializerContext) as global::DeepInfra.ChatCompletionSystemMessage; + } + + /// + /// 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::DeepInfra.ChatCompletionSystemMessage? 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::DeepInfra.ChatCompletionSystemMessage), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ChatCompletionSystemMessage; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.ChatCompletionSystemMessage.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ChatCompletionSystemMessage.g.cs index d6c99e7..56cec41 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.ChatCompletionSystemMessage.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ChatCompletionSystemMessage.g.cs @@ -35,91 +35,33 @@ public sealed partial class ChatCompletionSystemMessage [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - /// - /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// Initializes a new instance of the class. /// - 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::DeepInfra.ChatCompletionSystemMessage? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.ChatCompletionSystemMessage), - jsonSerializerContext) as global::DeepInfra.ChatCompletionSystemMessage; - } - - /// - /// 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::DeepInfra.ChatCompletionSystemMessage? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// the role of the author of this message
+ /// Default Value: system + /// + /// + /// the message content + /// + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public ChatCompletionSystemMessage( + string content, + global::DeepInfra.ChatCompletionSystemMessageRole? role, + string? name) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.ChatCompletionSystemMessage), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ChatCompletionSystemMessage; + this.Content = content ?? throw new global::System.ArgumentNullException(nameof(content)); + this.Role = role; + this.Name = name; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public ChatCompletionSystemMessage() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.ChatCompletionToolMessage.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ChatCompletionToolMessage.Json.g.cs new file mode 100644 index 0000000..86bc6b8 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ChatCompletionToolMessage.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class ChatCompletionToolMessage + { + /// + /// 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::DeepInfra.ChatCompletionToolMessage? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.ChatCompletionToolMessage), + jsonSerializerContext) as global::DeepInfra.ChatCompletionToolMessage; + } + + /// + /// 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::DeepInfra.ChatCompletionToolMessage? 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::DeepInfra.ChatCompletionToolMessage), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ChatCompletionToolMessage; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.ChatCompletionToolMessage.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ChatCompletionToolMessage.g.cs index 94cee4b..933dcda 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.ChatCompletionToolMessage.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ChatCompletionToolMessage.g.cs @@ -36,91 +36,33 @@ public sealed partial class ChatCompletionToolMessage [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - /// - /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// Initializes a new instance of the class. /// - 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::DeepInfra.ChatCompletionToolMessage? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.ChatCompletionToolMessage), - jsonSerializerContext) as global::DeepInfra.ChatCompletionToolMessage; - } - - /// - /// 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::DeepInfra.ChatCompletionToolMessage? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// the role of the author of this message
+ /// Default Value: tool + /// + /// + /// the message content + /// + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public ChatCompletionToolMessage( + string content, + string toolCallId, + global::DeepInfra.ChatCompletionToolMessageRole? role) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.ChatCompletionToolMessage), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ChatCompletionToolMessage; + this.Content = content ?? throw new global::System.ArgumentNullException(nameof(content)); + this.ToolCallId = toolCallId ?? throw new global::System.ArgumentNullException(nameof(toolCallId)); + this.Role = role; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public ChatCompletionToolMessage() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.ChatCompletionUserMessage.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ChatCompletionUserMessage.Json.g.cs new file mode 100644 index 0000000..1522579 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ChatCompletionUserMessage.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class ChatCompletionUserMessage + { + /// + /// 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::DeepInfra.ChatCompletionUserMessage? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.ChatCompletionUserMessage), + jsonSerializerContext) as global::DeepInfra.ChatCompletionUserMessage; + } + + /// + /// 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::DeepInfra.ChatCompletionUserMessage? 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::DeepInfra.ChatCompletionUserMessage), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ChatCompletionUserMessage; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.ChatCompletionUserMessage.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ChatCompletionUserMessage.g.cs index 2b216c2..e9574e4 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.ChatCompletionUserMessage.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ChatCompletionUserMessage.g.cs @@ -38,91 +38,33 @@ public sealed partial class ChatCompletionUserMessage [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - /// - /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// Initializes a new instance of the class. /// - 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::DeepInfra.ChatCompletionUserMessage? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.ChatCompletionUserMessage), - jsonSerializerContext) as global::DeepInfra.ChatCompletionUserMessage; - } - - /// - /// 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::DeepInfra.ChatCompletionUserMessage? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// the role of the author of this message
+ /// Default Value: user + /// + /// + /// the message content + /// + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public ChatCompletionUserMessage( + global::DeepInfra.AnyOf>> content, + global::DeepInfra.ChatCompletionUserMessageRole? role, + string? name) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.ChatCompletionUserMessage), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ChatCompletionUserMessage; + this.Content = content; + this.Role = role; + this.Name = name; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public ChatCompletionUserMessage() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.ChatTools.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ChatTools.Json.g.cs new file mode 100644 index 0000000..66190ef --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ChatTools.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class ChatTools + { + /// + /// 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::DeepInfra.ChatTools? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.ChatTools), + jsonSerializerContext) as global::DeepInfra.ChatTools; + } + + /// + /// 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::DeepInfra.ChatTools? 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::DeepInfra.ChatTools), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ChatTools; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.ChatTools.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ChatTools.g.cs index 3f9f452..8949b62 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.ChatTools.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ChatTools.g.cs @@ -27,91 +27,27 @@ public sealed partial class ChatTools [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// -#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::DeepInfra.ChatTools? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.ChatTools), - jsonSerializerContext) as global::DeepInfra.ChatTools; - } - - /// - /// 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::DeepInfra.ChatTools? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// Default Value: function + /// + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public ChatTools( + global::DeepInfra.FunctionDefinition function, + string? type) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.ChatTools), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ChatTools; + this.Function = function ?? throw new global::System.ArgumentNullException(nameof(function)); + this.Type = type; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public ChatTools() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.Checklist.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.Checklist.Json.g.cs new file mode 100644 index 0000000..8b0d5dc --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.Checklist.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class Checklist + { + /// + /// 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::DeepInfra.Checklist? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.Checklist), + jsonSerializerContext) as global::DeepInfra.Checklist; + } + + /// + /// 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::DeepInfra.Checklist? 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::DeepInfra.Checklist), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.Checklist; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.Checklist.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.Checklist.g.cs index cb14307..b7db0da 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.Checklist.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.Checklist.g.cs @@ -70,91 +70,62 @@ public sealed partial class Checklist [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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::DeepInfra.Checklist? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.Checklist), - jsonSerializerContext) as global::DeepInfra.Checklist; - } - - /// - /// 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::DeepInfra.Checklist? 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. + /// Initializes a new instance of the class. /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// Default Value: false + /// + /// + /// Default Value: false + /// + /// + /// Default Value: false + /// + /// + /// Default Value: false + /// + /// + /// Default Value: 0 + /// + /// + /// Default Value: 0 + /// + /// + /// Negative value indicates funds ready-to-spend. Positive value indicates money owed + /// + /// + /// + /// An enumeration. + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public Checklist( + double stripeBalance, + bool? email, + bool? billingAddress, + bool? paymentMethod, + bool? suspended, + double? overdueInvoices, + int? lastChecked, + double? limit, + global::DeepInfra.SuspendReason? suspendReason) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.Checklist), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.Checklist; + this.StripeBalance = stripeBalance; + this.Email = email; + this.BillingAddress = billingAddress; + this.PaymentMethod = paymentMethod; + this.Suspended = suspended; + this.OverdueInvoices = overdueInvoices; + this.LastChecked = lastChecked; + this.Limit = limit; + this.SuspendReason = suspendReason; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public Checklist() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.CliVersionCliVersionGetResponse.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.CliVersionCliVersionGetResponse.Json.g.cs new file mode 100644 index 0000000..bd5a0dc --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.CliVersionCliVersionGetResponse.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class CliVersionCliVersionGetResponse + { + /// + /// 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::DeepInfra.CliVersionCliVersionGetResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.CliVersionCliVersionGetResponse), + jsonSerializerContext) as global::DeepInfra.CliVersionCliVersionGetResponse; + } + + /// + /// 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::DeepInfra.CliVersionCliVersionGetResponse? 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::DeepInfra.CliVersionCliVersionGetResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.CliVersionCliVersionGetResponse; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.CliVersionCliVersionGetResponse.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.CliVersionCliVersionGetResponse.g.cs index c131a88..79bab1c 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.CliVersionCliVersionGetResponse.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.CliVersionCliVersionGetResponse.g.cs @@ -15,91 +15,13 @@ public sealed partial class CliVersionCliVersionGetResponse [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// - public static global::DeepInfra.CliVersionCliVersionGetResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public CliVersionCliVersionGetResponse( + ) { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.CliVersionCliVersionGetResponse), - jsonSerializerContext) as global::DeepInfra.CliVersionCliVersionGetResponse; } - - /// - /// 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::DeepInfra.CliVersionCliVersionGetResponse? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.CliVersionCliVersionGetResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.CliVersionCliVersionGetResponse; - } - - /// - /// 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.ConfigIn.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ConfigIn.Json.g.cs new file mode 100644 index 0000000..a4af780 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ConfigIn.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class ConfigIn + { + /// + /// 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::DeepInfra.ConfigIn? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.ConfigIn), + jsonSerializerContext) as global::DeepInfra.ConfigIn; + } + + /// + /// 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::DeepInfra.ConfigIn? 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::DeepInfra.ConfigIn), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ConfigIn; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.ConfigIn.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ConfigIn.g.cs index 7ff91cf..0c7c64a 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.ConfigIn.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ConfigIn.g.cs @@ -20,91 +20,24 @@ public sealed partial class ConfigIn [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// -#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::DeepInfra.ConfigIn? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.ConfigIn), - jsonSerializerContext) as global::DeepInfra.ConfigIn; - } - - /// - /// 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::DeepInfra.ConfigIn? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// Set usage limit (in USD). Negative means no limit.null/not-set means don't change it + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public ConfigIn( + double? limit) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.ConfigIn), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ConfigIn; + this.Limit = limit; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public ConfigIn() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.ConfigOut.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ConfigOut.Json.g.cs new file mode 100644 index 0000000..25ce161 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ConfigOut.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class ConfigOut + { + /// + /// 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::DeepInfra.ConfigOut? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.ConfigOut), + jsonSerializerContext) as global::DeepInfra.ConfigOut; + } + + /// + /// 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::DeepInfra.ConfigOut? 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::DeepInfra.ConfigOut), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ConfigOut; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.ConfigOut.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ConfigOut.g.cs index 18a223d..d3f2b82 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.ConfigOut.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ConfigOut.g.cs @@ -21,91 +21,24 @@ public sealed partial class ConfigOut [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// -#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::DeepInfra.ConfigOut? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.ConfigOut), - jsonSerializerContext) as global::DeepInfra.ConfigOut; - } - - /// - /// 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::DeepInfra.ConfigOut? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// Spending limit (in USD). Negative means no limit + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public ConfigOut( + double limit) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.ConfigOut), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ConfigOut; + this.Limit = limit; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public ConfigOut() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.DeepError.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeepError.Json.g.cs new file mode 100644 index 0000000..efd29e0 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeepError.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class DeepError + { + /// + /// 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::DeepInfra.DeepError? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.DeepError), + jsonSerializerContext) as global::DeepInfra.DeepError; + } + + /// + /// 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::DeepInfra.DeepError? 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::DeepInfra.DeepError), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.DeepError; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.DeepError.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeepError.g.cs index 36c700f..24f43e2 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.DeepError.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeepError.g.cs @@ -12,6 +12,7 @@ public sealed partial class DeepError /// Error
/// Example: Model not found /// + /// Model not found [global::System.Text.Json.Serialization.JsonPropertyName("error")] [global::System.Text.Json.Serialization.JsonRequired] public required string Error { get; set; } @@ -22,91 +23,25 @@ public sealed partial class DeepError [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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::DeepInfra.DeepError? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.DeepError), - jsonSerializerContext) as global::DeepInfra.DeepError; - } - - /// - /// 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::DeepInfra.DeepError? 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. + /// Initializes a new instance of the class. /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// Error
+ /// Example: Model not found + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public DeepError( + string error) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.DeepError), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.DeepError; + this.Error = error ?? throw new global::System.ArgumentNullException(nameof(error)); } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public DeepError() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.DeepStartApplicationIn.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeepStartApplicationIn.Json.g.cs new file mode 100644 index 0000000..8366343 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeepStartApplicationIn.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class DeepStartApplicationIn + { + /// + /// 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::DeepInfra.DeepStartApplicationIn? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.DeepStartApplicationIn), + jsonSerializerContext) as global::DeepInfra.DeepStartApplicationIn; + } + + /// + /// 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::DeepInfra.DeepStartApplicationIn? 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::DeepInfra.DeepStartApplicationIn), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.DeepStartApplicationIn; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.DeepStartApplicationIn.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeepStartApplicationIn.g.cs index 227bbe0..e73ab94 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.DeepStartApplicationIn.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeepStartApplicationIn.g.cs @@ -79,91 +79,51 @@ public sealed partial class DeepStartApplicationIn [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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::DeepInfra.DeepStartApplicationIn? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.DeepStartApplicationIn), - jsonSerializerContext) as global::DeepInfra.DeepStartApplicationIn; - } - - /// - /// 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::DeepInfra.DeepStartApplicationIn? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// Initializes a new instance of the class. + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// Default Value: pending + /// + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public DeepStartApplicationIn( + string company, + string ceo, + string funding, + string foundedOn, + string website, + string? id, + string? uid, + int? createdAt, + string? status, + string? deal) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.DeepStartApplicationIn), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.DeepStartApplicationIn; + this.Company = company ?? throw new global::System.ArgumentNullException(nameof(company)); + this.Ceo = ceo ?? throw new global::System.ArgumentNullException(nameof(ceo)); + this.Funding = funding ?? throw new global::System.ArgumentNullException(nameof(funding)); + this.FoundedOn = foundedOn ?? throw new global::System.ArgumentNullException(nameof(foundedOn)); + this.Website = website ?? throw new global::System.ArgumentNullException(nameof(website)); + this.Id = id; + this.Uid = uid; + this.CreatedAt = createdAt; + this.Status = status; + this.Deal = deal; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public DeepStartApplicationIn() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.DeepStartApplicationOut.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeepStartApplicationOut.Json.g.cs new file mode 100644 index 0000000..f8f9190 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeepStartApplicationOut.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class DeepStartApplicationOut + { + /// + /// 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::DeepInfra.DeepStartApplicationOut? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.DeepStartApplicationOut), + jsonSerializerContext) as global::DeepInfra.DeepStartApplicationOut; + } + + /// + /// 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::DeepInfra.DeepStartApplicationOut? 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::DeepInfra.DeepStartApplicationOut), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.DeepStartApplicationOut; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.DeepStartApplicationOut.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeepStartApplicationOut.g.cs index 9c08f10..f3a0694 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.DeepStartApplicationOut.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeepStartApplicationOut.g.cs @@ -85,91 +85,54 @@ public sealed partial class DeepStartApplicationOut [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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::DeepInfra.DeepStartApplicationOut? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.DeepStartApplicationOut), - jsonSerializerContext) as global::DeepInfra.DeepStartApplicationOut; - } - - /// - /// 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::DeepInfra.DeepStartApplicationOut? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// Initializes a new instance of the class. + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// Default Value: pending + /// + /// + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public DeepStartApplicationOut( + string company, + string ceo, + string funding, + string foundedOn, + string website, + string? id, + string? uid, + int? createdAt, + string? status, + string? deal, + string? email) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.DeepStartApplicationOut), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.DeepStartApplicationOut; + this.Company = company ?? throw new global::System.ArgumentNullException(nameof(company)); + this.Ceo = ceo ?? throw new global::System.ArgumentNullException(nameof(ceo)); + this.Funding = funding ?? throw new global::System.ArgumentNullException(nameof(funding)); + this.FoundedOn = foundedOn ?? throw new global::System.ArgumentNullException(nameof(foundedOn)); + this.Website = website ?? throw new global::System.ArgumentNullException(nameof(website)); + this.Id = id; + this.Uid = uid; + this.CreatedAt = createdAt; + this.Status = status; + this.Deal = deal; + this.Email = email; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public DeepStartApplicationOut() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.DeleteApiTokenV1ApiTokensApiTokenDeleteResponse.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeleteApiTokenV1ApiTokensApiTokenDeleteResponse.Json.g.cs new file mode 100644 index 0000000..c4d2ae7 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeleteApiTokenV1ApiTokensApiTokenDeleteResponse.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class DeleteApiTokenV1ApiTokensApiTokenDeleteResponse + { + /// + /// 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::DeepInfra.DeleteApiTokenV1ApiTokensApiTokenDeleteResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.DeleteApiTokenV1ApiTokensApiTokenDeleteResponse), + jsonSerializerContext) as global::DeepInfra.DeleteApiTokenV1ApiTokensApiTokenDeleteResponse; + } + + /// + /// 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::DeepInfra.DeleteApiTokenV1ApiTokensApiTokenDeleteResponse? 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::DeepInfra.DeleteApiTokenV1ApiTokensApiTokenDeleteResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.DeleteApiTokenV1ApiTokensApiTokenDeleteResponse; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.DeleteApiTokenV1ApiTokensApiTokenDeleteResponse.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeleteApiTokenV1ApiTokensApiTokenDeleteResponse.g.cs index 8829e19..d4a7a16 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.DeleteApiTokenV1ApiTokensApiTokenDeleteResponse.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeleteApiTokenV1ApiTokensApiTokenDeleteResponse.g.cs @@ -15,91 +15,13 @@ public sealed partial class DeleteApiTokenV1ApiTokensApiTokenDeleteResponse [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// - public static global::DeepInfra.DeleteApiTokenV1ApiTokensApiTokenDeleteResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public DeleteApiTokenV1ApiTokensApiTokenDeleteResponse( + ) { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.DeleteApiTokenV1ApiTokensApiTokenDeleteResponse), - jsonSerializerContext) as global::DeepInfra.DeleteApiTokenV1ApiTokensApiTokenDeleteResponse; } - - /// - /// 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::DeepInfra.DeleteApiTokenV1ApiTokensApiTokenDeleteResponse? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.DeleteApiTokenV1ApiTokensApiTokenDeleteResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.DeleteApiTokenV1ApiTokensApiTokenDeleteResponse; - } - - /// - /// 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.DeleteVoiceV1VoicesVoiceIdDeleteResponse.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeleteVoiceV1VoicesVoiceIdDeleteResponse.Json.g.cs new file mode 100644 index 0000000..26e25eb --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeleteVoiceV1VoicesVoiceIdDeleteResponse.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class DeleteVoiceV1VoicesVoiceIdDeleteResponse + { + /// + /// 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::DeepInfra.DeleteVoiceV1VoicesVoiceIdDeleteResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.DeleteVoiceV1VoicesVoiceIdDeleteResponse), + jsonSerializerContext) as global::DeepInfra.DeleteVoiceV1VoicesVoiceIdDeleteResponse; + } + + /// + /// 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::DeepInfra.DeleteVoiceV1VoicesVoiceIdDeleteResponse? 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::DeepInfra.DeleteVoiceV1VoicesVoiceIdDeleteResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.DeleteVoiceV1VoicesVoiceIdDeleteResponse; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.DeleteVoiceV1VoicesVoiceIdDeleteResponse.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeleteVoiceV1VoicesVoiceIdDeleteResponse.g.cs index 932ccad..3226dc8 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.DeleteVoiceV1VoicesVoiceIdDeleteResponse.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeleteVoiceV1VoicesVoiceIdDeleteResponse.g.cs @@ -15,91 +15,13 @@ public sealed partial class DeleteVoiceV1VoicesVoiceIdDeleteResponse [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// - public static global::DeepInfra.DeleteVoiceV1VoicesVoiceIdDeleteResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public DeleteVoiceV1VoicesVoiceIdDeleteResponse( + ) { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.DeleteVoiceV1VoicesVoiceIdDeleteResponse), - jsonSerializerContext) as global::DeepInfra.DeleteVoiceV1VoicesVoiceIdDeleteResponse; } - - /// - /// 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::DeepInfra.DeleteVoiceV1VoicesVoiceIdDeleteResponse? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.DeleteVoiceV1VoicesVoiceIdDeleteResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.DeleteVoiceV1VoicesVoiceIdDeleteResponse; - } - - /// - /// 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.DeployDelete.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeployDelete.Json.g.cs new file mode 100644 index 0000000..0038878 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeployDelete.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class DeployDelete + { + /// + /// 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::DeepInfra.DeployDelete? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.DeployDelete), + jsonSerializerContext) as global::DeepInfra.DeployDelete; + } + + /// + /// 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::DeepInfra.DeployDelete? 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::DeepInfra.DeployDelete), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.DeployDelete; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.DeployDelete.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeployDelete.g.cs index 58d115d..5b0c715 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.DeployDelete.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeployDelete.g.cs @@ -12,6 +12,7 @@ public sealed partial class DeployDelete /// Deploy Id
/// Example: fkj843kjh8 /// + /// fkj843kjh8 [global::System.Text.Json.Serialization.JsonPropertyName("deploy_id")] [global::System.Text.Json.Serialization.JsonRequired] public required string DeployId { get; set; } @@ -22,91 +23,25 @@ public sealed partial class DeployDelete [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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::DeepInfra.DeployDelete? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.DeployDelete), - jsonSerializerContext) as global::DeepInfra.DeployDelete; - } - - /// - /// 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::DeepInfra.DeployDelete? 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. + /// Initializes a new instance of the class. /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// Deploy Id
+ /// Example: fkj843kjh8 + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public DeployDelete( + string deployId) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.DeployDelete), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.DeployDelete; + this.DeployId = deployId ?? throw new global::System.ArgumentNullException(nameof(deployId)); } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public DeployDelete() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.DeployGPUAvailability.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeployGPUAvailability.Json.g.cs new file mode 100644 index 0000000..31cdd54 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeployGPUAvailability.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class DeployGPUAvailability + { + /// + /// 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::DeepInfra.DeployGPUAvailability? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.DeployGPUAvailability), + jsonSerializerContext) as global::DeepInfra.DeployGPUAvailability; + } + + /// + /// 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::DeepInfra.DeployGPUAvailability? 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::DeepInfra.DeployGPUAvailability), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.DeployGPUAvailability; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.DeployGPUAvailability.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeployGPUAvailability.g.cs index e9691a3..eb9ed5e 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.DeployGPUAvailability.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeployGPUAvailability.g.cs @@ -21,91 +21,24 @@ public sealed partial class DeployGPUAvailability [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// -#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::DeepInfra.DeployGPUAvailability? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.DeployGPUAvailability), - jsonSerializerContext) as global::DeepInfra.DeployGPUAvailability; - } - - /// - /// 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::DeepInfra.DeployGPUAvailability? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// A list of all provided GPUs configurations, including their price and wether they are available + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public DeployGPUAvailability( + global::System.Collections.Generic.IList gpus) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.DeployGPUAvailability), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.DeployGPUAvailability; + this.Gpus = gpus ?? throw new global::System.ArgumentNullException(nameof(gpus)); } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public DeployGPUAvailability() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.DeployInstances.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeployInstances.Json.g.cs new file mode 100644 index 0000000..3d40245 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeployInstances.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class DeployInstances + { + /// + /// 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::DeepInfra.DeployInstances? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.DeployInstances), + jsonSerializerContext) as global::DeepInfra.DeployInstances; + } + + /// + /// 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::DeepInfra.DeployInstances? 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::DeepInfra.DeployInstances), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.DeployInstances; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.DeployInstances.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeployInstances.g.cs index 508d0b6..33dbc64 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.DeployInstances.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeployInstances.g.cs @@ -28,91 +28,25 @@ public sealed partial class DeployInstances [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// - public static global::DeepInfra.DeployInstances? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public DeployInstances( + int running, + int pending) { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.DeployInstances), - jsonSerializerContext) as global::DeepInfra.DeployInstances; + this.Running = running; + this.Pending = pending; } /// - /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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::DeepInfra.DeployInstances? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public DeployInstances() { - 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.DeployInstances), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.DeployInstances; - } - - /// - /// 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.DeployLLMConfig.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeployLLMConfig.Json.g.cs new file mode 100644 index 0000000..05f59c2 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeployLLMConfig.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class DeployLLMConfig + { + /// + /// 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::DeepInfra.DeployLLMConfig? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.DeployLLMConfig), + jsonSerializerContext) as global::DeepInfra.DeployLLMConfig; + } + + /// + /// 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::DeepInfra.DeployLLMConfig? 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::DeepInfra.DeployLLMConfig), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.DeployLLMConfig; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.DeployLLMConfig.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeployLLMConfig.g.cs index 0b8d941..4a773ae 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.DeployLLMConfig.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeployLLMConfig.g.cs @@ -43,91 +43,39 @@ public sealed partial class DeployLLMConfig [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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::DeepInfra.DeployLLMConfig? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.DeployLLMConfig), - jsonSerializerContext) as global::DeepInfra.DeployLLMConfig; - } - /// - /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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::DeepInfra.DeployLLMConfig? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// The type of GPU the deployment is running on + /// + /// + /// Number of GPUs used by one instance + /// + /// + /// Maximum number of concurrent requests + /// + /// + /// Model weights information + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public DeployLLMConfig( + global::DeepInfra.DeployGPUs gpu, + int numGpus, + int maxBatchSize, + global::DeepInfra.HFWeights weights) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.DeployLLMConfig), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.DeployLLMConfig; + this.Gpu = gpu; + this.NumGpus = numGpus; + this.MaxBatchSize = maxBatchSize; + this.Weights = weights ?? throw new global::System.ArgumentNullException(nameof(weights)); } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public DeployLLMConfig() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.DeployLLMIn.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeployLLMIn.Json.g.cs new file mode 100644 index 0000000..91ab6cb --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeployLLMIn.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class DeployLLMIn + { + /// + /// 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::DeepInfra.DeployLLMIn? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.DeployLLMIn), + jsonSerializerContext) as global::DeepInfra.DeployLLMIn; + } + + /// + /// 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::DeepInfra.DeployLLMIn? 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::DeepInfra.DeployLLMIn), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.DeployLLMIn; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.DeployLLMIn.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeployLLMIn.g.cs index b3e8fae..d8b9ebc 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.DeployLLMIn.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeployLLMIn.g.cs @@ -55,91 +55,47 @@ public sealed partial class DeployLLMIn [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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::DeepInfra.DeployLLMIn? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.DeployLLMIn), - jsonSerializerContext) as global::DeepInfra.DeployLLMIn; - } - - /// - /// 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::DeepInfra.DeployLLMIn? 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. + /// Initializes a new instance of the class. /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// model name for deepinfra (username/mode-name format) + /// + /// + /// The GPU you want to run on + /// + /// + /// Number of GPUs you want for this model
+ /// Default Value: 1 + /// + /// + /// Maximum number of concurrent requests
+ /// Default Value: 96 + /// + /// + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public DeployLLMIn( + string modelName, + global::DeepInfra.DeployGPUs gpu, + int? numGpus, + int? maxBatchSize, + global::DeepInfra.HFWeights? hf, + global::DeepInfra.ScaleSettings? settings) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.DeployLLMIn), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.DeployLLMIn; + this.ModelName = modelName ?? throw new global::System.ArgumentNullException(nameof(modelName)); + this.Gpu = gpu; + this.NumGpus = numGpus; + this.MaxBatchSize = maxBatchSize; + this.Hf = hf; + this.Settings = settings; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public DeployLLMIn() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.DeployLLMUpdateIn.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeployLLMUpdateIn.Json.g.cs new file mode 100644 index 0000000..43aa007 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeployLLMUpdateIn.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class DeployLLMUpdateIn + { + /// + /// 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::DeepInfra.DeployLLMUpdateIn? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.DeployLLMUpdateIn), + jsonSerializerContext) as global::DeepInfra.DeployLLMUpdateIn; + } + + /// + /// 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::DeepInfra.DeployLLMUpdateIn? 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::DeepInfra.DeployLLMUpdateIn), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.DeployLLMUpdateIn; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.DeployLLMUpdateIn.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeployLLMUpdateIn.g.cs index f0a6066..1372329 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.DeployLLMUpdateIn.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeployLLMUpdateIn.g.cs @@ -21,91 +21,22 @@ public sealed partial class DeployLLMUpdateIn [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// - public static global::DeepInfra.DeployLLMUpdateIn? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public DeployLLMUpdateIn( + global::DeepInfra.ScaleSettings settings) { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.DeployLLMUpdateIn), - jsonSerializerContext) as global::DeepInfra.DeployLLMUpdateIn; + this.Settings = settings ?? throw new global::System.ArgumentNullException(nameof(settings)); } /// - /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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::DeepInfra.DeployLLMUpdateIn? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public DeployLLMUpdateIn() { - 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.DeployLLMUpdateIn), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.DeployLLMUpdateIn; - } - - /// - /// 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.DeployModelIn.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeployModelIn.Json.g.cs new file mode 100644 index 0000000..82b7053 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeployModelIn.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class DeployModelIn + { + /// + /// 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::DeepInfra.DeployModelIn? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.DeployModelIn), + jsonSerializerContext) as global::DeepInfra.DeployModelIn; + } + + /// + /// 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::DeepInfra.DeployModelIn? 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::DeepInfra.DeployModelIn), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.DeployModelIn; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.DeployModelIn.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeployModelIn.g.cs index 6efd633..288a1db 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.DeployModelIn.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeployModelIn.g.cs @@ -34,91 +34,34 @@ public sealed partial class DeployModelIn [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - /// - /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// Initializes a new instance of the class. /// - 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::DeepInfra.DeployModelIn? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.DeployModelIn), - jsonSerializerContext) as global::DeepInfra.DeployModelIn; - } - - /// - /// 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::DeepInfra.DeployModelIn? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// namespace for the model name + /// + /// + /// model name in specified provider + /// + /// + /// A specific revision, if left empty uses the last one + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public DeployModelIn( + string modelName, + global::DeepInfra.ModelProvider? provider, + string? version) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.DeployModelIn), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.DeployModelIn; + this.ModelName = modelName ?? throw new global::System.ArgumentNullException(nameof(modelName)); + this.Provider = provider; + this.Version = version; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public DeployModelIn() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.DeployResult.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeployResult.Json.g.cs new file mode 100644 index 0000000..7b39d33 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeployResult.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class DeployResult + { + /// + /// 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::DeepInfra.DeployResult? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.DeployResult), + jsonSerializerContext) as global::DeepInfra.DeployResult; + } + + /// + /// 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::DeepInfra.DeployResult? 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::DeepInfra.DeployResult), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.DeployResult; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.DeployResult.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeployResult.g.cs index 688d66d..32c2cf3 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.DeployResult.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeployResult.g.cs @@ -12,6 +12,7 @@ public sealed partial class DeployResult /// Deploy Id
/// Example: fkj843kjh8 /// + /// fkj843kjh8 [global::System.Text.Json.Serialization.JsonPropertyName("deploy_id")] [global::System.Text.Json.Serialization.JsonRequired] public required string DeployId { get; set; } @@ -22,91 +23,25 @@ public sealed partial class DeployResult [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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::DeepInfra.DeployResult? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.DeployResult), - jsonSerializerContext) as global::DeepInfra.DeployResult; - } - - /// - /// 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::DeepInfra.DeployResult? 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. + /// Initializes a new instance of the class. /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// Deploy Id
+ /// Example: fkj843kjh8 + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public DeployResult( + string deployId) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.DeployResult), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.DeployResult; + this.DeployId = deployId ?? throw new global::System.ArgumentNullException(nameof(deployId)); } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public DeployResult() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.DeployStatusOut.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeployStatusOut.Json.g.cs new file mode 100644 index 0000000..02d308e --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeployStatusOut.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class DeployStatusOut + { + /// + /// 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::DeepInfra.DeployStatusOut? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.DeployStatusOut), + jsonSerializerContext) as global::DeepInfra.DeployStatusOut; + } + + /// + /// 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::DeepInfra.DeployStatusOut? 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::DeepInfra.DeployStatusOut), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.DeployStatusOut; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.DeployStatusOut.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeployStatusOut.g.cs index 6676619..1dabae5 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.DeployStatusOut.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeployStatusOut.g.cs @@ -12,6 +12,7 @@ public sealed partial class DeployStatusOut /// Deploy Id
/// Example: fkj843kjh8 /// + /// fkj843kjh8 [global::System.Text.Json.Serialization.JsonPropertyName("deploy_id")] [global::System.Text.Json.Serialization.JsonRequired] public required string DeployId { get; set; } @@ -22,91 +23,25 @@ public sealed partial class DeployStatusOut [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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::DeepInfra.DeployStatusOut? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.DeployStatusOut), - jsonSerializerContext) as global::DeepInfra.DeployStatusOut; - } - - /// - /// 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::DeepInfra.DeployStatusOut? 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. + /// Initializes a new instance of the class. /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// Deploy Id
+ /// Example: fkj843kjh8 + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public DeployStatusOut( + string deployId) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.DeployStatusOut), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.DeployStatusOut; + this.DeployId = deployId ?? throw new global::System.ArgumentNullException(nameof(deployId)); } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public DeployStatusOut() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.DeploymentLogEntry.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeploymentLogEntry.Json.g.cs new file mode 100644 index 0000000..3b92c7e --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeploymentLogEntry.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class DeploymentLogEntry + { + /// + /// 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::DeepInfra.DeploymentLogEntry? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.DeploymentLogEntry), + jsonSerializerContext) as global::DeepInfra.DeploymentLogEntry; + } + + /// + /// 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::DeepInfra.DeploymentLogEntry? 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::DeepInfra.DeploymentLogEntry), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.DeploymentLogEntry; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.DeploymentLogEntry.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeploymentLogEntry.g.cs index 2a9eea7..ba8a00d 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.DeploymentLogEntry.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeploymentLogEntry.g.cs @@ -28,91 +28,25 @@ public sealed partial class DeploymentLogEntry [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// - public static global::DeepInfra.DeploymentLogEntry? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public DeploymentLogEntry( + string ts, + string line) { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.DeploymentLogEntry), - jsonSerializerContext) as global::DeepInfra.DeploymentLogEntry; + this.Ts = ts ?? throw new global::System.ArgumentNullException(nameof(ts)); + this.Line = line ?? throw new global::System.ArgumentNullException(nameof(line)); } /// - /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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::DeepInfra.DeploymentLogEntry? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public DeploymentLogEntry() { - 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.DeploymentLogEntry), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.DeploymentLogEntry; - } - - /// - /// 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.DeploymentLogQueryOut.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeploymentLogQueryOut.Json.g.cs new file mode 100644 index 0000000..ab9f576 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeploymentLogQueryOut.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class DeploymentLogQueryOut + { + /// + /// 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::DeepInfra.DeploymentLogQueryOut? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.DeploymentLogQueryOut), + jsonSerializerContext) as global::DeepInfra.DeploymentLogQueryOut; + } + + /// + /// 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::DeepInfra.DeploymentLogQueryOut? 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::DeepInfra.DeploymentLogQueryOut), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.DeploymentLogQueryOut; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.DeploymentLogQueryOut.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeploymentLogQueryOut.g.cs index afd695e..96d46ef 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.DeploymentLogQueryOut.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeploymentLogQueryOut.g.cs @@ -20,91 +20,24 @@ public sealed partial class DeploymentLogQueryOut [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// -#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::DeepInfra.DeploymentLogQueryOut? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.DeploymentLogQueryOut), - jsonSerializerContext) as global::DeepInfra.DeploymentLogQueryOut; - } - - /// - /// 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::DeepInfra.DeploymentLogQueryOut? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// mapping of pod names to log lines ordered by increasing timestamp + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public DeploymentLogQueryOut( + global::System.Collections.Generic.Dictionary>>? entries) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.DeploymentLogQueryOut), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.DeploymentLogQueryOut; + this.Entries = entries; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public DeploymentLogQueryOut() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.DeploymentLogQueryOutEntrieItem.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeploymentLogQueryOutEntrieItem.Json.g.cs new file mode 100644 index 0000000..72add14 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeploymentLogQueryOutEntrieItem.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class DeploymentLogQueryOutEntrieItem + { + /// + /// 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::DeepInfra.DeploymentLogQueryOutEntrieItem? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.DeploymentLogQueryOutEntrieItem), + jsonSerializerContext) as global::DeepInfra.DeploymentLogQueryOutEntrieItem; + } + + /// + /// 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::DeepInfra.DeploymentLogQueryOutEntrieItem? 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::DeepInfra.DeploymentLogQueryOutEntrieItem), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.DeploymentLogQueryOutEntrieItem; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.DeploymentLogQueryOutEntrieItem.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeploymentLogQueryOutEntrieItem.g.cs index b381d25..f41335d 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.DeploymentLogQueryOutEntrieItem.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeploymentLogQueryOutEntrieItem.g.cs @@ -15,91 +15,13 @@ public sealed partial class DeploymentLogQueryOutEntrieItem [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// - public static global::DeepInfra.DeploymentLogQueryOutEntrieItem? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public DeploymentLogQueryOutEntrieItem( + ) { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.DeploymentLogQueryOutEntrieItem), - jsonSerializerContext) as global::DeepInfra.DeploymentLogQueryOutEntrieItem; } - - /// - /// 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::DeepInfra.DeploymentLogQueryOutEntrieItem? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.DeploymentLogQueryOutEntrieItem), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.DeploymentLogQueryOutEntrieItem; - } - - /// - /// 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.DeploymentLogQueryOutEntries.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeploymentLogQueryOutEntries.Json.g.cs new file mode 100644 index 0000000..07efed6 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeploymentLogQueryOutEntries.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class DeploymentLogQueryOutEntries + { + /// + /// 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::DeepInfra.DeploymentLogQueryOutEntries? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.DeploymentLogQueryOutEntries), + jsonSerializerContext) as global::DeepInfra.DeploymentLogQueryOutEntries; + } + + /// + /// 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::DeepInfra.DeploymentLogQueryOutEntries? 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::DeepInfra.DeploymentLogQueryOutEntries), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.DeploymentLogQueryOutEntries; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.DeploymentLogQueryOutEntries.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeploymentLogQueryOutEntries.g.cs index 6c86392..f35f589 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.DeploymentLogQueryOutEntries.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeploymentLogQueryOutEntries.g.cs @@ -15,91 +15,13 @@ public sealed partial class DeploymentLogQueryOutEntries [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// - public static global::DeepInfra.DeploymentLogQueryOutEntries? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public DeploymentLogQueryOutEntries( + ) { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.DeploymentLogQueryOutEntries), - jsonSerializerContext) as global::DeepInfra.DeploymentLogQueryOutEntries; } - - /// - /// 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::DeepInfra.DeploymentLogQueryOutEntries? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.DeploymentLogQueryOutEntries), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.DeploymentLogQueryOutEntries; - } - - /// - /// 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.DeploymentOut.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeploymentOut.Json.g.cs new file mode 100644 index 0000000..c9bb5a5 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeploymentOut.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class DeploymentOut + { + /// + /// 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::DeepInfra.DeploymentOut? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.DeploymentOut), + jsonSerializerContext) as global::DeepInfra.DeploymentOut; + } + + /// + /// 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::DeepInfra.DeploymentOut? 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::DeepInfra.DeploymentOut), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.DeploymentOut; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.DeploymentOut.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeploymentOut.g.cs index 51bc557..0ce7b7d 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.DeploymentOut.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeploymentOut.g.cs @@ -19,6 +19,7 @@ public sealed partial class DeploymentOut /// Deploy Id
/// Example: fkj843kjh8 /// + /// fkj843kjh8 [global::System.Text.Json.Serialization.JsonPropertyName("deploy_id")] [global::System.Text.Json.Serialization.JsonRequired] public required string DeployId { get; set; } @@ -27,6 +28,7 @@ public sealed partial class DeploymentOut /// Model Id from huggingface
/// Example: google/vit-base-patch16-224 /// + /// google/vit-base-patch16-224 [global::System.Text.Json.Serialization.JsonPropertyName("model_name")] [global::System.Text.Json.Serialization.JsonRequired] public required string ModelName { get; set; } @@ -35,6 +37,7 @@ public sealed partial class DeploymentOut /// Model version
/// Example: d8b79b422843bd59d628bf25b01aded94a9ec1a9b917e69fe460df9ff39ec42b /// + /// d8b79b422843bd59d628bf25b01aded94a9ec1a9b917e69fe460df9ff39ec42b [global::System.Text.Json.Serialization.JsonPropertyName("version")] [global::System.Text.Json.Serialization.JsonRequired] public required string Version { get; set; } @@ -43,6 +46,7 @@ public sealed partial class DeploymentOut /// Task
/// Example: image-classification /// + /// image-classification [global::System.Text.Json.Serialization.JsonPropertyName("task")] [global::System.Text.Json.Serialization.JsonRequired] public required string Task { get; set; } @@ -51,6 +55,7 @@ public sealed partial class DeploymentOut /// Status
/// Example: deployed /// + /// deployed [global::System.Text.Json.Serialization.JsonPropertyName("status")] [global::System.Text.Json.Serialization.JsonRequired] public required string Status { get; set; } @@ -59,6 +64,7 @@ public sealed partial class DeploymentOut /// Failure reason
/// Example: Initialization failed /// + /// Initialization failed [global::System.Text.Json.Serialization.JsonPropertyName("fail_reason")] [global::System.Text.Json.Serialization.JsonRequired] public required string FailReason { get; set; } @@ -101,91 +107,83 @@ public sealed partial class DeploymentOut [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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::DeepInfra.DeploymentOut? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.DeploymentOut), - jsonSerializerContext) as global::DeepInfra.DeploymentOut; - } - /// - /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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::DeepInfra.DeploymentOut? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// + /// Deploy Id
+ /// Example: fkj843kjh8 + /// + /// + /// Model Id from huggingface
+ /// Example: google/vit-base-patch16-224 + /// + /// + /// Model version
+ /// Example: d8b79b422843bd59d628bf25b01aded94a9ec1a9b917e69fe460df9ff39ec42b + /// + /// + /// Task
+ /// Example: image-classification + /// + /// + /// Status
+ /// Example: deployed + /// + /// + /// Failure reason
+ /// Example: Initialization failed + /// + /// + /// Created at + /// + /// + /// Updated at + /// + /// + /// Details about number of instances running right now + /// + /// + /// Immutable deploy configuration + /// + /// + /// Scale Settings + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public DeploymentOut( + string deployId, + string modelName, + string version, + string task, + string status, + string failReason, + global::System.DateTime createdAt, + global::System.DateTime updatedAt, + global::DeepInfra.DeployType? type, + global::DeepInfra.DeployInstances? instances, + global::DeepInfra.DeployLLMConfig? config, + global::DeepInfra.ScaleSettings? settings) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.DeploymentOut), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.DeploymentOut; + this.DeployId = deployId ?? throw new global::System.ArgumentNullException(nameof(deployId)); + this.ModelName = modelName ?? throw new global::System.ArgumentNullException(nameof(modelName)); + this.Version = version ?? throw new global::System.ArgumentNullException(nameof(version)); + this.Task = task ?? throw new global::System.ArgumentNullException(nameof(task)); + this.Status = status ?? throw new global::System.ArgumentNullException(nameof(status)); + this.FailReason = failReason ?? throw new global::System.ArgumentNullException(nameof(failReason)); + this.CreatedAt = createdAt; + this.UpdatedAt = updatedAt; + this.Type = type; + this.Instances = instances; + this.Config = config; + this.Settings = settings; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public DeploymentOut() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.DeploymentStatsOut.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeploymentStatsOut.Json.g.cs new file mode 100644 index 0000000..0a401f8 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeploymentStatsOut.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class DeploymentStatsOut + { + /// + /// 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::DeepInfra.DeploymentStatsOut? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.DeploymentStatsOut), + jsonSerializerContext) as global::DeepInfra.DeploymentStatsOut; + } + + /// + /// 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::DeepInfra.DeploymentStatsOut? 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::DeepInfra.DeploymentStatsOut), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.DeploymentStatsOut; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.DeploymentStatsOut.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeploymentStatsOut.g.cs index ceb118b..b661a47 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.DeploymentStatsOut.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeploymentStatsOut.g.cs @@ -77,91 +77,64 @@ public sealed partial class DeploymentStatsOut [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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::DeepInfra.DeploymentStatsOut? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.DeploymentStatsOut), - jsonSerializerContext) as global::DeepInfra.DeploymentStatsOut; - } - /// - /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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::DeepInfra.DeploymentStatsOut? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// number of inference requests in the provided interval + /// + /// + /// total number of seconds spend in inference + /// + /// + /// total number of tokens generated + /// + /// + /// number of input tokens generated + /// + /// + /// number of output tokens generated + /// + /// + /// total number of cents spent + /// + /// + /// average millisecond inference time + /// + /// + /// 95th percentile inference time (estimated) + /// + /// + /// number of errors + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public DeploymentStatsOut( + int requests, + int totalTime, + int totalTokens, + int inputTokens, + int outputTokens, + int totalAmount, + double avgTime, + double avg95Time, + int errors) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.DeploymentStatsOut), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.DeploymentStatsOut; + this.Requests = requests; + this.TotalTime = totalTime; + this.TotalTokens = totalTokens; + this.InputTokens = inputTokens; + this.OutputTokens = outputTokens; + this.TotalAmount = totalAmount; + this.AvgTime = avgTime; + this.Avg95Time = avg95Time; + this.Errors = errors; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public DeploymentStatsOut() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.DetailedDeploymentStatsOut.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.DetailedDeploymentStatsOut.Json.g.cs new file mode 100644 index 0000000..5a71334 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.DetailedDeploymentStatsOut.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class DetailedDeploymentStatsOut + { + /// + /// 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::DeepInfra.DetailedDeploymentStatsOut? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.DetailedDeploymentStatsOut), + jsonSerializerContext) as global::DeepInfra.DetailedDeploymentStatsOut; + } + + /// + /// 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::DeepInfra.DetailedDeploymentStatsOut? 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::DeepInfra.DetailedDeploymentStatsOut), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.DetailedDeploymentStatsOut; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.DetailedDeploymentStatsOut.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.DetailedDeploymentStatsOut.g.cs index 279d595..04d4ca6 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.DetailedDeploymentStatsOut.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.DetailedDeploymentStatsOut.g.cs @@ -32,91 +32,34 @@ public sealed partial class DetailedDeploymentStatsOut [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - /// - /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// Initializes a new instance of the class. /// - 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::DeepInfra.DetailedDeploymentStatsOut? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.DetailedDeploymentStatsOut), - jsonSerializerContext) as global::DeepInfra.DetailedDeploymentStatsOut; - } - - /// - /// 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::DeepInfra.DetailedDeploymentStatsOut? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// LLM Deployment Stats + /// + /// + /// Embeddings Deployment Stats + /// + /// + /// Time based Deployment Stats + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public DetailedDeploymentStatsOut( + global::DeepInfra.LLMDeploymentStatsOut? llm, + global::DeepInfra.EmbeddingsDeploymentStatsOut? embeddings, + global::DeepInfra.TimeDeploymentStatsOut? time) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.DetailedDeploymentStatsOut), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.DetailedDeploymentStatsOut; + this.Llm = llm; + this.Embeddings = embeddings; + this.Time = time; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public DetailedDeploymentStatsOut() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.ElevenLabsTextToSpeechIn.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ElevenLabsTextToSpeechIn.Json.g.cs new file mode 100644 index 0000000..660dc05 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ElevenLabsTextToSpeechIn.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class ElevenLabsTextToSpeechIn + { + /// + /// 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::DeepInfra.ElevenLabsTextToSpeechIn? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.ElevenLabsTextToSpeechIn), + jsonSerializerContext) as global::DeepInfra.ElevenLabsTextToSpeechIn; + } + + /// + /// 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::DeepInfra.ElevenLabsTextToSpeechIn? 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::DeepInfra.ElevenLabsTextToSpeechIn), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ElevenLabsTextToSpeechIn; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.ElevenLabsTextToSpeechIn.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ElevenLabsTextToSpeechIn.g.cs index bd03746..e06ca0f 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.ElevenLabsTextToSpeechIn.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ElevenLabsTextToSpeechIn.g.cs @@ -15,6 +15,12 @@ public sealed partial class ElevenLabsTextToSpeechIn /// Now, who thinks their arms are long enough to slap box, slap box?
/// They said I rap like a robot, so call me Rap-bot /// + /// + /// I'm beginnin' to feel like a Rap God, Rap God
+ /// All my people from the front to the back nod, back nod
+ /// Now, who thinks their arms are long enough to slap box, slap box?
+ /// They said I rap like a robot, so call me Rap-bot + ///
[global::System.Text.Json.Serialization.JsonPropertyName("text")] [global::System.Text.Json.Serialization.JsonRequired] public required string Text { get; set; } @@ -46,91 +52,45 @@ public sealed partial class ElevenLabsTextToSpeechIn [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// -#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::DeepInfra.ElevenLabsTextToSpeechIn? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.ElevenLabsTextToSpeechIn), - jsonSerializerContext) as global::DeepInfra.ElevenLabsTextToSpeechIn; - } - - /// - /// 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::DeepInfra.ElevenLabsTextToSpeechIn? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// Text to convert to speech
+ /// Example: I'm beginnin' to feel like a Rap God, Rap God
+ /// All my people from the front to the back nod, back nod
+ /// Now, who thinks their arms are long enough to slap box, slap box?
+ /// They said I rap like a robot, so call me Rap-bot + /// + /// + /// Model ID to use for the conversion
+ /// Default Value: deepinfra/tts + /// + /// + /// Output format for the speech
+ /// Default Value: wav + /// + /// + /// ISO 639-1, 2 letter language code + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public ElevenLabsTextToSpeechIn( + string text, + string? modelId, + global::DeepInfra.TtsResponseFormat? outputFormat, + string? languageCode) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.ElevenLabsTextToSpeechIn), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ElevenLabsTextToSpeechIn; + this.Text = text ?? throw new global::System.ArgumentNullException(nameof(text)); + this.ModelId = modelId; + this.OutputFormat = outputFormat; + this.LanguageCode = languageCode; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public ElevenLabsTextToSpeechIn() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.EmailsOut.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.EmailsOut.Json.g.cs new file mode 100644 index 0000000..88d83e7 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.EmailsOut.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class EmailsOut + { + /// + /// 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::DeepInfra.EmailsOut? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.EmailsOut), + jsonSerializerContext) as global::DeepInfra.EmailsOut; + } + + /// + /// 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::DeepInfra.EmailsOut? 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::DeepInfra.EmailsOut), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.EmailsOut; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.EmailsOut.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.EmailsOut.g.cs index 624d213..21579e2 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.EmailsOut.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.EmailsOut.g.cs @@ -21,91 +21,24 @@ public sealed partial class EmailsOut [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// -#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::DeepInfra.EmailsOut? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.EmailsOut), - jsonSerializerContext) as global::DeepInfra.EmailsOut; - } - - /// - /// 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::DeepInfra.EmailsOut? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// List of emails verified by theauthenticaiton provider + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public EmailsOut( + global::System.Collections.Generic.IList emails) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.EmailsOut), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.EmailsOut; + this.Emails = emails ?? throw new global::System.ArgumentNullException(nameof(emails)); } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public EmailsOut() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.EmbeddingsDeploymentStatsOut.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.EmbeddingsDeploymentStatsOut.Json.g.cs new file mode 100644 index 0000000..87fecb0 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.EmbeddingsDeploymentStatsOut.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class EmbeddingsDeploymentStatsOut + { + /// + /// 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::DeepInfra.EmbeddingsDeploymentStatsOut? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.EmbeddingsDeploymentStatsOut), + jsonSerializerContext) as global::DeepInfra.EmbeddingsDeploymentStatsOut; + } + + /// + /// 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::DeepInfra.EmbeddingsDeploymentStatsOut? 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::DeepInfra.EmbeddingsDeploymentStatsOut), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.EmbeddingsDeploymentStatsOut; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.EmbeddingsDeploymentStatsOut.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.EmbeddingsDeploymentStatsOut.g.cs index 1a46cce..f208607 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.EmbeddingsDeploymentStatsOut.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.EmbeddingsDeploymentStatsOut.g.cs @@ -56,91 +56,49 @@ public sealed partial class EmbeddingsDeploymentStatsOut [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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::DeepInfra.EmbeddingsDeploymentStatsOut? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.EmbeddingsDeploymentStatsOut), - jsonSerializerContext) as global::DeepInfra.EmbeddingsDeploymentStatsOut; - } - - /// - /// 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::DeepInfra.EmbeddingsDeploymentStatsOut? 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. + /// Initializes a new instance of the class. /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// number of inference requests in the provided interval + /// + /// + /// number of input tokens generated + /// + /// + /// average millisecond time per token + /// + /// + /// 95th percentile time per token (estimated) + /// + /// + /// total number of cents spent + /// + /// + /// number of errors + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public EmbeddingsDeploymentStatsOut( + int requests, + int inputTokens, + double avgTptMs, + double avg95TptMs, + int totalAmountCents, + int errors) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.EmbeddingsDeploymentStatsOut), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.EmbeddingsDeploymentStatsOut; + this.Requests = requests; + this.InputTokens = inputTokens; + this.AvgTptMs = avgTptMs; + this.Avg95TptMs = avg95TptMs; + this.TotalAmountCents = totalAmountCents; + this.Errors = errors; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public EmbeddingsDeploymentStatsOut() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.FeedbackIn.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.FeedbackIn.Json.g.cs new file mode 100644 index 0000000..300421e --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.FeedbackIn.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class FeedbackIn + { + /// + /// 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::DeepInfra.FeedbackIn? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.FeedbackIn), + jsonSerializerContext) as global::DeepInfra.FeedbackIn; + } + + /// + /// 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::DeepInfra.FeedbackIn? 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::DeepInfra.FeedbackIn), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.FeedbackIn; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.FeedbackIn.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.FeedbackIn.g.cs index 1b8a07b..83a5bdf 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.FeedbackIn.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.FeedbackIn.g.cs @@ -27,91 +27,29 @@ public sealed partial class FeedbackIn [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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::DeepInfra.FeedbackIn? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.FeedbackIn), - jsonSerializerContext) as global::DeepInfra.FeedbackIn; - } - - /// - /// 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::DeepInfra.FeedbackIn? 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. + /// Initializes a new instance of the class. /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// The message you'd like to send to deepinfra team + /// + /// + /// Optional contact email to reach you back + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public FeedbackIn( + string message, + string? contactEmail) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.FeedbackIn), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.FeedbackIn; + this.Message = message ?? throw new global::System.ArgumentNullException(nameof(message)); + this.ContactEmail = contactEmail; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public FeedbackIn() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.Function.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.Function.Json.g.cs new file mode 100644 index 0000000..0a25598 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.Function.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class Function + { + /// + /// 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::DeepInfra.Function? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.Function), + jsonSerializerContext) as global::DeepInfra.Function; + } + + /// + /// 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::DeepInfra.Function? 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::DeepInfra.Function), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.Function; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.Function.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.Function.g.cs index c155560..dade2e3 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.Function.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.Function.g.cs @@ -28,91 +28,29 @@ public sealed partial class Function [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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::DeepInfra.Function? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.Function), - jsonSerializerContext) as global::DeepInfra.Function; - } - - /// - /// 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::DeepInfra.Function? 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. + /// Initializes a new instance of the class. /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// the name of the function to call + /// + /// + /// the function arguments, generated by the model in JSON format. the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public Function( + string name, + string arguments) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.Function), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.Function; + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.Arguments = arguments ?? throw new global::System.ArgumentNullException(nameof(arguments)); } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public Function() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.FunctionDefinition.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.FunctionDefinition.Json.g.cs new file mode 100644 index 0000000..5dbcf8c --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.FunctionDefinition.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class FunctionDefinition + { + /// + /// 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::DeepInfra.FunctionDefinition? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.FunctionDefinition), + jsonSerializerContext) as global::DeepInfra.FunctionDefinition; + } + + /// + /// 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::DeepInfra.FunctionDefinition? 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::DeepInfra.FunctionDefinition), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.FunctionDefinition; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.FunctionDefinition.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.FunctionDefinition.g.cs index 8313d7c..8078c8a 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.FunctionDefinition.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.FunctionDefinition.g.cs @@ -34,91 +34,28 @@ public sealed partial class FunctionDefinition [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// - public static global::DeepInfra.FunctionDefinition? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public FunctionDefinition( + string name, + string description, + object? parameters) { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.FunctionDefinition), - jsonSerializerContext) as global::DeepInfra.FunctionDefinition; + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.Description = description ?? throw new global::System.ArgumentNullException(nameof(description)); + this.Parameters = parameters; } /// - /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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::DeepInfra.FunctionDefinition? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public FunctionDefinition() { - 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.FunctionDefinition), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.FunctionDefinition; - } - - /// - /// 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.FunctionDefinitionParameters.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.FunctionDefinitionParameters.Json.g.cs new file mode 100644 index 0000000..4c4306f --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.FunctionDefinitionParameters.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class FunctionDefinitionParameters + { + /// + /// 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::DeepInfra.FunctionDefinitionParameters? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.FunctionDefinitionParameters), + jsonSerializerContext) as global::DeepInfra.FunctionDefinitionParameters; + } + + /// + /// 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::DeepInfra.FunctionDefinitionParameters? 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::DeepInfra.FunctionDefinitionParameters), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.FunctionDefinitionParameters; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.FunctionDefinitionParameters.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.FunctionDefinitionParameters.g.cs index 561718f..adbbccf 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.FunctionDefinitionParameters.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.FunctionDefinitionParameters.g.cs @@ -15,91 +15,13 @@ public sealed partial class FunctionDefinitionParameters [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// - public static global::DeepInfra.FunctionDefinitionParameters? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public FunctionDefinitionParameters( + ) { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.FunctionDefinitionParameters), - jsonSerializerContext) as global::DeepInfra.FunctionDefinitionParameters; } - - /// - /// 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::DeepInfra.FunctionDefinitionParameters? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.FunctionDefinitionParameters), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.FunctionDefinitionParameters; - } - - /// - /// 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.GPUAvailabilityInfo.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.GPUAvailabilityInfo.Json.g.cs new file mode 100644 index 0000000..39584b0 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.GPUAvailabilityInfo.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class GPUAvailabilityInfo + { + /// + /// 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::DeepInfra.GPUAvailabilityInfo? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.GPUAvailabilityInfo), + jsonSerializerContext) as global::DeepInfra.GPUAvailabilityInfo; + } + + /// + /// 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::DeepInfra.GPUAvailabilityInfo? 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::DeepInfra.GPUAvailabilityInfo), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.GPUAvailabilityInfo; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.GPUAvailabilityInfo.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.GPUAvailabilityInfo.g.cs index 7891a0e..a2c20e8 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.GPUAvailabilityInfo.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.GPUAvailabilityInfo.g.cs @@ -35,91 +35,28 @@ public sealed partial class GPUAvailabilityInfo [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// - public static global::DeepInfra.GPUAvailabilityInfo? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public GPUAvailabilityInfo( + string gpuConfig, + double usdPerHour, + bool available) { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.GPUAvailabilityInfo), - jsonSerializerContext) as global::DeepInfra.GPUAvailabilityInfo; + this.GpuConfig = gpuConfig ?? throw new global::System.ArgumentNullException(nameof(gpuConfig)); + this.UsdPerHour = usdPerHour; + this.Available = available; } /// - /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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::DeepInfra.GPUAvailabilityInfo? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public GPUAvailabilityInfo() { - 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.GPUAvailabilityInfo), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.GPUAvailabilityInfo; - } - - /// - /// 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.GetVoicesOut.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.GetVoicesOut.Json.g.cs new file mode 100644 index 0000000..2e0d4a8 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.GetVoicesOut.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class GetVoicesOut + { + /// + /// 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::DeepInfra.GetVoicesOut? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.GetVoicesOut), + jsonSerializerContext) as global::DeepInfra.GetVoicesOut; + } + + /// + /// 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::DeepInfra.GetVoicesOut? 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::DeepInfra.GetVoicesOut), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.GetVoicesOut; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.GetVoicesOut.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.GetVoicesOut.g.cs index 4fd5c43..1254b19 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.GetVoicesOut.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.GetVoicesOut.g.cs @@ -20,91 +20,22 @@ public sealed partial class GetVoicesOut [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// - public static global::DeepInfra.GetVoicesOut? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public GetVoicesOut( + global::System.Collections.Generic.IList? voices) { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.GetVoicesOut), - jsonSerializerContext) as global::DeepInfra.GetVoicesOut; + this.Voices = voices; } /// - /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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::DeepInfra.GetVoicesOut? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public GetVoicesOut() { - 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.GetVoicesOut), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.GetVoicesOut; - } - - /// - /// 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.GithubCliLoginGithubCliLoginGetResponse.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.GithubCliLoginGithubCliLoginGetResponse.Json.g.cs new file mode 100644 index 0000000..0627d01 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.GithubCliLoginGithubCliLoginGetResponse.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class GithubCliLoginGithubCliLoginGetResponse + { + /// + /// 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::DeepInfra.GithubCliLoginGithubCliLoginGetResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.GithubCliLoginGithubCliLoginGetResponse), + jsonSerializerContext) as global::DeepInfra.GithubCliLoginGithubCliLoginGetResponse; + } + + /// + /// 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::DeepInfra.GithubCliLoginGithubCliLoginGetResponse? 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::DeepInfra.GithubCliLoginGithubCliLoginGetResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.GithubCliLoginGithubCliLoginGetResponse; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.GithubCliLoginGithubCliLoginGetResponse.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.GithubCliLoginGithubCliLoginGetResponse.g.cs index 512bcd0..b32a8ef 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.GithubCliLoginGithubCliLoginGetResponse.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.GithubCliLoginGithubCliLoginGetResponse.g.cs @@ -15,91 +15,13 @@ public sealed partial class GithubCliLoginGithubCliLoginGetResponse [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// - public static global::DeepInfra.GithubCliLoginGithubCliLoginGetResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public GithubCliLoginGithubCliLoginGetResponse( + ) { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.GithubCliLoginGithubCliLoginGetResponse), - jsonSerializerContext) as global::DeepInfra.GithubCliLoginGithubCliLoginGetResponse; } - - /// - /// 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::DeepInfra.GithubCliLoginGithubCliLoginGetResponse? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.GithubCliLoginGithubCliLoginGetResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.GithubCliLoginGithubCliLoginGetResponse; - } - - /// - /// 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.GithubLoginGithubLoginGetResponse.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.GithubLoginGithubLoginGetResponse.Json.g.cs new file mode 100644 index 0000000..e8f1fb7 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.GithubLoginGithubLoginGetResponse.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class GithubLoginGithubLoginGetResponse + { + /// + /// 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::DeepInfra.GithubLoginGithubLoginGetResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.GithubLoginGithubLoginGetResponse), + jsonSerializerContext) as global::DeepInfra.GithubLoginGithubLoginGetResponse; + } + + /// + /// 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::DeepInfra.GithubLoginGithubLoginGetResponse? 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::DeepInfra.GithubLoginGithubLoginGetResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.GithubLoginGithubLoginGetResponse; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.GithubLoginGithubLoginGetResponse.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.GithubLoginGithubLoginGetResponse.g.cs index c1ecad5..a30feec 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.GithubLoginGithubLoginGetResponse.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.GithubLoginGithubLoginGetResponse.g.cs @@ -15,91 +15,13 @@ public sealed partial class GithubLoginGithubLoginGetResponse [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// - public static global::DeepInfra.GithubLoginGithubLoginGetResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public GithubLoginGithubLoginGetResponse( + ) { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.GithubLoginGithubLoginGetResponse), - jsonSerializerContext) as global::DeepInfra.GithubLoginGithubLoginGetResponse; } - - /// - /// 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::DeepInfra.GithubLoginGithubLoginGetResponse? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.GithubLoginGithubLoginGetResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.GithubLoginGithubLoginGetResponse; - } - - /// - /// 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.HFModel.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.HFModel.Json.g.cs new file mode 100644 index 0000000..4451f42 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.HFModel.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class HFModel + { + /// + /// 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::DeepInfra.HFModel? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.HFModel), + jsonSerializerContext) as global::DeepInfra.HFModel; + } + + /// + /// 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::DeepInfra.HFModel? 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::DeepInfra.HFModel), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.HFModel; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.HFModel.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.HFModel.g.cs index 7262e2f..073df6e 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.HFModel.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.HFModel.g.cs @@ -12,6 +12,7 @@ public sealed partial class HFModel /// Model Id from huggingface
/// Example: google/vit-base-patch16-224 /// + /// google/vit-base-patch16-224 [global::System.Text.Json.Serialization.JsonPropertyName("model_name")] [global::System.Text.Json.Serialization.JsonRequired] public required string ModelName { get; set; } @@ -20,6 +21,7 @@ public sealed partial class HFModel /// Task
/// Example: image-classification /// + /// image-classification [global::System.Text.Json.Serialization.JsonPropertyName("task")] public string? Task { get; set; } @@ -29,91 +31,31 @@ public sealed partial class HFModel [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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::DeepInfra.HFModel? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.HFModel), - jsonSerializerContext) as global::DeepInfra.HFModel; - } - /// - /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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::DeepInfra.HFModel? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// Model Id from huggingface
+ /// Example: google/vit-base-patch16-224 + /// + /// + /// Task
+ /// Example: image-classification + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public HFModel( + string modelName, + string? task) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.HFModel), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.HFModel; + this.ModelName = modelName ?? throw new global::System.ArgumentNullException(nameof(modelName)); + this.Task = task; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public HFModel() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.HFWeights.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.HFWeights.Json.g.cs new file mode 100644 index 0000000..4183594 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.HFWeights.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class HFWeights + { + /// + /// 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::DeepInfra.HFWeights? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.HFWeights), + jsonSerializerContext) as global::DeepInfra.HFWeights; + } + + /// + /// 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::DeepInfra.HFWeights? 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::DeepInfra.HFWeights), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.HFWeights; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.HFWeights.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.HFWeights.g.cs index a8f9a36..2be4bba 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.HFWeights.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.HFWeights.g.cs @@ -33,91 +33,34 @@ public sealed partial class HFWeights [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - /// - /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// Initializes a new instance of the class. /// - 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::DeepInfra.HFWeights? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.HFWeights), - jsonSerializerContext) as global::DeepInfra.HFWeights; - } - - /// - /// 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::DeepInfra.HFWeights? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// huggingface repository i.e username/reponame + /// + /// + /// commit sha or branch name + /// + /// + /// huggingface access token with read access to the repo + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public HFWeights( + string repo, + string? revision, + string? token) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.HFWeights), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.HFWeights; + this.Repo = repo ?? throw new global::System.ArgumentNullException(nameof(repo)); + this.Revision = revision; + this.Token = token; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public HFWeights() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.HTTPValidationError.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.HTTPValidationError.Json.g.cs new file mode 100644 index 0000000..4b71afa --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.HTTPValidationError.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class HTTPValidationError + { + /// + /// 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::DeepInfra.HTTPValidationError? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.HTTPValidationError), + jsonSerializerContext) as global::DeepInfra.HTTPValidationError; + } + + /// + /// 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::DeepInfra.HTTPValidationError? 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::DeepInfra.HTTPValidationError), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.HTTPValidationError; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.HTTPValidationError.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.HTTPValidationError.g.cs index 239d18a..91a6b96 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.HTTPValidationError.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.HTTPValidationError.g.cs @@ -20,91 +20,22 @@ public sealed partial class HTTPValidationError [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// - public static global::DeepInfra.HTTPValidationError? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public HTTPValidationError( + global::System.Collections.Generic.IList? detail) { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.HTTPValidationError), - jsonSerializerContext) as global::DeepInfra.HTTPValidationError; + this.Detail = detail; } /// - /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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::DeepInfra.HTTPValidationError? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public HTTPValidationError() { - 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.HTTPValidationError), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.HTTPValidationError; - } - - /// - /// 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.ImageURL.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ImageURL.Json.g.cs new file mode 100644 index 0000000..f45dbd2 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ImageURL.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class ImageURL + { + /// + /// 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::DeepInfra.ImageURL? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.ImageURL), + jsonSerializerContext) as global::DeepInfra.ImageURL; + } + + /// + /// 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::DeepInfra.ImageURL? 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::DeepInfra.ImageURL), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ImageURL; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.ImageURL.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ImageURL.g.cs index f889f4b..7db69ea 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.ImageURL.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ImageURL.g.cs @@ -28,91 +28,27 @@ public sealed partial class ImageURL [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// -#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::DeepInfra.ImageURL? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.ImageURL), - jsonSerializerContext) as global::DeepInfra.ImageURL; - } - - /// - /// 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::DeepInfra.ImageURL? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// + /// Default Value: auto + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public ImageURL( + string url, + global::DeepInfra.ImageURLDetail? detail) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.ImageURL), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ImageURL; + this.Url = url ?? throw new global::System.ArgumentNullException(nameof(url)); + this.Detail = detail; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public ImageURL() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.InferenceDeployV1InferenceDeployDeployIdPostResponse.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.InferenceDeployV1InferenceDeployDeployIdPostResponse.Json.g.cs new file mode 100644 index 0000000..51c3252 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.InferenceDeployV1InferenceDeployDeployIdPostResponse.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class InferenceDeployV1InferenceDeployDeployIdPostResponse + { + /// + /// 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::DeepInfra.InferenceDeployV1InferenceDeployDeployIdPostResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.InferenceDeployV1InferenceDeployDeployIdPostResponse), + jsonSerializerContext) as global::DeepInfra.InferenceDeployV1InferenceDeployDeployIdPostResponse; + } + + /// + /// 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::DeepInfra.InferenceDeployV1InferenceDeployDeployIdPostResponse? 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::DeepInfra.InferenceDeployV1InferenceDeployDeployIdPostResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.InferenceDeployV1InferenceDeployDeployIdPostResponse; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.InferenceDeployV1InferenceDeployDeployIdPostResponse.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.InferenceDeployV1InferenceDeployDeployIdPostResponse.g.cs index 3f37d88..83eacc6 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.InferenceDeployV1InferenceDeployDeployIdPostResponse.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.InferenceDeployV1InferenceDeployDeployIdPostResponse.g.cs @@ -15,91 +15,13 @@ public sealed partial class InferenceDeployV1InferenceDeployDeployIdPostResponse [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// - public static global::DeepInfra.InferenceDeployV1InferenceDeployDeployIdPostResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public InferenceDeployV1InferenceDeployDeployIdPostResponse( + ) { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.InferenceDeployV1InferenceDeployDeployIdPostResponse), - jsonSerializerContext) as global::DeepInfra.InferenceDeployV1InferenceDeployDeployIdPostResponse; } - - /// - /// 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::DeepInfra.InferenceDeployV1InferenceDeployDeployIdPostResponse? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.InferenceDeployV1InferenceDeployDeployIdPostResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.InferenceDeployV1InferenceDeployDeployIdPostResponse; - } - - /// - /// 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.InferenceModelV1InferenceModelNamePostResponse.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.InferenceModelV1InferenceModelNamePostResponse.Json.g.cs new file mode 100644 index 0000000..8fd5e71 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.InferenceModelV1InferenceModelNamePostResponse.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class InferenceModelV1InferenceModelNamePostResponse + { + /// + /// 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::DeepInfra.InferenceModelV1InferenceModelNamePostResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.InferenceModelV1InferenceModelNamePostResponse), + jsonSerializerContext) as global::DeepInfra.InferenceModelV1InferenceModelNamePostResponse; + } + + /// + /// 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::DeepInfra.InferenceModelV1InferenceModelNamePostResponse? 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::DeepInfra.InferenceModelV1InferenceModelNamePostResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.InferenceModelV1InferenceModelNamePostResponse; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.InferenceModelV1InferenceModelNamePostResponse.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.InferenceModelV1InferenceModelNamePostResponse.g.cs index 51a9138..3154568 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.InferenceModelV1InferenceModelNamePostResponse.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.InferenceModelV1InferenceModelNamePostResponse.g.cs @@ -15,91 +15,13 @@ public sealed partial class InferenceModelV1InferenceModelNamePostResponse [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// - public static global::DeepInfra.InferenceModelV1InferenceModelNamePostResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public InferenceModelV1InferenceModelNamePostResponse( + ) { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.InferenceModelV1InferenceModelNamePostResponse), - jsonSerializerContext) as global::DeepInfra.InferenceModelV1InferenceModelNamePostResponse; } - - /// - /// 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::DeepInfra.InferenceModelV1InferenceModelNamePostResponse? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.InferenceModelV1InferenceModelNamePostResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.InferenceModelV1InferenceModelNamePostResponse; - } - - /// - /// 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.LLMDeploymentStatsOut.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.LLMDeploymentStatsOut.Json.g.cs new file mode 100644 index 0000000..5ef26d2 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.LLMDeploymentStatsOut.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class LLMDeploymentStatsOut + { + /// + /// 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::DeepInfra.LLMDeploymentStatsOut? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.LLMDeploymentStatsOut), + jsonSerializerContext) as global::DeepInfra.LLMDeploymentStatsOut; + } + + /// + /// 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::DeepInfra.LLMDeploymentStatsOut? 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::DeepInfra.LLMDeploymentStatsOut), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.LLMDeploymentStatsOut; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.LLMDeploymentStatsOut.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.LLMDeploymentStatsOut.g.cs index b372a6c..3d6458b 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.LLMDeploymentStatsOut.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.LLMDeploymentStatsOut.g.cs @@ -77,91 +77,64 @@ public sealed partial class LLMDeploymentStatsOut [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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::DeepInfra.LLMDeploymentStatsOut? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.LLMDeploymentStatsOut), - jsonSerializerContext) as global::DeepInfra.LLMDeploymentStatsOut; - } - /// - /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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::DeepInfra.LLMDeploymentStatsOut? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// number of inference requests in the provided interval + /// + /// + /// number of input tokens generated + /// + /// + /// number of output tokens generated + /// + /// + /// average millisecond time to first token + /// + /// + /// 95th percentile time to first token (estimated) + /// + /// + /// average millisecond time per token + /// + /// + /// 95th percentile time per token (estimated) + /// + /// + /// total number of cents spent + /// + /// + /// number of errors + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public LLMDeploymentStatsOut( + int requests, + int inputTokens, + int outputTokens, + double avgTtftMs, + double avg95TtftMs, + double avgTptMs, + double avg95TptMs, + int totalAmountCents, + int errors) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.LLMDeploymentStatsOut), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.LLMDeploymentStatsOut; + this.Requests = requests; + this.InputTokens = inputTokens; + this.OutputTokens = outputTokens; + this.AvgTtftMs = avgTtftMs; + this.Avg95TtftMs = avg95TtftMs; + this.AvgTptMs = avgTptMs; + this.Avg95TptMs = avg95TptMs; + this.TotalAmountCents = totalAmountCents; + this.Errors = errors; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public LLMDeploymentStatsOut() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.LogEntry.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.LogEntry.Json.g.cs new file mode 100644 index 0000000..2e970d9 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.LogEntry.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class LogEntry + { + /// + /// 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::DeepInfra.LogEntry? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.LogEntry), + jsonSerializerContext) as global::DeepInfra.LogEntry; + } + + /// + /// 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::DeepInfra.LogEntry? 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::DeepInfra.LogEntry), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.LogEntry; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.LogEntry.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.LogEntry.g.cs index e5d6cb8..647e71a 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.LogEntry.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.LogEntry.g.cs @@ -28,91 +28,25 @@ public sealed partial class LogEntry [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// - public static global::DeepInfra.LogEntry? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public LogEntry( + string ts, + string line) { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.LogEntry), - jsonSerializerContext) as global::DeepInfra.LogEntry; + this.Ts = ts ?? throw new global::System.ArgumentNullException(nameof(ts)); + this.Line = line ?? throw new global::System.ArgumentNullException(nameof(line)); } /// - /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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::DeepInfra.LogEntry? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public LogEntry() { - 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.LogEntry), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.LogEntry; - } - - /// - /// 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.LogQueryOut.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.LogQueryOut.Json.g.cs new file mode 100644 index 0000000..3d394ae --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.LogQueryOut.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class LogQueryOut + { + /// + /// 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::DeepInfra.LogQueryOut? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.LogQueryOut), + jsonSerializerContext) as global::DeepInfra.LogQueryOut; + } + + /// + /// 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::DeepInfra.LogQueryOut? 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::DeepInfra.LogQueryOut), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.LogQueryOut; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.LogQueryOut.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.LogQueryOut.g.cs index 38b7674..42d48d7 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.LogQueryOut.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.LogQueryOut.g.cs @@ -20,91 +20,24 @@ public sealed partial class LogQueryOut [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// -#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::DeepInfra.LogQueryOut? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.LogQueryOut), - jsonSerializerContext) as global::DeepInfra.LogQueryOut; - } - - /// - /// 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::DeepInfra.LogQueryOut? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// list of log lines ordered by increasing timestamp + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public LogQueryOut( + global::System.Collections.Generic.IList>? entries) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.LogQueryOut), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.LogQueryOut; + this.Entries = entries; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public LogQueryOut() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.LogQueryOutEntrieItem.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.LogQueryOutEntrieItem.Json.g.cs new file mode 100644 index 0000000..5915749 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.LogQueryOutEntrieItem.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class LogQueryOutEntrieItem + { + /// + /// 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::DeepInfra.LogQueryOutEntrieItem? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.LogQueryOutEntrieItem), + jsonSerializerContext) as global::DeepInfra.LogQueryOutEntrieItem; + } + + /// + /// 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::DeepInfra.LogQueryOutEntrieItem? 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::DeepInfra.LogQueryOutEntrieItem), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.LogQueryOutEntrieItem; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.LogQueryOutEntrieItem.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.LogQueryOutEntrieItem.g.cs index a89f68e..011ce62 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.LogQueryOutEntrieItem.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.LogQueryOutEntrieItem.g.cs @@ -15,91 +15,13 @@ public sealed partial class LogQueryOutEntrieItem [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// - public static global::DeepInfra.LogQueryOutEntrieItem? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public LogQueryOutEntrieItem( + ) { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.LogQueryOutEntrieItem), - jsonSerializerContext) as global::DeepInfra.LogQueryOutEntrieItem; } - - /// - /// 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::DeepInfra.LogQueryOutEntrieItem? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.LogQueryOutEntrieItem), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.LogQueryOutEntrieItem; - } - - /// - /// 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.Me.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.Me.Json.g.cs new file mode 100644 index 0000000..9c80fbd --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.Me.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class Me + { + /// + /// 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::DeepInfra.Me? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.Me), + jsonSerializerContext) as global::DeepInfra.Me; + } + + /// + /// 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::DeepInfra.Me? 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::DeepInfra.Me), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.Me; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.Me.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.Me.g.cs index 1dcd88c..d8d43b5 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.Me.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.Me.g.cs @@ -119,91 +119,83 @@ public sealed partial class Me [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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::DeepInfra.Me? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.Me), - jsonSerializerContext) as global::DeepInfra.Me; - } - - /// - /// 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::DeepInfra.Me? 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. + /// Initializes a new instance of the class. /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// + /// + /// + /// Name that is used to identifythe account on the website + /// + /// + /// Authentication provider, e.g. 'github' + /// + /// + /// + /// + /// Personal name + /// + /// + /// + /// Company name + /// + /// + /// Company website address + /// + /// + /// Default Value: false + /// + /// + /// Default Value: false + /// + /// + /// + /// + /// Default Value: false + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public Me( + string uid, + bool emailVerified, + string displayName, + string provider, + bool isAdmin, + string name, + bool isBusinessAccount, + string company, + string website, + string? email, + string? picture, + bool? isTeamAccount, + bool? isTeamOwner, + string? teamRole, + string? teamDisplayName, + bool? isTeamUpgradeEnabled) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.Me), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.Me; + this.Uid = uid ?? throw new global::System.ArgumentNullException(nameof(uid)); + this.EmailVerified = emailVerified; + this.DisplayName = displayName ?? throw new global::System.ArgumentNullException(nameof(displayName)); + this.Provider = provider ?? throw new global::System.ArgumentNullException(nameof(provider)); + this.IsAdmin = isAdmin; + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.IsBusinessAccount = isBusinessAccount; + this.Company = company ?? throw new global::System.ArgumentNullException(nameof(company)); + this.Website = website ?? throw new global::System.ArgumentNullException(nameof(website)); + this.Email = email; + this.Picture = picture; + this.IsTeamAccount = isTeamAccount; + this.IsTeamOwner = isTeamOwner; + this.TeamRole = teamRole; + this.TeamDisplayName = teamDisplayName; + this.IsTeamUpgradeEnabled = isTeamUpgradeEnabled; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public Me() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.MeIn.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.MeIn.Json.g.cs new file mode 100644 index 0000000..cabd72f --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.MeIn.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class MeIn + { + /// + /// 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::DeepInfra.MeIn? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.MeIn), + jsonSerializerContext) as global::DeepInfra.MeIn; + } + + /// + /// 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::DeepInfra.MeIn? 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::DeepInfra.MeIn), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.MeIn; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.MeIn.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.MeIn.g.cs index 697ab60..8ef5dba 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.MeIn.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.MeIn.g.cs @@ -50,91 +50,45 @@ public sealed partial class MeIn [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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::DeepInfra.MeIn? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.MeIn), - jsonSerializerContext) as global::DeepInfra.MeIn; - } - /// - /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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::DeepInfra.MeIn? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// Personal name + /// + /// + /// + /// + /// Company name + /// + /// + /// Company website address + /// + /// + /// String with length between 1 and 39 characters. Only alphanumeric characters and dashes allowed. Must contain no leading, trailing or consecutive dashes. + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public MeIn( + string? name, + string? email, + bool? isBusinessAccount, + string? company, + string? website, + string? displayName) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.MeIn), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.MeIn; + this.Name = name; + this.Email = email; + this.IsBusinessAccount = isBusinessAccount; + this.Company = company; + this.Website = website; + this.DisplayName = displayName; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public MeIn() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.MeUsername.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.MeUsername.Json.g.cs new file mode 100644 index 0000000..52e72f0 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.MeUsername.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class MeUsername + { + /// + /// 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::DeepInfra.MeUsername? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.MeUsername), + jsonSerializerContext) as global::DeepInfra.MeUsername; + } + + /// + /// 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::DeepInfra.MeUsername? 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::DeepInfra.MeUsername), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.MeUsername; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.MeUsername.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.MeUsername.g.cs index 9c7add9..712ea86 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.MeUsername.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.MeUsername.g.cs @@ -21,91 +21,24 @@ public sealed partial class MeUsername [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// -#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::DeepInfra.MeUsername? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.MeUsername), - jsonSerializerContext) as global::DeepInfra.MeUsername; - } - - /// - /// 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::DeepInfra.MeUsername? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// String with length between 1 and 39 characters. Only alphanumeric characters and dashes allowed. Must contain no leading, trailing or consecutive dashes. + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public MeUsername( + string username) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.MeUsername), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.MeUsername; + this.Username = username ?? throw new global::System.ArgumentNullException(nameof(username)); } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public MeUsername() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelDeleteModelsModelNameDeleteResponse.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelDeleteModelsModelNameDeleteResponse.Json.g.cs new file mode 100644 index 0000000..d7b780b --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelDeleteModelsModelNameDeleteResponse.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class ModelDeleteModelsModelNameDeleteResponse + { + /// + /// 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::DeepInfra.ModelDeleteModelsModelNameDeleteResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.ModelDeleteModelsModelNameDeleteResponse), + jsonSerializerContext) as global::DeepInfra.ModelDeleteModelsModelNameDeleteResponse; + } + + /// + /// 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::DeepInfra.ModelDeleteModelsModelNameDeleteResponse? 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::DeepInfra.ModelDeleteModelsModelNameDeleteResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ModelDeleteModelsModelNameDeleteResponse; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.ModelDeleteModelsModelNameDeleteResponse.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelDeleteModelsModelNameDeleteResponse.g.cs index 281498a..61946f7 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelDeleteModelsModelNameDeleteResponse.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelDeleteModelsModelNameDeleteResponse.g.cs @@ -15,91 +15,13 @@ public sealed partial class ModelDeleteModelsModelNameDeleteResponse [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// - public static global::DeepInfra.ModelDeleteModelsModelNameDeleteResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public ModelDeleteModelsModelNameDeleteResponse( + ) { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.ModelDeleteModelsModelNameDeleteResponse), - jsonSerializerContext) as global::DeepInfra.ModelDeleteModelsModelNameDeleteResponse; } - - /// - /// 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::DeepInfra.ModelDeleteModelsModelNameDeleteResponse? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.ModelDeleteModelsModelNameDeleteResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ModelDeleteModelsModelNameDeleteResponse; - } - - /// - /// 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelDocBlock.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelDocBlock.Json.g.cs new file mode 100644 index 0000000..e2a39d4 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelDocBlock.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class ModelDocBlock + { + /// + /// 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::DeepInfra.ModelDocBlock? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.ModelDocBlock), + jsonSerializerContext) as global::DeepInfra.ModelDocBlock; + } + + /// + /// 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::DeepInfra.ModelDocBlock? 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::DeepInfra.ModelDocBlock), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ModelDocBlock; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.ModelDocBlock.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelDocBlock.g.cs index b646577..408831a 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelDocBlock.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelDocBlock.g.cs @@ -29,91 +29,27 @@ public sealed partial class ModelDocBlock [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// -#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::DeepInfra.ModelDocBlock? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.ModelDocBlock), - jsonSerializerContext) as global::DeepInfra.ModelDocBlock; - } - - /// - /// 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::DeepInfra.ModelDocBlock? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// An enumeration. + /// + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public ModelDocBlock( + global::DeepInfra.ModelDocBlockKey key, + string url) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.ModelDocBlock), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ModelDocBlock; + this.Key = key; + this.Url = url ?? throw new global::System.ArgumentNullException(nameof(url)); } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public ModelDocBlock() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelFieldInfo.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelFieldInfo.Json.g.cs new file mode 100644 index 0000000..73b7183 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelFieldInfo.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class ModelFieldInfo + { + /// + /// 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::DeepInfra.ModelFieldInfo? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.ModelFieldInfo), + jsonSerializerContext) as global::DeepInfra.ModelFieldInfo; + } + + /// + /// 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::DeepInfra.ModelFieldInfo? 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::DeepInfra.ModelFieldInfo), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ModelFieldInfo; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.ModelFieldInfo.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelFieldInfo.g.cs index 59b9642..93be284 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelFieldInfo.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelFieldInfo.g.cs @@ -82,91 +82,52 @@ public sealed partial class ModelFieldInfo [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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::DeepInfra.ModelFieldInfo? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// Initializes a new instance of the class. + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public ModelFieldInfo( + string name, + string ftype, + string? parent, + string? description, + global::System.Collections.Generic.IList? allowed, + object? @default, + global::System.Collections.Generic.IList? examples, + double? minimum, + double? exclusiveMinimum, + double? maximum, + double? exclusiveMaximum) { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.ModelFieldInfo), - jsonSerializerContext) as global::DeepInfra.ModelFieldInfo; + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.Ftype = ftype ?? throw new global::System.ArgumentNullException(nameof(ftype)); + this.Parent = parent; + this.Description = description; + this.Allowed = allowed; + this.Default = @default; + this.Examples = examples; + this.Minimum = minimum; + this.ExclusiveMinimum = exclusiveMinimum; + this.Maximum = maximum; + this.ExclusiveMaximum = exclusiveMaximum; } /// - /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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::DeepInfra.ModelFieldInfo? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public ModelFieldInfo() { - 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.ModelFieldInfo), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ModelFieldInfo; - } - - /// - /// 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelFieldInfoAllowedItem.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelFieldInfoAllowedItem.Json.g.cs new file mode 100644 index 0000000..198f77c --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelFieldInfoAllowedItem.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class ModelFieldInfoAllowedItem + { + /// + /// 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::DeepInfra.ModelFieldInfoAllowedItem? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.ModelFieldInfoAllowedItem), + jsonSerializerContext) as global::DeepInfra.ModelFieldInfoAllowedItem; + } + + /// + /// 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::DeepInfra.ModelFieldInfoAllowedItem? 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::DeepInfra.ModelFieldInfoAllowedItem), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ModelFieldInfoAllowedItem; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.ModelFieldInfoAllowedItem.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelFieldInfoAllowedItem.g.cs index ed69da3..13cad65 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelFieldInfoAllowedItem.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelFieldInfoAllowedItem.g.cs @@ -15,91 +15,13 @@ public sealed partial class ModelFieldInfoAllowedItem [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// - public static global::DeepInfra.ModelFieldInfoAllowedItem? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public ModelFieldInfoAllowedItem( + ) { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.ModelFieldInfoAllowedItem), - jsonSerializerContext) as global::DeepInfra.ModelFieldInfoAllowedItem; } - - /// - /// 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::DeepInfra.ModelFieldInfoAllowedItem? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.ModelFieldInfoAllowedItem), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ModelFieldInfoAllowedItem; - } - - /// - /// 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelFieldInfoDefault.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelFieldInfoDefault.Json.g.cs new file mode 100644 index 0000000..d5a7e0f --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelFieldInfoDefault.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class ModelFieldInfoDefault + { + /// + /// 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::DeepInfra.ModelFieldInfoDefault? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.ModelFieldInfoDefault), + jsonSerializerContext) as global::DeepInfra.ModelFieldInfoDefault; + } + + /// + /// 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::DeepInfra.ModelFieldInfoDefault? 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::DeepInfra.ModelFieldInfoDefault), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ModelFieldInfoDefault; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.ModelFieldInfoDefault.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelFieldInfoDefault.g.cs index 4ae7da9..eea9144 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelFieldInfoDefault.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelFieldInfoDefault.g.cs @@ -15,91 +15,13 @@ public sealed partial class ModelFieldInfoDefault [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// - public static global::DeepInfra.ModelFieldInfoDefault? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public ModelFieldInfoDefault( + ) { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.ModelFieldInfoDefault), - jsonSerializerContext) as global::DeepInfra.ModelFieldInfoDefault; } - - /// - /// 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::DeepInfra.ModelFieldInfoDefault? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.ModelFieldInfoDefault), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ModelFieldInfoDefault; - } - - /// - /// 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelFieldInfoExample.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelFieldInfoExample.Json.g.cs new file mode 100644 index 0000000..c8d33ff --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelFieldInfoExample.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class ModelFieldInfoExample + { + /// + /// 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::DeepInfra.ModelFieldInfoExample? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.ModelFieldInfoExample), + jsonSerializerContext) as global::DeepInfra.ModelFieldInfoExample; + } + + /// + /// 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::DeepInfra.ModelFieldInfoExample? 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::DeepInfra.ModelFieldInfoExample), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ModelFieldInfoExample; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.ModelFieldInfoExample.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelFieldInfoExample.g.cs index bf38e0c..afc6249 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelFieldInfoExample.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelFieldInfoExample.g.cs @@ -15,91 +15,13 @@ public sealed partial class ModelFieldInfoExample [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// - public static global::DeepInfra.ModelFieldInfoExample? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public ModelFieldInfoExample( + ) { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.ModelFieldInfoExample), - jsonSerializerContext) as global::DeepInfra.ModelFieldInfoExample; } - - /// - /// 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::DeepInfra.ModelFieldInfoExample? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.ModelFieldInfoExample), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ModelFieldInfoExample; - } - - /// - /// 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelInfoOut.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelInfoOut.Json.g.cs new file mode 100644 index 0000000..7d2e76b --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelInfoOut.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class ModelInfoOut + { + /// + /// 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::DeepInfra.ModelInfoOut? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.ModelInfoOut), + jsonSerializerContext) as global::DeepInfra.ModelInfoOut; + } + + /// + /// 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::DeepInfra.ModelInfoOut? 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::DeepInfra.ModelInfoOut), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ModelInfoOut; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.ModelInfoOut.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelInfoOut.g.cs index 200f589..f866e8d 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelInfoOut.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelInfoOut.g.cs @@ -199,91 +199,105 @@ public sealed partial class ModelInfoOut [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// -#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::DeepInfra.ModelInfoOut? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.ModelInfoOut), - jsonSerializerContext) as global::DeepInfra.ModelInfoOut; - } - - /// - /// 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::DeepInfra.ModelInfoOut? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// + /// + /// + /// + /// + /// + /// + /// Default Value: false + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public ModelInfoOut( + string modelName, + string type, + global::System.Collections.Generic.IList tags, + string reportedType, + string version, + bool featured, + bool @public, + string curlInv, + string cmdlineInv, + string txtDocs, + string outExample, + string outDocs, + global::DeepInfra.AnyOf pricing, + global::System.Collections.Generic.IList schemas, + string? description, + bool? owner, + string? maskToken, + object? inSchema, + object? outSchema, + global::System.Collections.Generic.IList? inFields, + global::System.Collections.Generic.IList? docBlocks, + object? meta, + int? maxTokens, + string? replacedBy, + int? deprecated, + string? quantization, + double? mmlu, + global::System.DateTime? expected) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.ModelInfoOut), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ModelInfoOut; + this.ModelName = modelName ?? throw new global::System.ArgumentNullException(nameof(modelName)); + this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); + this.Tags = tags ?? throw new global::System.ArgumentNullException(nameof(tags)); + this.ReportedType = reportedType ?? throw new global::System.ArgumentNullException(nameof(reportedType)); + this.Version = version ?? throw new global::System.ArgumentNullException(nameof(version)); + this.Featured = featured; + this.Public = @public; + this.CurlInv = curlInv ?? throw new global::System.ArgumentNullException(nameof(curlInv)); + this.CmdlineInv = cmdlineInv ?? throw new global::System.ArgumentNullException(nameof(cmdlineInv)); + this.TxtDocs = txtDocs ?? throw new global::System.ArgumentNullException(nameof(txtDocs)); + this.OutExample = outExample ?? throw new global::System.ArgumentNullException(nameof(outExample)); + this.OutDocs = outDocs ?? throw new global::System.ArgumentNullException(nameof(outDocs)); + this.Pricing = pricing; + this.Schemas = schemas ?? throw new global::System.ArgumentNullException(nameof(schemas)); + this.Description = description; + this.Owner = owner; + this.MaskToken = maskToken; + this.InSchema = inSchema; + this.OutSchema = outSchema; + this.InFields = inFields; + this.DocBlocks = docBlocks; + this.Meta = meta; + this.MaxTokens = maxTokens; + this.ReplacedBy = replacedBy; + this.Deprecated = deprecated; + this.Quantization = quantization; + this.Mmlu = mmlu; + this.Expected = expected; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public ModelInfoOut() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelInfoOutInSchema.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelInfoOutInSchema.Json.g.cs new file mode 100644 index 0000000..18698a4 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelInfoOutInSchema.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class ModelInfoOutInSchema + { + /// + /// 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::DeepInfra.ModelInfoOutInSchema? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.ModelInfoOutInSchema), + jsonSerializerContext) as global::DeepInfra.ModelInfoOutInSchema; + } + + /// + /// 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::DeepInfra.ModelInfoOutInSchema? 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::DeepInfra.ModelInfoOutInSchema), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ModelInfoOutInSchema; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.ModelInfoOutInSchema.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelInfoOutInSchema.g.cs index 8051f53..bb00b00 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelInfoOutInSchema.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelInfoOutInSchema.g.cs @@ -15,91 +15,13 @@ public sealed partial class ModelInfoOutInSchema [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// - public static global::DeepInfra.ModelInfoOutInSchema? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public ModelInfoOutInSchema( + ) { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.ModelInfoOutInSchema), - jsonSerializerContext) as global::DeepInfra.ModelInfoOutInSchema; } - - /// - /// 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::DeepInfra.ModelInfoOutInSchema? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.ModelInfoOutInSchema), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ModelInfoOutInSchema; - } - - /// - /// 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelInfoOutMeta.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelInfoOutMeta.Json.g.cs new file mode 100644 index 0000000..ad928b9 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelInfoOutMeta.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class ModelInfoOutMeta + { + /// + /// 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::DeepInfra.ModelInfoOutMeta? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.ModelInfoOutMeta), + jsonSerializerContext) as global::DeepInfra.ModelInfoOutMeta; + } + + /// + /// 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::DeepInfra.ModelInfoOutMeta? 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::DeepInfra.ModelInfoOutMeta), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ModelInfoOutMeta; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.ModelInfoOutMeta.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelInfoOutMeta.g.cs index b377d17..dc584b9 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelInfoOutMeta.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelInfoOutMeta.g.cs @@ -15,91 +15,13 @@ public sealed partial class ModelInfoOutMeta [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// - public static global::DeepInfra.ModelInfoOutMeta? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public ModelInfoOutMeta( + ) { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.ModelInfoOutMeta), - jsonSerializerContext) as global::DeepInfra.ModelInfoOutMeta; } - - /// - /// 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::DeepInfra.ModelInfoOutMeta? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.ModelInfoOutMeta), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ModelInfoOutMeta; - } - - /// - /// 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelInfoOutOutSchema.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelInfoOutOutSchema.Json.g.cs new file mode 100644 index 0000000..497dede --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelInfoOutOutSchema.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class ModelInfoOutOutSchema + { + /// + /// 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::DeepInfra.ModelInfoOutOutSchema? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.ModelInfoOutOutSchema), + jsonSerializerContext) as global::DeepInfra.ModelInfoOutOutSchema; + } + + /// + /// 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::DeepInfra.ModelInfoOutOutSchema? 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::DeepInfra.ModelInfoOutOutSchema), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ModelInfoOutOutSchema; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.ModelInfoOutOutSchema.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelInfoOutOutSchema.g.cs index 213cf96..270a041 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelInfoOutOutSchema.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelInfoOutOutSchema.g.cs @@ -15,91 +15,13 @@ public sealed partial class ModelInfoOutOutSchema [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// - public static global::DeepInfra.ModelInfoOutOutSchema? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public ModelInfoOutOutSchema( + ) { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.ModelInfoOutOutSchema), - jsonSerializerContext) as global::DeepInfra.ModelInfoOutOutSchema; } - - /// - /// 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::DeepInfra.ModelInfoOutOutSchema? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.ModelInfoOutOutSchema), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ModelInfoOutOutSchema; - } - - /// - /// 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelMeta.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelMeta.Json.g.cs new file mode 100644 index 0000000..0160def --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelMeta.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class ModelMeta + { + /// + /// 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::DeepInfra.ModelMeta? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.ModelMeta), + jsonSerializerContext) as global::DeepInfra.ModelMeta; + } + + /// + /// 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::DeepInfra.ModelMeta? 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::DeepInfra.ModelMeta), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ModelMeta; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.ModelMeta.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelMeta.g.cs index c56c847..e0f5bab 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelMeta.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelMeta.g.cs @@ -41,91 +41,31 @@ public sealed partial class ModelMeta [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// - public static global::DeepInfra.ModelMeta? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// + /// + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public ModelMeta( + string provider, + string modelName, + string task, + string? planId) { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.ModelMeta), - jsonSerializerContext) as global::DeepInfra.ModelMeta; + this.Provider = provider ?? throw new global::System.ArgumentNullException(nameof(provider)); + this.ModelName = modelName ?? throw new global::System.ArgumentNullException(nameof(modelName)); + this.Task = task ?? throw new global::System.ArgumentNullException(nameof(task)); + this.PlanId = planId; } /// - /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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::DeepInfra.ModelMeta? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public ModelMeta() { - 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.ModelMeta), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ModelMeta; - } - - /// - /// 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelMetaIn.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelMetaIn.Json.g.cs new file mode 100644 index 0000000..11773b5 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelMetaIn.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class ModelMetaIn + { + /// + /// 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::DeepInfra.ModelMetaIn? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.ModelMetaIn), + jsonSerializerContext) as global::DeepInfra.ModelMetaIn; + } + + /// + /// 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::DeepInfra.ModelMetaIn? 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::DeepInfra.ModelMetaIn), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ModelMetaIn; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.ModelMetaIn.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelMetaIn.g.cs index 64ce3b8..7efbafa 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelMetaIn.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelMetaIn.g.cs @@ -57,91 +57,54 @@ public sealed partial class ModelMetaIn [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// -#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::DeepInfra.ModelMetaIn? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.ModelMetaIn), - jsonSerializerContext) as global::DeepInfra.ModelMetaIn; - } - - /// - /// 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::DeepInfra.ModelMetaIn? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// short model description in plain text + /// + /// + /// source code project link (empty to delete) + /// + /// + /// paper/research link (empty to delete) + /// + /// + /// usage license link (empty to delete) + /// + /// + /// markdown flavored model readme + /// + /// + /// dataurl or regular url to cover image (empty to delete) + /// + /// + /// model type + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public ModelMetaIn( + string? description, + string? githubUrl, + string? paperUrl, + string? licenseUrl, + string? readme, + string? coverImgUrl, + global::DeepInfra.HFTasksE? reportedType) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.ModelMetaIn), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ModelMetaIn; + this.Description = description; + this.GithubUrl = githubUrl; + this.PaperUrl = paperUrl; + this.LicenseUrl = licenseUrl; + this.Readme = readme; + this.CoverImgUrl = coverImgUrl; + this.ReportedType = reportedType; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public ModelMetaIn() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelMetaUpdateModelsModelNameMetaPostResponse.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelMetaUpdateModelsModelNameMetaPostResponse.Json.g.cs new file mode 100644 index 0000000..22d4504 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelMetaUpdateModelsModelNameMetaPostResponse.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class ModelMetaUpdateModelsModelNameMetaPostResponse + { + /// + /// 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::DeepInfra.ModelMetaUpdateModelsModelNameMetaPostResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.ModelMetaUpdateModelsModelNameMetaPostResponse), + jsonSerializerContext) as global::DeepInfra.ModelMetaUpdateModelsModelNameMetaPostResponse; + } + + /// + /// 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::DeepInfra.ModelMetaUpdateModelsModelNameMetaPostResponse? 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::DeepInfra.ModelMetaUpdateModelsModelNameMetaPostResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ModelMetaUpdateModelsModelNameMetaPostResponse; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.ModelMetaUpdateModelsModelNameMetaPostResponse.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelMetaUpdateModelsModelNameMetaPostResponse.g.cs index 718d134..6fd5e3e 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelMetaUpdateModelsModelNameMetaPostResponse.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelMetaUpdateModelsModelNameMetaPostResponse.g.cs @@ -15,91 +15,13 @@ public sealed partial class ModelMetaUpdateModelsModelNameMetaPostResponse [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// - public static global::DeepInfra.ModelMetaUpdateModelsModelNameMetaPostResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public ModelMetaUpdateModelsModelNameMetaPostResponse( + ) { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.ModelMetaUpdateModelsModelNameMetaPostResponse), - jsonSerializerContext) as global::DeepInfra.ModelMetaUpdateModelsModelNameMetaPostResponse; } - - /// - /// 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::DeepInfra.ModelMetaUpdateModelsModelNameMetaPostResponse? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.ModelMetaUpdateModelsModelNameMetaPostResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ModelMetaUpdateModelsModelNameMetaPostResponse; - } - - /// - /// 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelOut.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelOut.Json.g.cs new file mode 100644 index 0000000..c819a5b --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelOut.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class ModelOut + { + /// + /// 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::DeepInfra.ModelOut? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.ModelOut), + jsonSerializerContext) as global::DeepInfra.ModelOut; + } + + /// + /// 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::DeepInfra.ModelOut? 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::DeepInfra.ModelOut), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ModelOut; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.ModelOut.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelOut.g.cs index 7f05e05..f3aae89 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelOut.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelOut.g.cs @@ -14,6 +14,7 @@ public sealed partial class ModelOut /// Model Name
/// Example: microsoft/resnet-50 /// + /// microsoft/resnet-50 [global::System.Text.Json.Serialization.JsonPropertyName("model_name")] [global::System.Text.Json.Serialization.JsonRequired] public required string ModelName { get; set; } @@ -22,6 +23,7 @@ public sealed partial class ModelOut /// raw type of the model
/// Example: image-classification /// + /// image-classification [global::System.Text.Json.Serialization.JsonPropertyName("type")] [global::System.Text.Json.Serialization.JsonRequired] public required string Type { get; set; } @@ -30,6 +32,7 @@ public sealed partial class ModelOut /// reported type of the model
/// Example: text-generation /// + /// text-generation [global::System.Text.Json.Serialization.JsonPropertyName("reported_type")] [global::System.Text.Json.Serialization.JsonRequired] public required string ReportedType { get; set; } @@ -38,6 +41,7 @@ public sealed partial class ModelOut /// description of the model
/// Example: ResNet-50 is a convolutional neural network that is trained on more than a million images from the ImageNet database. It is a 50-layer deep neural network. /// + /// ResNet-50 is a convolutional neural network that is trained on more than a million images from the ImageNet database. It is a 50-layer deep neural network. [global::System.Text.Json.Serialization.JsonPropertyName("description")] public string? Description { get; set; } @@ -103,91 +107,78 @@ public sealed partial class ModelOut [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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::DeepInfra.ModelOut? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.ModelOut), - jsonSerializerContext) as global::DeepInfra.ModelOut; - } - - /// - /// 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::DeepInfra.ModelOut? 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. + /// Initializes a new instance of the class. /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// Model Name
+ /// Example: microsoft/resnet-50 + /// + /// + /// raw type of the model
+ /// Example: image-classification + /// + /// + /// reported type of the model
+ /// Example: text-generation + /// + /// + /// description of the model
+ /// Example: ResNet-50 is a convolutional neural network that is trained on more than a million images from the ImageNet database. It is a 50-layer deep neural network. + /// + /// + /// cover image link + /// + /// + /// list of tags + /// + /// + /// The pricing type and cost for this model + /// + /// + /// The maximum context size of this model, if applicable + /// + /// + /// + /// + /// + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public ModelOut( + string modelName, + string type, + string reportedType, + global::DeepInfra.AnyOf pricing, + string? description, + string? coverImgUrl, + global::System.Collections.Generic.IList? tags, + int? maxTokens, + string? replacedBy, + int? deprecated, + string? quantization, + double? mmlu, + global::System.DateTime? expected) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.ModelOut), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ModelOut; + this.ModelName = modelName ?? throw new global::System.ArgumentNullException(nameof(modelName)); + this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); + this.ReportedType = reportedType ?? throw new global::System.ArgumentNullException(nameof(reportedType)); + this.Pricing = pricing; + this.Description = description; + this.CoverImgUrl = coverImgUrl; + this.Tags = tags; + this.MaxTokens = maxTokens; + this.ReplacedBy = replacedBy; + this.Deprecated = deprecated; + this.Quantization = quantization; + this.Mmlu = mmlu; + this.Expected = expected; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public ModelOut() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelPricingImageUnits.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelPricingImageUnits.Json.g.cs new file mode 100644 index 0000000..ed9f86b --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelPricingImageUnits.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class ModelPricingImageUnits + { + /// + /// 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::DeepInfra.ModelPricingImageUnits? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.ModelPricingImageUnits), + jsonSerializerContext) as global::DeepInfra.ModelPricingImageUnits; + } + + /// + /// 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::DeepInfra.ModelPricingImageUnits? 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::DeepInfra.ModelPricingImageUnits), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ModelPricingImageUnits; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.ModelPricingImageUnits.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelPricingImageUnits.g.cs index 96bfda0..5b601c3 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelPricingImageUnits.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelPricingImageUnits.g.cs @@ -48,91 +48,36 @@ public sealed partial class ModelPricingImageUnits [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// -#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::DeepInfra.ModelPricingImageUnits? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.ModelPricingImageUnits), - jsonSerializerContext) as global::DeepInfra.ModelPricingImageUnits; - } - - /// - /// 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::DeepInfra.ModelPricingImageUnits? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// + /// + /// + /// + /// Default Value: image_units + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public ModelPricingImageUnits( + double centsPerImageUnit, + int defaultWidth, + int defaultHeight, + int defaultIterations, + string? type) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.ModelPricingImageUnits), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ModelPricingImageUnits; + this.CentsPerImageUnit = centsPerImageUnit; + this.DefaultWidth = defaultWidth; + this.DefaultHeight = defaultHeight; + this.DefaultIterations = defaultIterations; + this.Type = type; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public ModelPricingImageUnits() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelPricingInputCharacterLength.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelPricingInputCharacterLength.Json.g.cs new file mode 100644 index 0000000..8523ac2 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelPricingInputCharacterLength.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class ModelPricingInputCharacterLength + { + /// + /// 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::DeepInfra.ModelPricingInputCharacterLength? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.ModelPricingInputCharacterLength), + jsonSerializerContext) as global::DeepInfra.ModelPricingInputCharacterLength; + } + + /// + /// 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::DeepInfra.ModelPricingInputCharacterLength? 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::DeepInfra.ModelPricingInputCharacterLength), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ModelPricingInputCharacterLength; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.ModelPricingInputCharacterLength.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelPricingInputCharacterLength.g.cs index 5fa20b3..8c6b9d2 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelPricingInputCharacterLength.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelPricingInputCharacterLength.g.cs @@ -27,91 +27,27 @@ public sealed partial class ModelPricingInputCharacterLength [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// -#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::DeepInfra.ModelPricingInputCharacterLength? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.ModelPricingInputCharacterLength), - jsonSerializerContext) as global::DeepInfra.ModelPricingInputCharacterLength; - } - - /// - /// 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::DeepInfra.ModelPricingInputCharacterLength? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// + /// Default Value: input_character_length + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public ModelPricingInputCharacterLength( + double centsPerInputChars, + string? type) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.ModelPricingInputCharacterLength), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ModelPricingInputCharacterLength; + this.CentsPerInputChars = centsPerInputChars; + this.Type = type; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public ModelPricingInputCharacterLength() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelPricingInputLength.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelPricingInputLength.Json.g.cs new file mode 100644 index 0000000..3fdb5a4 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelPricingInputLength.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class ModelPricingInputLength + { + /// + /// 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::DeepInfra.ModelPricingInputLength? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.ModelPricingInputLength), + jsonSerializerContext) as global::DeepInfra.ModelPricingInputLength; + } + + /// + /// 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::DeepInfra.ModelPricingInputLength? 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::DeepInfra.ModelPricingInputLength), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ModelPricingInputLength; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.ModelPricingInputLength.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelPricingInputLength.g.cs index 638d835..b73b65b 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelPricingInputLength.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelPricingInputLength.g.cs @@ -27,91 +27,27 @@ public sealed partial class ModelPricingInputLength [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// -#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::DeepInfra.ModelPricingInputLength? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.ModelPricingInputLength), - jsonSerializerContext) as global::DeepInfra.ModelPricingInputLength; - } - - /// - /// 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::DeepInfra.ModelPricingInputLength? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// + /// Default Value: input_length + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public ModelPricingInputLength( + double centsPerInputSec, + string? type) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.ModelPricingInputLength), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ModelPricingInputLength; + this.CentsPerInputSec = centsPerInputSec; + this.Type = type; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public ModelPricingInputLength() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelPricingInputTokens.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelPricingInputTokens.Json.g.cs new file mode 100644 index 0000000..04fa446 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelPricingInputTokens.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class ModelPricingInputTokens + { + /// + /// 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::DeepInfra.ModelPricingInputTokens? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.ModelPricingInputTokens), + jsonSerializerContext) as global::DeepInfra.ModelPricingInputTokens; + } + + /// + /// 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::DeepInfra.ModelPricingInputTokens? 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::DeepInfra.ModelPricingInputTokens), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ModelPricingInputTokens; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.ModelPricingInputTokens.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelPricingInputTokens.g.cs index 4bc08fe..b3fa453 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelPricingInputTokens.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelPricingInputTokens.g.cs @@ -27,91 +27,27 @@ public sealed partial class ModelPricingInputTokens [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// -#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::DeepInfra.ModelPricingInputTokens? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.ModelPricingInputTokens), - jsonSerializerContext) as global::DeepInfra.ModelPricingInputTokens; - } - - /// - /// 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::DeepInfra.ModelPricingInputTokens? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// + /// Default Value: input_tokens + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public ModelPricingInputTokens( + double centsPerInputToken, + string? type) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.ModelPricingInputTokens), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ModelPricingInputTokens; + this.CentsPerInputToken = centsPerInputToken; + this.Type = type; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public ModelPricingInputTokens() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelPricingTime.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelPricingTime.Json.g.cs new file mode 100644 index 0000000..042aee2 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelPricingTime.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class ModelPricingTime + { + /// + /// 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::DeepInfra.ModelPricingTime? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.ModelPricingTime), + jsonSerializerContext) as global::DeepInfra.ModelPricingTime; + } + + /// + /// 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::DeepInfra.ModelPricingTime? 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::DeepInfra.ModelPricingTime), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ModelPricingTime; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.ModelPricingTime.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelPricingTime.g.cs index f94c08f..caea041 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelPricingTime.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelPricingTime.g.cs @@ -27,91 +27,27 @@ public sealed partial class ModelPricingTime [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// -#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::DeepInfra.ModelPricingTime? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.ModelPricingTime), - jsonSerializerContext) as global::DeepInfra.ModelPricingTime; - } - - /// - /// 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::DeepInfra.ModelPricingTime? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// + /// Default Value: time + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public ModelPricingTime( + double centsPerSec, + string? type) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.ModelPricingTime), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ModelPricingTime; + this.CentsPerSec = centsPerSec; + this.Type = type; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public ModelPricingTime() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelPricingTokens.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelPricingTokens.Json.g.cs new file mode 100644 index 0000000..af66522 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelPricingTokens.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class ModelPricingTokens + { + /// + /// 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::DeepInfra.ModelPricingTokens? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.ModelPricingTokens), + jsonSerializerContext) as global::DeepInfra.ModelPricingTokens; + } + + /// + /// 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::DeepInfra.ModelPricingTokens? 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::DeepInfra.ModelPricingTokens), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ModelPricingTokens; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.ModelPricingTokens.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelPricingTokens.g.cs index 3a3d0db..6d0c1d0 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelPricingTokens.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelPricingTokens.g.cs @@ -34,91 +34,30 @@ public sealed partial class ModelPricingTokens [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// -#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::DeepInfra.ModelPricingTokens? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.ModelPricingTokens), - jsonSerializerContext) as global::DeepInfra.ModelPricingTokens; - } - - /// - /// 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::DeepInfra.ModelPricingTokens? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// + /// + /// Default Value: tokens + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public ModelPricingTokens( + double centsPerInputToken, + double centsPerOutputToken, + string? type) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.ModelPricingTokens), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ModelPricingTokens; + this.CentsPerInputToken = centsPerInputToken; + this.CentsPerOutputToken = centsPerOutputToken; + this.Type = type; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public ModelPricingTokens() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelPricingUptime.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelPricingUptime.Json.g.cs new file mode 100644 index 0000000..f67150a --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelPricingUptime.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class ModelPricingUptime + { + /// + /// 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::DeepInfra.ModelPricingUptime? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.ModelPricingUptime), + jsonSerializerContext) as global::DeepInfra.ModelPricingUptime; + } + + /// + /// 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::DeepInfra.ModelPricingUptime? 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::DeepInfra.ModelPricingUptime), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ModelPricingUptime; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.ModelPricingUptime.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelPricingUptime.g.cs index e2d6544..2174b2b 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelPricingUptime.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelPricingUptime.g.cs @@ -27,91 +27,27 @@ public sealed partial class ModelPricingUptime [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// -#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::DeepInfra.ModelPricingUptime? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.ModelPricingUptime), - jsonSerializerContext) as global::DeepInfra.ModelPricingUptime; - } - - /// - /// 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::DeepInfra.ModelPricingUptime? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// + /// Default Value: uptime + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public ModelPricingUptime( + double centsPerSec, + string? type) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.ModelPricingUptime), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ModelPricingUptime; + this.CentsPerSec = centsPerSec; + this.Type = type; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public ModelPricingUptime() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelPublicityIn.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelPublicityIn.Json.g.cs new file mode 100644 index 0000000..20d615d --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelPublicityIn.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class ModelPublicityIn + { + /// + /// 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::DeepInfra.ModelPublicityIn? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.ModelPublicityIn), + jsonSerializerContext) as global::DeepInfra.ModelPublicityIn; + } + + /// + /// 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::DeepInfra.ModelPublicityIn? 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::DeepInfra.ModelPublicityIn), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ModelPublicityIn; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.ModelPublicityIn.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelPublicityIn.g.cs index 703b77f..985576f 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelPublicityIn.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelPublicityIn.g.cs @@ -21,91 +21,24 @@ public sealed partial class ModelPublicityIn [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// -#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::DeepInfra.ModelPublicityIn? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.ModelPublicityIn), - jsonSerializerContext) as global::DeepInfra.ModelPublicityIn; - } - - /// - /// 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::DeepInfra.ModelPublicityIn? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// whether to make the model public of private + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public ModelPublicityIn( + bool @public) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.ModelPublicityIn), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ModelPublicityIn; + this.Public = @public; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public ModelPublicityIn() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelPublicityModelsModelNamePublicityPostResponse.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelPublicityModelsModelNamePublicityPostResponse.Json.g.cs new file mode 100644 index 0000000..a82bee6 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelPublicityModelsModelNamePublicityPostResponse.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class ModelPublicityModelsModelNamePublicityPostResponse + { + /// + /// 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::DeepInfra.ModelPublicityModelsModelNamePublicityPostResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.ModelPublicityModelsModelNamePublicityPostResponse), + jsonSerializerContext) as global::DeepInfra.ModelPublicityModelsModelNamePublicityPostResponse; + } + + /// + /// 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::DeepInfra.ModelPublicityModelsModelNamePublicityPostResponse? 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::DeepInfra.ModelPublicityModelsModelNamePublicityPostResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ModelPublicityModelsModelNamePublicityPostResponse; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.ModelPublicityModelsModelNamePublicityPostResponse.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelPublicityModelsModelNamePublicityPostResponse.g.cs index 1f03f2e..449dc82 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelPublicityModelsModelNamePublicityPostResponse.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelPublicityModelsModelNamePublicityPostResponse.g.cs @@ -15,91 +15,13 @@ public sealed partial class ModelPublicityModelsModelNamePublicityPostResponse [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// - public static global::DeepInfra.ModelPublicityModelsModelNamePublicityPostResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public ModelPublicityModelsModelNamePublicityPostResponse( + ) { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.ModelPublicityModelsModelNamePublicityPostResponse), - jsonSerializerContext) as global::DeepInfra.ModelPublicityModelsModelNamePublicityPostResponse; } - - /// - /// 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::DeepInfra.ModelPublicityModelsModelNamePublicityPostResponse? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.ModelPublicityModelsModelNamePublicityPostResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ModelPublicityModelsModelNamePublicityPostResponse; - } - - /// - /// 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelVersionOut.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelVersionOut.Json.g.cs new file mode 100644 index 0000000..e4da2e2 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelVersionOut.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class ModelVersionOut + { + /// + /// 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::DeepInfra.ModelVersionOut? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.ModelVersionOut), + jsonSerializerContext) as global::DeepInfra.ModelVersionOut; + } + + /// + /// 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::DeepInfra.ModelVersionOut? 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::DeepInfra.ModelVersionOut), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ModelVersionOut; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.ModelVersionOut.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelVersionOut.g.cs index c8dfe57..cde2897 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelVersionOut.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ModelVersionOut.g.cs @@ -12,6 +12,7 @@ public sealed partial class ModelVersionOut /// Model Name
/// Example: microsoft/resnet-50 /// + /// microsoft/resnet-50 [global::System.Text.Json.Serialization.JsonPropertyName("model_name")] [global::System.Text.Json.Serialization.JsonRequired] public required string ModelName { get; set; } @@ -20,6 +21,7 @@ public sealed partial class ModelVersionOut /// Version identifier
/// Example: 06dbf5f73be4b5eca79e137e00c4825f467cd5b172c64b6c9255dc4b5a25a03a /// + /// 06dbf5f73be4b5eca79e137e00c4825f467cd5b172c64b6c9255dc4b5a25a03a [global::System.Text.Json.Serialization.JsonPropertyName("version")] [global::System.Text.Json.Serialization.JsonRequired] public required string Version { get; set; } @@ -37,91 +39,36 @@ public sealed partial class ModelVersionOut [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// - public static global::DeepInfra.ModelVersionOut? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.ModelVersionOut), - jsonSerializerContext) as global::DeepInfra.ModelVersionOut; - } - - /// - /// 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::DeepInfra.ModelVersionOut? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// Model Name
+ /// Example: microsoft/resnet-50 + /// + /// + /// Version identifier
+ /// Example: 06dbf5f73be4b5eca79e137e00c4825f467cd5b172c64b6c9255dc4b5a25a03a + /// + /// + /// Upload time + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public ModelVersionOut( + string modelName, + string version, + global::System.DateTime uploadedAt) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.ModelVersionOut), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ModelVersionOut; + this.ModelName = modelName ?? throw new global::System.ArgumentNullException(nameof(modelName)); + this.Version = version ?? throw new global::System.ArgumentNullException(nameof(version)); + this.UploadedAt = uploadedAt; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public ModelVersionOut() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenAIChatCompletionsIn.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenAIChatCompletionsIn.Json.g.cs new file mode 100644 index 0000000..299d7d2 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenAIChatCompletionsIn.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class OpenAIChatCompletionsIn + { + /// + /// 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::DeepInfra.OpenAIChatCompletionsIn? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.OpenAIChatCompletionsIn), + jsonSerializerContext) as global::DeepInfra.OpenAIChatCompletionsIn; + } + + /// + /// 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::DeepInfra.OpenAIChatCompletionsIn? 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::DeepInfra.OpenAIChatCompletionsIn), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.OpenAIChatCompletionsIn; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.OpenAIChatCompletionsIn.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenAIChatCompletionsIn.g.cs index b729677..8382237 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenAIChatCompletionsIn.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenAIChatCompletionsIn.g.cs @@ -14,6 +14,7 @@ public sealed partial class OpenAIChatCompletionsIn /// model name
/// Example: meta-llama/Llama-2-70b-chat-hf /// + /// meta-llama/Llama-2-70b-chat-hf [global::System.Text.Json.Serialization.JsonPropertyName("model")] [global::System.Text.Json.Serialization.JsonRequired] public required string Model { get; set; } @@ -138,91 +139,120 @@ public sealed partial class OpenAIChatCompletionsIn [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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::DeepInfra.OpenAIChatCompletionsIn? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.OpenAIChatCompletionsIn), - jsonSerializerContext) as global::DeepInfra.OpenAIChatCompletionsIn; - } - /// - /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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::DeepInfra.OpenAIChatCompletionsIn? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// model name
+ /// Example: meta-llama/Llama-2-70b-chat-hf + /// + /// + /// conversation messages: (user,assistant,tool)*,user including one system message anywhere + /// + /// + /// whether to stream the output via SSE or return the full response
+ /// Default Value: false + /// + /// + /// What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic
+ /// Default Value: 1 + /// + /// + /// An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.
+ /// Default Value: 1 + /// + /// + /// Float that represents the minimum probability for a token to be considered, relative to the probability of the most likely token. Must be in [0, 1]. Set to 0 to disable this.
+ /// Default Value: 0 + /// + /// + /// Sample from the best k (number of) tokens. 0 means off
+ /// Default Value: 0 + /// + /// + /// The maximum number of tokens to generate in the chat completion.
+ /// The total length of input tokens and generated tokens is limited by the model's context length. + /// + /// + /// up to 16 sequences where the API will stop generating further tokens + /// + /// + /// number of sequences to return
+ /// Default Value: 1 + /// + /// + /// Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.
+ /// Default Value: 0 + /// + /// + /// Positive values penalize new tokens based on how many times they appear in the text so far, increasing the model's likelihood to talk about new topics.
+ /// Default Value: 0 + /// + /// + /// A list of tools the model may call. Currently, only functions are supported as a tool. + /// + /// + /// Controls which (if any) function is called by the model. none means the model will not call a function and instead generates a message. auto means the model can pick between generating a message or calling a function. specifying a particular function choice is not supported currently.none is the default when no functions are present. auto is the default if functions are present. + /// + /// + /// The format of the response. Currently, only json is supported. + /// + /// + /// Alternative penalty for repetition, but multiplicative instead of additive (> 1 penalize, < 1 encourage)
+ /// Default Value: 1 + /// + /// + /// A unique identifier representing your end-user, which can help monitor and detect abuse. Avoid sending us any identifying information. We recommend hashing user identifiers. + /// + /// + /// Seed for random number generator. If not provided, a random seed is used. Determinism is not guaranteed. + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public OpenAIChatCompletionsIn( + string model, + global::System.Collections.Generic.IList> messages, + bool? stream, + double? temperature, + double? topP, + double? minP, + int? topK, + int? maxTokens, + global::DeepInfra.AnyOf>? stop, + int? n, + double? presencePenalty, + double? frequencyPenalty, + global::System.Collections.Generic.IList? tools, + string? toolChoice, + global::DeepInfra.ResponseFormat? responseFormat, + double? repetitionPenalty, + string? user, + int? seed) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.OpenAIChatCompletionsIn), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.OpenAIChatCompletionsIn; + this.Model = model ?? throw new global::System.ArgumentNullException(nameof(model)); + this.Messages = messages ?? throw new global::System.ArgumentNullException(nameof(messages)); + this.Stream = stream; + this.Temperature = temperature; + this.TopP = topP; + this.MinP = minP; + this.TopK = topK; + this.MaxTokens = maxTokens; + this.Stop = stop; + this.N = n; + this.PresencePenalty = presencePenalty; + this.FrequencyPenalty = frequencyPenalty; + this.Tools = tools; + this.ToolChoice = toolChoice; + this.ResponseFormat = responseFormat; + this.RepetitionPenalty = repetitionPenalty; + this.User = user; + this.Seed = seed; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public OpenAIChatCompletionsIn() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenAICompletionsIn.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenAICompletionsIn.Json.g.cs new file mode 100644 index 0000000..74a72bd --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenAICompletionsIn.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class OpenAICompletionsIn + { + /// + /// 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::DeepInfra.OpenAICompletionsIn? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.OpenAICompletionsIn), + jsonSerializerContext) as global::DeepInfra.OpenAICompletionsIn; + } + + /// + /// 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::DeepInfra.OpenAICompletionsIn? 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::DeepInfra.OpenAICompletionsIn), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.OpenAICompletionsIn; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.OpenAICompletionsIn.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenAICompletionsIn.g.cs index 4359771..3b7ee08 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenAICompletionsIn.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenAICompletionsIn.g.cs @@ -14,6 +14,7 @@ public sealed partial class OpenAICompletionsIn /// model name
/// Example: meta-llama/Llama-2-70b-chat-hf /// + /// meta-llama/Llama-2-70b-chat-hf [global::System.Text.Json.Serialization.JsonPropertyName("model")] [global::System.Text.Json.Serialization.JsonRequired] public required string Model { get; set; } @@ -139,91 +140,121 @@ public sealed partial class OpenAICompletionsIn [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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::DeepInfra.OpenAICompletionsIn? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.OpenAICompletionsIn), - jsonSerializerContext) as global::DeepInfra.OpenAICompletionsIn; - } - /// - /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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::DeepInfra.OpenAICompletionsIn? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// model name
+ /// Example: meta-llama/Llama-2-70b-chat-hf + /// + /// + /// input prompt - a single string is currently supported + /// + /// + /// The maximum number of tokens to generate in the completion.
+ /// The total length of input tokens and generated tokens is limited by the model's context length.If explicitly set to None it will be the model's max context length minus input length.
+ /// Default Value: 512 + /// + /// + /// What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic
+ /// Default Value: 1 + /// + /// + /// An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.
+ /// Default Value: 1 + /// + /// + /// Float that represents the minimum probability for a token to be considered, relative to the probability of the most likely token. Must be in [0, 1]. Set to 0 to disable this.
+ /// Default Value: 0 + /// + /// + /// Sample from the best k (number of) tokens. 0 means off
+ /// Default Value: 0 + /// + /// + /// number of sequences to return
+ /// Default Value: 1 + /// + /// + /// whether to stream the output via SSE or return the full response
+ /// Default Value: false + /// + /// + /// return top tokens and their log-probabilities + /// + /// + /// return prompt as part of the respons + /// + /// + /// up to 16 sequences where the API will stop generating further tokens + /// + /// + /// Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.
+ /// Default Value: 0 + /// + /// + /// Positive values penalize new tokens based on how many times they appear in the text so far, increasing the model's likelihood to talk about new topics.
+ /// Default Value: 0 + /// + /// + /// The format of the response. Currently, only json is supported. + /// + /// + /// Alternative penalty for repetition, but multiplicative instead of additive (> 1 penalize, < 1 encourage)
+ /// Default Value: 1 + /// + /// + /// A unique identifier representing your end-user, which can help monitor and detect abuse. Avoid sending us any identifying information. We recommend hashing user identifiers. + /// + /// + /// Seed for random number generator. If not provided, a random seed is used. Determinism is not guaranteed. + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public OpenAICompletionsIn( + string model, + string prompt, + int? maxTokens, + double? temperature, + double? topP, + double? minP, + int? topK, + int? n, + bool? stream, + int? logprobs, + bool? echo, + global::DeepInfra.AnyOf>? stop, + double? presencePenalty, + double? frequencyPenalty, + global::DeepInfra.ResponseFormat? responseFormat, + double? repetitionPenalty, + string? user, + int? seed) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.OpenAICompletionsIn), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.OpenAICompletionsIn; + this.Model = model ?? throw new global::System.ArgumentNullException(nameof(model)); + this.Prompt = prompt ?? throw new global::System.ArgumentNullException(nameof(prompt)); + this.MaxTokens = maxTokens; + this.Temperature = temperature; + this.TopP = topP; + this.MinP = minP; + this.TopK = topK; + this.N = n; + this.Stream = stream; + this.Logprobs = logprobs; + this.Echo = echo; + this.Stop = stop; + this.PresencePenalty = presencePenalty; + this.FrequencyPenalty = frequencyPenalty; + this.ResponseFormat = responseFormat; + this.RepetitionPenalty = repetitionPenalty; + this.User = user; + this.Seed = seed; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public OpenAICompletionsIn() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenAIEmbeddingsIn.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenAIEmbeddingsIn.Json.g.cs new file mode 100644 index 0000000..dd04938 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenAIEmbeddingsIn.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class OpenAIEmbeddingsIn + { + /// + /// 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::DeepInfra.OpenAIEmbeddingsIn? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.OpenAIEmbeddingsIn), + jsonSerializerContext) as global::DeepInfra.OpenAIEmbeddingsIn; + } + + /// + /// 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::DeepInfra.OpenAIEmbeddingsIn? 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::DeepInfra.OpenAIEmbeddingsIn), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.OpenAIEmbeddingsIn; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.OpenAIEmbeddingsIn.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenAIEmbeddingsIn.g.cs index e8e706b..824ab3e 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenAIEmbeddingsIn.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenAIEmbeddingsIn.g.cs @@ -14,6 +14,7 @@ public sealed partial class OpenAIEmbeddingsIn /// model name
/// Example: thenlper/gte-large /// + /// thenlper/gte-large [global::System.Text.Json.Serialization.JsonPropertyName("model")] [global::System.Text.Json.Serialization.JsonRequired] public required string Model { get; set; } @@ -22,6 +23,7 @@ public sealed partial class OpenAIEmbeddingsIn /// sequences to embed
/// Example: [I like chocolate] /// + /// [I like chocolate] [global::System.Text.Json.Serialization.JsonPropertyName("input")] [global::System.Text.Json.Serialization.JsonConverter(typeof(global::DeepInfra.JsonConverters.AnyOfJsonConverterFactory2))] [global::System.Text.Json.Serialization.JsonRequired] @@ -41,91 +43,37 @@ public sealed partial class OpenAIEmbeddingsIn [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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::DeepInfra.OpenAIEmbeddingsIn? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.OpenAIEmbeddingsIn), - jsonSerializerContext) as global::DeepInfra.OpenAIEmbeddingsIn; - } - - /// - /// 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::DeepInfra.OpenAIEmbeddingsIn? 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. + /// Initializes a new instance of the class. /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// model name
+ /// Example: thenlper/gte-large + /// + /// + /// sequences to embed
+ /// Example: [I like chocolate] + /// + /// + /// format used when encoding
+ /// Default Value: float + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public OpenAIEmbeddingsIn( + string model, + global::DeepInfra.AnyOf, string> input, + global::DeepInfra.OpenAIEmbeddingsInEncodingFormat? encodingFormat) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.OpenAIEmbeddingsIn), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.OpenAIEmbeddingsIn; + this.Model = model ?? throw new global::System.ArgumentNullException(nameof(model)); + this.Input = input; + this.EncodingFormat = encodingFormat; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public OpenAIEmbeddingsIn() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenAIModelOut.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenAIModelOut.Json.g.cs new file mode 100644 index 0000000..f0a528c --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenAIModelOut.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class OpenAIModelOut + { + /// + /// 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::DeepInfra.OpenAIModelOut? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.OpenAIModelOut), + jsonSerializerContext) as global::DeepInfra.OpenAIModelOut; + } + + /// + /// 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::DeepInfra.OpenAIModelOut? 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::DeepInfra.OpenAIModelOut), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.OpenAIModelOut; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.OpenAIModelOut.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenAIModelOut.g.cs index a9dbc31..f325e1d 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenAIModelOut.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenAIModelOut.g.cs @@ -54,91 +54,39 @@ public sealed partial class OpenAIModelOut [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// -#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::DeepInfra.OpenAIModelOut? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.OpenAIModelOut), - jsonSerializerContext) as global::DeepInfra.OpenAIModelOut; - } - - /// - /// 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::DeepInfra.OpenAIModelOut? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// + /// Default Value: model + /// + /// + /// + /// + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public OpenAIModelOut( + string id, + int created, + string ownedBy, + string root, + string? @object, + object? parent) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.OpenAIModelOut), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.OpenAIModelOut; + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.Created = created; + this.OwnedBy = ownedBy ?? throw new global::System.ArgumentNullException(nameof(ownedBy)); + this.Root = root ?? throw new global::System.ArgumentNullException(nameof(root)); + this.Object = @object; + this.Parent = parent; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public OpenAIModelOut() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenAIModelsOut.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenAIModelsOut.Json.g.cs new file mode 100644 index 0000000..d37376a --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenAIModelsOut.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class OpenAIModelsOut + { + /// + /// 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::DeepInfra.OpenAIModelsOut? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.OpenAIModelsOut), + jsonSerializerContext) as global::DeepInfra.OpenAIModelsOut; + } + + /// + /// 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::DeepInfra.OpenAIModelsOut? 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::DeepInfra.OpenAIModelsOut), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.OpenAIModelsOut; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.OpenAIModelsOut.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenAIModelsOut.g.cs index e80501f..f8a8c22 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenAIModelsOut.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenAIModelsOut.g.cs @@ -26,91 +26,27 @@ public sealed partial class OpenAIModelsOut [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// -#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::DeepInfra.OpenAIModelsOut? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.OpenAIModelsOut), - jsonSerializerContext) as global::DeepInfra.OpenAIModelsOut; - } - - /// - /// 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::DeepInfra.OpenAIModelsOut? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// Default Value: list + /// + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public OpenAIModelsOut( + string? @object, + global::System.Collections.Generic.IList? data) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.OpenAIModelsOut), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.OpenAIModelsOut; + this.Object = @object; + this.Data = data; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public OpenAIModelsOut() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenAITextToSpeechIn.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenAITextToSpeechIn.Json.g.cs new file mode 100644 index 0000000..f6cf55f --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenAITextToSpeechIn.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class OpenAITextToSpeechIn + { + /// + /// 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::DeepInfra.OpenAITextToSpeechIn? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.OpenAITextToSpeechIn), + jsonSerializerContext) as global::DeepInfra.OpenAITextToSpeechIn; + } + + /// + /// 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::DeepInfra.OpenAITextToSpeechIn? 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::DeepInfra.OpenAITextToSpeechIn), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.OpenAITextToSpeechIn; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.OpenAITextToSpeechIn.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenAITextToSpeechIn.g.cs index b894e64..21b62dd 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenAITextToSpeechIn.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenAITextToSpeechIn.g.cs @@ -12,6 +12,7 @@ public sealed partial class OpenAITextToSpeechIn /// model name
/// Example: deepinfra/tts /// + /// deepinfra/tts [global::System.Text.Json.Serialization.JsonPropertyName("model")] [global::System.Text.Json.Serialization.JsonRequired] public required string Model { get; set; } @@ -23,6 +24,12 @@ public sealed partial class OpenAITextToSpeechIn /// Now, who thinks their arms are long enough to slap box, slap box?
/// They said I rap like a robot, so call me Rap-bot /// + /// + /// I'm beginnin' to feel like a Rap God, Rap God
+ /// All my people from the front to the back nod, back nod
+ /// Now, who thinks their arms are long enough to slap box, slap box?
+ /// They said I rap like a robot, so call me Rap-bot + ///
[global::System.Text.Json.Serialization.JsonPropertyName("input")] [global::System.Text.Json.Serialization.JsonRequired] public required string Input { get; set; } @@ -54,91 +61,50 @@ public sealed partial class OpenAITextToSpeechIn [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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::DeepInfra.OpenAITextToSpeechIn? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.OpenAITextToSpeechIn), - jsonSerializerContext) as global::DeepInfra.OpenAITextToSpeechIn; - } - /// - /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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::DeepInfra.OpenAITextToSpeechIn? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// model name
+ /// Example: deepinfra/tts + /// + /// + /// Text to convert to speech
+ /// Example: I'm beginnin' to feel like a Rap God, Rap God
+ /// All my people from the front to the back nod, back nod
+ /// Now, who thinks their arms are long enough to slap box, slap box?
+ /// They said I rap like a robot, so call me Rap-bot + /// + /// + /// Preset voices to use for the speech. + /// + /// + /// response format for the speech + /// + /// + /// speed of the speech
+ /// Default Value: 1 + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public OpenAITextToSpeechIn( + string model, + string input, + global::DeepInfra.TtsVoice? voice, + global::DeepInfra.TtsResponseFormat? responseFormat, + double? speed) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.OpenAITextToSpeechIn), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.OpenAITextToSpeechIn; + this.Model = model ?? throw new global::System.ArgumentNullException(nameof(model)); + this.Input = input ?? throw new global::System.ArgumentNullException(nameof(input)); + this.Voice = voice; + this.ResponseFormat = responseFormat; + this.Speed = speed; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public OpenAITextToSpeechIn() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenaiAudioSpeechV1OpenaiAudioSpeechPostResponse.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenaiAudioSpeechV1OpenaiAudioSpeechPostResponse.Json.g.cs new file mode 100644 index 0000000..6a73f8a --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenaiAudioSpeechV1OpenaiAudioSpeechPostResponse.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class OpenaiAudioSpeechV1OpenaiAudioSpeechPostResponse + { + /// + /// 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::DeepInfra.OpenaiAudioSpeechV1OpenaiAudioSpeechPostResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.OpenaiAudioSpeechV1OpenaiAudioSpeechPostResponse), + jsonSerializerContext) as global::DeepInfra.OpenaiAudioSpeechV1OpenaiAudioSpeechPostResponse; + } + + /// + /// 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::DeepInfra.OpenaiAudioSpeechV1OpenaiAudioSpeechPostResponse? 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::DeepInfra.OpenaiAudioSpeechV1OpenaiAudioSpeechPostResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.OpenaiAudioSpeechV1OpenaiAudioSpeechPostResponse; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.OpenaiAudioSpeechV1OpenaiAudioSpeechPostResponse.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenaiAudioSpeechV1OpenaiAudioSpeechPostResponse.g.cs index ba51065..7c13798 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenaiAudioSpeechV1OpenaiAudioSpeechPostResponse.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenaiAudioSpeechV1OpenaiAudioSpeechPostResponse.g.cs @@ -15,91 +15,13 @@ public sealed partial class OpenaiAudioSpeechV1OpenaiAudioSpeechPostResponse [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// - public static global::DeepInfra.OpenaiAudioSpeechV1OpenaiAudioSpeechPostResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public OpenaiAudioSpeechV1OpenaiAudioSpeechPostResponse( + ) { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.OpenaiAudioSpeechV1OpenaiAudioSpeechPostResponse), - jsonSerializerContext) as global::DeepInfra.OpenaiAudioSpeechV1OpenaiAudioSpeechPostResponse; } - - /// - /// 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::DeepInfra.OpenaiAudioSpeechV1OpenaiAudioSpeechPostResponse? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.OpenaiAudioSpeechV1OpenaiAudioSpeechPostResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.OpenaiAudioSpeechV1OpenaiAudioSpeechPostResponse; - } - - /// - /// 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenaiChatCompletionsV1OpenaiChatCompletionsPostResponse.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenaiChatCompletionsV1OpenaiChatCompletionsPostResponse.Json.g.cs new file mode 100644 index 0000000..ff5df85 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenaiChatCompletionsV1OpenaiChatCompletionsPostResponse.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class OpenaiChatCompletionsV1OpenaiChatCompletionsPostResponse + { + /// + /// 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::DeepInfra.OpenaiChatCompletionsV1OpenaiChatCompletionsPostResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.OpenaiChatCompletionsV1OpenaiChatCompletionsPostResponse), + jsonSerializerContext) as global::DeepInfra.OpenaiChatCompletionsV1OpenaiChatCompletionsPostResponse; + } + + /// + /// 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::DeepInfra.OpenaiChatCompletionsV1OpenaiChatCompletionsPostResponse? 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::DeepInfra.OpenaiChatCompletionsV1OpenaiChatCompletionsPostResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.OpenaiChatCompletionsV1OpenaiChatCompletionsPostResponse; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.OpenaiChatCompletionsV1OpenaiChatCompletionsPostResponse.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenaiChatCompletionsV1OpenaiChatCompletionsPostResponse.g.cs index a398e19..b240fc6 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenaiChatCompletionsV1OpenaiChatCompletionsPostResponse.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenaiChatCompletionsV1OpenaiChatCompletionsPostResponse.g.cs @@ -15,91 +15,13 @@ public sealed partial class OpenaiChatCompletionsV1OpenaiChatCompletionsPostResp [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// - public static global::DeepInfra.OpenaiChatCompletionsV1OpenaiChatCompletionsPostResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public OpenaiChatCompletionsV1OpenaiChatCompletionsPostResponse( + ) { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.OpenaiChatCompletionsV1OpenaiChatCompletionsPostResponse), - jsonSerializerContext) as global::DeepInfra.OpenaiChatCompletionsV1OpenaiChatCompletionsPostResponse; } - - /// - /// 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::DeepInfra.OpenaiChatCompletionsV1OpenaiChatCompletionsPostResponse? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.OpenaiChatCompletionsV1OpenaiChatCompletionsPostResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.OpenaiChatCompletionsV1OpenaiChatCompletionsPostResponse; - } - - /// - /// 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenaiCompletionsV1OpenaiCompletionsPostResponse.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenaiCompletionsV1OpenaiCompletionsPostResponse.Json.g.cs new file mode 100644 index 0000000..b6f1f11 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenaiCompletionsV1OpenaiCompletionsPostResponse.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class OpenaiCompletionsV1OpenaiCompletionsPostResponse + { + /// + /// 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::DeepInfra.OpenaiCompletionsV1OpenaiCompletionsPostResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.OpenaiCompletionsV1OpenaiCompletionsPostResponse), + jsonSerializerContext) as global::DeepInfra.OpenaiCompletionsV1OpenaiCompletionsPostResponse; + } + + /// + /// 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::DeepInfra.OpenaiCompletionsV1OpenaiCompletionsPostResponse? 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::DeepInfra.OpenaiCompletionsV1OpenaiCompletionsPostResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.OpenaiCompletionsV1OpenaiCompletionsPostResponse; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.OpenaiCompletionsV1OpenaiCompletionsPostResponse.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenaiCompletionsV1OpenaiCompletionsPostResponse.g.cs index 4847a00..c3467a1 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenaiCompletionsV1OpenaiCompletionsPostResponse.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenaiCompletionsV1OpenaiCompletionsPostResponse.g.cs @@ -15,91 +15,13 @@ public sealed partial class OpenaiCompletionsV1OpenaiCompletionsPostResponse [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// - public static global::DeepInfra.OpenaiCompletionsV1OpenaiCompletionsPostResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public OpenaiCompletionsV1OpenaiCompletionsPostResponse( + ) { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.OpenaiCompletionsV1OpenaiCompletionsPostResponse), - jsonSerializerContext) as global::DeepInfra.OpenaiCompletionsV1OpenaiCompletionsPostResponse; } - - /// - /// 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::DeepInfra.OpenaiCompletionsV1OpenaiCompletionsPostResponse? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.OpenaiCompletionsV1OpenaiCompletionsPostResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.OpenaiCompletionsV1OpenaiCompletionsPostResponse; - } - - /// - /// 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenaiEmbeddingsV1OpenaiEmbeddingsPostResponse.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenaiEmbeddingsV1OpenaiEmbeddingsPostResponse.Json.g.cs new file mode 100644 index 0000000..4e2eb91 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenaiEmbeddingsV1OpenaiEmbeddingsPostResponse.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class OpenaiEmbeddingsV1OpenaiEmbeddingsPostResponse + { + /// + /// 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::DeepInfra.OpenaiEmbeddingsV1OpenaiEmbeddingsPostResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.OpenaiEmbeddingsV1OpenaiEmbeddingsPostResponse), + jsonSerializerContext) as global::DeepInfra.OpenaiEmbeddingsV1OpenaiEmbeddingsPostResponse; + } + + /// + /// 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::DeepInfra.OpenaiEmbeddingsV1OpenaiEmbeddingsPostResponse? 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::DeepInfra.OpenaiEmbeddingsV1OpenaiEmbeddingsPostResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.OpenaiEmbeddingsV1OpenaiEmbeddingsPostResponse; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.OpenaiEmbeddingsV1OpenaiEmbeddingsPostResponse.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenaiEmbeddingsV1OpenaiEmbeddingsPostResponse.g.cs index ec6eafd..f60ce5e 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenaiEmbeddingsV1OpenaiEmbeddingsPostResponse.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenaiEmbeddingsV1OpenaiEmbeddingsPostResponse.g.cs @@ -15,91 +15,13 @@ public sealed partial class OpenaiEmbeddingsV1OpenaiEmbeddingsPostResponse [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// - public static global::DeepInfra.OpenaiEmbeddingsV1OpenaiEmbeddingsPostResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public OpenaiEmbeddingsV1OpenaiEmbeddingsPostResponse( + ) { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.OpenaiEmbeddingsV1OpenaiEmbeddingsPostResponse), - jsonSerializerContext) as global::DeepInfra.OpenaiEmbeddingsV1OpenaiEmbeddingsPostResponse; } - - /// - /// 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::DeepInfra.OpenaiEmbeddingsV1OpenaiEmbeddingsPostResponse? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.OpenaiEmbeddingsV1OpenaiEmbeddingsPostResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.OpenaiEmbeddingsV1OpenaiEmbeddingsPostResponse; - } - - /// - /// 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenaiFilesV1OpenaiFilesPostResponse.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenaiFilesV1OpenaiFilesPostResponse.Json.g.cs new file mode 100644 index 0000000..90b5699 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenaiFilesV1OpenaiFilesPostResponse.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class OpenaiFilesV1OpenaiFilesPostResponse + { + /// + /// 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::DeepInfra.OpenaiFilesV1OpenaiFilesPostResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.OpenaiFilesV1OpenaiFilesPostResponse), + jsonSerializerContext) as global::DeepInfra.OpenaiFilesV1OpenaiFilesPostResponse; + } + + /// + /// 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::DeepInfra.OpenaiFilesV1OpenaiFilesPostResponse? 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::DeepInfra.OpenaiFilesV1OpenaiFilesPostResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.OpenaiFilesV1OpenaiFilesPostResponse; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.OpenaiFilesV1OpenaiFilesPostResponse.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenaiFilesV1OpenaiFilesPostResponse.g.cs index f2bae55..0ec16cf 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenaiFilesV1OpenaiFilesPostResponse.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.OpenaiFilesV1OpenaiFilesPostResponse.g.cs @@ -15,91 +15,13 @@ public sealed partial class OpenaiFilesV1OpenaiFilesPostResponse [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// - public static global::DeepInfra.OpenaiFilesV1OpenaiFilesPostResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public OpenaiFilesV1OpenaiFilesPostResponse( + ) { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.OpenaiFilesV1OpenaiFilesPostResponse), - jsonSerializerContext) as global::DeepInfra.OpenaiFilesV1OpenaiFilesPostResponse; } - - /// - /// 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::DeepInfra.OpenaiFilesV1OpenaiFilesPostResponse? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.OpenaiFilesV1OpenaiFilesPostResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.OpenaiFilesV1OpenaiFilesPostResponse; - } - - /// - /// 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.RateLimitOut.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.RateLimitOut.Json.g.cs new file mode 100644 index 0000000..5ac8e68 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.RateLimitOut.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class RateLimitOut + { + /// + /// 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::DeepInfra.RateLimitOut? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.RateLimitOut), + jsonSerializerContext) as global::DeepInfra.RateLimitOut; + } + + /// + /// 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::DeepInfra.RateLimitOut? 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::DeepInfra.RateLimitOut), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.RateLimitOut; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.RateLimitOut.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.RateLimitOut.g.cs index b228611..0111023 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.RateLimitOut.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.RateLimitOut.g.cs @@ -21,91 +21,24 @@ public sealed partial class RateLimitOut [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// -#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::DeepInfra.RateLimitOut? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.RateLimitOut), - jsonSerializerContext) as global::DeepInfra.RateLimitOut; - } - - /// - /// 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::DeepInfra.RateLimitOut? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// Per model rate limit + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public RateLimitOut( + int rateLimit) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.RateLimitOut), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.RateLimitOut; + this.RateLimit = rateLimit; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public RateLimitOut() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.RateLimitRequestIn.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.RateLimitRequestIn.Json.g.cs new file mode 100644 index 0000000..e55693f --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.RateLimitRequestIn.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class RateLimitRequestIn + { + /// + /// 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::DeepInfra.RateLimitRequestIn? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.RateLimitRequestIn), + jsonSerializerContext) as global::DeepInfra.RateLimitRequestIn; + } + + /// + /// 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::DeepInfra.RateLimitRequestIn? 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::DeepInfra.RateLimitRequestIn), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.RateLimitRequestIn; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.RateLimitRequestIn.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.RateLimitRequestIn.g.cs index 28658aa..5b068a1 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.RateLimitRequestIn.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.RateLimitRequestIn.g.cs @@ -28,91 +28,25 @@ public sealed partial class RateLimitRequestIn [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// - public static global::DeepInfra.RateLimitRequestIn? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public RateLimitRequestIn( + int rateLimit, + string reason) { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.RateLimitRequestIn), - jsonSerializerContext) as global::DeepInfra.RateLimitRequestIn; + this.RateLimit = rateLimit; + this.Reason = reason ?? throw new global::System.ArgumentNullException(nameof(reason)); } /// - /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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::DeepInfra.RateLimitRequestIn? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public RateLimitRequestIn() { - 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.RateLimitRequestIn), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.RateLimitRequestIn; - } - - /// - /// 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.RequestRateLimitIncreaseV1MeRateLimitRequestPostResponse.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.RequestRateLimitIncreaseV1MeRateLimitRequestPostResponse.Json.g.cs new file mode 100644 index 0000000..91e1ebb --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.RequestRateLimitIncreaseV1MeRateLimitRequestPostResponse.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class RequestRateLimitIncreaseV1MeRateLimitRequestPostResponse + { + /// + /// 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::DeepInfra.RequestRateLimitIncreaseV1MeRateLimitRequestPostResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.RequestRateLimitIncreaseV1MeRateLimitRequestPostResponse), + jsonSerializerContext) as global::DeepInfra.RequestRateLimitIncreaseV1MeRateLimitRequestPostResponse; + } + + /// + /// 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::DeepInfra.RequestRateLimitIncreaseV1MeRateLimitRequestPostResponse? 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::DeepInfra.RequestRateLimitIncreaseV1MeRateLimitRequestPostResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.RequestRateLimitIncreaseV1MeRateLimitRequestPostResponse; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.RequestRateLimitIncreaseV1MeRateLimitRequestPostResponse.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.RequestRateLimitIncreaseV1MeRateLimitRequestPostResponse.g.cs index 7f772c5..ee6857e 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.RequestRateLimitIncreaseV1MeRateLimitRequestPostResponse.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.RequestRateLimitIncreaseV1MeRateLimitRequestPostResponse.g.cs @@ -15,91 +15,13 @@ public sealed partial class RequestRateLimitIncreaseV1MeRateLimitRequestPostResp [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// - public static global::DeepInfra.RequestRateLimitIncreaseV1MeRateLimitRequestPostResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public RequestRateLimitIncreaseV1MeRateLimitRequestPostResponse( + ) { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.RequestRateLimitIncreaseV1MeRateLimitRequestPostResponse), - jsonSerializerContext) as global::DeepInfra.RequestRateLimitIncreaseV1MeRateLimitRequestPostResponse; } - - /// - /// 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::DeepInfra.RequestRateLimitIncreaseV1MeRateLimitRequestPostResponse? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.RequestRateLimitIncreaseV1MeRateLimitRequestPostResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.RequestRateLimitIncreaseV1MeRateLimitRequestPostResponse; - } - - /// - /// 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.ResponseFormat.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ResponseFormat.Json.g.cs new file mode 100644 index 0000000..1bcb2a6 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ResponseFormat.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class ResponseFormat + { + /// + /// 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::DeepInfra.ResponseFormat? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.ResponseFormat), + jsonSerializerContext) as global::DeepInfra.ResponseFormat; + } + + /// + /// 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::DeepInfra.ResponseFormat? 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::DeepInfra.ResponseFormat), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ResponseFormat; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.ResponseFormat.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ResponseFormat.g.cs index e542999..3f3abc3 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.ResponseFormat.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ResponseFormat.g.cs @@ -13,6 +13,7 @@ public sealed partial class ResponseFormat /// Default Value: text
/// Example: json_object /// + /// json_object [global::System.Text.Json.Serialization.JsonPropertyName("type")] [global::System.Text.Json.Serialization.JsonConverter(typeof(global::DeepInfra.JsonConverters.ResponseFormatTypeJsonConverter))] public global::DeepInfra.ResponseFormatType? Type { get; set; } @@ -23,91 +24,26 @@ public sealed partial class ResponseFormat [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - /// - /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// Initializes a new instance of the class. /// - 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::DeepInfra.ResponseFormat? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.ResponseFormat), - jsonSerializerContext) as global::DeepInfra.ResponseFormat; - } - - /// - /// 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::DeepInfra.ResponseFormat? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// Response type, such as JSON mode
+ /// Default Value: text
+ /// Example: json_object + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public ResponseFormat( + global::DeepInfra.ResponseFormatType? type) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.ResponseFormat), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ResponseFormat; + this.Type = type; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public ResponseFormat() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.ScaleSettings.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ScaleSettings.Json.g.cs new file mode 100644 index 0000000..52c126b --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ScaleSettings.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class ScaleSettings + { + /// + /// 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::DeepInfra.ScaleSettings? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.ScaleSettings), + jsonSerializerContext) as global::DeepInfra.ScaleSettings; + } + + /// + /// 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::DeepInfra.ScaleSettings? 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::DeepInfra.ScaleSettings), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ScaleSettings; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.ScaleSettings.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ScaleSettings.g.cs index 511ec6e..f0b5199 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.ScaleSettings.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ScaleSettings.g.cs @@ -28,91 +28,31 @@ public sealed partial class ScaleSettings [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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::DeepInfra.ScaleSettings? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.ScaleSettings), - jsonSerializerContext) as global::DeepInfra.ScaleSettings; - } - /// - /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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::DeepInfra.ScaleSettings? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// Minimum number of model instances to run
+ /// Default Value: 1 + /// + /// + /// Maximum number of model instances to run
+ /// Default Value: 1 + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public ScaleSettings( + int? minInstances, + int? maxInstances) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.ScaleSettings), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ScaleSettings; + this.MinInstances = minInstances; + this.MaxInstances = maxInstances; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public ScaleSettings() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.SchemaFieldOut.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.SchemaFieldOut.Json.g.cs new file mode 100644 index 0000000..cd9320e --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.SchemaFieldOut.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class SchemaFieldOut + { + /// + /// 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::DeepInfra.SchemaFieldOut? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.SchemaFieldOut), + jsonSerializerContext) as global::DeepInfra.SchemaFieldOut; + } + + /// + /// 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::DeepInfra.SchemaFieldOut? 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::DeepInfra.SchemaFieldOut), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.SchemaFieldOut; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.SchemaFieldOut.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.SchemaFieldOut.g.cs index bcc628b..67e856f 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.SchemaFieldOut.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.SchemaFieldOut.g.cs @@ -82,91 +82,52 @@ public sealed partial class SchemaFieldOut [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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::DeepInfra.SchemaFieldOut? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// Initializes a new instance of the class. + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public SchemaFieldOut( + string name, + string ftype, + string? parent, + string? description, + global::System.Collections.Generic.IList? allowed, + object? @default, + global::System.Collections.Generic.IList? examples, + double? minimum, + double? exclusiveMinimum, + double? maximum, + double? exclusiveMaximum) { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.SchemaFieldOut), - jsonSerializerContext) as global::DeepInfra.SchemaFieldOut; + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.Ftype = ftype ?? throw new global::System.ArgumentNullException(nameof(ftype)); + this.Parent = parent; + this.Description = description; + this.Allowed = allowed; + this.Default = @default; + this.Examples = examples; + this.Minimum = minimum; + this.ExclusiveMinimum = exclusiveMinimum; + this.Maximum = maximum; + this.ExclusiveMaximum = exclusiveMaximum; } /// - /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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::DeepInfra.SchemaFieldOut? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public SchemaFieldOut() { - 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.SchemaFieldOut), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.SchemaFieldOut; - } - - /// - /// 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.SchemaFieldOutAllowedItem.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.SchemaFieldOutAllowedItem.Json.g.cs new file mode 100644 index 0000000..db8db8a --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.SchemaFieldOutAllowedItem.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class SchemaFieldOutAllowedItem + { + /// + /// 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::DeepInfra.SchemaFieldOutAllowedItem? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.SchemaFieldOutAllowedItem), + jsonSerializerContext) as global::DeepInfra.SchemaFieldOutAllowedItem; + } + + /// + /// 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::DeepInfra.SchemaFieldOutAllowedItem? 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::DeepInfra.SchemaFieldOutAllowedItem), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.SchemaFieldOutAllowedItem; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.SchemaFieldOutAllowedItem.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.SchemaFieldOutAllowedItem.g.cs index 0db33c0..596e7e1 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.SchemaFieldOutAllowedItem.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.SchemaFieldOutAllowedItem.g.cs @@ -15,91 +15,13 @@ public sealed partial class SchemaFieldOutAllowedItem [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// - public static global::DeepInfra.SchemaFieldOutAllowedItem? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public SchemaFieldOutAllowedItem( + ) { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.SchemaFieldOutAllowedItem), - jsonSerializerContext) as global::DeepInfra.SchemaFieldOutAllowedItem; } - - /// - /// 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::DeepInfra.SchemaFieldOutAllowedItem? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.SchemaFieldOutAllowedItem), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.SchemaFieldOutAllowedItem; - } - - /// - /// 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.SchemaFieldOutDefault.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.SchemaFieldOutDefault.Json.g.cs new file mode 100644 index 0000000..5e38284 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.SchemaFieldOutDefault.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class SchemaFieldOutDefault + { + /// + /// 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::DeepInfra.SchemaFieldOutDefault? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.SchemaFieldOutDefault), + jsonSerializerContext) as global::DeepInfra.SchemaFieldOutDefault; + } + + /// + /// 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::DeepInfra.SchemaFieldOutDefault? 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::DeepInfra.SchemaFieldOutDefault), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.SchemaFieldOutDefault; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.SchemaFieldOutDefault.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.SchemaFieldOutDefault.g.cs index 32c4763..b9bb4e8 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.SchemaFieldOutDefault.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.SchemaFieldOutDefault.g.cs @@ -15,91 +15,13 @@ public sealed partial class SchemaFieldOutDefault [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// - public static global::DeepInfra.SchemaFieldOutDefault? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public SchemaFieldOutDefault( + ) { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.SchemaFieldOutDefault), - jsonSerializerContext) as global::DeepInfra.SchemaFieldOutDefault; } - - /// - /// 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::DeepInfra.SchemaFieldOutDefault? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.SchemaFieldOutDefault), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.SchemaFieldOutDefault; - } - - /// - /// 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.SchemaFieldOutExample.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.SchemaFieldOutExample.Json.g.cs new file mode 100644 index 0000000..e681b1c --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.SchemaFieldOutExample.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class SchemaFieldOutExample + { + /// + /// 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::DeepInfra.SchemaFieldOutExample? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.SchemaFieldOutExample), + jsonSerializerContext) as global::DeepInfra.SchemaFieldOutExample; + } + + /// + /// 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::DeepInfra.SchemaFieldOutExample? 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::DeepInfra.SchemaFieldOutExample), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.SchemaFieldOutExample; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.SchemaFieldOutExample.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.SchemaFieldOutExample.g.cs index c57a8b6..7cfe91e 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.SchemaFieldOutExample.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.SchemaFieldOutExample.g.cs @@ -15,91 +15,13 @@ public sealed partial class SchemaFieldOutExample [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// - public static global::DeepInfra.SchemaFieldOutExample? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public SchemaFieldOutExample( + ) { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.SchemaFieldOutExample), - jsonSerializerContext) as global::DeepInfra.SchemaFieldOutExample; } - - /// - /// 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::DeepInfra.SchemaFieldOutExample? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.SchemaFieldOutExample), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.SchemaFieldOutExample; - } - - /// - /// 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.SchemaOut.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.SchemaOut.Json.g.cs new file mode 100644 index 0000000..87a82b2 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.SchemaOut.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class SchemaOut + { + /// + /// 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::DeepInfra.SchemaOut? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.SchemaOut), + jsonSerializerContext) as global::DeepInfra.SchemaOut; + } + + /// + /// 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::DeepInfra.SchemaOut? 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::DeepInfra.SchemaOut), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.SchemaOut; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.SchemaOut.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.SchemaOut.g.cs index 1c34cf7..1ac6449 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.SchemaOut.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.SchemaOut.g.cs @@ -46,91 +46,34 @@ public sealed partial class SchemaOut [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// - public static global::DeepInfra.SchemaOut? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// + /// + /// + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public SchemaOut( + global::DeepInfra.SchemaVariant variant, + global::System.Collections.Generic.IList fieldsIn, + object? schemaIn, + object? schemaOut1, + object? schemaStream) { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.SchemaOut), - jsonSerializerContext) as global::DeepInfra.SchemaOut; + this.Variant = variant ?? throw new global::System.ArgumentNullException(nameof(variant)); + this.FieldsIn = fieldsIn ?? throw new global::System.ArgumentNullException(nameof(fieldsIn)); + this.SchemaIn = schemaIn; + this.SchemaOut1 = schemaOut1; + this.SchemaStream = schemaStream; } /// - /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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::DeepInfra.SchemaOut? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public SchemaOut() { - 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.SchemaOut), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.SchemaOut; - } - - /// - /// 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.SchemaOutSchemaIn.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.SchemaOutSchemaIn.Json.g.cs new file mode 100644 index 0000000..4e0b2f2 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.SchemaOutSchemaIn.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class SchemaOutSchemaIn + { + /// + /// 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::DeepInfra.SchemaOutSchemaIn? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.SchemaOutSchemaIn), + jsonSerializerContext) as global::DeepInfra.SchemaOutSchemaIn; + } + + /// + /// 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::DeepInfra.SchemaOutSchemaIn? 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::DeepInfra.SchemaOutSchemaIn), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.SchemaOutSchemaIn; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.SchemaOutSchemaIn.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.SchemaOutSchemaIn.g.cs index bb35f75..7c51cd1 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.SchemaOutSchemaIn.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.SchemaOutSchemaIn.g.cs @@ -15,91 +15,13 @@ public sealed partial class SchemaOutSchemaIn [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// - public static global::DeepInfra.SchemaOutSchemaIn? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public SchemaOutSchemaIn( + ) { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.SchemaOutSchemaIn), - jsonSerializerContext) as global::DeepInfra.SchemaOutSchemaIn; } - - /// - /// 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::DeepInfra.SchemaOutSchemaIn? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.SchemaOutSchemaIn), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.SchemaOutSchemaIn; - } - - /// - /// 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.SchemaOutSchemaOut1.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.SchemaOutSchemaOut1.Json.g.cs new file mode 100644 index 0000000..c806746 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.SchemaOutSchemaOut1.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class SchemaOutSchemaOut1 + { + /// + /// 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::DeepInfra.SchemaOutSchemaOut1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.SchemaOutSchemaOut1), + jsonSerializerContext) as global::DeepInfra.SchemaOutSchemaOut1; + } + + /// + /// 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::DeepInfra.SchemaOutSchemaOut1? 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::DeepInfra.SchemaOutSchemaOut1), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.SchemaOutSchemaOut1; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.SchemaOutSchemaOut1.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.SchemaOutSchemaOut1.g.cs index 0ce90d3..fc8934f 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.SchemaOutSchemaOut1.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.SchemaOutSchemaOut1.g.cs @@ -15,91 +15,13 @@ public sealed partial class SchemaOutSchemaOut1 [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// - public static global::DeepInfra.SchemaOutSchemaOut1? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public SchemaOutSchemaOut1( + ) { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.SchemaOutSchemaOut1), - jsonSerializerContext) as global::DeepInfra.SchemaOutSchemaOut1; } - - /// - /// 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::DeepInfra.SchemaOutSchemaOut1? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.SchemaOutSchemaOut1), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.SchemaOutSchemaOut1; - } - - /// - /// 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.SchemaOutSchemaStream.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.SchemaOutSchemaStream.Json.g.cs new file mode 100644 index 0000000..a62758b --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.SchemaOutSchemaStream.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class SchemaOutSchemaStream + { + /// + /// 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::DeepInfra.SchemaOutSchemaStream? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.SchemaOutSchemaStream), + jsonSerializerContext) as global::DeepInfra.SchemaOutSchemaStream; + } + + /// + /// 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::DeepInfra.SchemaOutSchemaStream? 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::DeepInfra.SchemaOutSchemaStream), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.SchemaOutSchemaStream; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.SchemaOutSchemaStream.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.SchemaOutSchemaStream.g.cs index 8957c9c..dcb45ee 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.SchemaOutSchemaStream.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.SchemaOutSchemaStream.g.cs @@ -15,91 +15,13 @@ public sealed partial class SchemaOutSchemaStream [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// - public static global::DeepInfra.SchemaOutSchemaStream? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public SchemaOutSchemaStream( + ) { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.SchemaOutSchemaStream), - jsonSerializerContext) as global::DeepInfra.SchemaOutSchemaStream; } - - /// - /// 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::DeepInfra.SchemaOutSchemaStream? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.SchemaOutSchemaStream), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.SchemaOutSchemaStream; - } - - /// - /// 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.SchemaVariant.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.SchemaVariant.Json.g.cs new file mode 100644 index 0000000..c8087da --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.SchemaVariant.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class SchemaVariant + { + /// + /// 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::DeepInfra.SchemaVariant? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.SchemaVariant), + jsonSerializerContext) as global::DeepInfra.SchemaVariant; + } + + /// + /// 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::DeepInfra.SchemaVariant? 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::DeepInfra.SchemaVariant), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.SchemaVariant; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.SchemaVariant.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.SchemaVariant.g.cs index e6b2f3e..951bbc1 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.SchemaVariant.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.SchemaVariant.g.cs @@ -29,91 +29,27 @@ public sealed partial class SchemaVariant [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// -#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::DeepInfra.SchemaVariant? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.SchemaVariant), - jsonSerializerContext) as global::DeepInfra.SchemaVariant; - } - - /// - /// 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::DeepInfra.SchemaVariant? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// An enumeration. + /// + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public SchemaVariant( + global::DeepInfra.SchemaVariantKey key, + string url) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.SchemaVariant), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.SchemaVariant; + this.Key = key; + this.Url = url ?? throw new global::System.ArgumentNullException(nameof(url)); } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public SchemaVariant() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.SubmitFeedbackV1FeedbackPostResponse.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.SubmitFeedbackV1FeedbackPostResponse.Json.g.cs new file mode 100644 index 0000000..fb52d52 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.SubmitFeedbackV1FeedbackPostResponse.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class SubmitFeedbackV1FeedbackPostResponse + { + /// + /// 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::DeepInfra.SubmitFeedbackV1FeedbackPostResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.SubmitFeedbackV1FeedbackPostResponse), + jsonSerializerContext) as global::DeepInfra.SubmitFeedbackV1FeedbackPostResponse; + } + + /// + /// 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::DeepInfra.SubmitFeedbackV1FeedbackPostResponse? 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::DeepInfra.SubmitFeedbackV1FeedbackPostResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.SubmitFeedbackV1FeedbackPostResponse; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.SubmitFeedbackV1FeedbackPostResponse.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.SubmitFeedbackV1FeedbackPostResponse.g.cs index 0fdc928..e6aa36d 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.SubmitFeedbackV1FeedbackPostResponse.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.SubmitFeedbackV1FeedbackPostResponse.g.cs @@ -15,91 +15,13 @@ public sealed partial class SubmitFeedbackV1FeedbackPostResponse [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// - public static global::DeepInfra.SubmitFeedbackV1FeedbackPostResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public SubmitFeedbackV1FeedbackPostResponse( + ) { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.SubmitFeedbackV1FeedbackPostResponse), - jsonSerializerContext) as global::DeepInfra.SubmitFeedbackV1FeedbackPostResponse; } - - /// - /// 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::DeepInfra.SubmitFeedbackV1FeedbackPostResponse? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.SubmitFeedbackV1FeedbackPostResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.SubmitFeedbackV1FeedbackPostResponse; - } - - /// - /// 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.TextToSpeechV1TextToSpeechVoiceIdPostResponse.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.TextToSpeechV1TextToSpeechVoiceIdPostResponse.Json.g.cs new file mode 100644 index 0000000..2809f9f --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.TextToSpeechV1TextToSpeechVoiceIdPostResponse.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class TextToSpeechV1TextToSpeechVoiceIdPostResponse + { + /// + /// 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::DeepInfra.TextToSpeechV1TextToSpeechVoiceIdPostResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.TextToSpeechV1TextToSpeechVoiceIdPostResponse), + jsonSerializerContext) as global::DeepInfra.TextToSpeechV1TextToSpeechVoiceIdPostResponse; + } + + /// + /// 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::DeepInfra.TextToSpeechV1TextToSpeechVoiceIdPostResponse? 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::DeepInfra.TextToSpeechV1TextToSpeechVoiceIdPostResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.TextToSpeechV1TextToSpeechVoiceIdPostResponse; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.TextToSpeechV1TextToSpeechVoiceIdPostResponse.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.TextToSpeechV1TextToSpeechVoiceIdPostResponse.g.cs index a6bcc4c..bc6d681 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.TextToSpeechV1TextToSpeechVoiceIdPostResponse.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.TextToSpeechV1TextToSpeechVoiceIdPostResponse.g.cs @@ -15,91 +15,13 @@ public sealed partial class TextToSpeechV1TextToSpeechVoiceIdPostResponse [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// - public static global::DeepInfra.TextToSpeechV1TextToSpeechVoiceIdPostResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public TextToSpeechV1TextToSpeechVoiceIdPostResponse( + ) { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.TextToSpeechV1TextToSpeechVoiceIdPostResponse), - jsonSerializerContext) as global::DeepInfra.TextToSpeechV1TextToSpeechVoiceIdPostResponse; } - - /// - /// 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::DeepInfra.TextToSpeechV1TextToSpeechVoiceIdPostResponse? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.TextToSpeechV1TextToSpeechVoiceIdPostResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.TextToSpeechV1TextToSpeechVoiceIdPostResponse; - } - - /// - /// 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.TimeDeploymentStatsOut.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.TimeDeploymentStatsOut.Json.g.cs new file mode 100644 index 0000000..90ee30f --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.TimeDeploymentStatsOut.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class TimeDeploymentStatsOut + { + /// + /// 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::DeepInfra.TimeDeploymentStatsOut? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.TimeDeploymentStatsOut), + jsonSerializerContext) as global::DeepInfra.TimeDeploymentStatsOut; + } + + /// + /// 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::DeepInfra.TimeDeploymentStatsOut? 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::DeepInfra.TimeDeploymentStatsOut), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.TimeDeploymentStatsOut; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.TimeDeploymentStatsOut.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.TimeDeploymentStatsOut.g.cs index ad4c0e2..c47ee79 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.TimeDeploymentStatsOut.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.TimeDeploymentStatsOut.g.cs @@ -56,91 +56,49 @@ public sealed partial class TimeDeploymentStatsOut [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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::DeepInfra.TimeDeploymentStatsOut? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.TimeDeploymentStatsOut), - jsonSerializerContext) as global::DeepInfra.TimeDeploymentStatsOut; - } - - /// - /// 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::DeepInfra.TimeDeploymentStatsOut? 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. + /// Initializes a new instance of the class. /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// number of inference requests in the provided interval + /// + /// + /// total number of seconds spend in inference + /// + /// + /// total number of cents spent + /// + /// + /// average millisecond inference time + /// + /// + /// 95th percentile inference time (estimated) + /// + /// + /// number of errors + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public TimeDeploymentStatsOut( + int requests, + int totalTimeS, + int totalAmountCents, + double avgTimeMs, + double avg95TimeMs, + int errors) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.TimeDeploymentStatsOut), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.TimeDeploymentStatsOut; + this.Requests = requests; + this.TotalTimeS = totalTimeS; + this.TotalAmountCents = totalAmountCents; + this.AvgTimeMs = avgTimeMs; + this.Avg95TimeMs = avg95TimeMs; + this.Errors = errors; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public TimeDeploymentStatsOut() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.TimeInterval.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.TimeInterval.Json.g.cs new file mode 100644 index 0000000..df86637 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.TimeInterval.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class TimeInterval + { + /// + /// 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::DeepInfra.TimeInterval? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.TimeInterval), + jsonSerializerContext) as global::DeepInfra.TimeInterval; + } + + /// + /// 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::DeepInfra.TimeInterval? 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::DeepInfra.TimeInterval), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.TimeInterval; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.TimeInterval.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.TimeInterval.g.cs index c2cea19..80edc93 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.TimeInterval.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.TimeInterval.g.cs @@ -26,91 +26,29 @@ public sealed partial class TimeInterval [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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::DeepInfra.TimeInterval? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.TimeInterval), - jsonSerializerContext) as global::DeepInfra.TimeInterval; - } - - /// - /// 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::DeepInfra.TimeInterval? 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. + /// Initializes a new instance of the class. /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// Default Value: 0 + /// + /// + /// Default Value: 4000000000000L + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public TimeInterval( + int? fr, + long? to) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.TimeInterval), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.TimeInterval; + this.Fr = fr; + this.To = to; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public TimeInterval() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.UsageItem.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.UsageItem.Json.g.cs new file mode 100644 index 0000000..7ac4034 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.UsageItem.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class UsageItem + { + /// + /// 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::DeepInfra.UsageItem? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.UsageItem), + jsonSerializerContext) as global::DeepInfra.UsageItem; + } + + /// + /// 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::DeepInfra.UsageItem? 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::DeepInfra.UsageItem), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.UsageItem; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.UsageItem.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.UsageItem.g.cs index 8b4f911..a4d5b4e 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.UsageItem.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.UsageItem.g.cs @@ -56,91 +56,47 @@ public sealed partial class UsageItem [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// - public static global::DeepInfra.UsageItem? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.UsageItem), - jsonSerializerContext) as global::DeepInfra.UsageItem; - } - - /// - /// 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::DeepInfra.UsageItem? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// + /// billed seconds or tokens + /// + /// + /// rate in cents/sec or cents per token + /// + /// + /// model cost in cents + /// + /// + /// pricing type + /// + /// + /// time interval with this particular pricing + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public UsageItem( + global::DeepInfra.ModelMeta model, + int units, + double rate, + int cost, + string pricingType, + global::DeepInfra.TimeInterval interval) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.UsageItem), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.UsageItem; + this.Model = model ?? throw new global::System.ArgumentNullException(nameof(model)); + this.Units = units; + this.Rate = rate; + this.Cost = cost; + this.PricingType = pricingType ?? throw new global::System.ArgumentNullException(nameof(pricingType)); + this.Interval = interval ?? throw new global::System.ArgumentNullException(nameof(interval)); } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public UsageItem() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.UsageMonth.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.UsageMonth.Json.g.cs new file mode 100644 index 0000000..b0296dd --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.UsageMonth.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class UsageMonth + { + /// + /// 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::DeepInfra.UsageMonth? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.UsageMonth), + jsonSerializerContext) as global::DeepInfra.UsageMonth; + } + + /// + /// 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::DeepInfra.UsageMonth? 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::DeepInfra.UsageMonth), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.UsageMonth; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.UsageMonth.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.UsageMonth.g.cs index e4fcd40..2861093 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.UsageMonth.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.UsageMonth.g.cs @@ -49,91 +49,43 @@ public sealed partial class UsageMonth [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// - public static global::DeepInfra.UsageMonth? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.UsageMonth), - jsonSerializerContext) as global::DeepInfra.UsageMonth; - } - - /// - /// 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::DeepInfra.UsageMonth? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// YYYY.MM formatted period + /// + /// + /// time interval in this period + /// + /// + /// + /// total cost for all items in cents + /// + /// + /// Stripe Invoice ID, or EMPTY|NOT_FINAL
+ /// Default Value: NOT_FINAL + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public UsageMonth( + string period, + global::DeepInfra.TimeInterval interval, + global::System.Collections.Generic.IList items, + int totalCost, + string? invoiceId) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.UsageMonth), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.UsageMonth; + this.Period = period ?? throw new global::System.ArgumentNullException(nameof(period)); + this.Interval = interval ?? throw new global::System.ArgumentNullException(nameof(interval)); + this.Items = items ?? throw new global::System.ArgumentNullException(nameof(items)); + this.TotalCost = totalCost; + this.InvoiceId = invoiceId; } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public UsageMonth() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.UsageOut.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.UsageOut.Json.g.cs new file mode 100644 index 0000000..ef63f1d --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.UsageOut.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class UsageOut + { + /// + /// 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::DeepInfra.UsageOut? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.UsageOut), + jsonSerializerContext) as global::DeepInfra.UsageOut; + } + + /// + /// 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::DeepInfra.UsageOut? 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::DeepInfra.UsageOut), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.UsageOut; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.UsageOut.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.UsageOut.g.cs index 7356807..9db49bb 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.UsageOut.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.UsageOut.g.cs @@ -28,91 +28,27 @@ public sealed partial class UsageOut [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// -#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::DeepInfra.UsageOut? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.UsageOut), - jsonSerializerContext) as global::DeepInfra.UsageOut; - } - - /// - /// 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::DeepInfra.UsageOut? 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// + /// The first month for this account + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public UsageOut( + global::System.Collections.Generic.IList months, + string initialMonth) { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.UsageOut), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.UsageOut; + this.Months = months ?? throw new global::System.ArgumentNullException(nameof(months)); + this.InitialMonth = initialMonth ?? throw new global::System.ArgumentNullException(nameof(initialMonth)); } /// - /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public UsageOut() { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.ValidationError.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ValidationError.Json.g.cs new file mode 100644 index 0000000..50d6959 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ValidationError.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class ValidationError + { + /// + /// 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::DeepInfra.ValidationError? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.ValidationError), + jsonSerializerContext) as global::DeepInfra.ValidationError; + } + + /// + /// 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::DeepInfra.ValidationError? 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::DeepInfra.ValidationError), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ValidationError; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.ValidationError.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.ValidationError.g.cs index d3cc07b..fcc3482 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.ValidationError.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.ValidationError.g.cs @@ -37,91 +37,28 @@ public sealed partial class ValidationError [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// - public static global::DeepInfra.ValidationError? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public ValidationError( + global::System.Collections.Generic.IList> loc, + string msg, + string type) { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.ValidationError), - jsonSerializerContext) as global::DeepInfra.ValidationError; + this.Loc = loc ?? throw new global::System.ArgumentNullException(nameof(loc)); + this.Msg = msg ?? throw new global::System.ArgumentNullException(nameof(msg)); + this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); } /// - /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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::DeepInfra.ValidationError? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public ValidationError() { - 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.ValidationError), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.ValidationError; - } - - /// - /// 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.Voice.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.Voice.Json.g.cs new file mode 100644 index 0000000..688ee79 --- /dev/null +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.Voice.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace DeepInfra +{ + public sealed partial class Voice + { + /// + /// 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::DeepInfra.Voice? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::DeepInfra.Voice), + jsonSerializerContext) as global::DeepInfra.Voice; + } + + /// + /// 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::DeepInfra.Voice? 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::DeepInfra.Voice), + jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.Voice; + } + + /// + /// 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/DeepInfra/Generated/DeepInfra.Models.Voice.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.Voice.g.cs index c89a9e9..5b17a01 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Models.Voice.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.Voice.g.cs @@ -53,91 +53,37 @@ public sealed partial class Voice [global::System.Text.Json.Serialization.JsonExtensionData] public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// 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. + /// Initializes a new instance of the class. /// - public static global::DeepInfra.Voice? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + /// + /// + /// + /// + /// + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public Voice( + string userId, + string voiceId, + string name, + string? description, + int? createdAt, + int? updatedAt) { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::DeepInfra.Voice), - jsonSerializerContext) as global::DeepInfra.Voice; + this.UserId = userId ?? throw new global::System.ArgumentNullException(nameof(userId)); + this.VoiceId = voiceId ?? throw new global::System.ArgumentNullException(nameof(voiceId)); + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.Description = description; + this.CreatedAt = createdAt; + this.UpdatedAt = updatedAt; } /// - /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// Initializes a new instance of the class. /// -#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::DeepInfra.Voice? FromJson( - string json, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + public Voice() { - 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - typeof(global::DeepInfra.Voice), - jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.Voice; - } - - /// - /// 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 FromJsonStream( - global::System.IO.Stream jsonStream, - global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) - { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( - jsonStream, - jsonSerializerOptions); - } - } } \ No newline at end of file diff --git a/src/libs/DeepInfra/Generated/DeepInfra.PathBuilder.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.PathBuilder.g.cs index 77d831d..5bb9137 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.PathBuilder.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.PathBuilder.g.cs @@ -1,5 +1,3 @@ -using System.Linq; - #nullable enable namespace DeepInfra @@ -103,7 +101,11 @@ public PathBuilder AddRequiredParameter( string delimiter = ",", bool explode = false) { - AddRequiredParameter(name, value.Select(selector).ToArray(), delimiter, explode); + AddRequiredParameter( + name, + global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(value, selector)), + delimiter, + explode); return this; } @@ -167,7 +169,11 @@ public PathBuilder AddOptionalParameter( { if (value is not null) { - AddRequiredParameter(name, value.Select(selector).ToArray(), delimiter, explode); + AddRequiredParameter( + name, + global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(value, selector)), + delimiter, + explode); } return this; diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Polyfills.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Polyfills.g.cs index def950d..92ad4e7 100644 --- a/src/libs/DeepInfra/Generated/DeepInfra.Polyfills.g.cs +++ b/src/libs/DeepInfra/Generated/DeepInfra.Polyfills.g.cs @@ -7,7 +7,7 @@ namespace DeepInfra /// /// /// - public static partial class AutoSDKPolyfills + public static partial class AutoSdkPolyfills { /// ///