// <auto-generated/>

#nullable disable

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

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

        internal InternalCreateCompletionResponseChoiceLogprobs() : this(null, null, null, null, null)
        {
        }

        internal InternalCreateCompletionResponseChoiceLogprobs(IList<int> textOffset, IList<float> tokenLogprobs, IList<string> tokens, IList<IDictionary<string, float>> topLogprobs, IDictionary<string, BinaryData> additionalBinaryDataProperties)
        {
            // Plugin customization: ensure initialization of collections
            TextOffset = textOffset ?? new ChangeTrackingList<int>();
            TokenLogprobs = tokenLogprobs ?? new ChangeTrackingList<float>();
            Tokens = tokens ?? new ChangeTrackingList<string>();
            TopLogprobs = topLogprobs ?? new ChangeTrackingList<IDictionary<string, float>>();
            _additionalBinaryDataProperties = additionalBinaryDataProperties;
        }

        public IList<int> TextOffset { get; }

        public IList<float> TokenLogprobs { get; }

        public IList<string> Tokens { get; }

        public IList<IDictionary<string, float>> TopLogprobs { get; }

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