From 69c164dc676bee75fb1c05161bde71a2e0ef74c5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 17 Jun 2026 10:45:29 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- ...Fun.Models.ChatCompletionRequest.Json.g.cs | 49 +++++++++++++++++++ ...CompletionRequestReasoningFormat.Json.g.cs | 49 +++++++++++++++++++ ...un.Models.ChatCompletionResponse.Json.g.cs | 49 +++++++++++++++++++ .../Generated/StepFun.Models.Choice.Json.g.cs | 49 +++++++++++++++++++ .../StepFun.Models.ContentPart.Json.g.cs | 49 +++++++++++++++++++ ...epFun.Models.ContentPartImageUrl.Json.g.cs | 49 +++++++++++++++++++ ...Fun.Models.ContentPartInputAudio.Json.g.cs | 49 +++++++++++++++++++ ...epFun.Models.ContentPartVideoUrl.Json.g.cs | 49 +++++++++++++++++++ .../StepFun.Models.FunctionCall.Json.g.cs | 49 +++++++++++++++++++ ...tepFun.Models.FunctionDefinition.Json.g.cs | 49 +++++++++++++++++++ ...els.FunctionDefinitionParameters.Json.g.cs | 49 +++++++++++++++++++ .../StepFun.Models.Message.Json.g.cs | 49 +++++++++++++++++++ ...StepFun.Models.ModelListResponse.Json.g.cs | 49 +++++++++++++++++++ .../StepFun.Models.ModelObject.Json.g.cs | 49 +++++++++++++++++++ .../StepFun.Models.ResponseFormat.Json.g.cs | 49 +++++++++++++++++++ .../StepFun.Models.SpeechRequest.Json.g.cs | 49 +++++++++++++++++++ ...peechRequestPronunciationMapItem.Json.g.cs | 49 +++++++++++++++++++ ...n.Models.SpeechRequestVoiceLabel.Json.g.cs | 49 +++++++++++++++++++ .../StepFun.Models.SpeechResponse.Json.g.cs | 49 +++++++++++++++++++ ...StepFun.Models.TokenCountRequest.Json.g.cs | 49 +++++++++++++++++++ ...tepFun.Models.TokenCountResponse.Json.g.cs | 49 +++++++++++++++++++ ...un.Models.TokenCountResponseData.Json.g.cs | 49 +++++++++++++++++++ .../Generated/StepFun.Models.Tool.Json.g.cs | 49 +++++++++++++++++++ .../StepFun.Models.ToolCall.Json.g.cs | 49 +++++++++++++++++++ .../Generated/StepFun.Models.Usage.Json.g.cs | 49 +++++++++++++++++++ .../Generated/StepFun.OneOf.2.Json.g.cs | 49 +++++++++++++++++++ 26 files changed, 1274 insertions(+) diff --git a/src/libs/StepFun/Generated/StepFun.Models.ChatCompletionRequest.Json.g.cs b/src/libs/StepFun/Generated/StepFun.Models.ChatCompletionRequest.Json.g.cs index 3895843..435a29f 100644 --- a/src/libs/StepFun/Generated/StepFun.Models.ChatCompletionRequest.Json.g.cs +++ b/src/libs/StepFun/Generated/StepFun.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::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Serialize( this, jsonSerializerOptions); @@ -44,6 +57,17 @@ public string ToJson( jsonSerializerContext) as global::StepFun.ChatCompletionRequest; } + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::StepFun.ChatCompletionRequest? FromJson( + string json) + { + return FromJson( + json, + global::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); @@ -73,6 +104,17 @@ public string ToJson( jsonSerializerContext).ConfigureAwait(false)) as global::StepFun.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::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); diff --git a/src/libs/StepFun/Generated/StepFun.Models.ChatCompletionRequestReasoningFormat.Json.g.cs b/src/libs/StepFun/Generated/StepFun.Models.ChatCompletionRequestReasoningFormat.Json.g.cs index 86107a5..6781eed 100644 --- a/src/libs/StepFun/Generated/StepFun.Models.ChatCompletionRequestReasoningFormat.Json.g.cs +++ b/src/libs/StepFun/Generated/StepFun.Models.ChatCompletionRequestReasoningFormat.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::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Serialize( this, jsonSerializerOptions); @@ -44,6 +57,17 @@ public string ToJson( jsonSerializerContext) as global::StepFun.ChatCompletionRequestReasoningFormat; } + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::StepFun.ChatCompletionRequestReasoningFormat? FromJson( + string json) + { + return FromJson( + json, + global::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); @@ -73,6 +104,17 @@ public string ToJson( jsonSerializerContext).ConfigureAwait(false)) as global::StepFun.ChatCompletionRequestReasoningFormat; } + /// + /// 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::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); diff --git a/src/libs/StepFun/Generated/StepFun.Models.ChatCompletionResponse.Json.g.cs b/src/libs/StepFun/Generated/StepFun.Models.ChatCompletionResponse.Json.g.cs index 1c6050a..6336296 100644 --- a/src/libs/StepFun/Generated/StepFun.Models.ChatCompletionResponse.Json.g.cs +++ b/src/libs/StepFun/Generated/StepFun.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::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Serialize( this, jsonSerializerOptions); @@ -44,6 +57,17 @@ public string ToJson( jsonSerializerContext) as global::StepFun.ChatCompletionResponse; } + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::StepFun.ChatCompletionResponse? FromJson( + string json) + { + return FromJson( + json, + global::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); @@ -73,6 +104,17 @@ public string ToJson( jsonSerializerContext).ConfigureAwait(false)) as global::StepFun.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::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); diff --git a/src/libs/StepFun/Generated/StepFun.Models.Choice.Json.g.cs b/src/libs/StepFun/Generated/StepFun.Models.Choice.Json.g.cs index 3a316fe..4dd1060 100644 --- a/src/libs/StepFun/Generated/StepFun.Models.Choice.Json.g.cs +++ b/src/libs/StepFun/Generated/StepFun.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::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Serialize( this, jsonSerializerOptions); @@ -44,6 +57,17 @@ public string ToJson( jsonSerializerContext) as global::StepFun.Choice; } + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::StepFun.Choice? FromJson( + string json) + { + return FromJson( + json, + global::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); @@ -73,6 +104,17 @@ public string ToJson( jsonSerializerContext).ConfigureAwait(false)) as global::StepFun.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::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); diff --git a/src/libs/StepFun/Generated/StepFun.Models.ContentPart.Json.g.cs b/src/libs/StepFun/Generated/StepFun.Models.ContentPart.Json.g.cs index a66281b..fa93983 100644 --- a/src/libs/StepFun/Generated/StepFun.Models.ContentPart.Json.g.cs +++ b/src/libs/StepFun/Generated/StepFun.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::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Serialize( this, jsonSerializerOptions); @@ -44,6 +57,17 @@ public string ToJson( jsonSerializerContext) as global::StepFun.ContentPart; } + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::StepFun.ContentPart? FromJson( + string json) + { + return FromJson( + json, + global::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); @@ -73,6 +104,17 @@ public string ToJson( jsonSerializerContext).ConfigureAwait(false)) as global::StepFun.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::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); diff --git a/src/libs/StepFun/Generated/StepFun.Models.ContentPartImageUrl.Json.g.cs b/src/libs/StepFun/Generated/StepFun.Models.ContentPartImageUrl.Json.g.cs index 3776ece..b5f393f 100644 --- a/src/libs/StepFun/Generated/StepFun.Models.ContentPartImageUrl.Json.g.cs +++ b/src/libs/StepFun/Generated/StepFun.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::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Serialize( this, jsonSerializerOptions); @@ -44,6 +57,17 @@ public string ToJson( jsonSerializerContext) as global::StepFun.ContentPartImageUrl; } + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::StepFun.ContentPartImageUrl? FromJson( + string json) + { + return FromJson( + json, + global::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); @@ -73,6 +104,17 @@ public string ToJson( jsonSerializerContext).ConfigureAwait(false)) as global::StepFun.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::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); diff --git a/src/libs/StepFun/Generated/StepFun.Models.ContentPartInputAudio.Json.g.cs b/src/libs/StepFun/Generated/StepFun.Models.ContentPartInputAudio.Json.g.cs index 1435605..0236a16 100644 --- a/src/libs/StepFun/Generated/StepFun.Models.ContentPartInputAudio.Json.g.cs +++ b/src/libs/StepFun/Generated/StepFun.Models.ContentPartInputAudio.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::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Serialize( this, jsonSerializerOptions); @@ -44,6 +57,17 @@ public string ToJson( jsonSerializerContext) as global::StepFun.ContentPartInputAudio; } + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::StepFun.ContentPartInputAudio? FromJson( + string json) + { + return FromJson( + json, + global::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); @@ -73,6 +104,17 @@ public string ToJson( jsonSerializerContext).ConfigureAwait(false)) as global::StepFun.ContentPartInputAudio; } + /// + /// 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::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); diff --git a/src/libs/StepFun/Generated/StepFun.Models.ContentPartVideoUrl.Json.g.cs b/src/libs/StepFun/Generated/StepFun.Models.ContentPartVideoUrl.Json.g.cs index ed7cacb..514cf63 100644 --- a/src/libs/StepFun/Generated/StepFun.Models.ContentPartVideoUrl.Json.g.cs +++ b/src/libs/StepFun/Generated/StepFun.Models.ContentPartVideoUrl.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::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Serialize( this, jsonSerializerOptions); @@ -44,6 +57,17 @@ public string ToJson( jsonSerializerContext) as global::StepFun.ContentPartVideoUrl; } + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::StepFun.ContentPartVideoUrl? FromJson( + string json) + { + return FromJson( + json, + global::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); @@ -73,6 +104,17 @@ public string ToJson( jsonSerializerContext).ConfigureAwait(false)) as global::StepFun.ContentPartVideoUrl; } + /// + /// 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::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); diff --git a/src/libs/StepFun/Generated/StepFun.Models.FunctionCall.Json.g.cs b/src/libs/StepFun/Generated/StepFun.Models.FunctionCall.Json.g.cs index 5fce92d..36e3a3f 100644 --- a/src/libs/StepFun/Generated/StepFun.Models.FunctionCall.Json.g.cs +++ b/src/libs/StepFun/Generated/StepFun.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::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Serialize( this, jsonSerializerOptions); @@ -44,6 +57,17 @@ public string ToJson( jsonSerializerContext) as global::StepFun.FunctionCall; } + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::StepFun.FunctionCall? FromJson( + string json) + { + return FromJson( + json, + global::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); @@ -73,6 +104,17 @@ public string ToJson( jsonSerializerContext).ConfigureAwait(false)) as global::StepFun.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::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); diff --git a/src/libs/StepFun/Generated/StepFun.Models.FunctionDefinition.Json.g.cs b/src/libs/StepFun/Generated/StepFun.Models.FunctionDefinition.Json.g.cs index 73fc6ba..4d5e460 100644 --- a/src/libs/StepFun/Generated/StepFun.Models.FunctionDefinition.Json.g.cs +++ b/src/libs/StepFun/Generated/StepFun.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::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Serialize( this, jsonSerializerOptions); @@ -44,6 +57,17 @@ public string ToJson( jsonSerializerContext) as global::StepFun.FunctionDefinition; } + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::StepFun.FunctionDefinition? FromJson( + string json) + { + return FromJson( + json, + global::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); @@ -73,6 +104,17 @@ public string ToJson( jsonSerializerContext).ConfigureAwait(false)) as global::StepFun.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::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); diff --git a/src/libs/StepFun/Generated/StepFun.Models.FunctionDefinitionParameters.Json.g.cs b/src/libs/StepFun/Generated/StepFun.Models.FunctionDefinitionParameters.Json.g.cs index 58697b4..0bc46b0 100644 --- a/src/libs/StepFun/Generated/StepFun.Models.FunctionDefinitionParameters.Json.g.cs +++ b/src/libs/StepFun/Generated/StepFun.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::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Serialize( this, jsonSerializerOptions); @@ -44,6 +57,17 @@ public string ToJson( jsonSerializerContext) as global::StepFun.FunctionDefinitionParameters; } + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::StepFun.FunctionDefinitionParameters? FromJson( + string json) + { + return FromJson( + json, + global::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); @@ -73,6 +104,17 @@ public string ToJson( jsonSerializerContext).ConfigureAwait(false)) as global::StepFun.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::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); diff --git a/src/libs/StepFun/Generated/StepFun.Models.Message.Json.g.cs b/src/libs/StepFun/Generated/StepFun.Models.Message.Json.g.cs index b90c081..0b0b7a3 100644 --- a/src/libs/StepFun/Generated/StepFun.Models.Message.Json.g.cs +++ b/src/libs/StepFun/Generated/StepFun.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::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Serialize( this, jsonSerializerOptions); @@ -44,6 +57,17 @@ public string ToJson( jsonSerializerContext) as global::StepFun.Message; } + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::StepFun.Message? FromJson( + string json) + { + return FromJson( + json, + global::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); @@ -73,6 +104,17 @@ public string ToJson( jsonSerializerContext).ConfigureAwait(false)) as global::StepFun.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::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); diff --git a/src/libs/StepFun/Generated/StepFun.Models.ModelListResponse.Json.g.cs b/src/libs/StepFun/Generated/StepFun.Models.ModelListResponse.Json.g.cs index 9ffda3a..e97827f 100644 --- a/src/libs/StepFun/Generated/StepFun.Models.ModelListResponse.Json.g.cs +++ b/src/libs/StepFun/Generated/StepFun.Models.ModelListResponse.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::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Serialize( this, jsonSerializerOptions); @@ -44,6 +57,17 @@ public string ToJson( jsonSerializerContext) as global::StepFun.ModelListResponse; } + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::StepFun.ModelListResponse? FromJson( + string json) + { + return FromJson( + json, + global::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); @@ -73,6 +104,17 @@ public string ToJson( jsonSerializerContext).ConfigureAwait(false)) as global::StepFun.ModelListResponse; } + /// + /// 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::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); diff --git a/src/libs/StepFun/Generated/StepFun.Models.ModelObject.Json.g.cs b/src/libs/StepFun/Generated/StepFun.Models.ModelObject.Json.g.cs index 83b7df6..eb23b43 100644 --- a/src/libs/StepFun/Generated/StepFun.Models.ModelObject.Json.g.cs +++ b/src/libs/StepFun/Generated/StepFun.Models.ModelObject.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::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Serialize( this, jsonSerializerOptions); @@ -44,6 +57,17 @@ public string ToJson( jsonSerializerContext) as global::StepFun.ModelObject; } + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::StepFun.ModelObject? FromJson( + string json) + { + return FromJson( + json, + global::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); @@ -73,6 +104,17 @@ public string ToJson( jsonSerializerContext).ConfigureAwait(false)) as global::StepFun.ModelObject; } + /// + /// 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::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); diff --git a/src/libs/StepFun/Generated/StepFun.Models.ResponseFormat.Json.g.cs b/src/libs/StepFun/Generated/StepFun.Models.ResponseFormat.Json.g.cs index 8235216..13027a1 100644 --- a/src/libs/StepFun/Generated/StepFun.Models.ResponseFormat.Json.g.cs +++ b/src/libs/StepFun/Generated/StepFun.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::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Serialize( this, jsonSerializerOptions); @@ -44,6 +57,17 @@ public string ToJson( jsonSerializerContext) as global::StepFun.ResponseFormat; } + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::StepFun.ResponseFormat? FromJson( + string json) + { + return FromJson( + json, + global::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); @@ -73,6 +104,17 @@ public string ToJson( jsonSerializerContext).ConfigureAwait(false)) as global::StepFun.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::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); diff --git a/src/libs/StepFun/Generated/StepFun.Models.SpeechRequest.Json.g.cs b/src/libs/StepFun/Generated/StepFun.Models.SpeechRequest.Json.g.cs index a65a295..c4300b7 100644 --- a/src/libs/StepFun/Generated/StepFun.Models.SpeechRequest.Json.g.cs +++ b/src/libs/StepFun/Generated/StepFun.Models.SpeechRequest.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::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Serialize( this, jsonSerializerOptions); @@ -44,6 +57,17 @@ public string ToJson( jsonSerializerContext) as global::StepFun.SpeechRequest; } + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::StepFun.SpeechRequest? FromJson( + string json) + { + return FromJson( + json, + global::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); @@ -73,6 +104,17 @@ public string ToJson( jsonSerializerContext).ConfigureAwait(false)) as global::StepFun.SpeechRequest; } + /// + /// 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::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); diff --git a/src/libs/StepFun/Generated/StepFun.Models.SpeechRequestPronunciationMapItem.Json.g.cs b/src/libs/StepFun/Generated/StepFun.Models.SpeechRequestPronunciationMapItem.Json.g.cs index 977d701..0c9f37c 100644 --- a/src/libs/StepFun/Generated/StepFun.Models.SpeechRequestPronunciationMapItem.Json.g.cs +++ b/src/libs/StepFun/Generated/StepFun.Models.SpeechRequestPronunciationMapItem.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::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Serialize( this, jsonSerializerOptions); @@ -44,6 +57,17 @@ public string ToJson( jsonSerializerContext) as global::StepFun.SpeechRequestPronunciationMapItem; } + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::StepFun.SpeechRequestPronunciationMapItem? FromJson( + string json) + { + return FromJson( + json, + global::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); @@ -73,6 +104,17 @@ public string ToJson( jsonSerializerContext).ConfigureAwait(false)) as global::StepFun.SpeechRequestPronunciationMapItem; } + /// + /// 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::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); diff --git a/src/libs/StepFun/Generated/StepFun.Models.SpeechRequestVoiceLabel.Json.g.cs b/src/libs/StepFun/Generated/StepFun.Models.SpeechRequestVoiceLabel.Json.g.cs index 496ea8f..feae9c7 100644 --- a/src/libs/StepFun/Generated/StepFun.Models.SpeechRequestVoiceLabel.Json.g.cs +++ b/src/libs/StepFun/Generated/StepFun.Models.SpeechRequestVoiceLabel.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::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Serialize( this, jsonSerializerOptions); @@ -44,6 +57,17 @@ public string ToJson( jsonSerializerContext) as global::StepFun.SpeechRequestVoiceLabel; } + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::StepFun.SpeechRequestVoiceLabel? FromJson( + string json) + { + return FromJson( + json, + global::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); @@ -73,6 +104,17 @@ public string ToJson( jsonSerializerContext).ConfigureAwait(false)) as global::StepFun.SpeechRequestVoiceLabel; } + /// + /// 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::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); diff --git a/src/libs/StepFun/Generated/StepFun.Models.SpeechResponse.Json.g.cs b/src/libs/StepFun/Generated/StepFun.Models.SpeechResponse.Json.g.cs index 5d3c7f7..83a6577 100644 --- a/src/libs/StepFun/Generated/StepFun.Models.SpeechResponse.Json.g.cs +++ b/src/libs/StepFun/Generated/StepFun.Models.SpeechResponse.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::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Serialize( this, jsonSerializerOptions); @@ -44,6 +57,17 @@ public string ToJson( jsonSerializerContext) as global::StepFun.SpeechResponse; } + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::StepFun.SpeechResponse? FromJson( + string json) + { + return FromJson( + json, + global::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); @@ -73,6 +104,17 @@ public string ToJson( jsonSerializerContext).ConfigureAwait(false)) as global::StepFun.SpeechResponse; } + /// + /// 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::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); diff --git a/src/libs/StepFun/Generated/StepFun.Models.TokenCountRequest.Json.g.cs b/src/libs/StepFun/Generated/StepFun.Models.TokenCountRequest.Json.g.cs index c4df546..4bc4e00 100644 --- a/src/libs/StepFun/Generated/StepFun.Models.TokenCountRequest.Json.g.cs +++ b/src/libs/StepFun/Generated/StepFun.Models.TokenCountRequest.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::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Serialize( this, jsonSerializerOptions); @@ -44,6 +57,17 @@ public string ToJson( jsonSerializerContext) as global::StepFun.TokenCountRequest; } + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::StepFun.TokenCountRequest? FromJson( + string json) + { + return FromJson( + json, + global::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); @@ -73,6 +104,17 @@ public string ToJson( jsonSerializerContext).ConfigureAwait(false)) as global::StepFun.TokenCountRequest; } + /// + /// 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::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); diff --git a/src/libs/StepFun/Generated/StepFun.Models.TokenCountResponse.Json.g.cs b/src/libs/StepFun/Generated/StepFun.Models.TokenCountResponse.Json.g.cs index abb2865..b9a70ae 100644 --- a/src/libs/StepFun/Generated/StepFun.Models.TokenCountResponse.Json.g.cs +++ b/src/libs/StepFun/Generated/StepFun.Models.TokenCountResponse.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::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Serialize( this, jsonSerializerOptions); @@ -44,6 +57,17 @@ public string ToJson( jsonSerializerContext) as global::StepFun.TokenCountResponse; } + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::StepFun.TokenCountResponse? FromJson( + string json) + { + return FromJson( + json, + global::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); @@ -73,6 +104,17 @@ public string ToJson( jsonSerializerContext).ConfigureAwait(false)) as global::StepFun.TokenCountResponse; } + /// + /// 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::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); diff --git a/src/libs/StepFun/Generated/StepFun.Models.TokenCountResponseData.Json.g.cs b/src/libs/StepFun/Generated/StepFun.Models.TokenCountResponseData.Json.g.cs index d1a4c4e..ff076e7 100644 --- a/src/libs/StepFun/Generated/StepFun.Models.TokenCountResponseData.Json.g.cs +++ b/src/libs/StepFun/Generated/StepFun.Models.TokenCountResponseData.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::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Serialize( this, jsonSerializerOptions); @@ -44,6 +57,17 @@ public string ToJson( jsonSerializerContext) as global::StepFun.TokenCountResponseData; } + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::StepFun.TokenCountResponseData? FromJson( + string json) + { + return FromJson( + json, + global::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); @@ -73,6 +104,17 @@ public string ToJson( jsonSerializerContext).ConfigureAwait(false)) as global::StepFun.TokenCountResponseData; } + /// + /// 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::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); diff --git a/src/libs/StepFun/Generated/StepFun.Models.Tool.Json.g.cs b/src/libs/StepFun/Generated/StepFun.Models.Tool.Json.g.cs index bd37160..1befcf7 100644 --- a/src/libs/StepFun/Generated/StepFun.Models.Tool.Json.g.cs +++ b/src/libs/StepFun/Generated/StepFun.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::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Serialize( this, jsonSerializerOptions); @@ -44,6 +57,17 @@ public string ToJson( jsonSerializerContext) as global::StepFun.Tool; } + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::StepFun.Tool? FromJson( + string json) + { + return FromJson( + json, + global::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); @@ -73,6 +104,17 @@ public string ToJson( jsonSerializerContext).ConfigureAwait(false)) as global::StepFun.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::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); diff --git a/src/libs/StepFun/Generated/StepFun.Models.ToolCall.Json.g.cs b/src/libs/StepFun/Generated/StepFun.Models.ToolCall.Json.g.cs index 6175683..81c7602 100644 --- a/src/libs/StepFun/Generated/StepFun.Models.ToolCall.Json.g.cs +++ b/src/libs/StepFun/Generated/StepFun.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::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Serialize( this, jsonSerializerOptions); @@ -44,6 +57,17 @@ public string ToJson( jsonSerializerContext) as global::StepFun.ToolCall; } + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::StepFun.ToolCall? FromJson( + string json) + { + return FromJson( + json, + global::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); @@ -73,6 +104,17 @@ public string ToJson( jsonSerializerContext).ConfigureAwait(false)) as global::StepFun.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::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); diff --git a/src/libs/StepFun/Generated/StepFun.Models.Usage.Json.g.cs b/src/libs/StepFun/Generated/StepFun.Models.Usage.Json.g.cs index 82cc164..d3c55c4 100644 --- a/src/libs/StepFun/Generated/StepFun.Models.Usage.Json.g.cs +++ b/src/libs/StepFun/Generated/StepFun.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::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Serialize( this, jsonSerializerOptions); @@ -44,6 +57,17 @@ public string ToJson( jsonSerializerContext) as global::StepFun.Usage; } + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::StepFun.Usage? FromJson( + string json) + { + return FromJson( + json, + global::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); @@ -73,6 +104,17 @@ public string ToJson( jsonSerializerContext).ConfigureAwait(false)) as global::StepFun.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::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); diff --git a/src/libs/StepFun/Generated/StepFun.OneOf.2.Json.g.cs b/src/libs/StepFun/Generated/StepFun.OneOf.2.Json.g.cs index 957fd65..9c6b95c 100644 --- a/src/libs/StepFun/Generated/StepFun.OneOf.2.Json.g.cs +++ b/src/libs/StepFun/Generated/StepFun.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::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Serialize( this, jsonSerializerOptions); @@ -44,6 +57,17 @@ public string ToJson( jsonSerializerContext) as global::StepFun.OneOf?; } + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::StepFun.OneOf? FromJson( + string json) + { + return FromJson( + json, + global::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.Deserialize>( json, jsonSerializerOptions); @@ -73,6 +104,17 @@ public string ToJson( jsonSerializerContext).ConfigureAwait(false)) as global::StepFun.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::StepFun.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::StepFun.SourceGenerationContext.Default); + } + return global::System.Text.Json.JsonSerializer.DeserializeAsync?>( jsonStream, jsonSerializerOptions);