// <auto-generated/>

#nullable disable

using System;
using System.ComponentModel;
using OpenAI;

namespace OpenAI.Internal
{
    internal readonly partial struct InternalServiceTier : IEquatable<InternalServiceTier>
    {
        private readonly string _value;
        private const string AutoValue = "auto";
        private const string DefaultValue = "default";
        private const string FlexValue = "flex";
        private const string ScaleValue = "scale";

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

            _value = value;
        }

        internal static InternalServiceTier Auto { get; } = new InternalServiceTier(AutoValue);

        internal static InternalServiceTier Default { get; } = new InternalServiceTier(DefaultValue);

        internal static InternalServiceTier Flex { get; } = new InternalServiceTier(FlexValue);

        internal static InternalServiceTier Scale { get; } = new InternalServiceTier(ScaleValue);

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

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

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

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

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