// <auto-generated/>

#nullable disable

using System;
using System.ComponentModel;
using OpenAI;

namespace OpenAI.Realtime
{
    internal readonly partial struct InternalRealtimeResponseModality : IEquatable<InternalRealtimeResponseModality>
    {
        private readonly string _value;
        private const string TextValue = "text";
        private const string AudioValue = "audio";

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

            _value = value;
        }

        internal static InternalRealtimeResponseModality Text { get; } = new InternalRealtimeResponseModality(TextValue);

        internal static InternalRealtimeResponseModality Audio { get; } = new InternalRealtimeResponseModality(AudioValue);

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

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

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

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

        public bool Equals(InternalRealtimeResponseModality 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;
    }
}
