// <auto-generated/>

#nullable disable

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

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

        internal InternalEval(string id, string name, InternalEvalDataSourceConfigResource dataSourceConfig, IEnumerable<InternalEvalGraderResource> testingCriteria, DateTimeOffset createdAt, IDictionary<string, string> metadata)
        {
            // Plugin customization: ensure initialization of collections
            Id = id;
            Name = name;
            DataSourceConfig = dataSourceConfig;
            TestingCriteria = testingCriteria?.ToList();
            CreatedAt = createdAt;
            Metadata = metadata ?? new ChangeTrackingDictionary<string, string>();
        }

        internal InternalEval(string @object, string id, string name, InternalEvalDataSourceConfigResource dataSourceConfig, IList<InternalEvalGraderResource> testingCriteria, DateTimeOffset createdAt, IDictionary<string, string> metadata, IDictionary<string, BinaryData> additionalBinaryDataProperties)
        {
            // Plugin customization: ensure initialization of collections
            Object = @object;
            Id = id;
            Name = name;
            DataSourceConfig = dataSourceConfig;
            TestingCriteria = testingCriteria ?? new ChangeTrackingList<InternalEvalGraderResource>();
            CreatedAt = createdAt;
            Metadata = metadata ?? new ChangeTrackingDictionary<string, string>();
            _additionalBinaryDataProperties = additionalBinaryDataProperties;
        }

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

        public string Id { get; }

        public string Name { get; }

        internal InternalEvalDataSourceConfigResource DataSourceConfig { get; }

        internal IList<InternalEvalGraderResource> TestingCriteria { get; }

        public DateTimeOffset CreatedAt { get; }

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

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