Skip to content

Commit 0038da1

Browse files
author
github-actions[bot]
committed
feat: Updated OpenAPI spec
1 parent eef365e commit 0038da1

14 files changed

+292
-308
lines changed

src/libs/DeepInfra/Generated/AnyOf.6.g.cs renamed to src/libs/DeepInfra/Generated/AnyOf.7.g.cs

Lines changed: 62 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace System
77
/// <summary>
88
///
99
/// </summary>
10-
public readonly partial struct AnyOf<T1, T2, T3, T4, T5, T6> : global::System.IEquatable<AnyOf<T1, T2, T3, T4, T5, T6>>
10+
public readonly partial struct AnyOf<T1, T2, T3, T4, T5, T6, T7> : global::System.IEquatable<AnyOf<T1, T2, T3, T4, T5, T6, T7>>
1111
{
1212
/// <summary>
1313
///
@@ -29,12 +29,12 @@ namespace System
2929
/// <summary>
3030
///
3131
/// </summary>
32-
public static implicit operator AnyOf<T1, T2, T3, T4, T5, T6>(T1 value) => new AnyOf<T1, T2, T3, T4, T5, T6>(value);
32+
public static implicit operator AnyOf<T1, T2, T3, T4, T5, T6, T7>(T1 value) => new AnyOf<T1, T2, T3, T4, T5, T6, T7>(value);
3333

3434
/// <summary>
3535
///
3636
/// </summary>
37-
public static implicit operator T1?(AnyOf<T1, T2, T3, T4, T5, T6> @this) => @this.Value1;
37+
public static implicit operator T1?(AnyOf<T1, T2, T3, T4, T5, T6, T7> @this) => @this.Value1;
3838

3939
/// <summary>
4040
///
@@ -64,12 +64,12 @@ public AnyOf(T1? value)
6464
/// <summary>
6565
///
6666
/// </summary>
67-
public static implicit operator AnyOf<T1, T2, T3, T4, T5, T6>(T2 value) => new AnyOf<T1, T2, T3, T4, T5, T6>(value);
67+
public static implicit operator AnyOf<T1, T2, T3, T4, T5, T6, T7>(T2 value) => new AnyOf<T1, T2, T3, T4, T5, T6, T7>(value);
6868

6969
/// <summary>
7070
///
7171
/// </summary>
72-
public static implicit operator T2?(AnyOf<T1, T2, T3, T4, T5, T6> @this) => @this.Value2;
72+
public static implicit operator T2?(AnyOf<T1, T2, T3, T4, T5, T6, T7> @this) => @this.Value2;
7373

7474
/// <summary>
7575
///
@@ -99,12 +99,12 @@ public AnyOf(T2? value)
9999
/// <summary>
100100
///
101101
/// </summary>
102-
public static implicit operator AnyOf<T1, T2, T3, T4, T5, T6>(T3 value) => new AnyOf<T1, T2, T3, T4, T5, T6>(value);
102+
public static implicit operator AnyOf<T1, T2, T3, T4, T5, T6, T7>(T3 value) => new AnyOf<T1, T2, T3, T4, T5, T6, T7>(value);
103103

104104
/// <summary>
105105
///
106106
/// </summary>
107-
public static implicit operator T3?(AnyOf<T1, T2, T3, T4, T5, T6> @this) => @this.Value3;
107+
public static implicit operator T3?(AnyOf<T1, T2, T3, T4, T5, T6, T7> @this) => @this.Value3;
108108

109109
/// <summary>
110110
///
@@ -134,12 +134,12 @@ public AnyOf(T3? value)
134134
/// <summary>
135135
///
136136
/// </summary>
137-
public static implicit operator AnyOf<T1, T2, T3, T4, T5, T6>(T4 value) => new AnyOf<T1, T2, T3, T4, T5, T6>(value);
137+
public static implicit operator AnyOf<T1, T2, T3, T4, T5, T6, T7>(T4 value) => new AnyOf<T1, T2, T3, T4, T5, T6, T7>(value);
138138

139139
/// <summary>
140140
///
141141
/// </summary>
142-
public static implicit operator T4?(AnyOf<T1, T2, T3, T4, T5, T6> @this) => @this.Value4;
142+
public static implicit operator T4?(AnyOf<T1, T2, T3, T4, T5, T6, T7> @this) => @this.Value4;
143143

144144
/// <summary>
145145
///
@@ -169,12 +169,12 @@ public AnyOf(T4? value)
169169
/// <summary>
170170
///
171171
/// </summary>
172-
public static implicit operator AnyOf<T1, T2, T3, T4, T5, T6>(T5 value) => new AnyOf<T1, T2, T3, T4, T5, T6>(value);
172+
public static implicit operator AnyOf<T1, T2, T3, T4, T5, T6, T7>(T5 value) => new AnyOf<T1, T2, T3, T4, T5, T6, T7>(value);
173173

174174
/// <summary>
175175
///
176176
/// </summary>
177-
public static implicit operator T5?(AnyOf<T1, T2, T3, T4, T5, T6> @this) => @this.Value5;
177+
public static implicit operator T5?(AnyOf<T1, T2, T3, T4, T5, T6, T7> @this) => @this.Value5;
178178

179179
/// <summary>
180180
///
@@ -204,12 +204,12 @@ public AnyOf(T5? value)
204204
/// <summary>
205205
///
206206
/// </summary>
207-
public static implicit operator AnyOf<T1, T2, T3, T4, T5, T6>(T6 value) => new AnyOf<T1, T2, T3, T4, T5, T6>(value);
207+
public static implicit operator AnyOf<T1, T2, T3, T4, T5, T6, T7>(T6 value) => new AnyOf<T1, T2, T3, T4, T5, T6, T7>(value);
208208

209209
/// <summary>
210210
///
211211
/// </summary>
212-
public static implicit operator T6?(AnyOf<T1, T2, T3, T4, T5, T6> @this) => @this.Value6;
212+
public static implicit operator T6?(AnyOf<T1, T2, T3, T4, T5, T6, T7> @this) => @this.Value6;
213213

214214
/// <summary>
215215
///
@@ -219,6 +219,41 @@ public AnyOf(T6? value)
219219
Value6 = value;
220220
}
221221

