// <auto-generated/>

#nullable disable

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

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

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

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

        public string Language { get; }

        public string Text { get; }

        public IReadOnlyList<TranscribedSegment> Segments { get; }

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