// <auto-generated/>

#nullable disable

using System;
using System.ComponentModel;

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

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

        private const string WordValue = "word";
        private const string SegmentValue = "segment";

        public static InternalCreateTranscriptionRequestTimestampGranularity Word { get; } = new InternalCreateTranscriptionRequestTimestampGranularity(WordValue);
        public static InternalCreateTranscriptionRequestTimestampGranularity Segment { get; } = new InternalCreateTranscriptionRequestTimestampGranularity(SegmentValue);
        public static bool operator ==(InternalCreateTranscriptionRequestTimestampGranularity left, InternalCreateTranscriptionRequestTimestampGranularity right) => left.Equals(right);
        public static bool operator !=(InternalCreateTranscriptionRequestTimestampGranularity left, InternalCreateTranscriptionRequestTimestampGranularity right) => !left.Equals(right);
        public static implicit operator InternalCreateTranscriptionRequestTimestampGranularity(string value) => new InternalCreateTranscriptionRequestTimestampGranularity(value);

        [EditorBrowsable(EditorBrowsableState.Never)]
        public override bool Equals(object obj) => obj is InternalCreateTranscriptionRequestTimestampGranularity other && Equals(other);
        public bool Equals(InternalCreateTranscriptionRequestTimestampGranularity 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;
    }
}
