// <auto-generated/>

#nullable disable

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

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

        internal InternalRealtimeResponse(IDictionary<string, string> metadata)
        {
            // Plugin customization: ensure initialization of collections
            Metadata = metadata ?? new ChangeTrackingDictionary<string, string>();
            Output = new ChangeTrackingList<RealtimeItem>();
            Modalities = new ChangeTrackingList<InternalRealtimeResponseModality>();
        }

        internal InternalRealtimeResponse(string id, string @object, ConversationStatus? status, ConversationStatusDetails statusDetails, IDictionary<string, string> metadata, ConversationTokenUsage usage, string conversationId, float? temperature, BinaryData maxOutputTokens, IReadOnlyList<RealtimeItem> output, IReadOnlyList<InternalRealtimeResponseModality> modalities, ConversationVoice? voice, RealtimeAudioFormat? outputAudioFormat, IDictionary<string, BinaryData> additionalBinaryDataProperties)
        {
            // Plugin customization: ensure initialization of collections
            Id = id;
            Object = @object;
            Status = status;
            StatusDetails = statusDetails;
            Metadata = metadata ?? new ChangeTrackingDictionary<string, string>();
            Usage = usage;
            ConversationId = conversationId;
            Temperature = temperature;
            MaxOutputTokens = maxOutputTokens;
            Output = output ?? new ChangeTrackingList<RealtimeItem>();
            Modalities = modalities ?? new ChangeTrackingList<InternalRealtimeResponseModality>();
            Voice = voice;
            OutputAudioFormat = outputAudioFormat;
            _additionalBinaryDataProperties = additionalBinaryDataProperties;
        }

        public string Id { get; }

        public string Object { get; }

        public ConversationStatus? Status { get; }

        public ConversationStatusDetails StatusDetails { get; }

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

        public ConversationTokenUsage Usage { get; }

        public string ConversationId { get; }

        public float? Temperature { get; }

        public BinaryData MaxOutputTokens { get; }

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