// <auto-generated/>

#nullable disable

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

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

        internal InternalCreateEvalRequest(InternalEvalDataSourceConfigParams dataSourceConfig, IEnumerable<InternalEvalGraderParams> testingCriteria)
        {
            Argument.AssertNotNull(dataSourceConfig, nameof(dataSourceConfig));
            Argument.AssertNotNull(testingCriteria, nameof(testingCriteria));

            Metadata = new ChangeTrackingDictionary<string, string>();
            DataSourceConfig = dataSourceConfig;
            TestingCriteria = testingCriteria.ToList();
        }

        internal InternalCreateEvalRequest(string name, IDictionary<string, string> metadata, InternalEvalDataSourceConfigParams dataSourceConfig, IList<InternalEvalGraderParams> testingCriteria, IDictionary<string, BinaryData> additionalBinaryDataProperties)
        {
            // Plugin customization: ensure initialization of collections
            Name = name;
            Metadata = metadata ?? new ChangeTrackingDictionary<string, string>();
            DataSourceConfig = dataSourceConfig;
            TestingCriteria = testingCriteria ?? new ChangeTrackingList<InternalEvalGraderParams>();
            _additionalBinaryDataProperties = additionalBinaryDataProperties;
        }

        public string Name { get; set; }

        public IDictionary<string, string> Metadata { get; }

        internal InternalEvalDataSourceConfigParams DataSourceConfig { get; }

        internal IList<InternalEvalGraderParams> TestingCriteria { get; }

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