openai/openai-dotnet

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
copilot/sub-pr-1011-another-one

Branches

Tags

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

Clone

HTTPS

Download ZIP

src/Generated/Models/Embeddings/InternalCreateEmbeddingRequestEncodingFormat.cs

43lines · modecode

1// <auto-generated/>
2
3#nullable disable
4
5using System;
6using System.ComponentModel;
7
8namespace OpenAI.Embeddings
9{
10 internal readonly partial struct InternalCreateEmbeddingRequestEncodingFormat : IEquatable<InternalCreateEmbeddingRequestEncodingFormat>
11 {
12 private readonly string _value;
13 private const string FloatValue = "float";
14 private const string Base64Value = "base64";
15
16 public InternalCreateEmbeddingRequestEncodingFormat(string value)
17 {
18 _value = value;
19 }
20
21 internal static InternalCreateEmbeddingRequestEncodingFormat Float { get; } = new InternalCreateEmbeddingRequestEncodingFormat(FloatValue);
22
23 internal static InternalCreateEmbeddingRequestEncodingFormat Base64 { get; } = new InternalCreateEmbeddingRequestEncodingFormat(Base64Value);
24
25 public static bool operator ==(InternalCreateEmbeddingRequestEncodingFormat left, InternalCreateEmbeddingRequestEncodingFormat right) => left.Equals(right);
26
27 public static bool operator !=(InternalCreateEmbeddingRequestEncodingFormat left, InternalCreateEmbeddingRequestEncodingFormat right) => !left.Equals(right);
28
29 public static implicit operator InternalCreateEmbeddingRequestEncodingFormat(string value) => new InternalCreateEmbeddingRequestEncodingFormat(value);
30
31 public static implicit operator InternalCreateEmbeddingRequestEncodingFormat?(string value) => value == null ? null : new InternalCreateEmbeddingRequestEncodingFormat(value);
32
33 [EditorBrowsable(EditorBrowsableState.Never)]
34 public override bool Equals(object obj) => obj is InternalCreateEmbeddingRequestEncodingFormat other && Equals(other);
35
36 public bool Equals(InternalCreateEmbeddingRequestEncodingFormat 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