openai/openai-dotnet

Public

mirrored from https://github.com/openai/openai-dotnetAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
mailinhphan/clientOptions

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

OpenAI/src/Generated/Models/Files/FileUploadPurpose.cs

54lines · modecode

1// <auto-generated/>
2
3#nullable disable
4
5using System;
6using System.ComponentModel;
7using OpenAI;
8
9namespace OpenAI.Files
10{
11 public readonly partial struct FileUploadPurpose : IEquatable<FileUploadPurpose>
12 {
13 private readonly string _value;
14 private const string AssistantsValue = "assistants";
15 private const string BatchValue = "batch";
16 private const string FineTuneValue = "fine-tune";
17 private const string VisionValue = "vision";
18 private const string UserDataValue = "user_data";
19 private const string EvalsValue = "evals";
20
21 public FileUploadPurpose(string value)
22 {
23 Argument.AssertNotNull(value, nameof(value));
24
25 _value = value;
26 }
27
28 public static FileUploadPurpose Assistants { get; } = new FileUploadPurpose(AssistantsValue);
29
30 public static FileUploadPurpose Batch { get; } = new FileUploadPurpose(BatchValue);
31
32 public static FileUploadPurpose FineTune { get; } = new FileUploadPurpose(FineTuneValue);
33
34 public static FileUploadPurpose Vision { get; } = new FileUploadPurpose(VisionValue);
35
36 public static bool operator ==(FileUploadPurpose left, FileUploadPurpose right) => left.Equals(right);
37
38 public static bool operator !=(FileUploadPurpose left, FileUploadPurpose right) => !left.Equals(right);
39
40 public static implicit operator FileUploadPurpose(string value) => new FileUploadPurpose(value);
41
42 public static implicit operator FileUploadPurpose?(string value) => value == null ? null : new FileUploadPurpose(value);
43
44 [EditorBrowsable(EditorBrowsableState.Never)]
45 public override bool Equals(object obj) => obj is FileUploadPurpose other && Equals(other);
46
47 public bool Equals(FileUploadPurpose other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase);
48
49 [EditorBrowsable(EditorBrowsableState.Never)]
50 public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0;
51
52 public override string ToString() => _value;
53 }
54}
55