222+
/// <summary>
223+
///
224+
/// </summary>
225+
#if NET6_0_OR_GREATER
226+
public T7? Value7 { get; init; }
227+
#else
228+
public T7? Value7 { get; }
229+
#endif
230+
231+
/// <summary>
232+
///
233+
/// </summary>
234+
#if NET6_0_OR_GREATER
235+
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value7))]
236+
#endif
237+
public bool IsValue7 => Value7 != null;
238+
239+
/// <summary>
240+
///
241+
/// </summary>
242+
public static implicit operator AnyOf<T1, T2, T3, T4, T5, T6, T7>(T7 value) => new AnyOf<T1, T2, T3, T4, T5, T6, T7>(value);
243+
244+
/// <summary>
245+
///
246+
/// </summary>
247+
public static implicit operator T7?(AnyOf<T1, T2, T3, T4, T5, T6, T7> @this) => @this.Value7;
248+
249+
/// <summary>
250+
///
251+
/// </summary>
252+
public AnyOf(T7? value)
253+
{
254+
Value7 = value;
255+
}
256+
222257
/// <summary>
223258
///
224259
/// </summary>
@@ -228,7 +263,8 @@ public AnyOf(
228263
T3? value3,
229264
T4? value4,
230265
T5? value5,
231-
T6? value6
266+
T6? value6,
267+
T7? value7
232268
)
233269
{
234270
Value1 = value1;
@@ -237,12 +273,14 @@ public AnyOf(
237273
Value4 = value4;
238274
Value5 = value5;
239275
Value6 = value6;
276+
Value7 = value7;
240277
}
241278

242279
/// <summary>
243280
///
244281
/// </summary>
245282
public object? Object =>
283+
Value7 as object ??
246284
Value6 as object ??
247285
Value5 as object ??
248286
Value4 as object ??
@@ -256,7 +294,7 @@ Value1 as object
256294
/// </summary>
257295
public bool Validate()
258296
{
259-
return IsValue1 || IsValue2 || IsValue3 || IsValue4 || IsValue5 || IsValue6;
297+
return IsValue1 || IsValue2 || IsValue3 || IsValue4 || IsValue5 || IsValue6 || IsValue7;
260298
}
261299

262300
/// <summary>
@@ -278,6 +316,8 @@ public override int GetHashCode()
278316
typeof(T5),
279317
Value6,
280318
typeof(T6),
319+
Value7,
320+
typeof(T7),
281321
};
282322
const int offset = unchecked((int)2166136261);
283323
const int prime = 16777619;
@@ -290,30 +330,31 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null
290330
/// <summary>
291331
///
292332
/// </summary>
293-
public bool Equals(AnyOf<T1, T2, T3, T4, T5, T6> other)
333+
public bool Equals(AnyOf<T1, T2, T3, T4, T5, T6, T7> other)
294334
{
295335
return
296336
global::System.Collections.Generic.EqualityComparer<T1?>.Default.Equals(Value1, other.Value1) &&
297337
global::System.Collections.Generic.EqualityComparer<T2?>.Default.Equals(Value2, other.Value2) &&
298338
global::System.Collections.Generic.EqualityComparer<T3?>.Default.Equals(Value3, other.Value3) &&
299339
global::System.Collections.Generic.EqualityComparer<T4?>.Default.Equals(Value4, other.Value4) &&
300340
global::System.Collections.Generic.EqualityComparer<T5?>.Default.Equals(Value5, other.Value5) &&
301-
global::System.Collections.Generic.EqualityComparer<T6?>.Default.Equals(Value6, other.Value6)
341+
global::System.Collections.Generic.EqualityComparer<T6?>.Default.Equals(Value6, other.Value6) &&
342+
global::System.Collections.Generic.EqualityComparer<T7?>.Default.Equals(Value7, other.Value7)
302343
;
303344
}
304345

