// <auto-generated/>

#nullable disable

using System;
using System.ComponentModel;
using OpenAI;

namespace OpenAI.Responses
{
    internal readonly partial struct InternalToolChoiceObjectType : IEquatable<InternalToolChoiceObjectType>
    {
        private readonly string _value;
        private const string FileSearchValue = "file_search";
        private const string FunctionValue = "function";
        private const string ComputerValue = "computer_use_preview";
        private const string WebSearchValue = "web_search_preview";
        private const string ImageGenerationValue = "image_generation";
        private const string CodeInterpreterValue = "code_interpreter";
        private const string McpValue = "mcp";

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

            _value = value;
        }

        internal static InternalToolChoiceObjectType FileSearch { get; } = new InternalToolChoiceObjectType(FileSearchValue);

        internal static InternalToolChoiceObjectType Function { get; } = new InternalToolChoiceObjectType(FunctionValue);

        internal static InternalToolChoiceObjectType Computer { get; } = new InternalToolChoiceObjectType(ComputerValue);

        internal static InternalToolChoiceObjectType WebSearch { get; } = new InternalToolChoiceObjectType(WebSearchValue);

        internal static InternalToolChoiceObjectType ImageGeneration { get; } = new InternalToolChoiceObjectType(ImageGenerationValue);

        internal static InternalToolChoiceObjectType CodeInterpreter { get; } = new InternalToolChoiceObjectType(CodeInterpreterValue);

        internal static InternalToolChoiceObjectType Mcp { get; } = new InternalToolChoiceObjectType(McpValue);

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

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

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

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

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