// <auto-generated/>

#nullable disable

using System;
using System.ComponentModel;
using OpenAI;

namespace OpenAI.Responses
{
    internal readonly partial struct InternalCodeInterpreterToolCallItemResourceStatus : IEquatable<InternalCodeInterpreterToolCallItemResourceStatus>
    {
        private readonly string _value;
        private const string InProgressValue = "in_progress";
        private const string InterpretingValue = "interpreting";
        private const string CompletedValue = "completed";

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

            _value = value;
        }

        internal static InternalCodeInterpreterToolCallItemResourceStatus InProgress { get; } = new InternalCodeInterpreterToolCallItemResourceStatus(InProgressValue);

        internal static InternalCodeInterpreterToolCallItemResourceStatus Interpreting { get; } = new InternalCodeInterpreterToolCallItemResourceStatus(InterpretingValue);

        internal static InternalCodeInterpreterToolCallItemResourceStatus Completed { get; } = new InternalCodeInterpreterToolCallItemResourceStatus(CompletedValue);

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

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

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

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

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