openai/openai-dotnet

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
achandmsft-patch-2

Branches

Tags

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

Clone

HTTPS

Download ZIP

src/Generated/Models/Audio/AudioTranslationFormat.cs

43lines · modecode

1// <auto-generated/>
2
3#nullable disable
4
5using System;
6using System.ComponentModel;
7using OpenAI;
8
9namespace OpenAI.Audio
10{
11 public readonly partial struct AudioTranslationFormat : IEquatable<AudioTranslationFormat>
12 {
13 private readonly string _value;
14 private const string JsonValue = "json";
15 private const string TextValue = "text";
16 private const string SrtValue = "srt";
17 private const string VerboseJsonValue = "verbose_json";
18 private const string VttValue = "vtt";
19
20 public AudioTranslationFormat(string value)
21 {
22 Argument.AssertNotNull(value, nameof(value));
23
24 _value = value;
25 }
26
27 public static bool operator ==(AudioTranslationFormat left, AudioTranslationFormat right) => left.Equals(right);
28
29 public static bool operator !=(AudioTranslationFormat left, AudioTranslationFormat right) => !left.Equals(right);
30
31 public static implicit operator AudioTranslationFormat(string value) => new AudioTranslationFormat(value);
32
33 [EditorBrowsable(EditorBrowsableState.Never)]
34 public override bool Equals(object obj) => obj is AudioTranslationFormat other && Equals(other);
35
36 public bool Equals(AudioTranslationFormat other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase);
37
38 [EditorBrowsable(EditorBrowsableState.Never)]
39 public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0;
40
41 public override string ToString() => _value;
42 }
43}
44