openai/openai-dotnet
Publicmirrored from https://github.com/openai/openai-dotnetAvailable
src/Generated/Models/AssistantCollectionOrder.cs
33lines · modecode
| 1 | // <auto-generated/> |
| 2 | |
| 3 | #nullable disable |
| 4 | |
| 5 | using System; |
| 6 | using System.ComponentModel; |
| 7 | |
| 8 | namespace OpenAI.Assistants |
| 9 | { |
| 10 | public readonly partial struct AssistantCollectionOrder : IEquatable<AssistantCollectionOrder> |
| 11 | { |
| 12 | private readonly string _value; |
| 13 | |
| 14 | public AssistantCollectionOrder(string value) |
| 15 | { |
| 16 | _value = value ?? throw new ArgumentNullException(nameof(value)); |
| 17 | } |
| 18 | |
| 19 | private const string AscendingValue = "asc"; |
| 20 | private const string DescendingValue = "desc"; |
| 21 | public static bool operator ==(AssistantCollectionOrder left, AssistantCollectionOrder right) => left.Equals(right); |
| 22 | public static bool operator !=(AssistantCollectionOrder left, AssistantCollectionOrder right) => !left.Equals(right); |
| 23 | public static implicit operator AssistantCollectionOrder(string value) => new AssistantCollectionOrder(value); |
| 24 | |
| 25 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 26 | public override bool Equals(object obj) => obj is AssistantCollectionOrder other && Equals(other); |
| 27 | public bool Equals(AssistantCollectionOrder other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); |
| 28 | |
| 29 | [EditorBrowsable(EditorBrowsableState.Never)] |
| 30 | public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; |
| 31 | public override string ToString() => _value; |
| 32 | } |
| 33 | } |
| 34 | |