Skip to content

Commit

Permalink
Merge pull request #14 from tryAGI/bot/update-openapi_202411070047
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Nov 7, 2024
2 parents c16db27 + 7d619b9 commit e966f94
Show file tree
Hide file tree
Showing 31 changed files with 899 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,5 +77,34 @@ public string ToJson(
jsonSerializerOptions);
}

/// <summary>
/// Deserializes a JSON stream using the provided JsonSerializerContext.
/// </summary>
public static async global::System.Threading.Tasks.ValueTask<global::Google.Gemini.BatchEmbedContentsRequest?> FromJsonStream(
global::System.IO.Stream jsonStream,
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
typeof(global::Google.Gemini.BatchEmbedContentsRequest),
jsonSerializerContext).ConfigureAwait(false)) as global::Google.Gemini.BatchEmbedContentsRequest;
}

/// <summary>
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
/// </summary>
#if NET8_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
[global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
#endif
public static global::System.Threading.Tasks.ValueTask<global::Google.Gemini.BatchEmbedContentsRequest?> FromJsonStream(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
return global::System.Text.Json.JsonSerializer.DeserializeAsync<global::Google.Gemini.BatchEmbedContentsRequest?>(
jsonStream,
jsonSerializerOptions);
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,34 @@ public string ToJson(
jsonSerializerOptions);
}

/// <summary>
/// Deserializes a JSON stream using the provided JsonSerializerContext.
/// </summary>
public static async global::System.Threading.Tasks.ValueTask<global::Google.Gemini.BatchEmbedContentsResponse?> FromJsonStream(
global::System.IO.Stream jsonStream,
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
typeof(global::Google.Gemini.BatchEmbedContentsResponse),
jsonSerializerContext).ConfigureAwait(false)) as global::Google.Gemini.BatchEmbedContentsResponse;
}

/// <summary>
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
/// </summary>
#if NET8_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
[global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
#endif
public static global::System.Threading.Tasks.ValueTask<global::Google.Gemini.BatchEmbedContentsResponse?> FromJsonStream(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
return global::System.Text.Json.JsonSerializer.DeserializeAsync<global::Google.Gemini.BatchEmbedContentsResponse?>(
jsonStream,
jsonSerializerOptions);
}

}
}
29 changes: 29 additions & 0 deletions src/libs/Google.Gemini/Generated/Google.Gemini.Models.Blob.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,5 +83,34 @@ public string ToJson(
jsonSerializerOptions);
}

/// <summary>
/// Deserializes a JSON stream using the provided JsonSerializerContext.
/// </summary>
public static async global::System.Threading.Tasks.ValueTask<global::Google.Gemini.Blob?> FromJsonStream(
global::System.IO.Stream jsonStream,
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
typeof(global::Google.Gemini.Blob),
jsonSerializerContext).ConfigureAwait(false)) as global::Google.Gemini.Blob;
}

/// <summary>
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
/// </summary>
#if NET8_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
[global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
#endif
public static global::System.Threading.Tasks.ValueTask<global::Google.Gemini.Blob?> FromJsonStream(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
return global::System.Text.Json.JsonSerializer.DeserializeAsync<global::Google.Gemini.Blob?>(
jsonStream,
jsonSerializerOptions);
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,34 @@ public string ToJson(
jsonSerializerOptions);
}

/// <summary>
/// Deserializes a JSON stream using the provided JsonSerializerContext.
/// </summary>
public static async global::System.Threading.Tasks.ValueTask<global::Google.Gemini.CancelOperationRequest?> FromJsonStream(
global::System.IO.Stream jsonStream,
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
typeof(global::Google.Gemini.CancelOperationRequest),
jsonSerializerContext).ConfigureAwait(false)) as global::Google.Gemini.CancelOperationRequest;
}

/// <summary>
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
/// </summary>
#if NET8_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
[global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
#endif
public static global::System.Threading.Tasks.ValueTask<global::Google.Gemini.CancelOperationRequest?> FromJsonStream(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
return global::System.Text.Json.JsonSerializer.DeserializeAsync<global::Google.Gemini.CancelOperationRequest?>(
jsonStream,
jsonSerializerOptions);
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -111,5 +111,34 @@ public string ToJson(
jsonSerializerOptions);
}

/// <summary>
/// Deserializes a JSON stream using the provided JsonSerializerContext.
/// </summary>
public static async global::System.Threading.Tasks.ValueTask<global::Google.Gemini.Candidate?> FromJsonStream(
global::System.IO.Stream jsonStream,
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
typeof(global::Google.Gemini.Candidate),
jsonSerializerContext).ConfigureAwait(false)) as global::Google.Gemini.Candidate;
}

