// <auto-generated/>

#nullable disable

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

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

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

        internal AudioTranscription(string language, string text, IReadOnlyList<TranscribedWord> words, IReadOnlyList<TranscribedSegment> segments, InternalCreateTranscriptionResponseVerboseJsonTask task, TimeSpan? duration, IDictionary<string, BinaryData> additionalBinaryDataProperties)
        {
            Language = language;
            Text = text;
            Words = words;
            Segments = segments;
            Task = task;
            Duration = duration;
            _additionalBinaryDataProperties = additionalBinaryDataProperties;
        }

        public string Language { 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;
        }
    }
}
