// <auto-generated/>

#nullable disable

using System;
using System.ComponentModel;

namespace OpenAI.Embeddings
{
    internal readonly partial struct InternalEmbeddingGenerationOptionsEncodingFormat : IEquatable<InternalEmbeddingGenerationOptionsEncodingFormat>
    {
        private readonly string _value;

        public InternalEmbeddingGenerationOptionsEncodingFormat(string value)
        {
            _value = value ?? throw new ArgumentNullException(nameof(value));
        }

        private const string FloatValue = "float";
        private const string Base64Value = "base64";

        public static InternalEmbeddingGenerationOptionsEncodingFormat Float { get; } = new InternalEmbeddingGenerationOptionsEncodingFormat(FloatValue);
        public static InternalEmbeddingGenerationOptionsEncodingFormat Base64 { get; } = new InternalEmbeddingGenerationOptionsEncodingFormat(Base64Value);
        public static bool operator ==(InternalEmbeddingGenerationOptionsEncodingFormat left, InternalEmbeddingGenerationOptionsEncodingFormat right) => left.Equals(right);
        public static bool operator !=(InternalEmbeddingGenerationOptionsEncodingFormat left, InternalEmbeddingGenerationOptionsEncodingFormat right) => !left.Equals(right);
        public static implicit operator InternalEmbeddingGenerationOptionsEncodingFormat(string value) => new InternalEmbeddingGenerationOptionsEncodingFormat(value);

        [EditorBrowsable(EditorBrowsableState.Never)]
        public override bool Equals(object obj) => obj is InternalEmbeddingGenerationOptionsEncodingFormat other && Equals(other);
        public bool Equals(InternalEmbeddingGenerationOptionsEncodingFormat other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase);

        [EditorBrowsable(EditorBrowsableState.Never)]
        public override int GetHashCode() => _value?.GetHashCode() ?? 0;
        public override string ToString() => _value;
    }
}