/// <summary>
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
/// </summary>
#if NET8_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
[global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
#endif
public static global::System.Threading.Tasks.ValueTask<global::Google.Gemini.Candidate?> FromJsonStream(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
return global::System.Text.Json.JsonSerializer.DeserializeAsync<global::Google.Gemini.Candidate?>(
jsonStream,
jsonSerializerOptions);
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -77,5 +77,34 @@ public string ToJson(
jsonSerializerOptions);
}

/// <summary>
/// Deserializes a JSON stream using the provided JsonSerializerContext.
/// </summary>
public static async global::System.Threading.Tasks.ValueTask<global::Google.Gemini.CitationMetadata?> FromJsonStream(
global::System.IO.Stream jsonStream,
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
typeof(global::Google.Gemini.CitationMetadata),
jsonSerializerContext).ConfigureAwait(false)) as global::Google.Gemini.CitationMetadata;
}

/// <summary>
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
/// </summary>
#if NET8_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
[global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
#endif
public static global::System.Threading.Tasks.ValueTask<global::Google.Gemini.CitationMetadata?> FromJsonStream(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
return global::System.Text.Json.JsonSerializer.DeserializeAsync<global::Google.Gemini.CitationMetadata?>(
jsonStream,
jsonSerializerOptions);
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -95,5 +95,34 @@ public string ToJson(
jsonSerializerOptions);
}

/// <summary>
/// Deserializes a JSON stream using the provided JsonSerializerContext.
/// </summary>
public static async global::System.Threading.Tasks.ValueTask<global::Google.Gemini.CitationSource?> FromJsonStream(
global::System.IO.Stream jsonStream,
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
typeof(global::Google.Gemini.CitationSource),
jsonSerializerContext).ConfigureAwait(false)) as global::Google.Gemini.CitationSource;
}

/// <summary>
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
/// </summary>
#if NET8_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
[global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
#endif
public static global::System.Threading.Tasks.ValueTask<global::Google.Gemini.CitationSource?> FromJsonStream(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
return global::System.Text.Json.JsonSerializer.DeserializeAsync<global::Google.Gemini.CitationSource?>(
jsonStream,
jsonSerializerOptions);
}

}
}
29 changes: 29 additions & 0 deletions src/libs/Google.Gemini/Generated/Google.Gemini.Models.Content.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,5 +83,34 @@ public string ToJson(
jsonSerializerOptions);
}

/// <summary>
/// Deserializes a JSON stream using the provided JsonSerializerContext.
/// </summary>
public static async global::System.Threading.Tasks.ValueTask<global::Google.Gemini.Content?> FromJsonStream(
global::System.IO.Stream jsonStream,
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
typeof(global::Google.Gemini.Content),
jsonSerializerContext).ConfigureAwait(false)) as global::Google.Gemini.Content;
}

/// <summary>
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
/// </summary>
#if NET8_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
[global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
#endif
public static global::System.Threading.Tasks.ValueTask<global::Google.Gemini.Content?> FromJsonStream(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
return global::System.Text.Json.JsonSerializer.DeserializeAsync<global::Google.Gemini.Content?>(
jsonStream,
jsonSerializerOptions);
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -77,5 +77,34 @@ public string ToJson(
jsonSerializerOptions);
}

/// <summary>
/// Deserializes a JSON stream using the provided JsonSerializerContext.
/// </summary>
public static async global::System.Threading.Tasks.ValueTask<global::Google.Gemini.ContentEmbedding?> FromJsonStream(
global::System.IO.Stream jsonStream,
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
typeof(global::Google.Gemini.ContentEmbedding),
jsonSerializerContext).ConfigureAwait(false)) as global::Google.Gemini.ContentEmbedding;
}

/// <summary>
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
/// </summary>
#if NET8_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
[global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
#endif
public static global::System.Threading.Tasks.ValueTask<global::Google.Gemini.ContentEmbedding?> FromJsonStream(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
return global::System.Text.Json.JsonSerializer.DeserializeAsync<global::Google.Gemini.ContentEmbedding?>(
jsonStream,
jsonSerializerOptions);
}

}
}
Loading

0 comments on commit e966f94

Please sign in to comment.