// <auto-generated/>

#nullable disable

using System;
using System.ComponentModel;

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

        public InternalRealtimeRequestItemType(string value)
        {
            _value = value ?? throw new ArgumentNullException(nameof(value));
        }

        private const string MessageValue = "message";
        private const string FunctionCallValue = "function_call";
        private const string FunctionCallOutputValue = "function_call_output";

        public static InternalRealtimeRequestItemType Message { get; } = new InternalRealtimeRequestItemType(MessageValue);
        public static InternalRealtimeRequestItemType FunctionCall { get; } = new InternalRealtimeRequestItemType(FunctionCallValue);
        public static InternalRealtimeRequestItemType FunctionCallOutput { get; } = new InternalRealtimeRequestItemType(FunctionCallOutputValue);
        public static bool operator ==(InternalRealtimeRequestItemType left, InternalRealtimeRequestItemType right) => left.Equals(right);
        public static bool operator !=(InternalRealtimeRequestItemType left, InternalRealtimeRequestItemType right) => !left.Equals(right);
        public static implicit operator InternalRealtimeRequestItemType(string value) => new InternalRealtimeRequestItemType(value);

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