// <auto-generated/>

#nullable disable

using System;
using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using OpenAI;

namespace OpenAI.Audio
{
    [Experimental("OPENAI001")]
    public readonly partial struct StreamingAudioTranscriptionUpdateKind : IEquatable<StreamingAudioTranscriptionUpdateKind>
    {
        private readonly string _value;
        private const string TranscriptTextDeltaValue = "transcript.text.delta";
        private const string TranscriptTextDoneValue = "transcript.text.done";

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

            _value = value;
        }

        public static StreamingAudioTranscriptionUpdateKind TranscriptTextDelta { get; } = new StreamingAudioTranscriptionUpdateKind(TranscriptTextDeltaValue);

        public static StreamingAudioTranscriptionUpdateKind TranscriptTextDone { get; } = new StreamingAudioTranscriptionUpdateKind(TranscriptTextDoneValue);

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

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

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

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

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