diff --git a/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.ChatCompletionRequest.Json.g.cs b/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.ChatCompletionRequest.Json.g.cs index d9cc2b7..b6f924d 100644 --- a/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.ChatCompletionRequest.Json.g.cs +++ b/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.ChatCompletionRequest.Json.g.cs @@ -16,6 +16,14 @@ public string ToJson( jsonSerializerContext); } + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::TencentTokenHub.SourceGenerationContext.Default); + } + /// /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. /// @@ -26,6 +34,11 @@ public string ToJson( public string ToJson( global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return ToJson(global::TencentTokenHub.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Serialize( this, jsonSerializerOptions); @@ -44,6 +57,17 @@ public string ToJson( jsonSerializerContext) as global::TencentTokenHub.ChatCompletionRequest; } + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::TencentTokenHub.ChatCompletionRequest? FromJson( + string json) + { + return FromJson( + json, + global::TencentTokenHub.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON string using the provided JsonSerializerOptions. /// @@ -55,6 +79,13 @@ public string ToJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::TencentTokenHub.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); @@ -73,6 +104,17 @@ public string ToJson( jsonSerializerContext).ConfigureAwait(false)) as global::TencentTokenHub.ChatCompletionRequest; } + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::TencentTokenHub.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON stream using the provided JsonSerializerOptions. /// @@ -84,6 +126,13 @@ public string ToJson( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::TencentTokenHub.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); diff --git a/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.ChatCompletionResponse.Json.g.cs b/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.ChatCompletionResponse.Json.g.cs index e83e2ee..664898f 100644 --- a/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.ChatCompletionResponse.Json.g.cs +++ b/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.ChatCompletionResponse.Json.g.cs @@ -16,6 +16,14 @@ public string ToJson( jsonSerializerContext); } + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::TencentTokenHub.SourceGenerationContext.Default); + } + /// /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. /// @@ -26,6 +34,11 @@ public string ToJson( public string ToJson( global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return ToJson(global::TencentTokenHub.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Serialize( this, jsonSerializerOptions); @@ -44,6 +57,17 @@ public string ToJson( jsonSerializerContext) as global::TencentTokenHub.ChatCompletionResponse; } + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::TencentTokenHub.ChatCompletionResponse? FromJson( + string json) + { + return FromJson( + json, + global::TencentTokenHub.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON string using the provided JsonSerializerOptions. /// @@ -55,6 +79,13 @@ public string ToJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::TencentTokenHub.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); @@ -73,6 +104,17 @@ public string ToJson( jsonSerializerContext).ConfigureAwait(false)) as global::TencentTokenHub.ChatCompletionResponse; } + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::TencentTokenHub.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON stream using the provided JsonSerializerOptions. /// @@ -84,6 +126,13 @@ public string ToJson( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::TencentTokenHub.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); diff --git a/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.Choice.Json.g.cs b/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.Choice.Json.g.cs index 77e13dd..e6b85a6 100644 --- a/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.Choice.Json.g.cs +++ b/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.Choice.Json.g.cs @@ -16,6 +16,14 @@ public string ToJson( jsonSerializerContext); } + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::TencentTokenHub.SourceGenerationContext.Default); + } + /// /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. /// @@ -26,6 +34,11 @@ public string ToJson( public string ToJson( global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return ToJson(global::TencentTokenHub.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Serialize( this, jsonSerializerOptions); @@ -44,6 +57,17 @@ public string ToJson( jsonSerializerContext) as global::TencentTokenHub.Choice; } + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::TencentTokenHub.Choice? FromJson( + string json) + { + return FromJson( + json, + global::TencentTokenHub.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON string using the provided JsonSerializerOptions. /// @@ -55,6 +79,13 @@ public string ToJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::TencentTokenHub.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); @@ -73,6 +104,17 @@ public string ToJson( jsonSerializerContext).ConfigureAwait(false)) as global::TencentTokenHub.Choice; } + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::TencentTokenHub.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON stream using the provided JsonSerializerOptions. /// @@ -84,6 +126,13 @@ public string ToJson( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::TencentTokenHub.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); diff --git a/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.ContentPart.Json.g.cs b/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.ContentPart.Json.g.cs index 76eec1e..7daaa0f 100644 --- a/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.ContentPart.Json.g.cs +++ b/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.ContentPart.Json.g.cs @@ -16,6 +16,14 @@ public string ToJson( jsonSerializerContext); } + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::TencentTokenHub.SourceGenerationContext.Default); + } + /// /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. /// @@ -26,6 +34,11 @@ public string ToJson( public string ToJson( global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return ToJson(global::TencentTokenHub.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Serialize( this, jsonSerializerOptions); @@ -44,6 +57,17 @@ public string ToJson( jsonSerializerContext) as global::TencentTokenHub.ContentPart; } + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::TencentTokenHub.ContentPart? FromJson( + string json) + { + return FromJson( + json, + global::TencentTokenHub.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON string using the provided JsonSerializerOptions. /// @@ -55,6 +79,13 @@ public string ToJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::TencentTokenHub.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); @@ -73,6 +104,17 @@ public string ToJson( jsonSerializerContext).ConfigureAwait(false)) as global::TencentTokenHub.ContentPart; } + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::TencentTokenHub.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON stream using the provided JsonSerializerOptions. /// @@ -84,6 +126,13 @@ public string ToJson( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::TencentTokenHub.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); diff --git a/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.ContentPartFile.Json.g.cs b/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.ContentPartFile.Json.g.cs index 5cd5eb0..0693c13 100644 --- a/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.ContentPartFile.Json.g.cs +++ b/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.ContentPartFile.Json.g.cs @@ -16,6 +16,14 @@ public string ToJson( jsonSerializerContext); } + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::TencentTokenHub.SourceGenerationContext.Default); + } + /// /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. /// @@ -26,6 +34,11 @@ public string ToJson( public string ToJson( global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return ToJson(global::TencentTokenHub.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Serialize( this, jsonSerializerOptions); @@ -44,6 +57,17 @@ public string ToJson( jsonSerializerContext) as global::TencentTokenHub.ContentPartFile; } + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::TencentTokenHub.ContentPartFile? FromJson( + string json) + { + return FromJson( + json, + global::TencentTokenHub.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON string using the provided JsonSerializerOptions. /// @@ -55,6 +79,13 @@ public string ToJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::TencentTokenHub.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); @@ -73,6 +104,17 @@ public string ToJson( jsonSerializerContext).ConfigureAwait(false)) as global::TencentTokenHub.ContentPartFile; } + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::TencentTokenHub.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON stream using the provided JsonSerializerOptions. /// @@ -84,6 +126,13 @@ public string ToJson( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::TencentTokenHub.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); diff --git a/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.ContentPartImageUrl.Json.g.cs b/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.ContentPartImageUrl.Json.g.cs index bfb1326..d51d71d 100644 --- a/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.ContentPartImageUrl.Json.g.cs +++ b/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.ContentPartImageUrl.Json.g.cs @@ -16,6 +16,14 @@ public string ToJson( jsonSerializerContext); } + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::TencentTokenHub.SourceGenerationContext.Default); + } + /// /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. /// @@ -26,6 +34,11 @@ public string ToJson( public string ToJson( global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return ToJson(global::TencentTokenHub.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Serialize( this, jsonSerializerOptions); @@ -44,6 +57,17 @@ public string ToJson( jsonSerializerContext) as global::TencentTokenHub.ContentPartImageUrl; } + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::TencentTokenHub.ContentPartImageUrl? FromJson( + string json) + { + return FromJson( + json, + global::TencentTokenHub.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON string using the provided JsonSerializerOptions. /// @@ -55,6 +79,13 @@ public string ToJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::TencentTokenHub.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); @@ -73,6 +104,17 @@ public string ToJson( jsonSerializerContext).ConfigureAwait(false)) as global::TencentTokenHub.ContentPartImageUrl; } + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::TencentTokenHub.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON stream using the provided JsonSerializerOptions. /// @@ -84,6 +126,13 @@ public string ToJson( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::TencentTokenHub.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); diff --git a/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.FunctionCall.Json.g.cs b/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.FunctionCall.Json.g.cs index 59561a0..2b999f7 100644 --- a/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.FunctionCall.Json.g.cs +++ b/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.FunctionCall.Json.g.cs @@ -16,6 +16,14 @@ public string ToJson( jsonSerializerContext); } + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::TencentTokenHub.SourceGenerationContext.Default); + } + /// /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. /// @@ -26,6 +34,11 @@ public string ToJson( public string ToJson( global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return ToJson(global::TencentTokenHub.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Serialize( this, jsonSerializerOptions); @@ -44,6 +57,17 @@ public string ToJson( jsonSerializerContext) as global::TencentTokenHub.FunctionCall; } + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::TencentTokenHub.FunctionCall? FromJson( + string json) + { + return FromJson( + json, + global::TencentTokenHub.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON string using the provided JsonSerializerOptions. /// @@ -55,6 +79,13 @@ public string ToJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::TencentTokenHub.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); @@ -73,6 +104,17 @@ public string ToJson( jsonSerializerContext).ConfigureAwait(false)) as global::TencentTokenHub.FunctionCall; } + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::TencentTokenHub.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON stream using the provided JsonSerializerOptions. /// @@ -84,6 +126,13 @@ public string ToJson( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::TencentTokenHub.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); diff --git a/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.FunctionDefinition.Json.g.cs b/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.FunctionDefinition.Json.g.cs index be38e02..069574f 100644 --- a/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.FunctionDefinition.Json.g.cs +++ b/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.FunctionDefinition.Json.g.cs @@ -16,6 +16,14 @@ public string ToJson( jsonSerializerContext); } + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::TencentTokenHub.SourceGenerationContext.Default); + } + /// /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. /// @@ -26,6 +34,11 @@ public string ToJson( public string ToJson( global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return ToJson(global::TencentTokenHub.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Serialize( this, jsonSerializerOptions); @@ -44,6 +57,17 @@ public string ToJson( jsonSerializerContext) as global::TencentTokenHub.FunctionDefinition; } + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::TencentTokenHub.FunctionDefinition? FromJson( + string json) + { + return FromJson( + json, + global::TencentTokenHub.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON string using the provided JsonSerializerOptions. /// @@ -55,6 +79,13 @@ public string ToJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::TencentTokenHub.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); @@ -73,6 +104,17 @@ public string ToJson( jsonSerializerContext).ConfigureAwait(false)) as global::TencentTokenHub.FunctionDefinition; } + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::TencentTokenHub.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON stream using the provided JsonSerializerOptions. /// @@ -84,6 +126,13 @@ public string ToJson( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::TencentTokenHub.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); diff --git a/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.FunctionDefinitionParameters.Json.g.cs b/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.FunctionDefinitionParameters.Json.g.cs index 39b8839..05e4009 100644 --- a/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.FunctionDefinitionParameters.Json.g.cs +++ b/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.FunctionDefinitionParameters.Json.g.cs @@ -16,6 +16,14 @@ public string ToJson( jsonSerializerContext); } + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::TencentTokenHub.SourceGenerationContext.Default); + } + /// /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. /// @@ -26,6 +34,11 @@ public string ToJson( public string ToJson( global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return ToJson(global::TencentTokenHub.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Serialize( this, jsonSerializerOptions); @@ -44,6 +57,17 @@ public string ToJson( jsonSerializerContext) as global::TencentTokenHub.FunctionDefinitionParameters; } + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::TencentTokenHub.FunctionDefinitionParameters? FromJson( + string json) + { + return FromJson( + json, + global::TencentTokenHub.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON string using the provided JsonSerializerOptions. /// @@ -55,6 +79,13 @@ public string ToJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::TencentTokenHub.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); @@ -73,6 +104,17 @@ public string ToJson( jsonSerializerContext).ConfigureAwait(false)) as global::TencentTokenHub.FunctionDefinitionParameters; } + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::TencentTokenHub.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON stream using the provided JsonSerializerOptions. /// @@ -84,6 +126,13 @@ public string ToJson( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::TencentTokenHub.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); diff --git a/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.Message.Json.g.cs b/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.Message.Json.g.cs index cf6a142..f25a12a 100644 --- a/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.Message.Json.g.cs +++ b/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.Message.Json.g.cs @@ -16,6 +16,14 @@ public string ToJson( jsonSerializerContext); } + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::TencentTokenHub.SourceGenerationContext.Default); + } + /// /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. /// @@ -26,6 +34,11 @@ public string ToJson( public string ToJson( global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return ToJson(global::TencentTokenHub.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Serialize( this, jsonSerializerOptions); @@ -44,6 +57,17 @@ public string ToJson( jsonSerializerContext) as global::TencentTokenHub.Message; } + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::TencentTokenHub.Message? FromJson( + string json) + { + return FromJson( + json, + global::TencentTokenHub.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON string using the provided JsonSerializerOptions. /// @@ -55,6 +79,13 @@ public string ToJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::TencentTokenHub.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); @@ -73,6 +104,17 @@ public string ToJson( jsonSerializerContext).ConfigureAwait(false)) as global::TencentTokenHub.Message; } + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::TencentTokenHub.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON stream using the provided JsonSerializerOptions. /// @@ -84,6 +126,13 @@ public string ToJson( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::TencentTokenHub.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); diff --git a/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.ResponseFormat.Json.g.cs b/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.ResponseFormat.Json.g.cs index de95387..ea4c8a9 100644 --- a/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.ResponseFormat.Json.g.cs +++ b/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.ResponseFormat.Json.g.cs @@ -16,6 +16,14 @@ public string ToJson( jsonSerializerContext); } + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::TencentTokenHub.SourceGenerationContext.Default); + } + /// /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. /// @@ -26,6 +34,11 @@ public string ToJson( public string ToJson( global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return ToJson(global::TencentTokenHub.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Serialize( this, jsonSerializerOptions); @@ -44,6 +57,17 @@ public string ToJson( jsonSerializerContext) as global::TencentTokenHub.ResponseFormat; } + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::TencentTokenHub.ResponseFormat? FromJson( + string json) + { + return FromJson( + json, + global::TencentTokenHub.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON string using the provided JsonSerializerOptions. /// @@ -55,6 +79,13 @@ public string ToJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::TencentTokenHub.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); @@ -73,6 +104,17 @@ public string ToJson( jsonSerializerContext).ConfigureAwait(false)) as global::TencentTokenHub.ResponseFormat; } + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::TencentTokenHub.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON stream using the provided JsonSerializerOptions. /// @@ -84,6 +126,13 @@ public string ToJson( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::TencentTokenHub.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); diff --git a/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.Tool.Json.g.cs b/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.Tool.Json.g.cs index 4dba494..10bbb80 100644 --- a/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.Tool.Json.g.cs +++ b/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.Tool.Json.g.cs @@ -16,6 +16,14 @@ public string ToJson( jsonSerializerContext); } + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::TencentTokenHub.SourceGenerationContext.Default); + } + /// /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. /// @@ -26,6 +34,11 @@ public string ToJson( public string ToJson( global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return ToJson(global::TencentTokenHub.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Serialize( this, jsonSerializerOptions); @@ -44,6 +57,17 @@ public string ToJson( jsonSerializerContext) as global::TencentTokenHub.Tool; } + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::TencentTokenHub.Tool? FromJson( + string json) + { + return FromJson( + json, + global::TencentTokenHub.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON string using the provided JsonSerializerOptions. /// @@ -55,6 +79,13 @@ public string ToJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::TencentTokenHub.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); @@ -73,6 +104,17 @@ public string ToJson( jsonSerializerContext).ConfigureAwait(false)) as global::TencentTokenHub.Tool; } + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::TencentTokenHub.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON stream using the provided JsonSerializerOptions. /// @@ -84,6 +126,13 @@ public string ToJson( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::TencentTokenHub.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); diff --git a/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.ToolCall.Json.g.cs b/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.ToolCall.Json.g.cs index 6275142..5c4ac06 100644 --- a/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.ToolCall.Json.g.cs +++ b/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.ToolCall.Json.g.cs @@ -16,6 +16,14 @@ public string ToJson( jsonSerializerContext); } + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::TencentTokenHub.SourceGenerationContext.Default); + } + /// /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. /// @@ -26,6 +34,11 @@ public string ToJson( public string ToJson( global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return ToJson(global::TencentTokenHub.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Serialize( this, jsonSerializerOptions); @@ -44,6 +57,17 @@ public string ToJson( jsonSerializerContext) as global::TencentTokenHub.ToolCall; } + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::TencentTokenHub.ToolCall? FromJson( + string json) + { + return FromJson( + json, + global::TencentTokenHub.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON string using the provided JsonSerializerOptions. /// @@ -55,6 +79,13 @@ public string ToJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::TencentTokenHub.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); @@ -73,6 +104,17 @@ public string ToJson( jsonSerializerContext).ConfigureAwait(false)) as global::TencentTokenHub.ToolCall; } + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::TencentTokenHub.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON stream using the provided JsonSerializerOptions. /// @@ -84,6 +126,13 @@ public string ToJson( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::TencentTokenHub.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); diff --git a/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.Usage.Json.g.cs b/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.Usage.Json.g.cs index 9978bce..45705ee 100644 --- a/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.Usage.Json.g.cs +++ b/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.Usage.Json.g.cs @@ -16,6 +16,14 @@ public string ToJson( jsonSerializerContext); } + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::TencentTokenHub.SourceGenerationContext.Default); + } + /// /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. /// @@ -26,6 +34,11 @@ public string ToJson( public string ToJson( global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return ToJson(global::TencentTokenHub.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Serialize( this, jsonSerializerOptions); @@ -44,6 +57,17 @@ public string ToJson( jsonSerializerContext) as global::TencentTokenHub.Usage; } + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::TencentTokenHub.Usage? FromJson( + string json) + { + return FromJson( + json, + global::TencentTokenHub.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON string using the provided JsonSerializerOptions. /// @@ -55,6 +79,13 @@ public string ToJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::TencentTokenHub.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); @@ -73,6 +104,17 @@ public string ToJson( jsonSerializerContext).ConfigureAwait(false)) as global::TencentTokenHub.Usage; } + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::TencentTokenHub.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON stream using the provided JsonSerializerOptions. /// @@ -84,6 +126,13 @@ public string ToJson( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::TencentTokenHub.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); diff --git a/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.UsageCompletionTokensDetails.Json.g.cs b/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.UsageCompletionTokensDetails.Json.g.cs index 21954ef..16607f2 100644 --- a/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.UsageCompletionTokensDetails.Json.g.cs +++ b/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.UsageCompletionTokensDetails.Json.g.cs @@ -16,6 +16,14 @@ public string ToJson( jsonSerializerContext); } + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::TencentTokenHub.SourceGenerationContext.Default); + } + /// /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. /// @@ -26,6 +34,11 @@ public string ToJson( public string ToJson( global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return ToJson(global::TencentTokenHub.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Serialize( this, jsonSerializerOptions); @@ -44,6 +57,17 @@ public string ToJson( jsonSerializerContext) as global::TencentTokenHub.UsageCompletionTokensDetails; } + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::TencentTokenHub.UsageCompletionTokensDetails? FromJson( + string json) + { + return FromJson( + json, + global::TencentTokenHub.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON string using the provided JsonSerializerOptions. /// @@ -55,6 +79,13 @@ public string ToJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::TencentTokenHub.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); @@ -73,6 +104,17 @@ public string ToJson( jsonSerializerContext).ConfigureAwait(false)) as global::TencentTokenHub.UsageCompletionTokensDetails; } + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::TencentTokenHub.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON stream using the provided JsonSerializerOptions. /// @@ -84,6 +126,13 @@ public string ToJson( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::TencentTokenHub.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); diff --git a/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.UsagePromptTokensDetails.Json.g.cs b/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.UsagePromptTokensDetails.Json.g.cs index 1890c6e..b7ae0e1 100644 --- a/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.UsagePromptTokensDetails.Json.g.cs +++ b/src/libs/TencentTokenHub/Generated/TencentTokenHub.Models.UsagePromptTokensDetails.Json.g.cs @@ -16,6 +16,14 @@ public string ToJson( jsonSerializerContext); } + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::TencentTokenHub.SourceGenerationContext.Default); + } + /// /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. /// @@ -26,6 +34,11 @@ public string ToJson( public string ToJson( global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return ToJson(global::TencentTokenHub.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Serialize( this, jsonSerializerOptions); @@ -44,6 +57,17 @@ public string ToJson( jsonSerializerContext) as global::TencentTokenHub.UsagePromptTokensDetails; } + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::TencentTokenHub.UsagePromptTokensDetails? FromJson( + string json) + { + return FromJson( + json, + global::TencentTokenHub.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON string using the provided JsonSerializerOptions. /// @@ -55,6 +79,13 @@ public string ToJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::TencentTokenHub.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); @@ -73,6 +104,17 @@ public string ToJson( jsonSerializerContext).ConfigureAwait(false)) as global::TencentTokenHub.UsagePromptTokensDetails; } + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::TencentTokenHub.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON stream using the provided JsonSerializerOptions. /// @@ -84,6 +126,13 @@ public string ToJson( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::TencentTokenHub.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); diff --git a/src/libs/TencentTokenHub/Generated/TencentTokenHub.OneOf.2.Json.g.cs b/src/libs/TencentTokenHub/Generated/TencentTokenHub.OneOf.2.Json.g.cs index 0ca1448..b962cf1 100644 --- a/src/libs/TencentTokenHub/Generated/TencentTokenHub.OneOf.2.Json.g.cs +++ b/src/libs/TencentTokenHub/Generated/TencentTokenHub.OneOf.2.Json.g.cs @@ -16,6 +16,14 @@ public string ToJson( jsonSerializerContext); } + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::TencentTokenHub.SourceGenerationContext.Default); + } + /// /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. /// @@ -26,6 +34,11 @@ public string ToJson( public string ToJson( global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return ToJson(global::TencentTokenHub.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Serialize( this, jsonSerializerOptions); @@ -44,6 +57,17 @@ public string ToJson( jsonSerializerContext) as global::TencentTokenHub.OneOf?; } + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::TencentTokenHub.OneOf? FromJson( + string json) + { + return FromJson( + json, + global::TencentTokenHub.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON string using the provided JsonSerializerOptions. /// @@ -55,6 +79,13 @@ public string ToJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::TencentTokenHub.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Deserialize>( json, jsonSerializerOptions); @@ -73,6 +104,17 @@ public string ToJson( jsonSerializerContext).ConfigureAwait(false)) as global::TencentTokenHub.OneOf?; } + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask?> FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::TencentTokenHub.SourceGenerationContext.Default); + } + /// /// Deserializes a JSON stream using the provided JsonSerializerOptions. /// @@ -84,6 +126,13 @@ public string ToJson( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::TencentTokenHub.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.DeserializeAsync?>( jsonStream, jsonSerializerOptions);