Skip to content

Commit

Permalink
Merge pull request #75 from tryAGI/bot/update-openapi_202410230117
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Oct 23, 2024
2 parents c5c21b5 + 1f20446 commit 4de2839
Show file tree
Hide file tree
Showing 61 changed files with 1,896 additions and 1,866 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,71 +28,71 @@ partial void ProcessAccountEmailValuesResponseContent(
global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: _httpClient);
client: HttpClient);
PrepareAccountEmailValuesArguments(
httpClient: _httpClient);
httpClient: HttpClient);

var __pathBuilder = new PathBuilder(
path: "/v1/me/emails",
baseUri: _httpClient.BaseAddress);
baseUri: HttpClient.BaseAddress);
var __path = __pathBuilder.ToString();
using var httpRequest = new global::System.Net.Http.HttpRequestMessage(
using var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
method: global::System.Net.Http.HttpMethod.Get,
requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute));

foreach (var _authorization in _authorizations)
foreach (var __authorization in Authorizations)
{
if (_authorization.Type == "Http" ||
_authorization.Type == "OAuth2")
if (__authorization.Type == "Http" ||
__authorization.Type == "OAuth2")
{
httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
scheme: _authorization.Name,
parameter: _authorization.Value);
__httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
scheme: __authorization.Name,
parameter: __authorization.Value);
}
else if (_authorization.Type == "ApiKey" &&
_authorization.Location == "Header")
else if (__authorization.Type == "ApiKey" &&
__authorization.Location == "Header")
{
httpRequest.Headers.Add(_authorization.Name, _authorization.Value);
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}

PrepareRequest(
client: _httpClient,
request: httpRequest);
client: HttpClient,
request: __httpRequest);
PrepareAccountEmailValuesRequest(
httpClient: _httpClient,
httpRequestMessage: httpRequest);
httpClient: HttpClient,
httpRequestMessage: __httpRequest);

using var response = await _httpClient.SendAsync(
request: httpRequest,
using var __response = await HttpClient.SendAsync(
request: __httpRequest,
completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
cancellationToken: cancellationToken).ConfigureAwait(false);

ProcessResponse(
client: _httpClient,
response: response);
client: HttpClient,
response: __response);
ProcessAccountEmailValuesResponse(
httpClient: _httpClient,
httpResponseMessage: response);
httpClient: HttpClient,
httpResponseMessage: __response);

var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);

ProcessResponseContent(
client: _httpClient,
response: response,
client: HttpClient,
response: __response,
content: ref __content);
ProcessAccountEmailValuesResponseContent(
httpClient: _httpClient,
httpResponseMessage: response,
httpClient: HttpClient,
httpResponseMessage: __response,
content: ref __content);

try
{
response.EnsureSuccessStatusCode();
__response.EnsureSuccessStatusCode();
}
catch (global::System.Net.Http.HttpRequestException ex)
catch (global::System.Net.Http.HttpRequestException __ex)
{
throw new global::System.InvalidOperationException(__content, ex);
throw new global::System.InvalidOperationException(__content, __ex);
}

return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,71 +28,71 @@ partial void ProcessAccountRateLimitResponseContent(
global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: _httpClient);
client: HttpClient);
PrepareAccountRateLimitArguments(
httpClient: _httpClient);
httpClient: HttpClient);

var __pathBuilder = new PathBuilder(
path: "/v1/me/rate_limit",
baseUri: _httpClient.BaseAddress);
baseUri: HttpClient.BaseAddress);
var __path = __pathBuilder.ToString();
using var httpRequest = new global::System.Net.Http.HttpRequestMessage(
using var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
method: global::System.Net.Http.HttpMethod.Get,
requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute));

foreach (var _authorization in _authorizations)
foreach (var __authorization in Authorizations)
{
if (_authorization.Type == "Http" ||
_authorization.Type == "OAuth2")
if (__authorization.Type == "Http" ||
__authorization.Type == "OAuth2")
{
httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
scheme: _authorization.Name,
parameter: _authorization.Value);
__httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
scheme: __authorization.Name,
parameter: __authorization.Value);
}
else if (_authorization.Type == "ApiKey" &&
_authorization.Location == "Header")
else if (__authorization.Type == "ApiKey" &&
__authorization.Location == "Header")
{
httpRequest.Headers.Add(_authorization.Name, _authorization.Value);
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}

PrepareRequest(
client: _httpClient,
request: httpRequest);
client: HttpClient,
request: __httpRequest);
PrepareAccountRateLimitRequest(
httpClient: _httpClient,
httpRequestMessage: httpRequest);
httpClient: HttpClient,
httpRequestMessage: __httpRequest);

