// <auto-generated/>

#nullable disable

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

namespace OpenAI.Assistants
{
    public partial class ThreadRun
    {
        internal IDictionary<string, BinaryData> _serializedAdditionalRawData;

        internal ThreadRun(string id, DateTimeOffset createdAt, string threadId, string assistantId, RunStatus status, InternalRunRequiredAction internalRequiredAction, RunError lastError, DateTimeOffset? expiresAt, DateTimeOffset? startedAt, DateTimeOffset? cancelledAt, DateTimeOffset? failedAt, DateTimeOffset? completedAt, RunIncompleteDetails incompleteDetails, string model, string instructions, IEnumerable<ToolDefinition> tools, IReadOnlyDictionary<string, string> metadata, RunTokenUsage usage, int? maxPromptTokens, int? maxCompletionTokens, RunTruncationStrategy truncationStrategy, ToolConstraint toolConstraint, AssistantResponseFormat responseFormat)
        {
            Argument.AssertNotNull(id, nameof(id));
            Argument.AssertNotNull(threadId, nameof(threadId));
            Argument.AssertNotNull(assistantId, nameof(assistantId));
            Argument.AssertNotNull(model, nameof(model));
            Argument.AssertNotNull(instructions, nameof(instructions));
            Argument.AssertNotNull(tools, nameof(tools));

            Id = id;
            CreatedAt = createdAt;
            ThreadId = threadId;
            AssistantId = assistantId;
            Status = status;
            _internalRequiredAction = internalRequiredAction;
            LastError = lastError;
            ExpiresAt = expiresAt;
            StartedAt = startedAt;
            CancelledAt = cancelledAt;
            FailedAt = failedAt;
            CompletedAt = completedAt;
            IncompleteDetails = incompleteDetails;
            Model = model;
            Instructions = instructions;
            Tools = tools.ToList();
            Metadata = metadata;
            Usage = usage;
            MaxPromptTokens = maxPromptTokens;
            MaxCompletionTokens = maxCompletionTokens;
            TruncationStrategy = truncationStrategy;
            ToolConstraint = toolConstraint;
            ResponseFormat = responseFormat;
        }

        internal ThreadRun(string id, InternalRunObjectObject @object, DateTimeOffset createdAt, string threadId, string assistantId, RunStatus status, InternalRunRequiredAction internalRequiredAction, RunError lastError, DateTimeOffset? expiresAt, DateTimeOffset? startedAt, DateTimeOffset? cancelledAt, DateTimeOffset? failedAt, DateTimeOffset? completedAt, RunIncompleteDetails incompleteDetails, string model, string instructions, IReadOnlyList<ToolDefinition> tools, IReadOnlyDictionary<string, string> metadata, RunTokenUsage usage, float? temperature, float? nucleusSamplingFactor, int? maxPromptTokens, int? maxCompletionTokens, RunTruncationStrategy truncationStrategy, ToolConstraint toolConstraint, AssistantResponseFormat responseFormat, IDictionary<string, BinaryData> serializedAdditionalRawData)
        {
            Id = id;
            Object = @object;
            CreatedAt = createdAt;
            ThreadId = threadId;
            AssistantId = assistantId;
            Status = status;
            _internalRequiredAction = internalRequiredAction;
            LastError = lastError;
            ExpiresAt = expiresAt;
            StartedAt = startedAt;
            CancelledAt = cancelledAt;
            FailedAt = failedAt;
            CompletedAt = completedAt;
            IncompleteDetails = incompleteDetails;
            Model = model;
            Instructions = instructions;
            Tools = tools;
            Metadata = metadata;
            Usage = usage;
            Temperature = temperature;
            NucleusSamplingFactor = nucleusSamplingFactor;
            MaxPromptTokens = maxPromptTokens;
            MaxCompletionTokens = maxCompletionTokens;
            TruncationStrategy = truncationStrategy;
            ToolConstraint = toolConstraint;
            ResponseFormat = responseFormat;
            _serializedAdditionalRawData = serializedAdditionalRawData;
        }

        internal ThreadRun()
        {
        }

        public string Id { get; }

        public DateTimeOffset CreatedAt { get; }
        public string ThreadId { get; }
        public string AssistantId { get; }
        public RunStatus Status { get; }
        public RunError LastError { get; }
        public DateTimeOffset? ExpiresAt { get; }
        public DateTimeOffset? StartedAt { get; }
        public DateTimeOffset? CancelledAt { get; }
        public DateTimeOffset? FailedAt { get; }
        public DateTimeOffset? CompletedAt { get; }
        public RunIncompleteDetails IncompleteDetails { get; }
        public string Model { get; }
        public string Instructions { get; }
        public IReadOnlyList<ToolDefinition> Tools { get; }
        public IReadOnlyDictionary<string, string> Metadata { get; }
        public RunTokenUsage Usage { get; }
        public float? Temperature { get; }
        public int? MaxPromptTokens { get; }
        public int? MaxCompletionTokens { get; }
        public RunTruncationStrategy TruncationStrategy { get; }
    }
}
