// <auto-generated/>

#nullable disable

using System;
using System.Collections.Generic;
using OpenAI;

namespace OpenAI.Audio
{
    internal partial class InternalCreateTranscriptionResponseVerboseJson
    {
        private protected IDictionary<string, BinaryData> _additionalBinaryDataProperties;

        internal InternalCreateTranscriptionResponseVerboseJson(string language, TimeSpan duration, string text)
        {
            Language = language;
            Duration = duration;
            Text = text;
            Words = new ChangeTrackingList<TranscribedWord>();
            Segments = new ChangeTrackingList<TranscribedSegment>();
        }

        internal InternalCreateTranscriptionResponseVerboseJson(string task, string language, TimeSpan duration, string text, IReadOnlyList<TranscribedWord> words, IReadOnlyList<TranscribedSegment> segments, IDictionary<string, BinaryData> additionalBinaryDataProperties)
        {
            // Plugin customization: ensure initialization of collections
            Task = task;
            Language = language;
            Duration = duration;
            Text = text;
            Words = words ?? new ChangeTrackingList<TranscribedWord>();
            Segments = segments ?? new ChangeTrackingList<TranscribedSegment>();
            _additionalBinaryDataProperties = additionalBinaryDataProperties;
        }

        public string Task { get; } = "transcribe";

        public string Language { get; }

        public TimeSpan Duration { get; }

        public string Text { get; }

        public IReadOnlyList<TranscribedWord> Words { get; }

        public IReadOnlyList<TranscribedSegment> Segments { get; }

        internal IDictionary<string, BinaryData> SerializedAdditionalRawData
        {
            get => _additionalBinaryDataProperties;
            set => _additionalBinaryDataProperties = value;
        }
    }
}