305346
/// <summary>
306347
///
307348
/// </summary>
308-
public static bool operator ==(AnyOf<T1, T2, T3, T4, T5, T6> obj1, AnyOf<T1, T2, T3, T4, T5, T6> obj2)
349+
public static bool operator ==(AnyOf<T1, T2, T3, T4, T5, T6, T7> obj1, AnyOf<T1, T2, T3, T4, T5, T6, T7> obj2)
309350
{
310-
return global::System.Collections.Generic.EqualityComparer<AnyOf<T1, T2, T3, T4, T5, T6>>.Default.Equals(obj1, obj2);
351+
return global::System.Collections.Generic.EqualityComparer<AnyOf<T1, T2, T3, T4, T5, T6, T7>>.Default.Equals(obj1, obj2);
311352
}
312353

313354
/// <summary>
314355
///
315356
/// </summary>
316-
public static bool operator !=(AnyOf<T1, T2, T3, T4, T5, T6> obj1, AnyOf<T1, T2, T3, T4, T5, T6> obj2)
357+
public static bool operator !=(AnyOf<T1, T2, T3, T4, T5, T6, T7> obj1, AnyOf<T1, T2, T3, T4, T5, T6, T7> obj2)
317358
{
318359
return !(obj1 == obj2);
319360
}
@@ -323,7 +364,7 @@ public bool Equals(AnyOf<T1, T2, T3, T4, T5, T6> other)
323364
/// </summary>
324365
public override bool Equals(object? obj)
325366
{
326-
return obj is AnyOf<T1, T2, T3, T4, T5, T6> o && Equals(o);
367+
return obj is AnyOf<T1, T2, T3, T4, T5, T6, T7> o && Equals(o);
327368
}
328369
}
329370
}

src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.TextToSpeechV1ElevenlabsV1TextToSpeechVoiceIdPost.g.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ partial void ProcessTextToSpeechV1ElevenlabsV1TextToSpeechVoiceIdPostResponseCon
134134
string voiceId,
135135
string text,
136136
string? xDeepinfraSource = default,
137-
global::System.AllOf<global::DeepInfra.TtsModel?>? modelId = default,
137+
string? modelId = "deepinfra/tts",
138138
global::System.AllOf<global::DeepInfra.TtsResponseFormat?>? outputFormat = default,
139139
string? languageCode = default,
140140
global::System.Threading.CancellationToken cancellationToken = default)

src/libs/DeepInfra/Generated/DeepInfra.Models.ElevenLabsTextToSpeechIn.g.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ public sealed partial class ElevenLabsTextToSpeechIn
2626
/// Default Value: deepinfra/tts
2727
/// </summary>
2828
[global::System.Text.Json.Serialization.JsonPropertyName("model_id")]
29-
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.AllOfJsonConverterFactory1))]
30-
public global::System.AllOf<global::DeepInfra.TtsModel?>? ModelId { get; set; } = global::DeepInfra.TtsModel.DeepinfraTts;
29+
public string? ModelId { get; set; } = "deepinfra/tts";
3130

3231
/// <summary>
3332
/// Output format for the speech<br/>

