// <auto-generated/>

#nullable disable

using System;
using System.ComponentModel;
using OpenAI;

namespace OpenAI.Assistants
{
    public readonly partial struct FileSearchRanker : IEquatable<FileSearchRanker>
    {
        private readonly string _value;
        private const string AutoValue = "auto";
        private const string Default20240821Value = "default_2024_08_21";

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

            _value = value;
        }

        public static FileSearchRanker Auto { get; } = new FileSearchRanker(AutoValue);

        public static FileSearchRanker Default20240821 { get; } = new FileSearchRanker(Default20240821Value);

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

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

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

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

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