using var response = await _httpClient.SendAsync(
request: httpRequest,
using var __response = await HttpClient.SendAsync(
request: __httpRequest,
completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
cancellationToken: cancellationToken).ConfigureAwait(false);

ProcessResponse(
client: _httpClient,
response: response);
client: HttpClient,
response: __response);
ProcessAccountRateLimitResponse(
httpClient: _httpClient,
httpResponseMessage: response);
httpClient: HttpClient,
httpResponseMessage: __response);

var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);

ProcessResponseContent(
client: _httpClient,
response: response,
client: HttpClient,
response: __response,
content: ref __content);
ProcessAccountRateLimitResponseContent(
httpClient: _httpClient,
httpResponseMessage: response,
httpClient: HttpClient,
httpResponseMessage: __response,
content: ref __content);

try
{
response.EnsureSuccessStatusCode();
__response.EnsureSuccessStatusCode();
}
catch (global::System.Net.Http.HttpRequestException ex)
catch (global::System.Net.Http.HttpRequestException __ex)
{
throw new global::System.InvalidOperationException(__content, ex);
throw new global::System.InvalidOperationException(__content, __ex);
}

return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,79 +34,79 @@ partial void ProcessAccountSetUsernameResponseContent(
request = request ?? throw new global::System.ArgumentNullException(nameof(request));

PrepareArguments(
client: _httpClient);
client: HttpClient);
PrepareAccountSetUsernameArguments(
httpClient: _httpClient,
httpClient: HttpClient,
request: request);

var __pathBuilder = new PathBuilder(
path: "/v1/me/username",
baseUri: _httpClient.BaseAddress);
baseUri: HttpClient.BaseAddress);
var __path = __pathBuilder.ToString();
using var httpRequest = new global::System.Net.Http.HttpRequestMessage(
using var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
method: new global::System.Net.Http.HttpMethod("PATCH"),
requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute));

foreach (var _authorization in _authorizations)
foreach (var __authorization in Authorizations)
{
if (_authorization.Type == "Http" ||
_authorization.Type == "OAuth2")
if (__authorization.Type == "Http" ||
__authorization.Type == "OAuth2")
{
httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
scheme: _authorization.Name,
parameter: _authorization.Value);
__httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
scheme: __authorization.Name,
parameter: __authorization.Value);
}
else if (_authorization.Type == "ApiKey" &&
_authorization.Location == "Header")
else if (__authorization.Type == "ApiKey" &&
__authorization.Location == "Header")
{
httpRequest.Headers.Add(_authorization.Name, _authorization.Value);
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
mediaType: "application/json");
httpRequest.Content = __httpRequestContent;
__httpRequest.Content = __httpRequestContent;

PrepareRequest(
client: _httpClient,
request: httpRequest);
client: HttpClient,
request: __httpRequest);
PrepareAccountSetUsernameRequest(
httpClient: _httpClient,
httpRequestMessage: httpRequest,
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
request: request);

using var response = await _httpClient.SendAsync(
request: httpRequest,
using var __response = await HttpClient.SendAsync(
request: __httpRequest,
completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
cancellationToken: cancellationToken).ConfigureAwait(false);

ProcessResponse(
client: _httpClient,
response: response);
client: HttpClient,
response: __response);
ProcessAccountSetUsernameResponse(
httpClient: _httpClient,
httpResponseMessage: response);
httpClient: HttpClient,
httpResponseMessage: __response);

var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);

ProcessResponseContent(
client: _httpClient,
response: response,
client: HttpClient,
response: __response,
content: ref __content);
ProcessAccountSetUsernameResponseContent(
httpClient: _httpClient,
httpResponseMessage: response,
httpClient: HttpClient,
httpResponseMessage: __response,
content: ref __content);

try
{
response.EnsureSuccessStatusCode();
__response.EnsureSuccessStatusCode();
}
catch (global::System.Net.Http.HttpRequestException ex)
catch (global::System.Net.Http.HttpRequestException __ex)
{
throw new global::System.InvalidOperationException(__content, ex);
throw new global::System.InvalidOperationException(__content, __ex);
}

return __content;
Expand All @@ -124,13 +124,13 @@ partial void ProcessAccountSetUsernameResponseContent(
string username,
global::System.Threading.CancellationToken cancellationToken = default)
{
var request = new global::DeepInfra.MeUsername
var __request = new global::DeepInfra.MeUsername
{
Username = username,
};

return await AccountSetUsernameAsync(
request: request,
request: __request,
cancellationToken: cancellationToken).ConfigureAwait(false);
}
}
Expand Down
Loading

0 comments on commit 4de2839

Please sign in to comment.