ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.615.2

This commit is contained in:
speakeasybot
2025-09-15 00:26:45 +00:00
parent 1f5d4ff03a
commit 8563e8fef2
246 changed files with 8601 additions and 2253 deletions

View File

@@ -55,12 +55,12 @@ namespace LukeHagar.PlexAPI.SDK
/// List of server URLs available for the get-watch-list operation.
/// </summary>
public static readonly string[] GetWatchListServerList = {
"https://metadata.provider.plex.tv",
"https://discover.provider.plex.tv",
};
public SDKConfig SDKConfiguration { get; private set; }
private const string _language = "csharp";
private const string _sdkVersion = "0.16.1";
private const string _sdkGenVersion = "2.674.3";
private const string _sdkVersion = "0.17.0";
private const string _sdkGenVersion = "2.698.4";
private const string _openapiDocVersion = "0.0.3";
public Watchlist(SDKConfig config)
@@ -127,7 +127,17 @@ namespace LukeHagar.PlexAPI.SDK
{
if(Utilities.IsContentTypeMatch("application/json", contentType))
{
var obj = ResponseBodyDeserializer.Deserialize<GetWatchListResponseBody>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
var httpResponseBody = await httpResponse.Content.ReadAsStringAsync();
GetWatchListResponseBody obj;
try
{
obj = ResponseBodyDeserializer.DeserializeNotNull<GetWatchListResponseBody>(httpResponseBody, NullValueHandling.Ignore);
}
catch (Exception ex)
{
throw new ResponseValidationException("Failed to deserialize response body into GetWatchListResponseBody.", httpResponse, httpResponseBody, ex);
}
var response = new GetWatchListResponse()
{
StatusCode = responseStatusCode,
@@ -138,40 +148,60 @@ namespace LukeHagar.PlexAPI.SDK
return response;
}
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
throw new Models.Errors.SDKException("Unknown content type received", httpResponse, await httpResponse.Content.ReadAsStringAsync());
}
else if(responseStatusCode == 400)
{
if(Utilities.IsContentTypeMatch("application/json", contentType))
{
var obj = ResponseBodyDeserializer.Deserialize<GetWatchListBadRequest>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
obj!.RawResponse = httpResponse;
throw obj!;
var httpResponseBody = await httpResponse.Content.ReadAsStringAsync();
GetWatchListBadRequestPayload payload;
try
{
payload = ResponseBodyDeserializer.DeserializeNotNull<GetWatchListBadRequestPayload>(httpResponseBody, NullValueHandling.Ignore);
}
catch (Exception ex)
{
throw new ResponseValidationException("Failed to deserialize response body into GetWatchListBadRequestPayload.", httpResponse, httpResponseBody, ex);
}
payload.RawResponse = httpResponse;
throw new GetWatchListBadRequest(payload, httpResponse, httpResponseBody);
}
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
throw new Models.Errors.SDKException("Unknown content type received", httpResponse, await httpResponse.Content.ReadAsStringAsync());
}
else if(responseStatusCode == 401)
{
if(Utilities.IsContentTypeMatch("application/json", contentType))
{
var obj = ResponseBodyDeserializer.Deserialize<GetWatchListUnauthorized>(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore);
obj!.RawResponse = httpResponse;
throw obj!;
var httpResponseBody = await httpResponse.Content.ReadAsStringAsync();
GetWatchListUnauthorizedPayload payload;
try
{
payload = ResponseBodyDeserializer.DeserializeNotNull<GetWatchListUnauthorizedPayload>(httpResponseBody, NullValueHandling.Ignore);
}
catch (Exception ex)
{
throw new ResponseValidationException("Failed to deserialize response body into GetWatchListUnauthorizedPayload.", httpResponse, httpResponseBody, ex);
}
payload.RawResponse = httpResponse;
throw new GetWatchListUnauthorized(payload, httpResponse, httpResponseBody);
}
throw new Models.Errors.SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
throw new Models.Errors.SDKException("Unknown content type received", httpResponse, await httpResponse.Content.ReadAsStringAsync());
}
else if(responseStatusCode >= 400 && responseStatusCode < 500)
{
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
throw new Models.Errors.SDKException("API error occurred", httpResponse, await httpResponse.Content.ReadAsStringAsync());
}
else if(responseStatusCode >= 500 && responseStatusCode < 600)
{
throw new Models.Errors.SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
throw new Models.Errors.SDKException("API error occurred", httpResponse, await httpResponse.Content.ReadAsStringAsync());
}
throw new Models.Errors.SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse);
throw new Models.Errors.SDKException("Unknown status code received", httpResponse, await httpResponse.Content.ReadAsStringAsync());
}
}
}