// <auto-generated/>

#nullable disable

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

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

        internal InternalLogProb(string token, float logprob, IEnumerable<int> bytes, IEnumerable<InternalTopLogProb> topLogprobs)
        {
            Argument.AssertNotNull(token, nameof(token));
            Argument.AssertNotNull(bytes, nameof(bytes));
            Argument.AssertNotNull(topLogprobs, nameof(topLogprobs));

            Token = token;
            Logprob = logprob;
            Bytes = bytes.ToList();
            TopLogprobs = topLogprobs.ToList();
        }

        internal InternalLogProb(string token, float logprob, IList<int> bytes, IList<InternalTopLogProb> topLogprobs, IDictionary<string, BinaryData> additionalBinaryDataProperties)
        {
            // Plugin customization: ensure initialization of collections
            Token = token;
            Logprob = logprob;
            Bytes = bytes ?? new ChangeTrackingList<int>();
            TopLogprobs = topLogprobs ?? new ChangeTrackingList<InternalTopLogProb>();
            _additionalBinaryDataProperties = additionalBinaryDataProperties;
        }

        public string Token { get; set; }

        public float Logprob { get; set; }

        public IList<int> Bytes { get; }

        internal IList<InternalTopLogProb> TopLogprobs { get; }

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