ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.405.8

This commit is contained in:
speakeasybot
2024-10-02 09:49:57 +00:00
parent b9b7cd1146
commit 4a443f6f2e
61 changed files with 3862 additions and 1263 deletions

View File

@@ -40,7 +40,7 @@ namespace LukeHagar.PlexAPI.SDK
/// Querying status of updates
/// </remarks>
/// </summary>
Task<GetUpdateStatusResponse> GetUpdateStatusAsync();
Task<GetUpdateStatusResponse> GetUpdateStatusAsync(RetryConfig? retryConfig = null);
/// <summary>
/// Checking for updates
@@ -49,7 +49,7 @@ namespace LukeHagar.PlexAPI.SDK
/// Checking for updates
/// </remarks>
/// </summary>
Task<CheckForUpdatesResponse> CheckForUpdatesAsync(Download? download = null);
Task<CheckForUpdatesResponse> CheckForUpdatesAsync(Download? download = null, RetryConfig? retryConfig = null);
/// <summary>
/// Apply Updates
@@ -59,7 +59,7 @@ namespace LukeHagar.PlexAPI.SDK
///
/// </remarks>
/// </summary>
Task<ApplyUpdatesResponse> ApplyUpdatesAsync(Tonight? tonight = null, Skip? skip = null);
Task<ApplyUpdatesResponse> ApplyUpdatesAsync(Tonight? tonight = null, Skip? skip = null, RetryConfig? retryConfig = null);
}
/// <summary>
@@ -74,10 +74,10 @@ namespace LukeHagar.PlexAPI.SDK
{
public SDKConfig SDKConfiguration { get; private set; }
private const string _language = "csharp";
private const string _sdkVersion = "0.8.7";
private const string _sdkGenVersion = "2.428.1";
private const string _sdkVersion = "0.9.0";
private const string _sdkGenVersion = "2.429.0";
private const string _openapiDocVersion = "0.0.3";
private const string _userAgent = "speakeasy-sdk/csharp 0.8.7 2.428.1 0.0.3 LukeHagar.PlexAPI.SDK";
private const string _userAgent = "speakeasy-sdk/csharp 0.9.0 2.429.0 0.0.3 LukeHagar.PlexAPI.SDK";
private string _serverUrl = "";
private ISpeakeasyHttpClient _client;
private Func<LukeHagar.PlexAPI.SDK.Models.Components.Security>? _securitySource;
@@ -90,7 +90,7 @@ namespace LukeHagar.PlexAPI.SDK
SDKConfiguration = config;
}
public async Task<GetUpdateStatusResponse> GetUpdateStatusAsync()
public async Task<GetUpdateStatusResponse> GetUpdateStatusAsync(RetryConfig? retryConfig = null)
{
string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl();
@@ -107,11 +107,44 @@ namespace LukeHagar.PlexAPI.SDK
var hookCtx = new HookContext("getUpdateStatus", null, _securitySource);
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
if (retryConfig == null)
{
if (this.SDKConfiguration.RetryConfig != null)
{
retryConfig = this.SDKConfiguration.RetryConfig;
}
else
{
var backoff = new BackoffStrategy(
initialIntervalMs: 500L,
maxIntervalMs: 60000L,
maxElapsedTimeMs: 3600000L,
exponent: 1.5
);
retryConfig = new RetryConfig(
strategy: RetryConfig.RetryStrategy.BACKOFF,
backoff: backoff,
retryConnectionErrors: true
);
}
}
List<string> statusCodes = new List<string>
{
"5XX",
};
Func<Task<HttpResponseMessage>> retrySend = async () =>
{
var _httpRequest = await _client.CloneAsync(httpRequest);
return await _client.SendAsync(_httpRequest);
};
var retries = new LukeHagar.PlexAPI.SDK.Utils.Retries.Retries(retrySend, retryConfig, statusCodes);
HttpResponseMessage httpResponse;
try
{
httpResponse = await _client.SendAsync(httpRequest);
httpResponse = await retries.Run();
int _statusCode = (int)httpResponse.StatusCode;
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
@@ -187,7 +220,7 @@ namespace LukeHagar.PlexAPI.SDK
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
public async Task<CheckForUpdatesResponse> CheckForUpdatesAsync(Download? download = null)
public async Task<CheckForUpdatesResponse> CheckForUpdatesAsync(Download? download = null, RetryConfig? retryConfig = null)
{
var request = new CheckForUpdatesRequest()
{
@@ -207,11 +240,44 @@ namespace LukeHagar.PlexAPI.SDK
var hookCtx = new HookContext("checkForUpdates", null, _securitySource);
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
if (retryConfig == null)
{
if (this.SDKConfiguration.RetryConfig != null)
{
retryConfig = this.SDKConfiguration.RetryConfig;
}
else
{
var backoff = new BackoffStrategy(
initialIntervalMs: 500L,
maxIntervalMs: 60000L,
maxElapsedTimeMs: 3600000L,
exponent: 1.5
);
retryConfig = new RetryConfig(
strategy: RetryConfig.RetryStrategy.BACKOFF,
backoff: backoff,
retryConnectionErrors: true
);
}
}
List<string> statusCodes = new List<string>
{
"5XX",
};
Func<Task<HttpResponseMessage>> retrySend = async () =>
{
var _httpRequest = await _client.CloneAsync(httpRequest);
return await _client.SendAsync(_httpRequest);
};
var retries = new LukeHagar.PlexAPI.SDK.Utils.Retries.Retries(retrySend, retryConfig, statusCodes);
HttpResponseMessage httpResponse;
try
{
httpResponse = await _client.SendAsync(httpRequest);
httpResponse = await retries.Run();
int _statusCode = (int)httpResponse.StatusCode;
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600)
@@ -279,7 +345,7 @@ namespace LukeHagar.PlexAPI.SDK
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
}
public async Task<ApplyUpdatesResponse> ApplyUpdatesAsync(Tonight? tonight = null, Skip? skip = null)
public async Task<ApplyUpdatesResponse> ApplyUpdatesAsync(Tonight? tonight = null, Skip? skip = null, RetryConfig? retryConfig = null)
{
var request = new ApplyUpdatesRequest()
{
@@ -300,11 +366,44 @@ namespace LukeHagar.PlexAPI.SDK
var hookCtx = new HookContext("applyUpdates", null, _securitySource);
httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest);
if (retryConfig == null)
{
if (this.SDKConfiguration.RetryConfig != null)
{
retryConfig = this.SDKConfiguration.RetryConfig;
}
else
{
var backoff = new BackoffStrategy(
initialIntervalMs: 500L,
maxIntervalMs: 60000L,
maxElapsedTimeMs: 3600000L,
exponent: 1.5
);
retryConfig = new RetryConfig(
strategy: RetryConfig.RetryStrategy.BACKOFF,
backoff: backoff,
retryConnectionErrors: true
);
}
}
List<string> statusCodes = new List<string>
{
"5XX",
};
Func<Task<HttpResponseMessage>> retrySend = async () =>
{
var _httpRequest = await _client.CloneAsync(httpRequest);
return await _client.SendAsync(_httpRequest);
};
var retries = new LukeHagar.PlexAPI.SDK.Utils.Retries.Retries(retrySend, retryConfig, statusCodes);
HttpResponseMessage httpResponse;
try
{
httpResponse = await _client.SendAsync(httpRequest);
httpResponse = await retries.Run();
int _statusCode = (int)httpResponse.StatusCode;
if (_statusCode == 400 || _statusCode == 401 || _statusCode >= 400 && _statusCode < 500 || _statusCode == 500 || _statusCode >= 500 && _statusCode < 600)