// <auto-generated/>

#nullable disable

using System;
using System.ComponentModel;
using OpenAI;

namespace OpenAI.RealtimeConversation
{
    internal readonly partial struct InternalRealtimeResponseStatusDetailsType : IEquatable<InternalRealtimeResponseStatusDetailsType>
    {
        private readonly string _value;
        private const string CompletedValue = "completed";
        private const string CancelledValue = "cancelled";
        private const string FailedValue = "failed";
        private const string IncompleteValue = "incomplete";

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

            _value = value;
        }

        public static InternalRealtimeResponseStatusDetailsType Completed { get; } = new InternalRealtimeResponseStatusDetailsType(CompletedValue);

        public static InternalRealtimeResponseStatusDetailsType Cancelled { get; } = new InternalRealtimeResponseStatusDetailsType(CancelledValue);

        public static InternalRealtimeResponseStatusDetailsType Failed { get; } = new InternalRealtimeResponseStatusDetailsType(FailedValue);

        public static InternalRealtimeResponseStatusDetailsType Incomplete { get; } = new InternalRealtimeResponseStatusDetailsType(IncompleteValue);

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

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

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

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

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