// <auto-generated/>

#nullable disable

using System;
using System.Collections.Generic;
using System.Linq;

namespace OpenAI.Audio
{
    public readonly partial struct TranscribedSegment
    {
        private readonly IDictionary<string, BinaryData> _serializedAdditionalRawData;

        internal TranscribedSegment(int id, long seekOffset, TimeSpan start, TimeSpan end, string text, IEnumerable<long> tokenIds, float temperature, double averageLogProbability, float compressionRatio, double noSpeechProbability)
        {
            Argument.AssertNotNull(text, nameof(text));
            Argument.AssertNotNull(tokenIds, nameof(tokenIds));

            Id = id;
            SeekOffset = seekOffset;
            Start = start;
            End = end;
            Text = text;
            TokenIds = tokenIds.ToList();
            Temperature = temperature;
            AverageLogProbability = averageLogProbability;
            CompressionRatio = compressionRatio;
            NoSpeechProbability = noSpeechProbability;
        }

        internal TranscribedSegment(int id, long seekOffset, TimeSpan start, TimeSpan end, string text, IReadOnlyList<long> tokenIds, float temperature, double averageLogProbability, float compressionRatio, double noSpeechProbability, IDictionary<string, BinaryData> serializedAdditionalRawData)
        {
            Id = id;
            SeekOffset = seekOffset;
            Start = start;
            End = end;
            Text = text;
            TokenIds = tokenIds;
            Temperature = temperature;
            AverageLogProbability = averageLogProbability;
            CompressionRatio = compressionRatio;
            NoSpeechProbability = noSpeechProbability;
            _serializedAdditionalRawData = serializedAdditionalRawData;
        }

        public TranscribedSegment()
        {
        }

        public int Id { get; }
        public TimeSpan Start { get; }
        public TimeSpan End { get; }
        public string Text { get; }
        public float Temperature { get; }
        public float CompressionRatio { get; }
    }
}
