// <auto-generated/>

#nullable disable

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

namespace OpenAI.Responses
{
    public partial class OpenAIResponse
    {
        private protected IDictionary<string, BinaryData> _additionalBinaryDataProperties;

        internal OpenAIResponse(string id, DateTimeOffset createdAt, ResponseError error, string instructions, string model, string previousResponseId, float temperature, IEnumerable<ResponseTool> tools, float topP, IDictionary<string, string> metadata, ResponseIncompleteStatusDetails incompleteStatusDetails, IEnumerable<ResponseItem> outputItems, bool parallelToolCallsEnabled, ResponseToolChoice toolChoice)
        {
            Id = id;
            CreatedAt = createdAt;
            Error = error;
            Instructions = instructions;
            Model = model;
            PreviousResponseId = previousResponseId;
            Temperature = temperature;
            Tools = tools.ToList();
            TopP = topP;
            Metadata = metadata;
            IncompleteStatusDetails = incompleteStatusDetails;
            OutputItems = outputItems.ToList();
            ParallelToolCallsEnabled = parallelToolCallsEnabled;
            ToolChoice = toolChoice;
        }

        internal OpenAIResponse(string id, DateTimeOffset createdAt, ResponseStatus? status, ResponseError error, string instructions, string model, string previousResponseId, float temperature, IList<ResponseTool> tools, float topP, ResponseTokenUsage usage, IDictionary<string, string> metadata, InternalCreateResponsesResponseObject @object, string endUserId, ResponseReasoningOptions reasoningOptions, int? maxOutputTokenCount, ResponseTextOptions textOptions, ResponseTruncationMode? truncationMode, ResponseIncompleteStatusDetails incompleteStatusDetails, IList<ResponseItem> outputItems, bool parallelToolCallsEnabled, ResponseToolChoice toolChoice, IDictionary<string, BinaryData> additionalBinaryDataProperties)
        {
            Id = id;
            CreatedAt = createdAt;
            Status = status;
            Error = error;
            Instructions = instructions;
            Model = model;
            PreviousResponseId = previousResponseId;
            Temperature = temperature;
            Tools = tools;
            TopP = topP;
            Usage = usage;
            Metadata = metadata;
            Object = @object;
            EndUserId = endUserId;
            ReasoningOptions = reasoningOptions;
            MaxOutputTokenCount = maxOutputTokenCount;
            TextOptions = textOptions;
            TruncationMode = truncationMode;
            IncompleteStatusDetails = incompleteStatusDetails;
            OutputItems = outputItems;
            ParallelToolCallsEnabled = parallelToolCallsEnabled;
            ToolChoice = toolChoice;
            _additionalBinaryDataProperties = additionalBinaryDataProperties;
        }

        public string Id { get; }

        public DateTimeOffset CreatedAt { get; }

        public ResponseStatus? Status { get; }

        public ResponseError Error { get; }

        public string Instructions { get; }

        public string Model { get; }

        public string PreviousResponseId { get; }

        public float Temperature { get; }

        public IList<ResponseTool> Tools { get; }

        public float TopP { get; }

        public ResponseTokenUsage Usage { get; }

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

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