src/libs/DeepInfra/Generated/DeepInfra.Models.ModelInfoOut.g.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,9 @@ public sealed partial class ModelInfoOut
134134
///
135135
/// </summary>
136136
[global::System.Text.Json.Serialization.JsonPropertyName("pricing")]
137-
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.AnyOfJsonConverterFactory6))]
137+
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.AnyOfJsonConverterFactory7))]
138138
[global::System.Text.Json.Serialization.JsonRequired]
139-
public required global::System.AnyOf<global::DeepInfra.ModelPricingTime, global::DeepInfra.ModelPricingUptime, global::DeepInfra.ModelPricingTokens, global::DeepInfra.ModelPricingInputLength, global::DeepInfra.ModelPricingInputTokens, global::DeepInfra.ModelPricingInputCharacterLength> Pricing { get; set; }
139+
public required global::System.AnyOf<global::DeepInfra.ModelPricingTime, global::DeepInfra.ModelPricingUptime, global::DeepInfra.ModelPricingTokens, global::DeepInfra.ModelPricingInputLength, global::DeepInfra.ModelPricingInputTokens, global::DeepInfra.ModelPricingInputCharacterLength, global::DeepInfra.ModelPricingImageUnits> Pricing { get; set; }
140140

141141
/// <summary>
142142
///

src/libs/DeepInfra/Generated/DeepInfra.Models.ModelOut.g.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ public sealed partial class ModelOut
5757
/// The pricing type and cost for this model
5858
/// </summary>
5959
[global::System.Text.Json.Serialization.JsonPropertyName("pricing")]
60-
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.AnyOfJsonConverterFactory6))]
60+
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.AnyOfJsonConverterFactory7))]
6161
[global::System.Text.Json.Serialization.JsonRequired]
62-
public required global::System.AnyOf<global::DeepInfra.ModelPricingTime, global::DeepInfra.ModelPricingTokens, global::DeepInfra.ModelPricingInputLength, global::DeepInfra.ModelPricingInputTokens, global::DeepInfra.ModelPricingUptime, global::DeepInfra.ModelPricingInputCharacterLength> Pricing { get; set; }
62+
public required global::System.AnyOf<global::DeepInfra.ModelPricingTime, global::DeepInfra.ModelPricingTokens, global::DeepInfra.ModelPricingInputLength, global::DeepInfra.ModelPricingInputTokens, global::DeepInfra.ModelPricingUptime, global::DeepInfra.ModelPricingInputCharacterLength, global::DeepInfra.ModelPricingImageUnits> Pricing { get; set; }
6363

6464
/// <summary>
6565
/// The maximum context size of this model, if applicable
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
2+
#nullable enable
3+
4+
namespace DeepInfra
5+
{
6+
/// <summary>
7+
///
8+
/// </summary>
9+
public sealed partial class ModelPricingImageUnits
10+
{
11+
/// <summary>
12+
///
13+
/// </summary>
14+
[global::System.Text.Json.Serialization.JsonPropertyName("cents_per_image_unit")]
15+
[global::System.Text.Json.Serialization.JsonRequired]
16+
public required double CentsPerImageUnit { get; set; }
17+
18+
/// <summary>
19+
///
20+
/// </summary>
21+
[global::System.Text.Json.Serialization.JsonPropertyName("default_width")]
22+
[global::System.Text.Json.Serialization.JsonRequired]
23+
public required int DefaultWidth { get; set; }
24+
25+
/// <summary>
26+
///
27+
/// </summary>
28+
[global::System.Text.Json.Serialization.JsonPropertyName("default_height")]
29+
[global::System.Text.Json.Serialization.JsonRequired]
30+
public required int DefaultHeight { get; set; }
31+
32+
/// <summary>
33+
///
34+
/// </summary>
35+
[global::System.Text.Json.Serialization.JsonPropertyName("default_iterations")]
36+
[global::System.Text.Json.Serialization.JsonRequired]
37+
public required int DefaultIterations { get; set; }
38+
39+
/// <summary>
40+
/// Default Value: image_units
41+
/// </summary>
42+
[global::System.Text.Json.Serialization.JsonPropertyName("type")]
43+
public string? Type { get; set; } = "image_units";
44+
45+
/// <summary>
46+
/// Additional properties that are not explicitly defined in the schema
47+
/// </summary>
48+
[global::System.Text.Json.Serialization.JsonExtensionData]
49+
public global::System.Collections.Generic.IDictionary<string, object> AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary<string, object>();
50+
}
51+
}

src/libs/DeepInfra/Generated/DeepInfra.Models.TtsModel.g.cs

Lines changed: 0 additions & 45 deletions
This file was deleted.

0 commit comments

Comments
 (0)