Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,28 @@ partial void ProcessAuthJwtLoginApiV1AuthJwtLoginPostResponseContent(
/// <exception cref="global::Presenton.ApiException"></exception>
public async global::System.Threading.Tasks.Task<global::Presenton.BearerResponse> AuthJwtLoginApiV1AuthJwtLoginPostAsync(

global::Presenton.BodyAuthJwtLoginApiV1AuthJwtLoginPost request,
global::Presenton.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
var __response = await AuthJwtLoginApiV1AuthJwtLoginPostAsResponseAsync(

request: request,
requestOptions: requestOptions,
cancellationToken: cancellationToken
).ConfigureAwait(false);

return __response.Body;
}
/// <summary>
/// Auth:Jwt.Login
/// </summary>
/// <param name="request"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Presenton.ApiException"></exception>
public async global::System.Threading.Tasks.Task<global::Presenton.AutoSDKHttpResponse<global::Presenton.BearerResponse>> AuthJwtLoginApiV1AuthJwtLoginPostAsResponseAsync(

global::Presenton.BodyAuthJwtLoginApiV1AuthJwtLoginPost request,
global::Presenton.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
Expand Down Expand Up @@ -84,6 +106,7 @@ partial void ProcessAuthJwtLoginApiV1AuthJwtLoginPostResponseContent(

global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{

var __pathBuilder = new global::Presenton.PathBuilder(
path: "/api/v1/auth/jwt/login",
baseUri: HttpClient.BaseAddress);
Expand Down Expand Up @@ -163,6 +186,8 @@ partial void ProcessAuthJwtLoginApiV1AuthJwtLoginPostResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
retryDelay: null,
retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
Expand All @@ -173,6 +198,11 @@ partial void ProcessAuthJwtLoginApiV1AuthJwtLoginPostResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay(
clientOptions: Options,
requestOptions: requestOptions,
response: null,
attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
Expand All @@ -190,6 +220,8 @@ partial void ProcessAuthJwtLoginApiV1AuthJwtLoginPostResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
Expand All @@ -199,8 +231,7 @@ partial void ProcessAuthJwtLoginApiV1AuthJwtLoginPostResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
clientOptions: Options,
requestOptions: requestOptions,
retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
Expand All @@ -209,6 +240,11 @@ partial void ProcessAuthJwtLoginApiV1AuthJwtLoginPostResponseContent(
__attempt < __maxAttempts &&
global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay(
clientOptions: Options,
requestOptions: requestOptions,
response: __response,
attempt: __attempt);
await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext(
Expand All @@ -225,14 +261,15 @@ partial void ProcessAuthJwtLoginApiV1AuthJwtLoginPostResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
retryDelay: __retryDelay,
retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
clientOptions: Options,
requestOptions: requestOptions,
retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
Expand Down Expand Up @@ -272,6 +309,8 @@ partial void ProcessAuthJwtLoginApiV1AuthJwtLoginPostResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
retryDelay: null,
retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
Expand All @@ -292,6 +331,8 @@ partial void ProcessAuthJwtLoginApiV1AuthJwtLoginPostResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
retryDelay: null,
retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Bad Request
Expand Down Expand Up @@ -392,9 +433,13 @@ partial void ProcessAuthJwtLoginApiV1AuthJwtLoginPostResponseContent(
{
__response.EnsureSuccessStatusCode();

return
global::Presenton.BearerResponse.FromJson(__content, JsonSerializerContext) ??
var __value = global::Presenton.BearerResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
return new global::Presenton.AutoSDKHttpResponse<global::Presenton.BearerResponse>(
statusCode: __response.StatusCode,
headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response),
requestUri: __response.RequestMessage?.RequestUri,
body: __value);
}
catch (global::System.Exception __ex)
{
Expand Down Expand Up @@ -422,9 +467,13 @@ partial void ProcessAuthJwtLoginApiV1AuthJwtLoginPostResponseContent(
#endif
).ConfigureAwait(false);

return
await global::Presenton.BearerResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
var __value = await global::Presenton.BearerResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
return new global::Presenton.AutoSDKHttpResponse<global::Presenton.BearerResponse>(
statusCode: __response.StatusCode,
headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response),
requestUri: __response.RequestMessage?.RequestUri,
body: __value);
}
catch (global::System.Exception __ex)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,23 @@ partial void ProcessAuthJwtLogoutApiV1AuthJwtLogoutPostResponseContent(
public async global::System.Threading.Tasks.Task<string> AuthJwtLogoutApiV1AuthJwtLogoutPostAsync(
global::Presenton.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
var __response = await AuthJwtLogoutApiV1AuthJwtLogoutPostAsResponseAsync(
requestOptions: requestOptions,
cancellationToken: cancellationToken
).ConfigureAwait(false);

return __response.Body;
}
/// <summary>
/// Auth:Jwt.Logout
/// </summary>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Presenton.ApiException"></exception>
public async global::System.Threading.Tasks.Task<global::Presenton.AutoSDKHttpResponse<string>> AuthJwtLogoutApiV1AuthJwtLogoutPostAsResponseAsync(
global::Presenton.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
Expand Down Expand Up @@ -76,6 +93,7 @@ partial void ProcessAuthJwtLogoutApiV1AuthJwtLogoutPostResponseContent(

global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{

var __pathBuilder = new global::Presenton.PathBuilder(
path: "/api/v1/auth/jwt/logout",
baseUri: HttpClient.BaseAddress);
Expand Down Expand Up @@ -148,6 +166,8 @@ partial void ProcessAuthJwtLogoutApiV1AuthJwtLogoutPostResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
retryDelay: null,
retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
Expand All @@ -158,6 +178,11 @@ partial void ProcessAuthJwtLogoutApiV1AuthJwtLogoutPostResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay(
clientOptions: Options,
requestOptions: requestOptions,
response: null,
attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
Expand All @@ -175,6 +200,8 @@ partial void ProcessAuthJwtLogoutApiV1AuthJwtLogoutPostResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
Expand All @@ -184,8 +211,7 @@ partial void ProcessAuthJwtLogoutApiV1AuthJwtLogoutPostResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
clientOptions: Options,
requestOptions: requestOptions,
retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
Expand All @@ -194,6 +220,11 @@ partial void ProcessAuthJwtLogoutApiV1AuthJwtLogoutPostResponseContent(
__attempt < __maxAttempts &&
global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay(
clientOptions: Options,
requestOptions: requestOptions,
response: __response,
attempt: __attempt);
await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext(
Expand All @@ -210,14 +241,15 @@ partial void ProcessAuthJwtLogoutApiV1AuthJwtLogoutPostResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
retryDelay: __retryDelay,
retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
clientOptions: Options,
requestOptions: requestOptions,
retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
Expand Down Expand Up @@ -257,6 +289,8 @@ partial void ProcessAuthJwtLogoutApiV1AuthJwtLogoutPostResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
retryDelay: null,
retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
Expand All @@ -277,6 +311,8 @@ partial void ProcessAuthJwtLogoutApiV1AuthJwtLogoutPostResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
retryDelay: null,
retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
//
Expand Down Expand Up @@ -334,7 +370,11 @@ partial void ProcessAuthJwtLogoutApiV1AuthJwtLogoutPostResponseContent(
{
__response.EnsureSuccessStatusCode();

return __content;
return new global::Presenton.AutoSDKHttpResponse<string>(
statusCode: __response.StatusCode,
headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response),
requestUri: __response.RequestMessage?.RequestUri,
body: __content);
}
catch (global::System.Exception __ex)
{
Expand Down Expand Up @@ -362,7 +402,11 @@ partial void ProcessAuthJwtLogoutApiV1AuthJwtLogoutPostResponseContent(
#endif
).ConfigureAwait(false);

return __content;
return new global::Presenton.AutoSDKHttpResponse<string>(
statusCode: __response.StatusCode,
headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response),
requestUri: __response.RequestMessage?.RequestUri,
body: __content);
}
catch (global::System.Exception __ex)
{
Expand Down
Loading