#nullable enable

namespace Google.Gemini;

using System.Text.Json.Serialization;

/// <summary>
/// Content generated by the model during a Live API session.
/// </summary>
public sealed class LiveServerContent
{
    /// <summary>
    /// The model's response turn containing generated parts (text, audio, etc.).
    /// </summary>
    [JsonPropertyName("modelTurn")]
    public Content? ModelTurn { get; set; }

    /// <summary>
    /// Transcription of the user's input audio.
    /// </summary>
    [JsonPropertyName("inputTranscription")]
    public LiveTranscription? InputTranscription { get; set; }

    /// <summary>
    /// Transcription of the model's output audio.
    /// </summary>
    [JsonPropertyName("outputTranscription")]
    public LiveTranscription? OutputTranscription { get; set; }

    /// <summary>
    /// If true, the model's current response was interrupted (e.g., by the user speaking).
    /// </summary>
    [JsonPropertyName("interrupted")]
    public bool? Interrupted { get; set; }

    /// <summary>
    /// If true, the model's current turn is complete.
    /// </summary>
    [JsonPropertyName("turnComplete")]
    public bool? TurnComplete { get; set; }

    /// <summary>
    /// Generation ID for this turn, useful for correlating events within the same generation.
    /// </summary>
    [JsonPropertyName("generationId")]
    public string? GenerationId { get; set; }
}

/// <summary>
/// Transcription of audio content.
/// </summary>
public sealed class LiveTranscription
{
    /// <summary>
    /// The transcribed text.
    /// </summary>
    [JsonPropertyName("text")]
    public string? Text { get; set; }
}
