Clean up and add more comments (#2)
This commit is contained in:
parent
79af38cf21
commit
9a244f5770
1 changed files with 349 additions and 653 deletions
|
|
@ -37,48 +37,3 @@ public record Resource
|
|||
[JsonPropertyName("annotations")]
|
||||
public Annotations? Annotations { get; init; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Interface for resource contents.
|
||||
/// </summary>
|
||||
public interface IResourceContents
|
||||
{
|
||||
string Uri { get; }
|
||||
string? MimeType { get; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents text-based resource contents.
|
||||
/// </summary>
|
||||
public record TextResourceContents : IResourceContents
|
||||
{
|
||||
[JsonPropertyName("uri")]
|
||||
public required string Uri { get; init; }
|
||||
|
||||
[JsonPropertyName("mimeType")]
|
||||
public string? MimeType { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// The text content of the resource.
|
||||
/// </summary>
|
||||
[JsonPropertyName("text")]
|
||||
public required string Text { get; init; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents binary resource contents.
|
||||
/// </summary>
|
||||
public record BlobResourceContents : IResourceContents
|
||||
{
|
||||
[JsonPropertyName("uri")]
|
||||
public required string Uri { get; init; }
|
||||
|
||||
[JsonPropertyName("mimeType")]
|
||||
public string? MimeType { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// The base64-encoded binary content of the resource.
|
||||
/// </summary>
|
||||
[JsonPropertyName("blob")]
|
||||
public required string Blob { get; init; }
|
||||
}
|
||||
Loading…
Reference in a new issue