// #nullable disable using System; using System.ComponentModel; using System.Diagnostics.CodeAnalysis; using OpenAI; namespace OpenAI.Responses { [Experimental("OPENAI001")] public readonly partial struct ApplyPatchCallOutputStatus : IEquatable { private readonly string _value; private const string CompletedValue = "completed"; private const string FailedValue = "failed"; public ApplyPatchCallOutputStatus(string value) { Argument.AssertNotNull(value, nameof(value)); _value = value; } public static ApplyPatchCallOutputStatus Completed { get; } = new ApplyPatchCallOutputStatus(CompletedValue); public static ApplyPatchCallOutputStatus Failed { get; } = new ApplyPatchCallOutputStatus(FailedValue); public static bool operator ==(ApplyPatchCallOutputStatus left, ApplyPatchCallOutputStatus right) => left.Equals(right); public static bool operator !=(ApplyPatchCallOutputStatus left, ApplyPatchCallOutputStatus right) => !left.Equals(right); public static implicit operator ApplyPatchCallOutputStatus(string value) => new ApplyPatchCallOutputStatus(value); public static implicit operator ApplyPatchCallOutputStatus?(string value) => value == null ? null : new ApplyPatchCallOutputStatus(value); [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is ApplyPatchCallOutputStatus other && Equals(other); public bool Equals(ApplyPatchCallOutputStatus 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; } }