// <auto-generated/>

#nullable disable

using System;
using System.ComponentModel;

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

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

        private const string FunctionValue = "function";
        private const string CodeInterpreterValue = "code_interpreter";
        private const string FileSearchValue = "file_search";

        public static InternalToolConstraintType Function { get; } = new InternalToolConstraintType(FunctionValue);
        public static InternalToolConstraintType CodeInterpreter { get; } = new InternalToolConstraintType(CodeInterpreterValue);
        public static InternalToolConstraintType FileSearch { get; } = new InternalToolConstraintType(FileSearchValue);
        public static bool operator ==(InternalToolConstraintType left, InternalToolConstraintType right) => left.Equals(right);
        public static bool operator !=(InternalToolConstraintType left, InternalToolConstraintType right) => !left.Equals(right);
        public static implicit operator InternalToolConstraintType(string value) => new InternalToolConstraintType(value);

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

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