// <auto-generated/>

#nullable disable

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

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

        internal InternalResponseItemList(IEnumerable<ResponseItem> data, bool hasMore, string firstId, string lastId)
        {
            Data = data.ToList();
            HasMore = hasMore;
            FirstId = firstId;
            LastId = lastId;
        }

        internal InternalResponseItemList(string @object, IList<ResponseItem> data, bool hasMore, string firstId, string lastId, IDictionary<string, BinaryData> additionalBinaryDataProperties)
        {
            // Plugin customization: ensure initialization of collections
            Object = @object;
            Data = data ?? new ChangeTrackingList<ResponseItem>();
            HasMore = hasMore;
            FirstId = firstId;
            LastId = lastId;
            _additionalBinaryDataProperties = additionalBinaryDataProperties;
        }

        public string Object { get; } = "list";

        public IList<ResponseItem> Data { get; }

        public bool HasMore { get; }

        public string FirstId { get; }

        public string LastId { get; }

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