// <auto-generated/>

#nullable disable

using System;
using System.ComponentModel;
using OpenAI;

namespace OpenAI.Responses
{
    internal readonly partial struct InternalResponsesItemType : IEquatable<InternalResponsesItemType>
    {
        private readonly string _value;
        private const string MessageValue = "message";
        private const string FileSearchCallValue = "file_search_call";
        private const string FunctionCallValue = "function_call";
        private const string FunctionCallOutputValue = "function_call_output";
        private const string ComputerCallValue = "computer_call";
        private const string ComputerCallOutputValue = "computer_call_output";
        private const string WebSearchCallValue = "web_search_call";
        private const string ItemReferenceValue = "item_reference";
        private const string ReasoningValue = "reasoning";

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

            _value = value;
        }

        public static InternalResponsesItemType Message { get; } = new InternalResponsesItemType(MessageValue);

        public static InternalResponsesItemType FileSearchCall { get; } = new InternalResponsesItemType(FileSearchCallValue);

        public static InternalResponsesItemType FunctionCall { get; } = new InternalResponsesItemType(FunctionCallValue);

        public static InternalResponsesItemType FunctionCallOutput { get; } = new InternalResponsesItemType(FunctionCallOutputValue);

        public static InternalResponsesItemType ComputerCall { get; } = new InternalResponsesItemType(ComputerCallValue);

        public static InternalResponsesItemType ComputerCallOutput { get; } = new InternalResponsesItemType(ComputerCallOutputValue);

        public static InternalResponsesItemType WebSearchCall { get; } = new InternalResponsesItemType(WebSearchCallValue);

        public static InternalResponsesItemType ItemReference { get; } = new InternalResponsesItemType(ItemReferenceValue);

        public static InternalResponsesItemType Reasoning { get; } = new InternalResponsesItemType(ReasoningValue);

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

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

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

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

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