// <auto-generated/>

#nullable disable

using System;
using System.ComponentModel;
using OpenAI;

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

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

            _value = value;
        }

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

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

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

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

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

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

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