// <auto-generated/>

#nullable disable

using System;
using System.ComponentModel;
using OpenAI;

namespace OpenAI.Realtime
{
    internal readonly partial struct InternalRealtimeTranscriptionSessionCreateRequestInputAudioFormat : IEquatable<InternalRealtimeTranscriptionSessionCreateRequestInputAudioFormat>
    {
        private readonly string _value;
        private const string Pcm16Value = "pcm16";
        private const string G711UlawValue = "g711_ulaw";
        private const string G711AlawValue = "g711_alaw";

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

            _value = value;
        }

        internal static InternalRealtimeTranscriptionSessionCreateRequestInputAudioFormat Pcm16 { get; } = new InternalRealtimeTranscriptionSessionCreateRequestInputAudioFormat(Pcm16Value);

        internal static InternalRealtimeTranscriptionSessionCreateRequestInputAudioFormat G711Ulaw { get; } = new InternalRealtimeTranscriptionSessionCreateRequestInputAudioFormat(G711UlawValue);

        internal static InternalRealtimeTranscriptionSessionCreateRequestInputAudioFormat G711Alaw { get; } = new InternalRealtimeTranscriptionSessionCreateRequestInputAudioFormat(G711AlawValue);

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

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

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

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

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