openai/openai-dotnet
Publicmirrored from https://github.com/openai/openai-dotnetAvailable
OpenAI.Responses/src/Generated/Models/ApplyPatchCallStatus.cs
48lines · modecode
| 1 | // <auto-generated/> |
| 2 | |
| 3 | #nullable disable |
| 4 | |
| 5 | using System; |
| 6 | using System.ComponentModel; |
| 7 | using System.Diagnostics.CodeAnalysis; |
| 8 | using OpenAI; |
| 9 | |
| 10 | namespace OpenAI.Responses |
| 11 | { |
| 12 | [Experimental("OPENAI001")] |
| 13 | public readonly partial struct ApplyPatchCallStatus : IEquatable<ApplyPatchCallStatus> |
| 14 | { |
| 15 | private readonly string _value; |
| 16 | private const string InProgressValue = "in_progress"; |
| 17 | private const string CompletedValue = "completed"; |
| 18 | |
| 19 | public ApplyPatchCallStatus(string value) |
| 20 | { |
| 21 | Argument.AssertNotNull(value, nameof(value)); |
| 22 | |
| 23 | _value = value; |
| 24 | } |
| 25 | |
| 26 | public static ApplyPatchCallStatus InProgress { get; } = new ApplyPatchCallStatus(InProgressValue); |
| 27 | |
| 28 | public static ApplyPatchCallStatus Completed { get; } = new ApplyPatchCallStatus(CompletedValue); |
| 29 | |
| 30 | public static bool operator ==(ApplyPatchCallStatus left, ApplyPatchCallStatus right) => left.Equals(right); |
| 31 | |
| 32 | public static bool operator !=(ApplyPatchCallStatus left, ApplyPatchCallStatus right) => !left.Equals(right); |
| 33 | |
| 34 | public static implicit operator ApplyPatchCallStatus(string value) => new ApplyPatchCallStatus(value); |
| 35 | |
| 36 | public static implicit operator ApplyPatchCallStatus?(string value) => value == null ? null : new ApplyPatchCallStatus(value); |
| 37 | |
| 38 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 39 | public override bool Equals(object obj) => obj is ApplyPatchCallStatus other && Equals(other); |
| 40 | |
| 41 | public bool Equals(ApplyPatchCallStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); |
| 42 | |
| 43 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 44 | public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; |
| 45 | |
| 46 | public override string ToString() => _value; |
| 47 | } |
| 48 | } |