// <auto-generated/>

#nullable disable

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

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

        internal InternalVectorStoreSearchResultItem(string fileId, string filename, float score, IDictionary<string, BinaryData> attributes, IEnumerable<InternalVectorStoreSearchResultContentObject> content)
        {
            // Plugin customization: ensure initialization of collections
            FileId = fileId;
            Filename = filename;
            Score = score;
            Attributes = attributes ?? new ChangeTrackingDictionary<string, BinaryData>();
            Content = content.ToList();
        }

        internal InternalVectorStoreSearchResultItem(string fileId, string filename, float score, IDictionary<string, BinaryData> attributes, IList<InternalVectorStoreSearchResultContentObject> content, IDictionary<string, BinaryData> additionalBinaryDataProperties)
        {
            // Plugin customization: ensure initialization of collections
            FileId = fileId;
            Filename = filename;
            Score = score;
            Attributes = attributes ?? new ChangeTrackingDictionary<string, BinaryData>();
            Content = content ?? new ChangeTrackingList<InternalVectorStoreSearchResultContentObject>();
            _additionalBinaryDataProperties = additionalBinaryDataProperties;
        }

        public string FileId { get; }

        public string Filename { get; }

        public float Score { get; }

        public IDictionary<string, BinaryData> Attributes { get; }

        internal IList<InternalVectorStoreSearchResultContentObject> Content { get; }

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