// <auto-generated/>

#nullable disable

using System;
using System.ComponentModel;

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

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

        private const string FileValue = "file";

        public static InternalOpenAIFileObject File { get; } = new InternalOpenAIFileObject(FileValue);
        public static bool operator ==(InternalOpenAIFileObject left, InternalOpenAIFileObject right) => left.Equals(right);
        public static bool operator !=(InternalOpenAIFileObject left, InternalOpenAIFileObject right) => !left.Equals(right);
        public static implicit operator InternalOpenAIFileObject(string value) => new InternalOpenAIFileObject(value);

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

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