// <auto-generated/>

#nullable disable

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

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

        internal InternalRealtimeResponseSession(string id, string model, IEnumerable<InternalRealtimeRequestSessionModality> modalities, string instructions, ConversationVoice voice, ConversationAudioFormat inputAudioFormat, ConversationAudioFormat outputAudioFormat, ConversationInputTranscriptionOptions inputAudioTranscription, ConversationTurnDetectionOptions turnDetection, BinaryData toolChoice, float temperature, BinaryData maxResponseOutputTokens)
        {
            Id = id;
            Model = model;
            Modalities = modalities.ToList();
            Instructions = instructions;
            Voice = voice;
            InputAudioFormat = inputAudioFormat;
            OutputAudioFormat = outputAudioFormat;
            InputAudioTranscription = inputAudioTranscription;
            TurnDetection = turnDetection;
            Tools = new ChangeTrackingList<ConversationTool>();
            ToolChoice = toolChoice;
            Temperature = temperature;
            _maxResponseOutputTokens = maxResponseOutputTokens;
        }

        internal InternalRealtimeResponseSession(InternalRealtimeResponseSessionObject @object, string id, string model, IList<InternalRealtimeRequestSessionModality> modalities, string instructions, ConversationVoice voice, ConversationAudioFormat inputAudioFormat, ConversationAudioFormat outputAudioFormat, ConversationInputTranscriptionOptions inputAudioTranscription, ConversationTurnDetectionOptions turnDetection, IReadOnlyList<ConversationTool> tools, BinaryData toolChoice, float temperature, BinaryData maxResponseOutputTokens, IDictionary<string, BinaryData> additionalBinaryDataProperties)
        {
            Object = @object;
            Id = id;
            Model = model;
            Modalities = modalities;
            Instructions = instructions;
            Voice = voice;
            InputAudioFormat = inputAudioFormat;
            OutputAudioFormat = outputAudioFormat;
            InputAudioTranscription = inputAudioTranscription;
            TurnDetection = turnDetection;
            Tools = tools;
            ToolChoice = toolChoice;
            Temperature = temperature;
            _maxResponseOutputTokens = maxResponseOutputTokens;
            _additionalBinaryDataProperties = additionalBinaryDataProperties;
        }

        public InternalRealtimeResponseSessionObject Object { get; } = "realtime.session";

        public string Id { get; }

        public string Model { get; }

        public IList<InternalRealtimeRequestSessionModality> Modalities { get; }

        public string Instructions { get; }

        public ConversationVoice Voice { get; }

        public ConversationAudioFormat InputAudioFormat { get; }

        public ConversationAudioFormat OutputAudioFormat { get; }

        public ConversationInputTranscriptionOptions InputAudioTranscription { get; }

        public ConversationTurnDetectionOptions TurnDetection { get; }

        public IReadOnlyList<ConversationTool> Tools { get; }

        public BinaryData ToolChoice { get; }

        public float Temperature { get; }

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