// <auto-generated/>

#nullable disable

using System;
using System.ComponentModel;

namespace OpenAI.Chat
{
    internal readonly partial struct InternalChatResponseFormatType : IEquatable<InternalChatResponseFormatType>
    {
        private readonly string _value;

        public InternalChatResponseFormatType(string value)
        {
            _value = value ?? throw new ArgumentNullException(nameof(value));
        }

        private const string TextValue = "text";
        private const string JsonObjectValue = "json_object";

        public static InternalChatResponseFormatType Text { get; } = new InternalChatResponseFormatType(TextValue);
        public static InternalChatResponseFormatType JsonObject { get; } = new InternalChatResponseFormatType(JsonObjectValue);
        public static bool operator ==(InternalChatResponseFormatType left, InternalChatResponseFormatType right) => left.Equals(right);
        public static bool operator !=(InternalChatResponseFormatType left, InternalChatResponseFormatType right) => !left.Equals(right);
        public static implicit operator InternalChatResponseFormatType(string value) => new InternalChatResponseFormatType(value);

        [EditorBrowsable(EditorBrowsableState.Never)]
        public override bool Equals(object obj) => obj is InternalChatResponseFormatType other && Equals(other);
        public bool Equals(InternalChatResponseFormatType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase);

        [EditorBrowsable(EditorBrowsableState.Never)]
        public override int GetHashCode() => _value?.GetHashCode() ?? 0;
        public override string ToString() => _value;
    }
}
