// <auto-generated/>

#nullable disable

using System;
using System.ComponentModel;

namespace OpenAI.RealtimeConversation
{
    internal readonly partial struct InternalRealtimeRequestCommandType : IEquatable<InternalRealtimeRequestCommandType>
    {
        private readonly string _value;

        public InternalRealtimeRequestCommandType(string value)
        {
            _value = value ?? throw new ArgumentNullException(nameof(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 ItemCreateValue = "conversation.item.create";
        private const string ItemDeleteValue = "conversation.item.delete";
        private const string ItemTruncateValue = "conversation.item.truncate";
        private const string ResponseCreateValue = "response.create";
        private const string ResponseCancelValue = "response.cancel";

        public static InternalRealtimeRequestCommandType SessionUpdate { get; } = new InternalRealtimeRequestCommandType(SessionUpdateValue);
        public static InternalRealtimeRequestCommandType InputAudioBufferAppend { get; } = new InternalRealtimeRequestCommandType(InputAudioBufferAppendValue);
        public static InternalRealtimeRequestCommandType InputAudioBufferCommit { get; } = new InternalRealtimeRequestCommandType(InputAudioBufferCommitValue);
        public static InternalRealtimeRequestCommandType InputAudioBufferClear { get; } = new InternalRealtimeRequestCommandType(InputAudioBufferClearValue);
        public static InternalRealtimeRequestCommandType ItemCreate { get; } = new InternalRealtimeRequestCommandType(ItemCreateValue);
        public static InternalRealtimeRequestCommandType ItemDelete { get; } = new InternalRealtimeRequestCommandType(ItemDeleteValue);
        public static InternalRealtimeRequestCommandType ItemTruncate { get; } = new InternalRealtimeRequestCommandType(ItemTruncateValue);
        public static InternalRealtimeRequestCommandType ResponseCreate { get; } = new InternalRealtimeRequestCommandType(ResponseCreateValue);
        public static InternalRealtimeRequestCommandType ResponseCancel { get; } = new InternalRealtimeRequestCommandType(ResponseCancelValue);
        public static bool operator ==(InternalRealtimeRequestCommandType left, InternalRealtimeRequestCommandType right) => left.Equals(right);
        public static bool operator !=(InternalRealtimeRequestCommandType left, InternalRealtimeRequestCommandType right) => !left.Equals(right);
        public static implicit operator InternalRealtimeRequestCommandType(string value) => new InternalRealtimeRequestCommandType(value);

        [EditorBrowsable(EditorBrowsableState.Never)]
        public override bool Equals(object obj) => obj is InternalRealtimeRequestCommandType other && Equals(other);
        public bool Equals(InternalRealtimeRequestCommandType 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;
    }
}
