// <auto-generated/>

#nullable disable

using System;
using System.ComponentModel;
using OpenAI;

namespace OpenAI.Chat
{
    internal readonly partial struct InternalChatCompletionResponseMessageAnnotationType : IEquatable<InternalChatCompletionResponseMessageAnnotationType>
    {
        private readonly string _value;
        private const string UrlCitationValue = "url_citation";

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

            _value = value;
        }

        public static InternalChatCompletionResponseMessageAnnotationType UrlCitation { get; } = new InternalChatCompletionResponseMessageAnnotationType(UrlCitationValue);

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

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

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

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

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