// <auto-generated/>

#nullable disable

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

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

        internal InternalEvalRunOutputItem(string id, string runId, string evalId, DateTimeOffset createdAt, string status, int datasourceItemId, IDictionary<string, BinaryData> datasourceItem, IEnumerable<IDictionary<string, BinaryData>> results, InternalEvalRunOutputItemSample sample)
        {
            // Plugin customization: ensure initialization of collections
            Id = id;
            RunId = runId;
            EvalId = evalId;
            CreatedAt = createdAt;
            Status = status;
            DatasourceItemId = datasourceItemId;
            DatasourceItem = datasourceItem ?? new ChangeTrackingDictionary<string, BinaryData>();
            Results = results.ToList();
            Sample = sample;
        }

        internal InternalEvalRunOutputItem(string @object, string id, string runId, string evalId, DateTimeOffset createdAt, string status, int datasourceItemId, IDictionary<string, BinaryData> datasourceItem, IList<IDictionary<string, BinaryData>> results, InternalEvalRunOutputItemSample sample, IDictionary<string, BinaryData> additionalBinaryDataProperties)
        {
            // Plugin customization: ensure initialization of collections
            Object = @object;
            Id = id;
            RunId = runId;
            EvalId = evalId;
            CreatedAt = createdAt;
            Status = status;
            DatasourceItemId = datasourceItemId;
            DatasourceItem = datasourceItem ?? new ChangeTrackingDictionary<string, BinaryData>();
            Results = results ?? new ChangeTrackingList<IDictionary<string, BinaryData>>();
            Sample = sample;
            _additionalBinaryDataProperties = additionalBinaryDataProperties;
        }

        public string Object { get; } = "eval.run.output_item";

        public string Id { get; }

        public string RunId { get; }

        public string EvalId { get; }

        public DateTimeOffset CreatedAt { get; }

        public string Status { get; }

        public int DatasourceItemId { get; }

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

        public IList<IDictionary<string, BinaryData>> Results { get; }

        internal InternalEvalRunOutputItemSample Sample { get; }

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