// <auto-generated/>

#nullable disable

using System;
using System.ComponentModel;
using OpenAI;

namespace OpenAI.Realtime
{
    internal readonly partial struct InternalRealtimeClientEventType : IEquatable<InternalRealtimeClientEventType>
    {
        private readonly string _value;
        private const string SessionUpdateValue = "session.update";
        private const string InputAudioBufferAppendValue = "input_audio_buffer.append";
        private const string InputAudioBufferCommitValue = "input_audio_buffer.commit";
        private const string InputAudioBufferClearValue = "input_audio_buffer.clear";
        private const string OutputAudioBufferClearValue = "output_audio_buffer.clear";
        private const string ConversationItemCreateValue = "conversation.item.create";
        private const string ConversationItemRetrieveValue = "conversation.item.retrieve";
        private const string ConversationItemTruncateValue = "conversation.item.truncate";
        private const string ConversationItemDeleteValue = "conversation.item.delete";
        private const string ResponseCreateValue = "response.create";
        private const string ResponseCancelValue = "response.cancel";
        private const string TranscriptionSessionUpdateValue = "transcription_session.update";

        public InternalRealtimeClientEventType(string value)
        {
            Argument.AssertNotNull(value, nameof(value));

            _value = value;
        }

        internal static InternalRealtimeClientEventType SessionUpdate { get; } = new InternalRealtimeClientEventType(SessionUpdateValue);

        internal static InternalRealtimeClientEventType InputAudioBufferAppend { get; } = new InternalRealtimeClientEventType(InputAudioBufferAppendValue);

        internal static InternalRealtimeClientEventType InputAudioBufferCommit { get; } = new InternalRealtimeClientEventType(InputAudioBufferCommitValue);

        internal static InternalRealtimeClientEventType InputAudioBufferClear { get; } = new InternalRealtimeClientEventType(InputAudioBufferClearValue);

        internal static InternalRealtimeClientEventType OutputAudioBufferClear { get; } = new InternalRealtimeClientEventType(OutputAudioBufferClearValue);

        internal static InternalRealtimeClientEventType ConversationItemCreate { get; } = new InternalRealtimeClientEventType(ConversationItemCreateValue);

        internal static InternalRealtimeClientEventType ConversationItemRetrieve { get; } = new InternalRealtimeClientEventType(ConversationItemRetrieveValue);

        internal static InternalRealtimeClientEventType ConversationItemTruncate { get; } = new InternalRealtimeClientEventType(ConversationItemTruncateValue);

        internal static InternalRealtimeClientEventType ConversationItemDelete { get; } = new InternalRealtimeClientEventType(ConversationItemDeleteValue);

        internal static InternalRealtimeClientEventType ResponseCreate { get; } = new InternalRealtimeClientEventType(ResponseCreateValue);

        internal static InternalRealtimeClientEventType ResponseCancel { get; } = new InternalRealtimeClientEventType(ResponseCancelValue);

        internal static InternalRealtimeClientEventType TranscriptionSessionUpdate { get; } = new InternalRealtimeClientEventType(TranscriptionSessionUpdateValue);

        public static bool operator ==(InternalRealtimeClientEventType left, InternalRealtimeClientEventType right) => left.Equals(right);

        public static bool operator !=(InternalRealtimeClientEventType left, InternalRealtimeClientEventType right) => !left.Equals(right);

        public static implicit operator InternalRealtimeClientEventType(string value) => new InternalRealtimeClientEventType(value);

        [EditorBrowsable(EditorBrowsableState.Never)]
        public override bool Equals(object obj) => obj is InternalRealtimeClientEventType other && Equals(other);

        public bool Equals(InternalRealtimeClientEventType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase);

        [EditorBrowsable(EditorBrowsableState.Never)]
        public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0;

        public override string ToString() => _value;
    }
}
