2024-06-28 10:54:00 -05:00
|
|
|
using System.Text.Json.Serialization;
|
|
|
|
|
|
|
|
|
|
namespace AnthropicClient.Models;
|
|
|
|
|
|
2024-06-29 22:20:55 -05:00
|
|
|
/// <summary>
|
|
|
|
|
/// Represents data for a content_block_stop event.
|
|
|
|
|
/// </summary>
|
2024-06-28 10:54:00 -05:00
|
|
|
public class ContentStopEventData : EventData
|
|
|
|
|
{
|
2024-06-29 22:20:55 -05:00
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the index of the content block.
|
|
|
|
|
/// </summary>
|
2024-06-28 10:54:00 -05:00
|
|
|
public int Index { get; init; }
|
|
|
|
|
|
|
|
|
|
[JsonConstructor]
|
|
|
|
|
internal ContentStopEventData() : base(EventType.ContentBlockStop)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2024-06-29 22:20:55 -05:00
|
|
|
/// <summary>
|
|
|
|
|
/// Initializes a new instance of the <see cref="ContentStopEventData"/> class.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="index">The index of the content block.</param>
|
|
|
|
|
/// <returns>A new instance of the <see cref="ContentStopEventData"/> class.</returns>
|
2024-06-28 10:54:00 -05:00
|
|
|
public ContentStopEventData(int index) : base(EventType.ContentBlockStop)
|
|
|
|
|
{
|
|
|
|
|
Index = index;
|
|
|
|
|
}
|
|
|
|
|
}
|