40 lines
932 B
C#
40 lines
932 B
C#
using System.Text.Json.Serialization;
|
|
|
|
namespace StellaOps.Provcache;
|
|
|
|
/// <summary>
|
|
/// Chunk included in the bundle with base64-encoded blob.
|
|
/// </summary>
|
|
public sealed record BundleChunk
|
|
{
|
|
/// <summary>
|
|
/// Zero-based chunk index.
|
|
/// </summary>
|
|
[JsonPropertyName("index")]
|
|
public required int Index { get; init; }
|
|
|
|
/// <summary>
|
|
/// SHA256 hash for verification.
|
|
/// </summary>
|
|
[JsonPropertyName("hash")]
|
|
public required string Hash { get; init; }
|
|
|
|
/// <summary>
|
|
/// Size in bytes.
|
|
/// </summary>
|
|
[JsonPropertyName("size")]
|
|
public required int Size { get; init; }
|
|
|
|
/// <summary>
|
|
/// MIME type.
|
|
/// </summary>
|
|
[JsonPropertyName("contentType")]
|
|
public required string ContentType { get; init; }
|
|
|
|
/// <summary>
|
|
/// Base64-encoded chunk data.
|
|
/// </summary>
|
|
[JsonPropertyName("data")]
|
|
public required string Data { get; init; }
|
|
}
|