// <auto-generated/>

#nullable disable

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

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

        internal FineTuningJob(string id, DateTimeOffset createdAt, FineTuningJobError error, string fineTunedModel, DateTimeOffset? finishedAt, FineTuningJobHyperparameters hyperparameters, string model, string organizationId, IEnumerable<string> resultFiles, FineTuningJobStatus status, int? trainedTokens, string trainingFile, string validationFile, int seed)
        {
            Id = id;
            CreatedAt = createdAt;
            Error = error;
            FineTunedModel = fineTunedModel;
            FinishedAt = finishedAt;
            Hyperparameters = hyperparameters;
            Model = model;
            OrganizationId = organizationId;
            ResultFiles = resultFiles.ToList();
            Status = status;
            TrainedTokens = trainedTokens;
            TrainingFile = trainingFile;
            ValidationFile = validationFile;
            Integrations = new ChangeTrackingList<InternalFineTuningIntegration>();
            Seed = seed;
        }

        internal FineTuningJob(string userProvidedSuffix, string id, DateTimeOffset createdAt, FineTuningJobError error, string fineTunedModel, DateTimeOffset? finishedAt, FineTuningJobHyperparameters hyperparameters, string model, InternalFineTuningJobObject @object, string organizationId, IList<string> resultFiles, FineTuningJobStatus status, int? trainedTokens, string trainingFile, string validationFile, IList<InternalFineTuningIntegration> integrations, int seed, DateTimeOffset? estimatedFinish, InternalTodoFineTuneMethod @method, IDictionary<string, BinaryData> additionalBinaryDataProperties)
        {
            UserProvidedSuffix = userProvidedSuffix;
            Id = id;
            CreatedAt = createdAt;
            Error = error;
            FineTunedModel = fineTunedModel;
            FinishedAt = finishedAt;
            Hyperparameters = hyperparameters;
            Model = model;
            Object = @object;
            OrganizationId = organizationId;
            ResultFiles = resultFiles;
            Status = status;
            TrainedTokens = trainedTokens;
            TrainingFile = trainingFile;
            ValidationFile = validationFile;
            Integrations = integrations;
            Seed = seed;
            EstimatedFinish = estimatedFinish;
            Method = @method;
            _additionalBinaryDataProperties = additionalBinaryDataProperties;
        }

        public string UserProvidedSuffix { get; }

        public string Id { get; }

        public DateTimeOffset CreatedAt { get; }

        public FineTuningJobError Error { get; }

        public string FineTunedModel { get; }

        public DateTimeOffset? FinishedAt { get; }

        public FineTuningJobHyperparameters Hyperparameters { get; }

        public string Model { get; }

        public InternalFineTuningJobObject Object { get; } = "fine_tuning.job";

        public string OrganizationId { get; }

        public IList<string> ResultFiles { get; }

        public FineTuningJobStatus Status { get; }

        public int? TrainedTokens { get; }

        public string TrainingFile { get; }

        public string ValidationFile { get; }

        public IList<InternalFineTuningIntegration> Integrations { get; }

        public int Seed { get; }

        public DateTimeOffset? EstimatedFinish { get; }

        public InternalTodoFineTuneMethod Method { get; }

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