// <auto-generated/>

#nullable disable

using System;
using System.ComponentModel;
using OpenAI;

namespace OpenAI.Responses
{
    internal readonly partial struct InternalItemContentType : IEquatable<InternalItemContentType>
    {
        private readonly string _value;
        private const string InputTextValue = "input_text";
        private const string InputAudioValue = "input_audio";
        private const string InputImageValue = "input_image";
        private const string InputFileValue = "input_file";
        private const string OutputTextValue = "output_text";
        private const string OutputAudioValue = "output_audio";
        private const string RefusalValue = "refusal";

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

            _value = value;
        }

        internal static InternalItemContentType InputText { get; } = new InternalItemContentType(InputTextValue);

        internal static InternalItemContentType InputAudio { get; } = new InternalItemContentType(InputAudioValue);

        internal static InternalItemContentType InputImage { get; } = new InternalItemContentType(InputImageValue);

        internal static InternalItemContentType InputFile { get; } = new InternalItemContentType(InputFileValue);

        internal static InternalItemContentType OutputText { get; } = new InternalItemContentType(OutputTextValue);

        internal static InternalItemContentType OutputAudio { get; } = new InternalItemContentType(OutputAudioValue);

        internal static InternalItemContentType Refusal { get; } = new InternalItemContentType(RefusalValue);

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

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

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

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

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