// <auto-generated/>

#nullable disable

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

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

        internal InternalListBatchesResponse(IEnumerable<InternalBatchJob> data, bool hasMore)
        {
            Data = data.ToList();
            HasMore = hasMore;
        }

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

        internal IList<InternalBatchJob> Data { get; }

        public string FirstId { get; }

        public string LastId { get; }

        public bool HasMore { get; }

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

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