// <auto-generated/>

#nullable disable

using System;
using System.ComponentModel;
using OpenAI;

namespace OpenAI.Responses
{
    public readonly partial struct ResponseTruncationMode : IEquatable<ResponseTruncationMode>
    {
        private readonly string _value;
        private const string AutoValue = "auto";
        private const string DisabledValue = "disabled";

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

            _value = value;
        }

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

        public static ResponseTruncationMode Disabled { get; } = new ResponseTruncationMode(DisabledValue);

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

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

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

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

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