// <auto-generated/>

#nullable disable

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

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

        internal InternalBatchJob(string id, string endpoint, string inputFileId, string completionWindow, InternalBatchStatus status, DateTimeOffset createdAt, IDictionary<string, string> metadata)
        {
            // Plugin customization: ensure initialization of collections
            Id = id;
            Endpoint = endpoint;
            InputFileId = inputFileId;
            CompletionWindow = completionWindow;
            Status = status;
            CreatedAt = createdAt;
            Metadata = metadata ?? new ChangeTrackingDictionary<string, string>();
        }

        internal InternalBatchJob(string id, string @object, string endpoint, InternalBatchErrors errors, string inputFileId, string completionWindow, InternalBatchStatus status, string outputFileId, string errorFileId, DateTimeOffset createdAt, DateTimeOffset? inProgressAt, DateTimeOffset? expiresAt, DateTimeOffset? finalizingAt, DateTimeOffset? completedAt, DateTimeOffset? failedAt, DateTimeOffset? expiredAt, DateTimeOffset? cancellingAt, DateTimeOffset? cancelledAt, InternalBatchRequestCounts requestCounts, IDictionary<string, string> metadata, IDictionary<string, BinaryData> additionalBinaryDataProperties)
        {
            // Plugin customization: ensure initialization of collections
            Id = id;
            Object = @object;
            Endpoint = endpoint;
            Errors = errors;
            InputFileId = inputFileId;
            CompletionWindow = completionWindow;
            Status = status;
            OutputFileId = outputFileId;
            ErrorFileId = errorFileId;
            CreatedAt = createdAt;
            InProgressAt = inProgressAt;
            ExpiresAt = expiresAt;
            FinalizingAt = finalizingAt;
            CompletedAt = completedAt;
            FailedAt = failedAt;
            ExpiredAt = expiredAt;
            CancellingAt = cancellingAt;
            CancelledAt = cancelledAt;
            RequestCounts = requestCounts;
            Metadata = metadata ?? new ChangeTrackingDictionary<string, string>();
            _additionalBinaryDataProperties = additionalBinaryDataProperties;
        }

        public string Id { get; }

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

        public string Endpoint { get; }

        internal InternalBatchErrors Errors { get; }

        public string InputFileId { get; }

        public string CompletionWindow { get; }

        internal InternalBatchStatus Status { get; }

        public string OutputFileId { get; }

        public string ErrorFileId { get; }

        public DateTimeOffset CreatedAt { get; }

        public DateTimeOffset? InProgressAt { get; }

        public DateTimeOffset? ExpiresAt { get; }

        public DateTimeOffset? FinalizingAt { get; }

        public DateTimeOffset? CompletedAt { get; }

        public DateTimeOffset? FailedAt { get; }

        public DateTimeOffset? ExpiredAt { get; }

        public DateTimeOffset? CancellingAt { get; }

        public DateTimeOffset? CancelledAt { get; }

        internal InternalBatchRequestCounts RequestCounts { get; }

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

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