// <auto-generated/>

#nullable disable

using System;
using System.ComponentModel;
using OpenAI;

namespace OpenAI.Responses
{
    internal readonly partial struct InternalResponsesToolType : IEquatable<InternalResponsesToolType>
    {
        private readonly string _value;
        private const string FunctionValue = "function";
        private const string FileSearchValue = "file_search";
        private const string WebSearchValue = "web_search_preview";
        private const string ComputerValue = "computer_use_preview";

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

            _value = value;
        }

        public static InternalResponsesToolType Function { get; } = new InternalResponsesToolType(FunctionValue);

        public static InternalResponsesToolType FileSearch { get; } = new InternalResponsesToolType(FileSearchValue);

        public static InternalResponsesToolType WebSearch { get; } = new InternalResponsesToolType(WebSearchValue);

        public static InternalResponsesToolType Computer { get; } = new InternalResponsesToolType(ComputerValue);

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

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

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

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

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