Skip to content

Commit f654f60

Browse files
author
github-actions[bot]
committed
feat: Updated OpenAPI spec
1 parent 88de79c commit f654f60

11 files changed

+871
-68
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ partial void ProcessAccountUpdateDetailsV1MePatchResponseContent(
4040
request: request);
4141

4242
using var httpRequest = new global::System.Net.Http.HttpRequestMessage(
43-
method: new global::System.Net.Http.HttpMethod("PATCH"),
43+
method: global::System.Net.Http.HttpMethod.Patch,
4444
requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/me", global::System.UriKind.RelativeOrAbsolute));
4545
var __httpRequestContent = new global::System.Net.Http.StringContent(
4646
content: global::System.Text.Json.JsonSerializer.Serialize(request, global::DeepInfra.SourceGenerationContext.Default.MeIn),
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
2+
#nullable enable
3+
4+
namespace DeepInfra
5+
{
6+
public partial class DeepInfraApi
7+
{
8+
partial void PrepareCreateVoiceV1VoicesAddPostArguments(
9+
global::System.Net.Http.HttpClient httpClient);
10+
partial void PrepareCreateVoiceV1VoicesAddPostRequest(
11+
global::System.Net.Http.HttpClient httpClient,
12+
global::System.Net.Http.HttpRequestMessage httpRequestMessage);
13+
partial void ProcessCreateVoiceV1VoicesAddPostResponse(
14+
global::System.Net.Http.HttpClient httpClient,
15+
global::System.Net.Http.HttpResponseMessage httpResponseMessage);
16+
17+
partial void ProcessCreateVoiceV1VoicesAddPostResponseContent(
18+
global::System.Net.Http.HttpClient httpClient,
19+
global::System.Net.Http.HttpResponseMessage httpResponseMessage,
20+
ref string content);
21+
22+
/// <summary>
23+
/// Create Voice<br/>
24+
/// Create a new voice
25+
/// </summary>
26+
/// <param name="cancellationToken">The token to cancel the operation with</param>
27+
/// <exception cref="global::System.InvalidOperationException"></exception>
28+
public async global::System.Threading.Tasks.Task<global::DeepInfra.Voice> CreateVoiceV1VoicesAddPostAsync(
29+
global::System.Threading.CancellationToken cancellationToken = default)
30+
{
31+
PrepareArguments(
32+
client: _httpClient);
33+
PrepareCreateVoiceV1VoicesAddPostArguments(
34+
httpClient: _httpClient);
35+
36+
using var httpRequest = new global::System.Net.Http.HttpRequestMessage(
37+
method: global::System.Net.Http.HttpMethod.Post,
38+
requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/voices/add", global::System.UriKind.RelativeOrAbsolute));
39+
40+
PrepareRequest(
41+
client: _httpClient,
42+
request: httpRequest);
43+
PrepareCreateVoiceV1VoicesAddPostRequest(
44+
httpClient: _httpClient,
45+
httpRequestMessage: httpRequest);
46+
47+
using var response = await _httpClient.SendAsync(
48+
request: httpRequest,
49+
completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
50+
cancellationToken: cancellationToken).ConfigureAwait(false);
51+
52+
ProcessResponse(
53+
client: _httpClient,
54+
response: response);
55+
ProcessCreateVoiceV1VoicesAddPostResponse(
56+
httpClient: _httpClient,
57+
httpResponseMessage: response);
58+
59+
var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
60+
61+
ProcessResponseContent(
62+
client: _httpClient,
63+
response: response,
64+
content: ref __content);
65+
ProcessCreateVoiceV1VoicesAddPostResponseContent(
66+
httpClient: _httpClient,
67+
httpResponseMessage: response,
68+
content: ref __content);
69+
70+
try
71+
{
72+
response.EnsureSuccessStatusCode();
73+
}
74+
catch (global::System.Net.Http.HttpRequestException ex)
75+
{
76+
throw new global::System.InvalidOperationException(__content, ex);
77+
}
78+
79+
return
80+
global::System.Text.Json.JsonSerializer.Deserialize(__content, global::DeepInfra.SourceGenerationContext.Default.Voice) ??
81+
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
82+
}
83+
}
84+
}
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
2+
#nullable enable
3+
4+
namespace DeepInfra
5+
{
6+
public partial class DeepInfraApi
7+
{
8+
partial void PrepareDeleteVoiceV1VoicesVoiceIdDeleteArguments(
9+
global::System.Net.Http.HttpClient httpClient,
10+
ref string voiceId);
11+
partial void PrepareDeleteVoiceV1VoicesVoiceIdDeleteRequest(
12+
global::System.Net.Http.HttpClient httpClient,
13+
global::System.Net.Http.HttpRequestMessage httpRequestMessage,
14+
string voiceId);
15+
partial void ProcessDeleteVoiceV1VoicesVoiceIdDeleteResponse(
16+
global::System.Net.Http.HttpClient httpClient,
17+
global::System.Net.Http.HttpResponseMessage httpResponseMessage);
18+
19+
partial void ProcessDeleteVoiceV1VoicesVoiceIdDeleteResponseContent(
20+
global::System.Net.Http.HttpClient httpClient,
21+
global::System.Net.Http.HttpResponseMessage httpResponseMessage,
22+
ref string content);
23+
24+
/// <summary>
25+
/// Delete Voice
26+
/// </summary>
27+
/// <param name="voiceId"></param>
28+
/// <param name="cancellationToken">The token to cancel the operation with</param>
29+
/// <exception cref="global::System.InvalidOperationException"></exception>
30+
public async global::System.Threading.Tasks.Task<object> DeleteVoiceV1VoicesVoiceIdDeleteAsync(
31+
string voiceId,
32+
global::System.Threading.CancellationToken cancellationToken = default)
33+
{
34+
PrepareArguments(
35+
client: _httpClient);
36+
PrepareDeleteVoiceV1VoicesVoiceIdDeleteArguments(
37+
httpClient: _httpClient,
38+
voiceId: ref voiceId);
39+
40+
using var httpRequest = new global::System.Net.Http.HttpRequestMessage(
41+
method: global::System.Net.Http.HttpMethod.Delete,
42+
requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/v1/voices/{voiceId}", global::System.UriKind.RelativeOrAbsolute));
43+
44+
PrepareRequest(
45+
client: _httpClient,
46+
request: httpRequest);
47+
PrepareDeleteVoiceV1VoicesVoiceIdDeleteRequest(
48+
httpClient: _httpClient,
49+
httpRequestMessage: httpRequest,
50+
voiceId: voiceId);
51+
52+
using var response = await _httpClient.SendAsync(
53+
request: httpRequest,
54+
completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
55+
cancellationToken: cancellationToken).ConfigureAwait(false);
56+
57+
ProcessResponse(
58+
client: _httpClient,
59+
response: response);
60+
ProcessDeleteVoiceV1VoicesVoiceIdDeleteResponse(
61+
httpClient: _httpClient,
62+
httpResponseMessage: response);
63+
64+
var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
65+
66+
ProcessResponseContent(
67+
client: _httpClient,
68+
response: response,
69+
content: ref __content);
70+
ProcessDeleteVoiceV1VoicesVoiceIdDeleteResponseContent(
71+
httpClient: _httpClient,
72+
httpResponseMessage: response,
73+
content: ref __content);
74+
75+
try
76+
{
77+
response.EnsureSuccessStatusCode();
78+
}
79+
catch (global::System.Net.Http.HttpRequestException ex)
80+
{
81+
throw new global::System.InvalidOperationException(__content, ex);
82+
}
83+
84+
return
85+
global::System.Text.Json.JsonSerializer.Deserialize(__content, global::DeepInfra.SourceGenerationContext.Default.Object) ??
86+
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
87+
}
88+
}
89+
}
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
2+
#nullable enable
3+
4+
namespace DeepInfra
5+
{
6+
public partial class DeepInfraApi
7+
{
8+
partial void PrepareGetVoiceV1VoicesVoiceIdGetArguments(
9+
global::System.Net.Http.HttpClient httpClient,
10+
ref string voiceId);
11+
partial void PrepareGetVoiceV1VoicesVoiceIdGetRequest(
12+
global::System.Net.Http.HttpClient httpClient,
13+
global::System.Net.Http.HttpRequestMessage httpRequestMessage,
14+
string voiceId);
15+
partial void ProcessGetVoiceV1VoicesVoiceIdGetResponse(
16+
global::System.Net.Http.HttpClient httpClient,
17+
global::System.Net.Http.HttpResponseMessage httpResponseMessage);
18+
19+
partial void ProcessGetVoiceV1VoicesVoiceIdGetResponseContent(
20+
global::System.Net.Http.HttpClient httpClient,
21+
global::System.Net.Http.HttpResponseMessage httpResponseMessage,
22+
ref string content);
23+
24+
/// <summary>
25+
/// Get Voice<br/>
26+
/// Get a voice by its id
27+
/// </summary>
28+
/// <param name="voiceId"></param>
29+
/// <param name="cancellationToken">The token to cancel the operation with</param>
30+
/// <exception cref="global::System.InvalidOperationException"></exception>
31+
public async global::System.Threading.Tasks.Task<global::DeepInfra.Voice> GetVoiceV1VoicesVoiceIdGetAsync(
32+
string voiceId,
33+
global::System.Threading.CancellationToken cancellationToken = default)
34+
{
35+
PrepareArguments(
36+
client: _httpClient);
37+
PrepareGetVoiceV1VoicesVoiceIdGetArguments(
38+
httpClient: _httpClient,
39+
voiceId: ref voiceId);
40+
41+
using var httpRequest = new global::System.Net.Http.HttpRequestMessage(
42+
method: global::System.Net.Http.HttpMethod.Get,
43+
requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/v1/voices/{voiceId}", global::System.UriKind.RelativeOrAbsolute));
44+
45+
PrepareRequest(
46+
client: _httpClient,
47+
request: httpRequest);
48+
PrepareGetVoiceV1VoicesVoiceIdGetRequest(
49+
httpClient: _httpClient,
50+
httpRequestMessage: httpRequest,
51+
voiceId: voiceId);
52+
53+
using var response = await _httpClient.SendAsync(
54+
request: httpRequest,
55+
completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
56+
cancellationToken: cancellationToken).ConfigureAwait(false);
57+
58+
ProcessResponse(
59+
client: _httpClient,
60+
response: response);
61+
ProcessGetVoiceV1VoicesVoiceIdGetResponse(
62+
httpClient: _httpClient,
63+
httpResponseMessage: response);
64+
65+
var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
66+
67+
ProcessResponseContent(
68+
client: _httpClient,
69+
response: response,
70+
content: ref __content);
71+
ProcessGetVoiceV1VoicesVoiceIdGetResponseContent(
72+
httpClient: _httpClient,
73+
httpResponseMessage: response,
74+
content: ref __content);
75+
76+
try
77+
{
78+
response.EnsureSuccessStatusCode();
79+
}
80+
catch (global::System.Net.Http.HttpRequestException ex)
81+
{
82+
throw new global::System.InvalidOperationException(__content, ex);
83+
}
84+
85+
return
86+
global::System.Text.Json.JsonSerializer.Deserialize(__content, global::DeepInfra.SourceGenerationContext.Default.Voice) ??
87+
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
88+
}
89+
}
90+
}
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
2+
#nullable enable
3+
4+
namespace DeepInfra
5+
{
6+
public partial class DeepInfraApi
7+
{
8+
partial void PrepareGetVoicesV1VoicesGetArguments(
9+
global::System.Net.Http.HttpClient httpClient);
10+
partial void PrepareGetVoicesV1VoicesGetRequest(
11+
global::System.Net.Http.HttpClient httpClient,
12+
global::System.Net.Http.HttpRequestMessage httpRequestMessage);
13+
partial void ProcessGetVoicesV1VoicesGetResponse(
14+
global::System.Net.Http.HttpClient httpClient,
15+
global::System.Net.Http.HttpResponseMessage httpResponseMessage);
16+
17+
partial void ProcessGetVoicesV1VoicesGetResponseContent(
18+
global::System.Net.Http.HttpClient httpClient,
19+
global::System.Net.Http.HttpResponseMessage httpResponseMessage,
20+
ref string content);
21+
22+
/// <summary>
23+
/// Get Voices<br/>
24+
/// Get available voices for a given user
25+
/// </summary>
26+
/// <param name="cancellationToken">The token to cancel the operation with</param>
27+
/// <exception cref="global::System.InvalidOperationException"></exception>
28+
public async global::System.Threading.Tasks.Task<global::DeepInfra.GetVoicesOut> GetVoicesV1VoicesGetAsync(
29+
global::System.Threading.CancellationToken cancellationToken = default)
30+
{
31+
PrepareArguments(
32+
client: _httpClient);
33+
PrepareGetVoicesV1VoicesGetArguments(
34+
httpClient: _httpClient);
35+
36+
using var httpRequest = new global::System.Net.Http.HttpRequestMessage(
37+
method: global::System.Net.Http.HttpMethod.Get,
38+
requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/voices", global::System.UriKind.RelativeOrAbsolute));
39+
40+
PrepareRequest(
41+
client: _httpClient,
42+
request: httpRequest);
43+
PrepareGetVoicesV1VoicesGetRequest(
44+
httpClient: _httpClient,
45+
httpRequestMessage: httpRequest);
46+
47+
using var response = await _httpClient.SendAsync(
48+
request: httpRequest,
49+
completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
50+
cancellationToken: cancellationToken).ConfigureAwait(false);
51+
52+
ProcessResponse(
53+
client: _httpClient,
54+
response: response);
55+
ProcessGetVoicesV1VoicesGetResponse(
56+
httpClient: _httpClient,
57+
httpResponseMessage: response);
58+
59+
var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
60+
61+
ProcessResponseContent(
62+
client: _httpClient,
63+
response: response,
64+
content: ref __content);
65+
ProcessGetVoicesV1VoicesGetResponseContent(
66+
httpClient: _httpClient,
67+
httpResponseMessage: response,
68+
content: ref __content);
69+
70+
try
71+
{
72+
response.EnsureSuccessStatusCode();
73+
}
74+
catch (global::System.Net.Http.HttpRequestException ex)
75+
{
76+
throw new global::System.InvalidOperationException(__content, ex);
77+
}
78+
79+
return
80+
global::System.Text.Json.JsonSerializer.Deserialize(__content, global::DeepInfra.SourceGenerationContext.Default.GetVoicesOut) ??
81+
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
82+
}
83+
}
84+
}

0 commit comments

Comments
 (0)