From 0d9ebaa142c1a78518a81e435fb45e353601ae32 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 5 May 2026 13:03:57 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- .../RevAI.AccountClient.GetAccount.g.cs | 61 ++++- .../RevAI/Generated/RevAI.AccountClient.g.cs | 8 +- .../Generated/RevAI.AutoSDKHttpResponse.g.cs | 121 +++++++++ .../RevAI.CaptionsClient.GetCaptions.g.cs | 72 +++++- .../RevAI/Generated/RevAI.CaptionsClient.g.cs | 8 +- .../RevAI.IAccountClient.GetAccount.g.cs | 10 + .../RevAI.ICaptionsClient.GetCaptions.g.cs | 18 ++ ...lient.DeleteLanguageIdentificationJob.g.cs | 12 + ...ient.GetLanguageIdentificationJobById.g.cs | 12 + ...t.GetListOfLanguageIdentificationJobs.g.cs | 14 ++ ...lient.SubmitLanguageIdentificationJob.g.cs | 13 + ...lient.GetLanguageIdentificationResult.g.cs | 12 + ...JobsClient.DeleteSentimentAnalysisJob.g.cs | 12 + ...Client.GetListOfSentimentAnalysisJobs.g.cs | 14 ++ ...obsClient.GetSentimentAnalysisJobById.g.cs | 12 + ...JobsClient.SubmitSentimentAnalysisJob.g.cs | 13 + ...ultsClient.GetSentimentAnalysisResult.g.cs | 12 + ...onJobsClient.DeleteTopicExtractionJob.g.cs | 12 + ...bsClient.GetListOfTopicExtractionJobs.g.cs | 14 ++ ...nJobsClient.GetTopicExtractionJobById.g.cs | 12 + ...onJobsClient.SubmitTopicExtractionJob.g.cs | 13 + ...esultsClient.GetTopicExtractionResult.g.cs | 12 + ...RevAI.ITranscriptClient.GetTranscript.g.cs | 16 ++ ...tionJobsClient.DeleteTranscriptionJob.g.cs | 12 + ...JobsClient.GetListOfTranscriptionJobs.g.cs | 14 ++ ...ionJobsClient.GetTranscriptionJobById.g.cs | 12 + ...tionJobsClient.SubmitTranscriptionJob.g.cs | 13 + ...lient.DeleteLanguageIdentificationJob.g.cs | 54 +++- ...ient.GetLanguageIdentificationJobById.g.cs | 64 ++++- ...t.GetListOfLanguageIdentificationJobs.g.cs | 71 +++++- ...lient.SubmitLanguageIdentificationJob.g.cs | 66 ++++- ...evAI.LanguageIdentificationJobsClient.g.cs | 8 +- ...lient.GetLanguageIdentificationResult.g.cs | 64 ++++- ...I.LanguageIdentificationResultsClient.g.cs | 8 +- .../RevAI/Generated/RevAI.OptionsSupport.g.cs | 231 +++++++++++++++++- .../RevAI/Generated/RevAI.RevAIClient.g.cs | 28 +-- ...JobsClient.DeleteSentimentAnalysisJob.g.cs | 54 +++- ...Client.GetListOfSentimentAnalysisJobs.g.cs | 71 +++++- ...obsClient.GetSentimentAnalysisJobById.g.cs | 64 ++++- ...JobsClient.SubmitSentimentAnalysisJob.g.cs | 66 ++++- .../RevAI.SentimentAnalysisJobsClient.g.cs | 8 +- ...ultsClient.GetSentimentAnalysisResult.g.cs | 64 ++++- .../RevAI.SentimentAnalysisResultsClient.g.cs | 8 +- ...onJobsClient.DeleteTopicExtractionJob.g.cs | 54 +++- ...bsClient.GetListOfTopicExtractionJobs.g.cs | 71 +++++- ...nJobsClient.GetTopicExtractionJobById.g.cs | 64 ++++- ...onJobsClient.SubmitTopicExtractionJob.g.cs | 66 ++++- .../RevAI.TopicExtractionJobsClient.g.cs | 8 +- ...esultsClient.GetTopicExtractionResult.g.cs | 64 ++++- .../RevAI.TopicExtractionResultsClient.g.cs | 8 +- .../RevAI.TranscriptClient.GetTranscript.g.cs | 69 +++++- .../Generated/RevAI.TranscriptClient.g.cs | 8 +- ...tionJobsClient.DeleteTranscriptionJob.g.cs | 54 +++- ...JobsClient.GetListOfTranscriptionJobs.g.cs | 71 +++++- ...ionJobsClient.GetTranscriptionJobById.g.cs | 64 ++++- ...tionJobsClient.SubmitTranscriptionJob.g.cs | 66 ++++- .../RevAI.TranscriptionJobsClient.g.cs | 8 +- 57 files changed, 1930 insertions(+), 228 deletions(-) create mode 100644 src/libs/RevAI/Generated/RevAI.AutoSDKHttpResponse.g.cs diff --git a/src/libs/RevAI/Generated/RevAI.AccountClient.GetAccount.g.cs b/src/libs/RevAI/Generated/RevAI.AccountClient.GetAccount.g.cs index 95c664d..b01baa0 100644 --- a/src/libs/RevAI/Generated/RevAI.AccountClient.GetAccount.g.cs +++ b/src/libs/RevAI/Generated/RevAI.AccountClient.GetAccount.g.cs @@ -49,6 +49,24 @@ partial void ProcessGetAccountResponseContent( public async global::System.Threading.Tasks.Task GetAccountAsync( global::RevAI.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetAccountAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Account
+ /// Get the developer's account information + ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetAccountAsResponseAsync( + global::RevAI.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -77,6 +95,7 @@ partial void ProcessGetAccountResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::RevAI.PathBuilder( path: "/speechtotext/v1/account", baseUri: HttpClient.BaseAddress); @@ -149,6 +168,8 @@ partial void ProcessGetAccountResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -159,6 +180,11 @@ partial void ProcessGetAccountResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::RevAI.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::RevAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -176,6 +202,8 @@ partial void ProcessGetAccountResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -185,8 +213,7 @@ partial void ProcessGetAccountResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::RevAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -195,6 +222,11 @@ partial void ProcessGetAccountResponseContent( __attempt < __maxAttempts && global::RevAI.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::RevAI.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::RevAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::RevAI.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -211,14 +243,15 @@ partial void ProcessGetAccountResponseContent( 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::RevAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -258,6 +291,8 @@ partial void ProcessGetAccountResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -278,6 +313,8 @@ partial void ProcessGetAccountResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Authorization has been denied for this request @@ -340,9 +377,13 @@ partial void ProcessGetAccountResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::RevAI.Account.FromJson(__content, JsonSerializerContext) ?? + var __value = global::RevAI.Account.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::RevAI.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::RevAI.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -370,9 +411,13 @@ partial void ProcessGetAccountResponseContent( #endif ).ConfigureAwait(false); - return - await global::RevAI.Account.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::RevAI.Account.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::RevAI.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::RevAI.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/RevAI/Generated/RevAI.AccountClient.g.cs b/src/libs/RevAI/Generated/RevAI.AccountClient.g.cs index 1a40f51..d24fcc6 100644 --- a/src/libs/RevAI/Generated/RevAI.AccountClient.g.cs +++ b/src/libs/RevAI/Generated/RevAI.AccountClient.g.cs @@ -73,10 +73,10 @@ public AccountClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public AccountClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::RevAI.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::RevAI.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/RevAI/Generated/RevAI.AutoSDKHttpResponse.g.cs b/src/libs/RevAI/Generated/RevAI.AutoSDKHttpResponse.g.cs new file mode 100644 index 0000000..338116e --- /dev/null +++ b/src/libs/RevAI/Generated/RevAI.AutoSDKHttpResponse.g.cs @@ -0,0 +1,121 @@ + +#nullable enable + +namespace RevAI +{ + /// + /// Represents a successful HTTP response with status code and headers. + /// + public partial class AutoSDKHttpResponse + { + /// + /// Initializes a new instance of the class. + /// + public AutoSDKHttpResponse( + global::System.Net.HttpStatusCode statusCode, + global::System.Collections.Generic.Dictionary> headers) + : this( + statusCode: statusCode, + headers: headers, + requestUri: null) + { + } + + /// + /// Initializes a new instance of the class. + /// + public AutoSDKHttpResponse( + global::System.Net.HttpStatusCode statusCode, + global::System.Collections.Generic.Dictionary> headers, + global::System.Uri? requestUri) + { + StatusCode = statusCode; + Headers = headers ?? throw new global::System.ArgumentNullException(nameof(headers)); + RequestUri = requestUri; + } + + /// + /// Gets the HTTP status code. + /// + public global::System.Net.HttpStatusCode StatusCode { get; } + /// + /// Gets the response headers. + /// + public global::System.Collections.Generic.Dictionary> Headers { get; } + /// + /// Gets the final request URI associated with the response. + /// + public global::System.Uri? RequestUri { get; } + + internal static global::System.Collections.Generic.Dictionary> CreateHeaders( + global::System.Net.Http.HttpResponseMessage response) + { + response = response ?? throw new global::System.ArgumentNullException(nameof(response)); + + var headers = global::System.Linq.Enumerable.ToDictionary( + response.Headers, + static header => header.Key, + static header => (global::System.Collections.Generic.IEnumerable)global::System.Linq.Enumerable.ToArray(header.Value), + global::System.StringComparer.OrdinalIgnoreCase); + + if (response.Content?.Headers == null) + { + return headers; + } + + foreach (var header in response.Content.Headers) + { + if (headers.TryGetValue(header.Key, out var existingValues)) + { + headers[header.Key] = global::System.Linq.Enumerable.ToArray( + global::System.Linq.Enumerable.Concat(existingValues, header.Value)); + } + else + { + headers[header.Key] = global::System.Linq.Enumerable.ToArray(header.Value); + } + } + + return headers; + } + } + + /// + /// Represents a successful HTTP response with status code, headers, and body. + /// + public partial class AutoSDKHttpResponse : AutoSDKHttpResponse + { + /// + /// Initializes a new instance of the class. + /// + public AutoSDKHttpResponse( + global::System.Net.HttpStatusCode statusCode, + global::System.Collections.Generic.Dictionary> headers, + T body) + : this( + statusCode: statusCode, + headers: headers, + requestUri: null, + body: body) + { + } + + /// + /// Initializes a new instance of the class. + /// + public AutoSDKHttpResponse( + global::System.Net.HttpStatusCode statusCode, + global::System.Collections.Generic.Dictionary> headers, + global::System.Uri? requestUri, + T body) + : base(statusCode, headers, requestUri) + { + Body = body; + } + + /// + /// Gets the response body. + /// + public T Body { get; } + } +} \ No newline at end of file diff --git a/src/libs/RevAI/Generated/RevAI.CaptionsClient.GetCaptions.g.cs b/src/libs/RevAI/Generated/RevAI.CaptionsClient.GetCaptions.g.cs index cda1b5d..e75de2e 100644 --- a/src/libs/RevAI/Generated/RevAI.CaptionsClient.GetCaptions.g.cs +++ b/src/libs/RevAI/Generated/RevAI.CaptionsClient.GetCaptions.g.cs @@ -63,6 +63,35 @@ partial void ProcessGetCaptionsResponseContent( int? speakerChannel = default, global::RevAI.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetCaptionsAsResponseAsync( + id: id, + accept: accept, + speakerChannel: speakerChannel, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Captions
+ /// Returns caption output for a transcription job in SRT or VTT format. + ///
+ /// + /// Default Value: application/x-subrip + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetCaptionsAsResponseAsync( + string id, + global::RevAI.GetCaptionsAccept? accept = default, + int? speakerChannel = default, + global::RevAI.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -94,11 +123,12 @@ partial void ProcessGetCaptionsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::RevAI.PathBuilder( path: $"/speechtotext/v1/jobs/{id}/captions", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder - .AddOptionalParameter("speaker_channel", speakerChannel?.ToString()) + .AddOptionalParameter("speaker_channel", speakerChannel?.ToString()) ; var __path = __pathBuilder.ToString(); __path = global::RevAI.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -178,6 +208,8 @@ partial void ProcessGetCaptionsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +220,11 @@ partial void ProcessGetCaptionsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::RevAI.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::RevAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +242,8 @@ partial void ProcessGetCaptionsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +253,7 @@ partial void ProcessGetCaptionsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::RevAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +262,11 @@ partial void ProcessGetCaptionsResponseContent( __attempt < __maxAttempts && global::RevAI.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::RevAI.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::RevAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::RevAI.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +283,15 @@ partial void ProcessGetCaptionsResponseContent( 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::RevAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +331,8 @@ partial void ProcessGetCaptionsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +353,8 @@ partial void ProcessGetCaptionsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Authorization has been denied for this request @@ -473,7 +521,11 @@ partial void ProcessGetCaptionsResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::RevAI.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::RevAI.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -501,7 +553,11 @@ partial void ProcessGetCaptionsResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::RevAI.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::RevAI.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/RevAI/Generated/RevAI.CaptionsClient.g.cs b/src/libs/RevAI/Generated/RevAI.CaptionsClient.g.cs index e4d90bc..b3d77e9 100644 --- a/src/libs/RevAI/Generated/RevAI.CaptionsClient.g.cs +++ b/src/libs/RevAI/Generated/RevAI.CaptionsClient.g.cs @@ -73,10 +73,10 @@ public CaptionsClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public CaptionsClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::RevAI.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::RevAI.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/RevAI/Generated/RevAI.IAccountClient.GetAccount.g.cs b/src/libs/RevAI/Generated/RevAI.IAccountClient.GetAccount.g.cs index 782a674..7626c3d 100644 --- a/src/libs/RevAI/Generated/RevAI.IAccountClient.GetAccount.g.cs +++ b/src/libs/RevAI/Generated/RevAI.IAccountClient.GetAccount.g.cs @@ -14,5 +14,15 @@ public partial interface IAccountClient global::System.Threading.Tasks.Task GetAccountAsync( global::RevAI.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Account
+ /// Get the developer's account information + ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetAccountAsResponseAsync( + global::RevAI.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/RevAI/Generated/RevAI.ICaptionsClient.GetCaptions.g.cs b/src/libs/RevAI/Generated/RevAI.ICaptionsClient.GetCaptions.g.cs index 9239e42..16af31a 100644 --- a/src/libs/RevAI/Generated/RevAI.ICaptionsClient.GetCaptions.g.cs +++ b/src/libs/RevAI/Generated/RevAI.ICaptionsClient.GetCaptions.g.cs @@ -22,5 +22,23 @@ public partial interface ICaptionsClient int? speakerChannel = default, global::RevAI.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Captions
+ /// Returns caption output for a transcription job in SRT or VTT format. + ///
+ /// + /// Default Value: application/x-subrip + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetCaptionsAsResponseAsync( + string id, + global::RevAI.GetCaptionsAccept? accept = default, + int? speakerChannel = default, + global::RevAI.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/RevAI/Generated/RevAI.ILanguageIdentificationJobsClient.DeleteLanguageIdentificationJob.g.cs b/src/libs/RevAI/Generated/RevAI.ILanguageIdentificationJobsClient.DeleteLanguageIdentificationJob.g.cs index ee4ec81..9cf1374 100644 --- a/src/libs/RevAI/Generated/RevAI.ILanguageIdentificationJobsClient.DeleteLanguageIdentificationJob.g.cs +++ b/src/libs/RevAI/Generated/RevAI.ILanguageIdentificationJobsClient.DeleteLanguageIdentificationJob.g.cs @@ -16,5 +16,17 @@ public partial interface ILanguageIdentificationJobsClient string id, global::RevAI.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete Language Identification Job
+ /// Deletes a language identification job and all associated data. + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task DeleteLanguageIdentificationJobAsResponseAsync( + string id, + global::RevAI.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/RevAI/Generated/RevAI.ILanguageIdentificationJobsClient.GetLanguageIdentificationJobById.g.cs b/src/libs/RevAI/Generated/RevAI.ILanguageIdentificationJobsClient.GetLanguageIdentificationJobById.g.cs index 2d79b66..5f51687 100644 --- a/src/libs/RevAI/Generated/RevAI.ILanguageIdentificationJobsClient.GetLanguageIdentificationJobById.g.cs +++ b/src/libs/RevAI/Generated/RevAI.ILanguageIdentificationJobsClient.GetLanguageIdentificationJobById.g.cs @@ -16,5 +16,17 @@ public partial interface ILanguageIdentificationJobsClient string id, global::RevAI.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Language Identification Job By Id
+ /// Returns information about a language identification job + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetLanguageIdentificationJobByIdAsResponseAsync( + string id, + global::RevAI.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/RevAI/Generated/RevAI.ILanguageIdentificationJobsClient.GetListOfLanguageIdentificationJobs.g.cs b/src/libs/RevAI/Generated/RevAI.ILanguageIdentificationJobsClient.GetListOfLanguageIdentificationJobs.g.cs index 18b9d80..40a9e9e 100644 --- a/src/libs/RevAI/Generated/RevAI.ILanguageIdentificationJobsClient.GetListOfLanguageIdentificationJobs.g.cs +++ b/src/libs/RevAI/Generated/RevAI.ILanguageIdentificationJobsClient.GetListOfLanguageIdentificationJobs.g.cs @@ -18,5 +18,19 @@ public partial interface ILanguageIdentificationJobsClient string? startingAfter = default, global::RevAI.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get List of Language Identification Jobs
+ /// Gets a list of language identification jobs submitted within the last 30 days. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task>> GetListOfLanguageIdentificationJobsAsResponseAsync( + int? limit = default, + string? startingAfter = default, + global::RevAI.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/RevAI/Generated/RevAI.ILanguageIdentificationJobsClient.SubmitLanguageIdentificationJob.g.cs b/src/libs/RevAI/Generated/RevAI.ILanguageIdentificationJobsClient.SubmitLanguageIdentificationJob.g.cs index 4cec99d..0238e66 100644 --- a/src/libs/RevAI/Generated/RevAI.ILanguageIdentificationJobsClient.SubmitLanguageIdentificationJob.g.cs +++ b/src/libs/RevAI/Generated/RevAI.ILanguageIdentificationJobsClient.SubmitLanguageIdentificationJob.g.cs @@ -21,6 +21,19 @@ public partial interface ILanguageIdentificationJobsClient /// Submit Language Identification Job
/// Starts an asynchronous language identification job for an audio file. Identifies the spoken language from 57+ supported languages. /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> SubmitLanguageIdentificationJobAsResponseAsync( + + global::RevAI.SubmitLanguageIdentificationJobRequest request, + global::RevAI.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Submit Language Identification Job
+ /// Starts an asynchronous language identification job for an audio file. Identifies the spoken language from 57+ supported languages. + ///
/// /// Direct download URL for the audio file /// diff --git a/src/libs/RevAI/Generated/RevAI.ILanguageIdentificationResultsClient.GetLanguageIdentificationResult.g.cs b/src/libs/RevAI/Generated/RevAI.ILanguageIdentificationResultsClient.GetLanguageIdentificationResult.g.cs index b73199f..69ef1f5 100644 --- a/src/libs/RevAI/Generated/RevAI.ILanguageIdentificationResultsClient.GetLanguageIdentificationResult.g.cs +++ b/src/libs/RevAI/Generated/RevAI.ILanguageIdentificationResultsClient.GetLanguageIdentificationResult.g.cs @@ -16,5 +16,17 @@ public partial interface ILanguageIdentificationResultsClient string id, global::RevAI.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Language Identification Result
+ /// Returns the language identification result for a completed job. + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetLanguageIdentificationResultAsResponseAsync( + string id, + global::RevAI.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/RevAI/Generated/RevAI.ISentimentAnalysisJobsClient.DeleteSentimentAnalysisJob.g.cs b/src/libs/RevAI/Generated/RevAI.ISentimentAnalysisJobsClient.DeleteSentimentAnalysisJob.g.cs index 1c9ad26..b6e8ec5 100644 --- a/src/libs/RevAI/Generated/RevAI.ISentimentAnalysisJobsClient.DeleteSentimentAnalysisJob.g.cs +++ b/src/libs/RevAI/Generated/RevAI.ISentimentAnalysisJobsClient.DeleteSentimentAnalysisJob.g.cs @@ -16,5 +16,17 @@ public partial interface ISentimentAnalysisJobsClient string id, global::RevAI.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete Sentiment Analysis Job
+ /// Deletes a sentiment analysis job and all associated data. + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task DeleteSentimentAnalysisJobAsResponseAsync( + string id, + global::RevAI.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/RevAI/Generated/RevAI.ISentimentAnalysisJobsClient.GetListOfSentimentAnalysisJobs.g.cs b/src/libs/RevAI/Generated/RevAI.ISentimentAnalysisJobsClient.GetListOfSentimentAnalysisJobs.g.cs index 6957eb7..ca77bc2 100644 --- a/src/libs/RevAI/Generated/RevAI.ISentimentAnalysisJobsClient.GetListOfSentimentAnalysisJobs.g.cs +++ b/src/libs/RevAI/Generated/RevAI.ISentimentAnalysisJobsClient.GetListOfSentimentAnalysisJobs.g.cs @@ -18,5 +18,19 @@ public partial interface ISentimentAnalysisJobsClient string? startingAfter = default, global::RevAI.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get List of Sentiment Analysis Jobs
+ /// Gets a list of sentiment analysis jobs submitted within the last 30 days. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task>> GetListOfSentimentAnalysisJobsAsResponseAsync( + int? limit = default, + string? startingAfter = default, + global::RevAI.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/RevAI/Generated/RevAI.ISentimentAnalysisJobsClient.GetSentimentAnalysisJobById.g.cs b/src/libs/RevAI/Generated/RevAI.ISentimentAnalysisJobsClient.GetSentimentAnalysisJobById.g.cs index b4d8652..2b74515 100644 --- a/src/libs/RevAI/Generated/RevAI.ISentimentAnalysisJobsClient.GetSentimentAnalysisJobById.g.cs +++ b/src/libs/RevAI/Generated/RevAI.ISentimentAnalysisJobsClient.GetSentimentAnalysisJobById.g.cs @@ -16,5 +16,17 @@ public partial interface ISentimentAnalysisJobsClient string id, global::RevAI.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Sentiment Analysis Job By Id
+ /// Returns information about a sentiment analysis job + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetSentimentAnalysisJobByIdAsResponseAsync( + string id, + global::RevAI.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/RevAI/Generated/RevAI.ISentimentAnalysisJobsClient.SubmitSentimentAnalysisJob.g.cs b/src/libs/RevAI/Generated/RevAI.ISentimentAnalysisJobsClient.SubmitSentimentAnalysisJob.g.cs index 9bfab31..704ce7d 100644 --- a/src/libs/RevAI/Generated/RevAI.ISentimentAnalysisJobsClient.SubmitSentimentAnalysisJob.g.cs +++ b/src/libs/RevAI/Generated/RevAI.ISentimentAnalysisJobsClient.SubmitSentimentAnalysisJob.g.cs @@ -21,6 +21,19 @@ public partial interface ISentimentAnalysisJobsClient /// Submit Sentiment Analysis Job
/// Starts an asynchronous sentiment analysis job. Input can be plain text, a JSON transcript, or reference a completed transcription job. /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> SubmitSentimentAnalysisJobAsResponseAsync( + + global::RevAI.SubmitSentimentAnalysisJobRequest request, + global::RevAI.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Submit Sentiment Analysis Job
+ /// Starts an asynchronous sentiment analysis job. Input can be plain text, a JSON transcript, or reference a completed transcription job. + ///
/// /// Rev.ai Transcript /// diff --git a/src/libs/RevAI/Generated/RevAI.ISentimentAnalysisResultsClient.GetSentimentAnalysisResult.g.cs b/src/libs/RevAI/Generated/RevAI.ISentimentAnalysisResultsClient.GetSentimentAnalysisResult.g.cs index b13bc99..1ae9aba 100644 --- a/src/libs/RevAI/Generated/RevAI.ISentimentAnalysisResultsClient.GetSentimentAnalysisResult.g.cs +++ b/src/libs/RevAI/Generated/RevAI.ISentimentAnalysisResultsClient.GetSentimentAnalysisResult.g.cs @@ -16,5 +16,17 @@ public partial interface ISentimentAnalysisResultsClient string id, global::RevAI.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Sentiment Analysis Result
+ /// Returns the sentiment analysis result for a completed job. + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetSentimentAnalysisResultAsResponseAsync( + string id, + global::RevAI.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/RevAI/Generated/RevAI.ITopicExtractionJobsClient.DeleteTopicExtractionJob.g.cs b/src/libs/RevAI/Generated/RevAI.ITopicExtractionJobsClient.DeleteTopicExtractionJob.g.cs index 2cbd5a5..181ae57 100644 --- a/src/libs/RevAI/Generated/RevAI.ITopicExtractionJobsClient.DeleteTopicExtractionJob.g.cs +++ b/src/libs/RevAI/Generated/RevAI.ITopicExtractionJobsClient.DeleteTopicExtractionJob.g.cs @@ -16,5 +16,17 @@ public partial interface ITopicExtractionJobsClient string id, global::RevAI.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete Topic Extraction Job
+ /// Deletes a topic extraction job and all associated data. + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task DeleteTopicExtractionJobAsResponseAsync( + string id, + global::RevAI.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/RevAI/Generated/RevAI.ITopicExtractionJobsClient.GetListOfTopicExtractionJobs.g.cs b/src/libs/RevAI/Generated/RevAI.ITopicExtractionJobsClient.GetListOfTopicExtractionJobs.g.cs index da0317f..7e1ce0a 100644 --- a/src/libs/RevAI/Generated/RevAI.ITopicExtractionJobsClient.GetListOfTopicExtractionJobs.g.cs +++ b/src/libs/RevAI/Generated/RevAI.ITopicExtractionJobsClient.GetListOfTopicExtractionJobs.g.cs @@ -18,5 +18,19 @@ public partial interface ITopicExtractionJobsClient string? startingAfter = default, global::RevAI.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get List of Topic Extraction Jobs
+ /// Gets a list of topic extraction jobs submitted within the last 30 days. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task>> GetListOfTopicExtractionJobsAsResponseAsync( + int? limit = default, + string? startingAfter = default, + global::RevAI.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/RevAI/Generated/RevAI.ITopicExtractionJobsClient.GetTopicExtractionJobById.g.cs b/src/libs/RevAI/Generated/RevAI.ITopicExtractionJobsClient.GetTopicExtractionJobById.g.cs index 72da044..d0b0be6 100644 --- a/src/libs/RevAI/Generated/RevAI.ITopicExtractionJobsClient.GetTopicExtractionJobById.g.cs +++ b/src/libs/RevAI/Generated/RevAI.ITopicExtractionJobsClient.GetTopicExtractionJobById.g.cs @@ -16,5 +16,17 @@ public partial interface ITopicExtractionJobsClient string id, global::RevAI.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Topic Extraction Job By Id
+ /// Returns information about a topic extraction job + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetTopicExtractionJobByIdAsResponseAsync( + string id, + global::RevAI.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/RevAI/Generated/RevAI.ITopicExtractionJobsClient.SubmitTopicExtractionJob.g.cs b/src/libs/RevAI/Generated/RevAI.ITopicExtractionJobsClient.SubmitTopicExtractionJob.g.cs index e31ecf7..a9eb97c 100644 --- a/src/libs/RevAI/Generated/RevAI.ITopicExtractionJobsClient.SubmitTopicExtractionJob.g.cs +++ b/src/libs/RevAI/Generated/RevAI.ITopicExtractionJobsClient.SubmitTopicExtractionJob.g.cs @@ -21,6 +21,19 @@ public partial interface ITopicExtractionJobsClient /// Submit Topic Extraction Job
/// Starts an asynchronous topic extraction job. Input can be plain text, a JSON transcript, or reference a completed transcription job. /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> SubmitTopicExtractionJobAsResponseAsync( + + global::RevAI.SubmitTopicExtractionJobRequest request, + global::RevAI.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Submit Topic Extraction Job
+ /// Starts an asynchronous topic extraction job. Input can be plain text, a JSON transcript, or reference a completed transcription job. + ///
/// /// Rev.ai Transcript /// diff --git a/src/libs/RevAI/Generated/RevAI.ITopicExtractionResultsClient.GetTopicExtractionResult.g.cs b/src/libs/RevAI/Generated/RevAI.ITopicExtractionResultsClient.GetTopicExtractionResult.g.cs index f2b9fd0..911f2f6 100644 --- a/src/libs/RevAI/Generated/RevAI.ITopicExtractionResultsClient.GetTopicExtractionResult.g.cs +++ b/src/libs/RevAI/Generated/RevAI.ITopicExtractionResultsClient.GetTopicExtractionResult.g.cs @@ -16,5 +16,17 @@ public partial interface ITopicExtractionResultsClient string id, global::RevAI.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Topic Extraction Result
+ /// Returns the topic extraction result for a completed job. + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetTopicExtractionResultAsResponseAsync( + string id, + global::RevAI.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/RevAI/Generated/RevAI.ITranscriptClient.GetTranscript.g.cs b/src/libs/RevAI/Generated/RevAI.ITranscriptClient.GetTranscript.g.cs index 4f1ecff..ebee8b4 100644 --- a/src/libs/RevAI/Generated/RevAI.ITranscriptClient.GetTranscript.g.cs +++ b/src/libs/RevAI/Generated/RevAI.ITranscriptClient.GetTranscript.g.cs @@ -20,5 +20,21 @@ public partial interface ITranscriptClient global::RevAI.GetTranscriptAccept? accept = default, global::RevAI.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Transcript
+ /// Returns the transcript for a completed transcription job in JSON or plain text format. + ///
+ /// + /// Default Value: application/vnd.rev.transcript.v1.0+json + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetTranscriptAsResponseAsync( + string id, + global::RevAI.GetTranscriptAccept? accept = default, + global::RevAI.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/RevAI/Generated/RevAI.ITranscriptionJobsClient.DeleteTranscriptionJob.g.cs b/src/libs/RevAI/Generated/RevAI.ITranscriptionJobsClient.DeleteTranscriptionJob.g.cs index 048dfa6..ae3a208 100644 --- a/src/libs/RevAI/Generated/RevAI.ITranscriptionJobsClient.DeleteTranscriptionJob.g.cs +++ b/src/libs/RevAI/Generated/RevAI.ITranscriptionJobsClient.DeleteTranscriptionJob.g.cs @@ -16,5 +16,17 @@ public partial interface ITranscriptionJobsClient string id, global::RevAI.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete Transcription Job
+ /// Deletes a transcription job. All data related to the job will be permanently deleted. A job can only be deleted once it's completed. + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task DeleteTranscriptionJobAsResponseAsync( + string id, + global::RevAI.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/RevAI/Generated/RevAI.ITranscriptionJobsClient.GetListOfTranscriptionJobs.g.cs b/src/libs/RevAI/Generated/RevAI.ITranscriptionJobsClient.GetListOfTranscriptionJobs.g.cs index 3ba2f68..0dc76ac 100644 --- a/src/libs/RevAI/Generated/RevAI.ITranscriptionJobsClient.GetListOfTranscriptionJobs.g.cs +++ b/src/libs/RevAI/Generated/RevAI.ITranscriptionJobsClient.GetListOfTranscriptionJobs.g.cs @@ -18,5 +18,19 @@ public partial interface ITranscriptionJobsClient string? startingAfter = default, global::RevAI.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get List of Transcription Jobs
+ /// Gets a list of transcription jobs submitted within the last 30 days in reverse chronological order up to the provided limit number of jobs per call. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task>> GetListOfTranscriptionJobsAsResponseAsync( + int? limit = default, + string? startingAfter = default, + global::RevAI.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/RevAI/Generated/RevAI.ITranscriptionJobsClient.GetTranscriptionJobById.g.cs b/src/libs/RevAI/Generated/RevAI.ITranscriptionJobsClient.GetTranscriptionJobById.g.cs index f7aae95..cb7f40d 100644 --- a/src/libs/RevAI/Generated/RevAI.ITranscriptionJobsClient.GetTranscriptionJobById.g.cs +++ b/src/libs/RevAI/Generated/RevAI.ITranscriptionJobsClient.GetTranscriptionJobById.g.cs @@ -16,5 +16,17 @@ public partial interface ITranscriptionJobsClient string id, global::RevAI.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Transcription Job By Id
+ /// Returns information about a transcription job + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetTranscriptionJobByIdAsResponseAsync( + string id, + global::RevAI.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/RevAI/Generated/RevAI.ITranscriptionJobsClient.SubmitTranscriptionJob.g.cs b/src/libs/RevAI/Generated/RevAI.ITranscriptionJobsClient.SubmitTranscriptionJob.g.cs index 0fad077..b562f9c 100644 --- a/src/libs/RevAI/Generated/RevAI.ITranscriptionJobsClient.SubmitTranscriptionJob.g.cs +++ b/src/libs/RevAI/Generated/RevAI.ITranscriptionJobsClient.SubmitTranscriptionJob.g.cs @@ -21,6 +21,19 @@ public partial interface ITranscriptionJobsClient /// Submit Transcription Job
/// Starts an asynchronous job to transcribe speech-to-text for a media file. Media files can be specified by URL or uploaded directly. /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> SubmitTranscriptionJobAsResponseAsync( + + global::RevAI.SubmitTranscriptionJobRequest request, + global::RevAI.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Submit Transcription Job
+ /// Starts an asynchronous job to transcribe speech-to-text for a media file. Media files can be specified by URL or uploaded directly. + ///
/// /// Direct download URL for the media file /// diff --git a/src/libs/RevAI/Generated/RevAI.LanguageIdentificationJobsClient.DeleteLanguageIdentificationJob.g.cs b/src/libs/RevAI/Generated/RevAI.LanguageIdentificationJobsClient.DeleteLanguageIdentificationJob.g.cs index bd2dbef..39bd279 100644 --- a/src/libs/RevAI/Generated/RevAI.LanguageIdentificationJobsClient.DeleteLanguageIdentificationJob.g.cs +++ b/src/libs/RevAI/Generated/RevAI.LanguageIdentificationJobsClient.DeleteLanguageIdentificationJob.g.cs @@ -48,6 +48,25 @@ partial void ProcessDeleteLanguageIdentificationJobResponse( string id, global::RevAI.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await DeleteLanguageIdentificationJobAsResponseAsync( + id: id, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Delete Language Identification Job
+ /// Deletes a language identification job and all associated data. + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task DeleteLanguageIdentificationJobAsResponseAsync( + string id, + global::RevAI.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -77,6 +96,7 @@ partial void ProcessDeleteLanguageIdentificationJobResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::RevAI.PathBuilder( path: $"/languageid/v1/jobs/{id}", baseUri: HttpClient.BaseAddress); @@ -150,6 +170,8 @@ partial void ProcessDeleteLanguageIdentificationJobResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -160,6 +182,11 @@ partial void ProcessDeleteLanguageIdentificationJobResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::RevAI.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::RevAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -177,6 +204,8 @@ partial void ProcessDeleteLanguageIdentificationJobResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -186,8 +215,7 @@ partial void ProcessDeleteLanguageIdentificationJobResponse( __httpRequest.Dispose(); __httpRequest = null; await global::RevAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -196,6 +224,11 @@ partial void ProcessDeleteLanguageIdentificationJobResponse( __attempt < __maxAttempts && global::RevAI.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::RevAI.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::RevAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::RevAI.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -212,14 +245,15 @@ partial void ProcessDeleteLanguageIdentificationJobResponse( 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::RevAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -259,6 +293,8 @@ partial void ProcessDeleteLanguageIdentificationJobResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -279,6 +315,8 @@ partial void ProcessDeleteLanguageIdentificationJobResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Authorization has been denied for this request @@ -408,6 +446,10 @@ partial void ProcessDeleteLanguageIdentificationJobResponse( { __response.EnsureSuccessStatusCode(); + return new global::RevAI.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::RevAI.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -429,6 +471,10 @@ partial void ProcessDeleteLanguageIdentificationJobResponse( try { __response.EnsureSuccessStatusCode(); + return new global::RevAI.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::RevAI.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/RevAI/Generated/RevAI.LanguageIdentificationJobsClient.GetLanguageIdentificationJobById.g.cs b/src/libs/RevAI/Generated/RevAI.LanguageIdentificationJobsClient.GetLanguageIdentificationJobById.g.cs index 87563d8..a46c184 100644 --- a/src/libs/RevAI/Generated/RevAI.LanguageIdentificationJobsClient.GetLanguageIdentificationJobById.g.cs +++ b/src/libs/RevAI/Generated/RevAI.LanguageIdentificationJobsClient.GetLanguageIdentificationJobById.g.cs @@ -53,6 +53,27 @@ partial void ProcessGetLanguageIdentificationJobByIdResponseContent( string id, global::RevAI.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetLanguageIdentificationJobByIdAsResponseAsync( + id: id, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Language Identification Job By Id
+ /// Returns information about a language identification job + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetLanguageIdentificationJobByIdAsResponseAsync( + string id, + global::RevAI.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -82,6 +103,7 @@ partial void ProcessGetLanguageIdentificationJobByIdResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::RevAI.PathBuilder( path: $"/languageid/v1/jobs/{id}", baseUri: HttpClient.BaseAddress); @@ -155,6 +177,8 @@ partial void ProcessGetLanguageIdentificationJobByIdResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -165,6 +189,11 @@ partial void ProcessGetLanguageIdentificationJobByIdResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::RevAI.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::RevAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -182,6 +211,8 @@ partial void ProcessGetLanguageIdentificationJobByIdResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -191,8 +222,7 @@ partial void ProcessGetLanguageIdentificationJobByIdResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::RevAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -201,6 +231,11 @@ partial void ProcessGetLanguageIdentificationJobByIdResponseContent( __attempt < __maxAttempts && global::RevAI.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::RevAI.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::RevAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::RevAI.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -217,14 +252,15 @@ partial void ProcessGetLanguageIdentificationJobByIdResponseContent( 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::RevAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -264,6 +300,8 @@ partial void ProcessGetLanguageIdentificationJobByIdResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -284,6 +322,8 @@ partial void ProcessGetLanguageIdentificationJobByIdResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Authorization has been denied for this request @@ -384,9 +424,13 @@ partial void ProcessGetLanguageIdentificationJobByIdResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::RevAI.LanguageIdentificationJob.FromJson(__content, JsonSerializerContext) ?? + var __value = global::RevAI.LanguageIdentificationJob.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::RevAI.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::RevAI.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -414,9 +458,13 @@ partial void ProcessGetLanguageIdentificationJobByIdResponseContent( #endif ).ConfigureAwait(false); - return - await global::RevAI.LanguageIdentificationJob.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::RevAI.LanguageIdentificationJob.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::RevAI.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::RevAI.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/RevAI/Generated/RevAI.LanguageIdentificationJobsClient.GetListOfLanguageIdentificationJobs.g.cs b/src/libs/RevAI/Generated/RevAI.LanguageIdentificationJobsClient.GetListOfLanguageIdentificationJobs.g.cs index 3b80f49..55830c0 100644 --- a/src/libs/RevAI/Generated/RevAI.LanguageIdentificationJobsClient.GetListOfLanguageIdentificationJobs.g.cs +++ b/src/libs/RevAI/Generated/RevAI.LanguageIdentificationJobsClient.GetListOfLanguageIdentificationJobs.g.cs @@ -57,6 +57,30 @@ partial void ProcessGetListOfLanguageIdentificationJobsResponseContent( string? startingAfter = default, global::RevAI.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetListOfLanguageIdentificationJobsAsResponseAsync( + limit: limit, + startingAfter: startingAfter, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get List of Language Identification Jobs
+ /// Gets a list of language identification jobs submitted within the last 30 days. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task>> GetListOfLanguageIdentificationJobsAsResponseAsync( + int? limit = default, + string? startingAfter = default, + global::RevAI.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -87,12 +111,13 @@ partial void ProcessGetListOfLanguageIdentificationJobsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::RevAI.PathBuilder( path: "/languageid/v1/jobs", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("limit", limit?.ToString()) - .AddOptionalParameter("starting_after", startingAfter) + .AddOptionalParameter("starting_after", startingAfter) ; var __path = __pathBuilder.ToString(); __path = global::RevAI.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -165,6 +190,8 @@ partial void ProcessGetListOfLanguageIdentificationJobsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -175,6 +202,11 @@ partial void ProcessGetListOfLanguageIdentificationJobsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::RevAI.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::RevAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -192,6 +224,8 @@ partial void ProcessGetListOfLanguageIdentificationJobsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -201,8 +235,7 @@ partial void ProcessGetListOfLanguageIdentificationJobsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::RevAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -211,6 +244,11 @@ partial void ProcessGetListOfLanguageIdentificationJobsResponseContent( __attempt < __maxAttempts && global::RevAI.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::RevAI.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::RevAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::RevAI.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -227,14 +265,15 @@ partial void ProcessGetListOfLanguageIdentificationJobsResponseContent( 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::RevAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -274,6 +313,8 @@ partial void ProcessGetListOfLanguageIdentificationJobsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -294,6 +335,8 @@ partial void ProcessGetListOfLanguageIdentificationJobsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Bad Request - Invalid parameters @@ -394,9 +437,13 @@ partial void ProcessGetListOfLanguageIdentificationJobsResponseContent( { __response.EnsureSuccessStatusCode(); - return - (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? + var __value = (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::RevAI.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::RevAI.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -424,9 +471,13 @@ partial void ProcessGetListOfLanguageIdentificationJobsResponseContent( #endif ).ConfigureAwait(false); - return - (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? + var __value = (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::RevAI.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::RevAI.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/RevAI/Generated/RevAI.LanguageIdentificationJobsClient.SubmitLanguageIdentificationJob.g.cs b/src/libs/RevAI/Generated/RevAI.LanguageIdentificationJobsClient.SubmitLanguageIdentificationJob.g.cs index cdf6781..588d3f5 100644 --- a/src/libs/RevAI/Generated/RevAI.LanguageIdentificationJobsClient.SubmitLanguageIdentificationJob.g.cs +++ b/src/libs/RevAI/Generated/RevAI.LanguageIdentificationJobsClient.SubmitLanguageIdentificationJob.g.cs @@ -51,6 +51,29 @@ partial void ProcessSubmitLanguageIdentificationJobResponseContent( /// public async global::System.Threading.Tasks.Task SubmitLanguageIdentificationJobAsync( + global::RevAI.SubmitLanguageIdentificationJobRequest request, + global::RevAI.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await SubmitLanguageIdentificationJobAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Submit Language Identification Job
+ /// Starts an asynchronous language identification job for an audio file. Identifies the spoken language from 57+ supported languages. + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> SubmitLanguageIdentificationJobAsResponseAsync( + global::RevAI.SubmitLanguageIdentificationJobRequest request, global::RevAI.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -85,6 +108,7 @@ partial void ProcessSubmitLanguageIdentificationJobResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::RevAI.PathBuilder( path: "/languageid/v1/jobs", baseUri: HttpClient.BaseAddress); @@ -164,6 +188,8 @@ partial void ProcessSubmitLanguageIdentificationJobResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -174,6 +200,11 @@ partial void ProcessSubmitLanguageIdentificationJobResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::RevAI.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::RevAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -191,6 +222,8 @@ partial void ProcessSubmitLanguageIdentificationJobResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -200,8 +233,7 @@ partial void ProcessSubmitLanguageIdentificationJobResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::RevAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -210,6 +242,11 @@ partial void ProcessSubmitLanguageIdentificationJobResponseContent( __attempt < __maxAttempts && global::RevAI.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::RevAI.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::RevAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::RevAI.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -226,14 +263,15 @@ partial void ProcessSubmitLanguageIdentificationJobResponseContent( 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::RevAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -273,6 +311,8 @@ partial void ProcessSubmitLanguageIdentificationJobResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -293,6 +333,8 @@ partial void ProcessSubmitLanguageIdentificationJobResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Bad Request - Invalid parameters @@ -426,9 +468,13 @@ partial void ProcessSubmitLanguageIdentificationJobResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::RevAI.LanguageIdentificationJob.FromJson(__content, JsonSerializerContext) ?? + var __value = global::RevAI.LanguageIdentificationJob.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::RevAI.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::RevAI.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -456,9 +502,13 @@ partial void ProcessSubmitLanguageIdentificationJobResponseContent( #endif ).ConfigureAwait(false); - return - await global::RevAI.LanguageIdentificationJob.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::RevAI.LanguageIdentificationJob.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::RevAI.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::RevAI.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/RevAI/Generated/RevAI.LanguageIdentificationJobsClient.g.cs b/src/libs/RevAI/Generated/RevAI.LanguageIdentificationJobsClient.g.cs index cf13948..f839924 100644 --- a/src/libs/RevAI/Generated/RevAI.LanguageIdentificationJobsClient.g.cs +++ b/src/libs/RevAI/Generated/RevAI.LanguageIdentificationJobsClient.g.cs @@ -73,10 +73,10 @@ public LanguageIdentificationJobsClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public LanguageIdentificationJobsClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::RevAI.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::RevAI.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/RevAI/Generated/RevAI.LanguageIdentificationResultsClient.GetLanguageIdentificationResult.g.cs b/src/libs/RevAI/Generated/RevAI.LanguageIdentificationResultsClient.GetLanguageIdentificationResult.g.cs index cbe93cc..a5b57d5 100644 --- a/src/libs/RevAI/Generated/RevAI.LanguageIdentificationResultsClient.GetLanguageIdentificationResult.g.cs +++ b/src/libs/RevAI/Generated/RevAI.LanguageIdentificationResultsClient.GetLanguageIdentificationResult.g.cs @@ -53,6 +53,27 @@ partial void ProcessGetLanguageIdentificationResultResponseContent( string id, global::RevAI.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetLanguageIdentificationResultAsResponseAsync( + id: id, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Language Identification Result
+ /// Returns the language identification result for a completed job. + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetLanguageIdentificationResultAsResponseAsync( + string id, + global::RevAI.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -82,6 +103,7 @@ partial void ProcessGetLanguageIdentificationResultResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::RevAI.PathBuilder( path: $"/languageid/v1/jobs/{id}/result", baseUri: HttpClient.BaseAddress); @@ -155,6 +177,8 @@ partial void ProcessGetLanguageIdentificationResultResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -165,6 +189,11 @@ partial void ProcessGetLanguageIdentificationResultResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::RevAI.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::RevAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -182,6 +211,8 @@ partial void ProcessGetLanguageIdentificationResultResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -191,8 +222,7 @@ partial void ProcessGetLanguageIdentificationResultResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::RevAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -201,6 +231,11 @@ partial void ProcessGetLanguageIdentificationResultResponseContent( __attempt < __maxAttempts && global::RevAI.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::RevAI.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::RevAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::RevAI.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -217,14 +252,15 @@ partial void ProcessGetLanguageIdentificationResultResponseContent( 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::RevAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -264,6 +300,8 @@ partial void ProcessGetLanguageIdentificationResultResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -284,6 +322,8 @@ partial void ProcessGetLanguageIdentificationResultResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Authorization has been denied for this request @@ -417,9 +457,13 @@ partial void ProcessGetLanguageIdentificationResultResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::RevAI.LanguageIdentificationResult.FromJson(__content, JsonSerializerContext) ?? + var __value = global::RevAI.LanguageIdentificationResult.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::RevAI.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::RevAI.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -447,9 +491,13 @@ partial void ProcessGetLanguageIdentificationResultResponseContent( #endif ).ConfigureAwait(false); - return - await global::RevAI.LanguageIdentificationResult.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::RevAI.LanguageIdentificationResult.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::RevAI.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::RevAI.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/RevAI/Generated/RevAI.LanguageIdentificationResultsClient.g.cs b/src/libs/RevAI/Generated/RevAI.LanguageIdentificationResultsClient.g.cs index bd51842..23366fe 100644 --- a/src/libs/RevAI/Generated/RevAI.LanguageIdentificationResultsClient.g.cs +++ b/src/libs/RevAI/Generated/RevAI.LanguageIdentificationResultsClient.g.cs @@ -73,10 +73,10 @@ public LanguageIdentificationResultsClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public LanguageIdentificationResultsClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::RevAI.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::RevAI.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/RevAI/Generated/RevAI.OptionsSupport.g.cs b/src/libs/RevAI/Generated/RevAI.OptionsSupport.g.cs index 6674d97..2fd7abe 100644 --- a/src/libs/RevAI/Generated/RevAI.OptionsSupport.g.cs +++ b/src/libs/RevAI/Generated/RevAI.OptionsSupport.g.cs @@ -101,9 +101,45 @@ public sealed class AutoSDKRetryOptions public int MaxAttempts { get; set; } = 1; /// - /// Optional fixed delay between retry attempts. + /// Optional fixed delay between retry attempts. When set, this takes precedence over exponential backoff. /// public global::System.TimeSpan? Delay { get; set; } + + /// + /// Initial exponential backoff delay used when is not set. + /// + public global::System.TimeSpan InitialDelay { get; set; } = global::System.TimeSpan.FromSeconds(1); + + /// + /// Maximum retry delay after applying retry headers, backoff, and jitter. + /// + public global::System.TimeSpan MaxDelay { get; set; } = global::System.TimeSpan.FromSeconds(30); + + /// + /// Multiplier applied to exponential backoff after each failed attempt. + /// Values below 1 are normalized to 1. + /// + public double BackoffMultiplier { get; set; } = 2D; + + /// + /// Randomizes computed backoff by plus or minus this ratio. Values are clamped to 0..1. + /// + public double JitterRatio { get; set; } = 0.2D; + + /// + /// Whether Retry-After response headers should control retry delay when present. + /// + public bool UseRetryAfterHeader { get; set; } = true; + + /// + /// Whether a rate-limit reset response header should control retry delay when present. + /// + public bool UseRateLimitResetHeader { get; set; } + + /// + /// Optional provider-specific rate-limit reset header name. Values may be Unix seconds or an HTTP date. + /// + public string? RateLimitResetHeaderName { get; set; } = "X-RateLimit-Reset"; } @@ -231,6 +267,16 @@ public sealed class AutoSDKHookContext /// public bool WillRetry { get; set; } + /// + /// The computed retry delay when is true. + /// + public global::System.TimeSpan? RetryDelay { get; set; } + + /// + /// A short retry reason such as exception or status:429. + /// + public string RetryReason { get; set; } = string.Empty; + /// /// The effective cancellation token for the current request attempt. /// @@ -254,6 +300,8 @@ internal static class AutoSDKRequestOptionsSupport int attempt, int maxAttempts, bool willRetry, + global::System.TimeSpan? retryDelay, + string retryReason, global::System.Threading.CancellationToken cancellationToken) { return new global::RevAI.AutoSDKHookContext @@ -271,6 +319,8 @@ internal static class AutoSDKRequestOptionsSupport Attempt = attempt, MaxAttempts = maxAttempts, WillRetry = willRetry, + RetryDelay = retryDelay, + RetryReason = retryReason ?? string.Empty, CancellationToken = cancellationToken, }; } @@ -338,19 +388,188 @@ internal static int GetMaxAttempts( return maxAttempts < 1 ? 1 : maxAttempts; } - internal static async global::System.Threading.Tasks.Task DelayBeforeRetryAsync( + internal static global::System.TimeSpan GetRetryDelay( global::RevAI.AutoSDKClientOptions clientOptions, global::RevAI.AutoSDKRequestOptions? requestOptions, + global::System.Net.Http.HttpResponseMessage? response, + int attempt) + { + var retryOptions = requestOptions?.Retry ?? clientOptions.Retry ?? new global::RevAI.AutoSDKRetryOptions(); + + if (retryOptions.UseRetryAfterHeader && + TryGetRetryAfterDelay(response, out var retryAfterDelay)) + { + return ClampRetryDelay(retryAfterDelay, retryOptions); + } + + if (retryOptions.UseRateLimitResetHeader && + TryGetRateLimitResetDelay(response, retryOptions.RateLimitResetHeaderName, out var rateLimitResetDelay)) + { + return ClampRetryDelay(rateLimitResetDelay, retryOptions); + } + + if (retryOptions.Delay.HasValue) + { + return ClampRetryDelay(retryOptions.Delay.Value, retryOptions); + } + + var initialDelay = retryOptions.InitialDelay; + if (initialDelay <= global::System.TimeSpan.Zero) + { + return global::System.TimeSpan.Zero; + } + + var multiplier = retryOptions.BackoffMultiplier < 1D ? 1D : retryOptions.BackoffMultiplier; + var exponent = attempt <= 1 ? 0 : attempt - 1; + var delayMilliseconds = initialDelay.TotalMilliseconds * global::System.Math.Pow(multiplier, exponent); + if (double.IsNaN(delayMilliseconds) || double.IsInfinity(delayMilliseconds) || delayMilliseconds < 0D) + { + delayMilliseconds = 0D; + } + + var delay = global::System.TimeSpan.FromMilliseconds(delayMilliseconds); + delay = ApplyJitter(delay, retryOptions.JitterRatio); + return ClampRetryDelay(delay, retryOptions); + } + + internal static async global::System.Threading.Tasks.Task DelayBeforeRetryAsync( + global::System.TimeSpan retryDelay, global::System.Threading.CancellationToken cancellationToken) { - var delay = requestOptions?.Retry?.Delay ?? - clientOptions.Retry?.Delay; - if (!delay.HasValue || delay.Value <= global::System.TimeSpan.Zero) + if (retryDelay <= global::System.TimeSpan.Zero) { return; } - await global::System.Threading.Tasks.Task.Delay(delay.Value, cancellationToken).ConfigureAwait(false); + await global::System.Threading.Tasks.Task.Delay(retryDelay, cancellationToken).ConfigureAwait(false); + } + + private static bool TryGetRetryAfterDelay( + global::System.Net.Http.HttpResponseMessage? response, + out global::System.TimeSpan delay) + { + delay = global::System.TimeSpan.Zero; + var retryAfter = response?.Headers.RetryAfter; + if (retryAfter == null) + { + return false; + } + + if (retryAfter.Delta.HasValue) + { + delay = retryAfter.Delta.Value; + return delay > global::System.TimeSpan.Zero; + } + + if (retryAfter.Date.HasValue) + { + delay = retryAfter.Date.Value - global::System.DateTimeOffset.UtcNow; + return delay > global::System.TimeSpan.Zero; + } + + return false; + } + + private static bool TryGetRateLimitResetDelay( + global::System.Net.Http.HttpResponseMessage? response, + string? headerName, + out global::System.TimeSpan delay) + { + delay = global::System.TimeSpan.Zero; + if (response == null || string.IsNullOrWhiteSpace(headerName)) + { + return false; + } + + if (!response.Headers.TryGetValues(headerName, out var values) && + (response.Content?.Headers == null || !response.Content.Headers.TryGetValues(headerName, out values))) + { + return false; + } + + var value = global::System.Linq.Enumerable.FirstOrDefault(values); + if (string.IsNullOrWhiteSpace(value)) + { + return false; + } + + value = value.Trim(); + if (long.TryParse( + value, + global::System.Globalization.NumberStyles.Integer, + global::System.Globalization.CultureInfo.InvariantCulture, + out var unixSeconds)) + { + delay = global::System.DateTimeOffset.FromUnixTimeSeconds(unixSeconds) - global::System.DateTimeOffset.UtcNow; + return delay > global::System.TimeSpan.Zero; + } + + if (global::System.DateTimeOffset.TryParse( + value, + global::System.Globalization.CultureInfo.InvariantCulture, + global::System.Globalization.DateTimeStyles.AssumeUniversal | global::System.Globalization.DateTimeStyles.AdjustToUniversal, + out var resetAt)) + { + delay = resetAt - global::System.DateTimeOffset.UtcNow; + return delay > global::System.TimeSpan.Zero; + } + + return false; + } + + private static global::System.TimeSpan ApplyJitter( + global::System.TimeSpan delay, + double jitterRatio) + { + if (delay <= global::System.TimeSpan.Zero || jitterRatio <= 0D) + { + return delay; + } + + if (jitterRatio > 1D) + { + jitterRatio = 1D; + } + + var sample = NextJitterSample(); + var multiplier = 1D - jitterRatio + (sample * jitterRatio * 2D); + var milliseconds = delay.TotalMilliseconds * multiplier; + if (double.IsNaN(milliseconds) || double.IsInfinity(milliseconds) || milliseconds < 0D) + { + milliseconds = 0D; + } + + return global::System.TimeSpan.FromMilliseconds(milliseconds); + } + + private static double NextJitterSample() + { + var bytes = new byte[8]; + using (var randomNumberGenerator = global::System.Security.Cryptography.RandomNumberGenerator.Create()) + { + randomNumberGenerator.GetBytes(bytes); + } + + var value = global::System.BitConverter.ToUInt64(bytes, 0); + return value / (double)ulong.MaxValue; + } + + private static global::System.TimeSpan ClampRetryDelay( + global::System.TimeSpan delay, + global::RevAI.AutoSDKRetryOptions retryOptions) + { + if (delay <= global::System.TimeSpan.Zero) + { + return global::System.TimeSpan.Zero; + } + + var maxDelay = retryOptions.MaxDelay; + if (maxDelay > global::System.TimeSpan.Zero && delay > maxDelay) + { + return maxDelay; + } + + return delay; } internal static bool ShouldRetryStatusCode( diff --git a/src/libs/RevAI/Generated/RevAI.RevAIClient.g.cs b/src/libs/RevAI/Generated/RevAI.RevAIClient.g.cs index 9ee260b..4809811 100644 --- a/src/libs/RevAI/Generated/RevAI.RevAIClient.g.cs +++ b/src/libs/RevAI/Generated/RevAI.RevAIClient.g.cs @@ -44,7 +44,7 @@ public sealed partial class RevAIClient : global::RevAI.IRevAIClient, global::Sy /// /// Account information. /// - public AccountClient Account => new AccountClient(HttpClient, authorizations: Authorizations, options: Options) + public AccountClient Account => new AccountClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -53,7 +53,7 @@ public sealed partial class RevAIClient : global::RevAI.IRevAIClient, global::Sy /// /// Retrieve caption output (SRT/VTT). /// - public CaptionsClient Captions => new CaptionsClient(HttpClient, authorizations: Authorizations, options: Options) + public CaptionsClient Captions => new CaptionsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -62,7 +62,7 @@ public sealed partial class RevAIClient : global::RevAI.IRevAIClient, global::Sy /// /// Language identification from audio. /// - public LanguageIdentificationJobsClient LanguageIdentificationJobs => new LanguageIdentificationJobsClient(HttpClient, authorizations: Authorizations, options: Options) + public LanguageIdentificationJobsClient LanguageIdentificationJobs => new LanguageIdentificationJobsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -71,7 +71,7 @@ public sealed partial class RevAIClient : global::RevAI.IRevAIClient, global::Sy /// /// Retrieve language identification results. /// - public LanguageIdentificationResultsClient LanguageIdentificationResults => new LanguageIdentificationResultsClient(HttpClient, authorizations: Authorizations, options: Options) + public LanguageIdentificationResultsClient LanguageIdentificationResults => new LanguageIdentificationResultsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -80,7 +80,7 @@ public sealed partial class RevAIClient : global::RevAI.IRevAIClient, global::Sy /// /// Sentiment analysis on text or transcripts. /// - public SentimentAnalysisJobsClient SentimentAnalysisJobs => new SentimentAnalysisJobsClient(HttpClient, authorizations: Authorizations, options: Options) + public SentimentAnalysisJobsClient SentimentAnalysisJobs => new SentimentAnalysisJobsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -89,7 +89,7 @@ public sealed partial class RevAIClient : global::RevAI.IRevAIClient, global::Sy /// /// Retrieve sentiment analysis results. /// - public SentimentAnalysisResultsClient SentimentAnalysisResults => new SentimentAnalysisResultsClient(HttpClient, authorizations: Authorizations, options: Options) + public SentimentAnalysisResultsClient SentimentAnalysisResults => new SentimentAnalysisResultsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -98,7 +98,7 @@ public sealed partial class RevAIClient : global::RevAI.IRevAIClient, global::Sy /// /// Topic extraction from text or transcripts. /// - public TopicExtractionJobsClient TopicExtractionJobs => new TopicExtractionJobsClient(HttpClient, authorizations: Authorizations, options: Options) + public TopicExtractionJobsClient TopicExtractionJobs => new TopicExtractionJobsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -107,7 +107,7 @@ public sealed partial class RevAIClient : global::RevAI.IRevAIClient, global::Sy /// /// Retrieve topic extraction results. /// - public TopicExtractionResultsClient TopicExtractionResults => new TopicExtractionResultsClient(HttpClient, authorizations: Authorizations, options: Options) + public TopicExtractionResultsClient TopicExtractionResults => new TopicExtractionResultsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -116,7 +116,7 @@ public sealed partial class RevAIClient : global::RevAI.IRevAIClient, global::Sy /// /// Retrieve transcription results. /// - public TranscriptClient Transcript => new TranscriptClient(HttpClient, authorizations: Authorizations, options: Options) + public TranscriptClient Transcript => new TranscriptClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -125,7 +125,7 @@ public sealed partial class RevAIClient : global::RevAI.IRevAIClient, global::Sy /// /// Async speech-to-text transcription. /// - public TranscriptionJobsClient TranscriptionJobs => new TranscriptionJobsClient(HttpClient, authorizations: Authorizations, options: Options) + public TranscriptionJobsClient TranscriptionJobs => new TranscriptionJobsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -164,10 +164,10 @@ public RevAIClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public RevAIClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::RevAI.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::RevAI.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/RevAI/Generated/RevAI.SentimentAnalysisJobsClient.DeleteSentimentAnalysisJob.g.cs b/src/libs/RevAI/Generated/RevAI.SentimentAnalysisJobsClient.DeleteSentimentAnalysisJob.g.cs index 8e9ad54..e26bfc8 100644 --- a/src/libs/RevAI/Generated/RevAI.SentimentAnalysisJobsClient.DeleteSentimentAnalysisJob.g.cs +++ b/src/libs/RevAI/Generated/RevAI.SentimentAnalysisJobsClient.DeleteSentimentAnalysisJob.g.cs @@ -48,6 +48,25 @@ partial void ProcessDeleteSentimentAnalysisJobResponse( string id, global::RevAI.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await DeleteSentimentAnalysisJobAsResponseAsync( + id: id, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Delete Sentiment Analysis Job
+ /// Deletes a sentiment analysis job and all associated data. + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task DeleteSentimentAnalysisJobAsResponseAsync( + string id, + global::RevAI.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -77,6 +96,7 @@ partial void ProcessDeleteSentimentAnalysisJobResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::RevAI.PathBuilder( path: $"/sentiment_analysis/v1/jobs/{id}", baseUri: HttpClient.BaseAddress); @@ -150,6 +170,8 @@ partial void ProcessDeleteSentimentAnalysisJobResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -160,6 +182,11 @@ partial void ProcessDeleteSentimentAnalysisJobResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::RevAI.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::RevAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -177,6 +204,8 @@ partial void ProcessDeleteSentimentAnalysisJobResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -186,8 +215,7 @@ partial void ProcessDeleteSentimentAnalysisJobResponse( __httpRequest.Dispose(); __httpRequest = null; await global::RevAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -196,6 +224,11 @@ partial void ProcessDeleteSentimentAnalysisJobResponse( __attempt < __maxAttempts && global::RevAI.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::RevAI.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::RevAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::RevAI.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -212,14 +245,15 @@ partial void ProcessDeleteSentimentAnalysisJobResponse( 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::RevAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -259,6 +293,8 @@ partial void ProcessDeleteSentimentAnalysisJobResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -279,6 +315,8 @@ partial void ProcessDeleteSentimentAnalysisJobResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Authorization has been denied for this request @@ -408,6 +446,10 @@ partial void ProcessDeleteSentimentAnalysisJobResponse( { __response.EnsureSuccessStatusCode(); + return new global::RevAI.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::RevAI.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -429,6 +471,10 @@ partial void ProcessDeleteSentimentAnalysisJobResponse( try { __response.EnsureSuccessStatusCode(); + return new global::RevAI.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::RevAI.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/RevAI/Generated/RevAI.SentimentAnalysisJobsClient.GetListOfSentimentAnalysisJobs.g.cs b/src/libs/RevAI/Generated/RevAI.SentimentAnalysisJobsClient.GetListOfSentimentAnalysisJobs.g.cs index 69f18d3..cf1acb6 100644 --- a/src/libs/RevAI/Generated/RevAI.SentimentAnalysisJobsClient.GetListOfSentimentAnalysisJobs.g.cs +++ b/src/libs/RevAI/Generated/RevAI.SentimentAnalysisJobsClient.GetListOfSentimentAnalysisJobs.g.cs @@ -57,6 +57,30 @@ partial void ProcessGetListOfSentimentAnalysisJobsResponseContent( string? startingAfter = default, global::RevAI.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetListOfSentimentAnalysisJobsAsResponseAsync( + limit: limit, + startingAfter: startingAfter, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get List of Sentiment Analysis Jobs
+ /// Gets a list of sentiment analysis jobs submitted within the last 30 days. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task>> GetListOfSentimentAnalysisJobsAsResponseAsync( + int? limit = default, + string? startingAfter = default, + global::RevAI.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -87,12 +111,13 @@ partial void ProcessGetListOfSentimentAnalysisJobsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::RevAI.PathBuilder( path: "/sentiment_analysis/v1/jobs", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("limit", limit?.ToString()) - .AddOptionalParameter("starting_after", startingAfter) + .AddOptionalParameter("starting_after", startingAfter) ; var __path = __pathBuilder.ToString(); __path = global::RevAI.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -165,6 +190,8 @@ partial void ProcessGetListOfSentimentAnalysisJobsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -175,6 +202,11 @@ partial void ProcessGetListOfSentimentAnalysisJobsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::RevAI.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::RevAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -192,6 +224,8 @@ partial void ProcessGetListOfSentimentAnalysisJobsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -201,8 +235,7 @@ partial void ProcessGetListOfSentimentAnalysisJobsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::RevAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -211,6 +244,11 @@ partial void ProcessGetListOfSentimentAnalysisJobsResponseContent( __attempt < __maxAttempts && global::RevAI.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::RevAI.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::RevAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::RevAI.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -227,14 +265,15 @@ partial void ProcessGetListOfSentimentAnalysisJobsResponseContent( 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::RevAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -274,6 +313,8 @@ partial void ProcessGetListOfSentimentAnalysisJobsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -294,6 +335,8 @@ partial void ProcessGetListOfSentimentAnalysisJobsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Bad Request - Invalid parameters @@ -394,9 +437,13 @@ partial void ProcessGetListOfSentimentAnalysisJobsResponseContent( { __response.EnsureSuccessStatusCode(); - return - (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? + var __value = (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::RevAI.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::RevAI.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -424,9 +471,13 @@ partial void ProcessGetListOfSentimentAnalysisJobsResponseContent( #endif ).ConfigureAwait(false); - return - (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? + var __value = (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::RevAI.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::RevAI.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/RevAI/Generated/RevAI.SentimentAnalysisJobsClient.GetSentimentAnalysisJobById.g.cs b/src/libs/RevAI/Generated/RevAI.SentimentAnalysisJobsClient.GetSentimentAnalysisJobById.g.cs index 7290ecc..65f4536 100644 --- a/src/libs/RevAI/Generated/RevAI.SentimentAnalysisJobsClient.GetSentimentAnalysisJobById.g.cs +++ b/src/libs/RevAI/Generated/RevAI.SentimentAnalysisJobsClient.GetSentimentAnalysisJobById.g.cs @@ -53,6 +53,27 @@ partial void ProcessGetSentimentAnalysisJobByIdResponseContent( string id, global::RevAI.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetSentimentAnalysisJobByIdAsResponseAsync( + id: id, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Sentiment Analysis Job By Id
+ /// Returns information about a sentiment analysis job + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetSentimentAnalysisJobByIdAsResponseAsync( + string id, + global::RevAI.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -82,6 +103,7 @@ partial void ProcessGetSentimentAnalysisJobByIdResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::RevAI.PathBuilder( path: $"/sentiment_analysis/v1/jobs/{id}", baseUri: HttpClient.BaseAddress); @@ -155,6 +177,8 @@ partial void ProcessGetSentimentAnalysisJobByIdResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -165,6 +189,11 @@ partial void ProcessGetSentimentAnalysisJobByIdResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::RevAI.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::RevAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -182,6 +211,8 @@ partial void ProcessGetSentimentAnalysisJobByIdResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -191,8 +222,7 @@ partial void ProcessGetSentimentAnalysisJobByIdResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::RevAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -201,6 +231,11 @@ partial void ProcessGetSentimentAnalysisJobByIdResponseContent( __attempt < __maxAttempts && global::RevAI.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::RevAI.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::RevAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::RevAI.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -217,14 +252,15 @@ partial void ProcessGetSentimentAnalysisJobByIdResponseContent( 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::RevAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -264,6 +300,8 @@ partial void ProcessGetSentimentAnalysisJobByIdResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -284,6 +322,8 @@ partial void ProcessGetSentimentAnalysisJobByIdResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Authorization has been denied for this request @@ -384,9 +424,13 @@ partial void ProcessGetSentimentAnalysisJobByIdResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::RevAI.SentimentAnalysisJob.FromJson(__content, JsonSerializerContext) ?? + var __value = global::RevAI.SentimentAnalysisJob.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::RevAI.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::RevAI.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -414,9 +458,13 @@ partial void ProcessGetSentimentAnalysisJobByIdResponseContent( #endif ).ConfigureAwait(false); - return - await global::RevAI.SentimentAnalysisJob.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::RevAI.SentimentAnalysisJob.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::RevAI.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::RevAI.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/RevAI/Generated/RevAI.SentimentAnalysisJobsClient.SubmitSentimentAnalysisJob.g.cs b/src/libs/RevAI/Generated/RevAI.SentimentAnalysisJobsClient.SubmitSentimentAnalysisJob.g.cs index e75b3a1..af8e773 100644 --- a/src/libs/RevAI/Generated/RevAI.SentimentAnalysisJobsClient.SubmitSentimentAnalysisJob.g.cs +++ b/src/libs/RevAI/Generated/RevAI.SentimentAnalysisJobsClient.SubmitSentimentAnalysisJob.g.cs @@ -51,6 +51,29 @@ partial void ProcessSubmitSentimentAnalysisJobResponseContent( /// public async global::System.Threading.Tasks.Task SubmitSentimentAnalysisJobAsync( + global::RevAI.SubmitSentimentAnalysisJobRequest request, + global::RevAI.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await SubmitSentimentAnalysisJobAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Submit Sentiment Analysis Job
+ /// Starts an asynchronous sentiment analysis job. Input can be plain text, a JSON transcript, or reference a completed transcription job. + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> SubmitSentimentAnalysisJobAsResponseAsync( + global::RevAI.SubmitSentimentAnalysisJobRequest request, global::RevAI.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -85,6 +108,7 @@ partial void ProcessSubmitSentimentAnalysisJobResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::RevAI.PathBuilder( path: "/sentiment_analysis/v1/jobs", baseUri: HttpClient.BaseAddress); @@ -164,6 +188,8 @@ partial void ProcessSubmitSentimentAnalysisJobResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -174,6 +200,11 @@ partial void ProcessSubmitSentimentAnalysisJobResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::RevAI.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::RevAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -191,6 +222,8 @@ partial void ProcessSubmitSentimentAnalysisJobResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -200,8 +233,7 @@ partial void ProcessSubmitSentimentAnalysisJobResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::RevAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -210,6 +242,11 @@ partial void ProcessSubmitSentimentAnalysisJobResponseContent( __attempt < __maxAttempts && global::RevAI.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::RevAI.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::RevAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::RevAI.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -226,14 +263,15 @@ partial void ProcessSubmitSentimentAnalysisJobResponseContent( 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::RevAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -273,6 +311,8 @@ partial void ProcessSubmitSentimentAnalysisJobResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -293,6 +333,8 @@ partial void ProcessSubmitSentimentAnalysisJobResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Bad Request - Invalid parameters @@ -393,9 +435,13 @@ partial void ProcessSubmitSentimentAnalysisJobResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::RevAI.SentimentAnalysisJob.FromJson(__content, JsonSerializerContext) ?? + var __value = global::RevAI.SentimentAnalysisJob.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::RevAI.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::RevAI.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -423,9 +469,13 @@ partial void ProcessSubmitSentimentAnalysisJobResponseContent( #endif ).ConfigureAwait(false); - return - await global::RevAI.SentimentAnalysisJob.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::RevAI.SentimentAnalysisJob.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::RevAI.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::RevAI.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/RevAI/Generated/RevAI.SentimentAnalysisJobsClient.g.cs b/src/libs/RevAI/Generated/RevAI.SentimentAnalysisJobsClient.g.cs index bed3351..a8cccd1 100644 --- a/src/libs/RevAI/Generated/RevAI.SentimentAnalysisJobsClient.g.cs +++ b/src/libs/RevAI/Generated/RevAI.SentimentAnalysisJobsClient.g.cs @@ -73,10 +73,10 @@ public SentimentAnalysisJobsClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public SentimentAnalysisJobsClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::RevAI.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::RevAI.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/RevAI/Generated/RevAI.SentimentAnalysisResultsClient.GetSentimentAnalysisResult.g.cs b/src/libs/RevAI/Generated/RevAI.SentimentAnalysisResultsClient.GetSentimentAnalysisResult.g.cs index 67f6de6..8b4584c 100644 --- a/src/libs/RevAI/Generated/RevAI.SentimentAnalysisResultsClient.GetSentimentAnalysisResult.g.cs +++ b/src/libs/RevAI/Generated/RevAI.SentimentAnalysisResultsClient.GetSentimentAnalysisResult.g.cs @@ -53,6 +53,27 @@ partial void ProcessGetSentimentAnalysisResultResponseContent( string id, global::RevAI.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetSentimentAnalysisResultAsResponseAsync( + id: id, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Sentiment Analysis Result
+ /// Returns the sentiment analysis result for a completed job. + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetSentimentAnalysisResultAsResponseAsync( + string id, + global::RevAI.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -82,6 +103,7 @@ partial void ProcessGetSentimentAnalysisResultResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::RevAI.PathBuilder( path: $"/sentiment_analysis/v1/jobs/{id}/result", baseUri: HttpClient.BaseAddress); @@ -155,6 +177,8 @@ partial void ProcessGetSentimentAnalysisResultResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -165,6 +189,11 @@ partial void ProcessGetSentimentAnalysisResultResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::RevAI.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::RevAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -182,6 +211,8 @@ partial void ProcessGetSentimentAnalysisResultResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -191,8 +222,7 @@ partial void ProcessGetSentimentAnalysisResultResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::RevAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -201,6 +231,11 @@ partial void ProcessGetSentimentAnalysisResultResponseContent( __attempt < __maxAttempts && global::RevAI.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::RevAI.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::RevAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::RevAI.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -217,14 +252,15 @@ partial void ProcessGetSentimentAnalysisResultResponseContent( 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::RevAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -264,6 +300,8 @@ partial void ProcessGetSentimentAnalysisResultResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -284,6 +322,8 @@ partial void ProcessGetSentimentAnalysisResultResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Authorization has been denied for this request @@ -417,9 +457,13 @@ partial void ProcessGetSentimentAnalysisResultResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::RevAI.SentimentAnalysisResult.FromJson(__content, JsonSerializerContext) ?? + var __value = global::RevAI.SentimentAnalysisResult.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::RevAI.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::RevAI.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -447,9 +491,13 @@ partial void ProcessGetSentimentAnalysisResultResponseContent( #endif ).ConfigureAwait(false); - return - await global::RevAI.SentimentAnalysisResult.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::RevAI.SentimentAnalysisResult.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::RevAI.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::RevAI.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/RevAI/Generated/RevAI.SentimentAnalysisResultsClient.g.cs b/src/libs/RevAI/Generated/RevAI.SentimentAnalysisResultsClient.g.cs index f5d0421..9947507 100644 --- a/src/libs/RevAI/Generated/RevAI.SentimentAnalysisResultsClient.g.cs +++ b/src/libs/RevAI/Generated/RevAI.SentimentAnalysisResultsClient.g.cs @@ -73,10 +73,10 @@ public SentimentAnalysisResultsClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public SentimentAnalysisResultsClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::RevAI.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::RevAI.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/RevAI/Generated/RevAI.TopicExtractionJobsClient.DeleteTopicExtractionJob.g.cs b/src/libs/RevAI/Generated/RevAI.TopicExtractionJobsClient.DeleteTopicExtractionJob.g.cs index 2909399..6c903e0 100644 --- a/src/libs/RevAI/Generated/RevAI.TopicExtractionJobsClient.DeleteTopicExtractionJob.g.cs +++ b/src/libs/RevAI/Generated/RevAI.TopicExtractionJobsClient.DeleteTopicExtractionJob.g.cs @@ -48,6 +48,25 @@ partial void ProcessDeleteTopicExtractionJobResponse( string id, global::RevAI.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await DeleteTopicExtractionJobAsResponseAsync( + id: id, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Delete Topic Extraction Job
+ /// Deletes a topic extraction job and all associated data. + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task DeleteTopicExtractionJobAsResponseAsync( + string id, + global::RevAI.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -77,6 +96,7 @@ partial void ProcessDeleteTopicExtractionJobResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::RevAI.PathBuilder( path: $"/topic_extraction/v1/jobs/{id}", baseUri: HttpClient.BaseAddress); @@ -150,6 +170,8 @@ partial void ProcessDeleteTopicExtractionJobResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -160,6 +182,11 @@ partial void ProcessDeleteTopicExtractionJobResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::RevAI.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::RevAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -177,6 +204,8 @@ partial void ProcessDeleteTopicExtractionJobResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -186,8 +215,7 @@ partial void ProcessDeleteTopicExtractionJobResponse( __httpRequest.Dispose(); __httpRequest = null; await global::RevAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -196,6 +224,11 @@ partial void ProcessDeleteTopicExtractionJobResponse( __attempt < __maxAttempts && global::RevAI.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::RevAI.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::RevAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::RevAI.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -212,14 +245,15 @@ partial void ProcessDeleteTopicExtractionJobResponse( 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::RevAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -259,6 +293,8 @@ partial void ProcessDeleteTopicExtractionJobResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -279,6 +315,8 @@ partial void ProcessDeleteTopicExtractionJobResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Authorization has been denied for this request @@ -408,6 +446,10 @@ partial void ProcessDeleteTopicExtractionJobResponse( { __response.EnsureSuccessStatusCode(); + return new global::RevAI.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::RevAI.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -429,6 +471,10 @@ partial void ProcessDeleteTopicExtractionJobResponse( try { __response.EnsureSuccessStatusCode(); + return new global::RevAI.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::RevAI.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/RevAI/Generated/RevAI.TopicExtractionJobsClient.GetListOfTopicExtractionJobs.g.cs b/src/libs/RevAI/Generated/RevAI.TopicExtractionJobsClient.GetListOfTopicExtractionJobs.g.cs index 8e4836b..0e1441e 100644 --- a/src/libs/RevAI/Generated/RevAI.TopicExtractionJobsClient.GetListOfTopicExtractionJobs.g.cs +++ b/src/libs/RevAI/Generated/RevAI.TopicExtractionJobsClient.GetListOfTopicExtractionJobs.g.cs @@ -57,6 +57,30 @@ partial void ProcessGetListOfTopicExtractionJobsResponseContent( string? startingAfter = default, global::RevAI.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetListOfTopicExtractionJobsAsResponseAsync( + limit: limit, + startingAfter: startingAfter, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get List of Topic Extraction Jobs
+ /// Gets a list of topic extraction jobs submitted within the last 30 days. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task>> GetListOfTopicExtractionJobsAsResponseAsync( + int? limit = default, + string? startingAfter = default, + global::RevAI.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -87,12 +111,13 @@ partial void ProcessGetListOfTopicExtractionJobsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::RevAI.PathBuilder( path: "/topic_extraction/v1/jobs", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("limit", limit?.ToString()) - .AddOptionalParameter("starting_after", startingAfter) + .AddOptionalParameter("starting_after", startingAfter) ; var __path = __pathBuilder.ToString(); __path = global::RevAI.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -165,6 +190,8 @@ partial void ProcessGetListOfTopicExtractionJobsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -175,6 +202,11 @@ partial void ProcessGetListOfTopicExtractionJobsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::RevAI.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::RevAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -192,6 +224,8 @@ partial void ProcessGetListOfTopicExtractionJobsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -201,8 +235,7 @@ partial void ProcessGetListOfTopicExtractionJobsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::RevAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -211,6 +244,11 @@ partial void ProcessGetListOfTopicExtractionJobsResponseContent( __attempt < __maxAttempts && global::RevAI.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::RevAI.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::RevAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::RevAI.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -227,14 +265,15 @@ partial void ProcessGetListOfTopicExtractionJobsResponseContent( 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::RevAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -274,6 +313,8 @@ partial void ProcessGetListOfTopicExtractionJobsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -294,6 +335,8 @@ partial void ProcessGetListOfTopicExtractionJobsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Bad Request - Invalid parameters @@ -394,9 +437,13 @@ partial void ProcessGetListOfTopicExtractionJobsResponseContent( { __response.EnsureSuccessStatusCode(); - return - (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? + var __value = (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::RevAI.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::RevAI.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -424,9 +471,13 @@ partial void ProcessGetListOfTopicExtractionJobsResponseContent( #endif ).ConfigureAwait(false); - return - (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? + var __value = (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::RevAI.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::RevAI.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/RevAI/Generated/RevAI.TopicExtractionJobsClient.GetTopicExtractionJobById.g.cs b/src/libs/RevAI/Generated/RevAI.TopicExtractionJobsClient.GetTopicExtractionJobById.g.cs index 553be86..11b96ea 100644 --- a/src/libs/RevAI/Generated/RevAI.TopicExtractionJobsClient.GetTopicExtractionJobById.g.cs +++ b/src/libs/RevAI/Generated/RevAI.TopicExtractionJobsClient.GetTopicExtractionJobById.g.cs @@ -53,6 +53,27 @@ partial void ProcessGetTopicExtractionJobByIdResponseContent( string id, global::RevAI.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetTopicExtractionJobByIdAsResponseAsync( + id: id, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Topic Extraction Job By Id
+ /// Returns information about a topic extraction job + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetTopicExtractionJobByIdAsResponseAsync( + string id, + global::RevAI.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -82,6 +103,7 @@ partial void ProcessGetTopicExtractionJobByIdResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::RevAI.PathBuilder( path: $"/topic_extraction/v1/jobs/{id}", baseUri: HttpClient.BaseAddress); @@ -155,6 +177,8 @@ partial void ProcessGetTopicExtractionJobByIdResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -165,6 +189,11 @@ partial void ProcessGetTopicExtractionJobByIdResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::RevAI.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::RevAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -182,6 +211,8 @@ partial void ProcessGetTopicExtractionJobByIdResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -191,8 +222,7 @@ partial void ProcessGetTopicExtractionJobByIdResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::RevAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -201,6 +231,11 @@ partial void ProcessGetTopicExtractionJobByIdResponseContent( __attempt < __maxAttempts && global::RevAI.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::RevAI.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::RevAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::RevAI.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -217,14 +252,15 @@ partial void ProcessGetTopicExtractionJobByIdResponseContent( 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::RevAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -264,6 +300,8 @@ partial void ProcessGetTopicExtractionJobByIdResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -284,6 +322,8 @@ partial void ProcessGetTopicExtractionJobByIdResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Authorization has been denied for this request @@ -384,9 +424,13 @@ partial void ProcessGetTopicExtractionJobByIdResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::RevAI.TopicExtractionJob.FromJson(__content, JsonSerializerContext) ?? + var __value = global::RevAI.TopicExtractionJob.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::RevAI.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::RevAI.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -414,9 +458,13 @@ partial void ProcessGetTopicExtractionJobByIdResponseContent( #endif ).ConfigureAwait(false); - return - await global::RevAI.TopicExtractionJob.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::RevAI.TopicExtractionJob.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::RevAI.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::RevAI.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/RevAI/Generated/RevAI.TopicExtractionJobsClient.SubmitTopicExtractionJob.g.cs b/src/libs/RevAI/Generated/RevAI.TopicExtractionJobsClient.SubmitTopicExtractionJob.g.cs index 8e4b336..9970ba9 100644 --- a/src/libs/RevAI/Generated/RevAI.TopicExtractionJobsClient.SubmitTopicExtractionJob.g.cs +++ b/src/libs/RevAI/Generated/RevAI.TopicExtractionJobsClient.SubmitTopicExtractionJob.g.cs @@ -51,6 +51,29 @@ partial void ProcessSubmitTopicExtractionJobResponseContent( /// public async global::System.Threading.Tasks.Task SubmitTopicExtractionJobAsync( + global::RevAI.SubmitTopicExtractionJobRequest request, + global::RevAI.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await SubmitTopicExtractionJobAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Submit Topic Extraction Job
+ /// Starts an asynchronous topic extraction job. Input can be plain text, a JSON transcript, or reference a completed transcription job. + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> SubmitTopicExtractionJobAsResponseAsync( + global::RevAI.SubmitTopicExtractionJobRequest request, global::RevAI.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -85,6 +108,7 @@ partial void ProcessSubmitTopicExtractionJobResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::RevAI.PathBuilder( path: "/topic_extraction/v1/jobs", baseUri: HttpClient.BaseAddress); @@ -164,6 +188,8 @@ partial void ProcessSubmitTopicExtractionJobResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -174,6 +200,11 @@ partial void ProcessSubmitTopicExtractionJobResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::RevAI.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::RevAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -191,6 +222,8 @@ partial void ProcessSubmitTopicExtractionJobResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -200,8 +233,7 @@ partial void ProcessSubmitTopicExtractionJobResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::RevAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -210,6 +242,11 @@ partial void ProcessSubmitTopicExtractionJobResponseContent( __attempt < __maxAttempts && global::RevAI.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::RevAI.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::RevAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::RevAI.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -226,14 +263,15 @@ partial void ProcessSubmitTopicExtractionJobResponseContent( 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::RevAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -273,6 +311,8 @@ partial void ProcessSubmitTopicExtractionJobResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -293,6 +333,8 @@ partial void ProcessSubmitTopicExtractionJobResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Bad Request - Invalid parameters @@ -393,9 +435,13 @@ partial void ProcessSubmitTopicExtractionJobResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::RevAI.TopicExtractionJob.FromJson(__content, JsonSerializerContext) ?? + var __value = global::RevAI.TopicExtractionJob.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::RevAI.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::RevAI.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -423,9 +469,13 @@ partial void ProcessSubmitTopicExtractionJobResponseContent( #endif ).ConfigureAwait(false); - return - await global::RevAI.TopicExtractionJob.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::RevAI.TopicExtractionJob.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::RevAI.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::RevAI.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/RevAI/Generated/RevAI.TopicExtractionJobsClient.g.cs b/src/libs/RevAI/Generated/RevAI.TopicExtractionJobsClient.g.cs index 42976b0..9e3e0cd 100644 --- a/src/libs/RevAI/Generated/RevAI.TopicExtractionJobsClient.g.cs +++ b/src/libs/RevAI/Generated/RevAI.TopicExtractionJobsClient.g.cs @@ -73,10 +73,10 @@ public TopicExtractionJobsClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public TopicExtractionJobsClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::RevAI.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::RevAI.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/RevAI/Generated/RevAI.TopicExtractionResultsClient.GetTopicExtractionResult.g.cs b/src/libs/RevAI/Generated/RevAI.TopicExtractionResultsClient.GetTopicExtractionResult.g.cs index e5f1718..1d7cb00 100644 --- a/src/libs/RevAI/Generated/RevAI.TopicExtractionResultsClient.GetTopicExtractionResult.g.cs +++ b/src/libs/RevAI/Generated/RevAI.TopicExtractionResultsClient.GetTopicExtractionResult.g.cs @@ -53,6 +53,27 @@ partial void ProcessGetTopicExtractionResultResponseContent( string id, global::RevAI.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetTopicExtractionResultAsResponseAsync( + id: id, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Topic Extraction Result
+ /// Returns the topic extraction result for a completed job. + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetTopicExtractionResultAsResponseAsync( + string id, + global::RevAI.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -82,6 +103,7 @@ partial void ProcessGetTopicExtractionResultResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::RevAI.PathBuilder( path: $"/topic_extraction/v1/jobs/{id}/result", baseUri: HttpClient.BaseAddress); @@ -155,6 +177,8 @@ partial void ProcessGetTopicExtractionResultResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -165,6 +189,11 @@ partial void ProcessGetTopicExtractionResultResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::RevAI.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::RevAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -182,6 +211,8 @@ partial void ProcessGetTopicExtractionResultResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -191,8 +222,7 @@ partial void ProcessGetTopicExtractionResultResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::RevAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -201,6 +231,11 @@ partial void ProcessGetTopicExtractionResultResponseContent( __attempt < __maxAttempts && global::RevAI.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::RevAI.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::RevAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::RevAI.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -217,14 +252,15 @@ partial void ProcessGetTopicExtractionResultResponseContent( 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::RevAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -264,6 +300,8 @@ partial void ProcessGetTopicExtractionResultResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -284,6 +322,8 @@ partial void ProcessGetTopicExtractionResultResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Authorization has been denied for this request @@ -417,9 +457,13 @@ partial void ProcessGetTopicExtractionResultResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::RevAI.TopicExtractionResult.FromJson(__content, JsonSerializerContext) ?? + var __value = global::RevAI.TopicExtractionResult.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::RevAI.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::RevAI.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -447,9 +491,13 @@ partial void ProcessGetTopicExtractionResultResponseContent( #endif ).ConfigureAwait(false); - return - await global::RevAI.TopicExtractionResult.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::RevAI.TopicExtractionResult.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::RevAI.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::RevAI.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/RevAI/Generated/RevAI.TopicExtractionResultsClient.g.cs b/src/libs/RevAI/Generated/RevAI.TopicExtractionResultsClient.g.cs index 689a6ff..55cc827 100644 --- a/src/libs/RevAI/Generated/RevAI.TopicExtractionResultsClient.g.cs +++ b/src/libs/RevAI/Generated/RevAI.TopicExtractionResultsClient.g.cs @@ -73,10 +73,10 @@ public TopicExtractionResultsClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public TopicExtractionResultsClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::RevAI.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::RevAI.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/RevAI/Generated/RevAI.TranscriptClient.GetTranscript.g.cs b/src/libs/RevAI/Generated/RevAI.TranscriptClient.GetTranscript.g.cs index f299269..3a14576 100644 --- a/src/libs/RevAI/Generated/RevAI.TranscriptClient.GetTranscript.g.cs +++ b/src/libs/RevAI/Generated/RevAI.TranscriptClient.GetTranscript.g.cs @@ -59,6 +59,32 @@ partial void ProcessGetTranscriptResponseContent( global::RevAI.GetTranscriptAccept? accept = default, global::RevAI.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetTranscriptAsResponseAsync( + id: id, + accept: accept, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Transcript
+ /// Returns the transcript for a completed transcription job in JSON or plain text format. + ///
+ /// + /// Default Value: application/vnd.rev.transcript.v1.0+json + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetTranscriptAsResponseAsync( + string id, + global::RevAI.GetTranscriptAccept? accept = default, + global::RevAI.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -89,6 +115,7 @@ partial void ProcessGetTranscriptResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::RevAI.PathBuilder( path: $"/speechtotext/v1/jobs/{id}/transcript", baseUri: HttpClient.BaseAddress); @@ -169,6 +196,8 @@ partial void ProcessGetTranscriptResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -179,6 +208,11 @@ partial void ProcessGetTranscriptResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::RevAI.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::RevAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -196,6 +230,8 @@ partial void ProcessGetTranscriptResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -205,8 +241,7 @@ partial void ProcessGetTranscriptResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::RevAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +250,11 @@ partial void ProcessGetTranscriptResponseContent( __attempt < __maxAttempts && global::RevAI.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::RevAI.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::RevAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::RevAI.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -231,14 +271,15 @@ partial void ProcessGetTranscriptResponseContent( 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::RevAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -278,6 +319,8 @@ partial void ProcessGetTranscriptResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -298,6 +341,8 @@ partial void ProcessGetTranscriptResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Authorization has been denied for this request @@ -431,9 +476,13 @@ partial void ProcessGetTranscriptResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::RevAI.Transcript.FromJson(__content, JsonSerializerContext) ?? + var __value = global::RevAI.Transcript.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::RevAI.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::RevAI.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -461,9 +510,13 @@ partial void ProcessGetTranscriptResponseContent( #endif ).ConfigureAwait(false); - return - await global::RevAI.Transcript.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::RevAI.Transcript.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::RevAI.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::RevAI.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/RevAI/Generated/RevAI.TranscriptClient.g.cs b/src/libs/RevAI/Generated/RevAI.TranscriptClient.g.cs index de80d49..41f9464 100644 --- a/src/libs/RevAI/Generated/RevAI.TranscriptClient.g.cs +++ b/src/libs/RevAI/Generated/RevAI.TranscriptClient.g.cs @@ -73,10 +73,10 @@ public TranscriptClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public TranscriptClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::RevAI.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::RevAI.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/RevAI/Generated/RevAI.TranscriptionJobsClient.DeleteTranscriptionJob.g.cs b/src/libs/RevAI/Generated/RevAI.TranscriptionJobsClient.DeleteTranscriptionJob.g.cs index bd4fd80..db4c714 100644 --- a/src/libs/RevAI/Generated/RevAI.TranscriptionJobsClient.DeleteTranscriptionJob.g.cs +++ b/src/libs/RevAI/Generated/RevAI.TranscriptionJobsClient.DeleteTranscriptionJob.g.cs @@ -48,6 +48,25 @@ partial void ProcessDeleteTranscriptionJobResponse( string id, global::RevAI.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await DeleteTranscriptionJobAsResponseAsync( + id: id, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Delete Transcription Job
+ /// Deletes a transcription job. All data related to the job will be permanently deleted. A job can only be deleted once it's completed. + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task DeleteTranscriptionJobAsResponseAsync( + string id, + global::RevAI.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -77,6 +96,7 @@ partial void ProcessDeleteTranscriptionJobResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::RevAI.PathBuilder( path: $"/speechtotext/v1/jobs/{id}", baseUri: HttpClient.BaseAddress); @@ -150,6 +170,8 @@ partial void ProcessDeleteTranscriptionJobResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -160,6 +182,11 @@ partial void ProcessDeleteTranscriptionJobResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::RevAI.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::RevAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -177,6 +204,8 @@ partial void ProcessDeleteTranscriptionJobResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -186,8 +215,7 @@ partial void ProcessDeleteTranscriptionJobResponse( __httpRequest.Dispose(); __httpRequest = null; await global::RevAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -196,6 +224,11 @@ partial void ProcessDeleteTranscriptionJobResponse( __attempt < __maxAttempts && global::RevAI.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::RevAI.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::RevAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::RevAI.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -212,14 +245,15 @@ partial void ProcessDeleteTranscriptionJobResponse( 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::RevAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -259,6 +293,8 @@ partial void ProcessDeleteTranscriptionJobResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -279,6 +315,8 @@ partial void ProcessDeleteTranscriptionJobResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Authorization has been denied for this request @@ -408,6 +446,10 @@ partial void ProcessDeleteTranscriptionJobResponse( { __response.EnsureSuccessStatusCode(); + return new global::RevAI.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::RevAI.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -429,6 +471,10 @@ partial void ProcessDeleteTranscriptionJobResponse( try { __response.EnsureSuccessStatusCode(); + return new global::RevAI.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::RevAI.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/RevAI/Generated/RevAI.TranscriptionJobsClient.GetListOfTranscriptionJobs.g.cs b/src/libs/RevAI/Generated/RevAI.TranscriptionJobsClient.GetListOfTranscriptionJobs.g.cs index ee5a919..82f5aaa 100644 --- a/src/libs/RevAI/Generated/RevAI.TranscriptionJobsClient.GetListOfTranscriptionJobs.g.cs +++ b/src/libs/RevAI/Generated/RevAI.TranscriptionJobsClient.GetListOfTranscriptionJobs.g.cs @@ -57,6 +57,30 @@ partial void ProcessGetListOfTranscriptionJobsResponseContent( string? startingAfter = default, global::RevAI.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetListOfTranscriptionJobsAsResponseAsync( + limit: limit, + startingAfter: startingAfter, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get List of Transcription Jobs
+ /// Gets a list of transcription jobs submitted within the last 30 days in reverse chronological order up to the provided limit number of jobs per call. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task>> GetListOfTranscriptionJobsAsResponseAsync( + int? limit = default, + string? startingAfter = default, + global::RevAI.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -87,12 +111,13 @@ partial void ProcessGetListOfTranscriptionJobsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::RevAI.PathBuilder( path: "/speechtotext/v1/jobs", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("limit", limit?.ToString()) - .AddOptionalParameter("starting_after", startingAfter) + .AddOptionalParameter("starting_after", startingAfter) ; var __path = __pathBuilder.ToString(); __path = global::RevAI.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -165,6 +190,8 @@ partial void ProcessGetListOfTranscriptionJobsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -175,6 +202,11 @@ partial void ProcessGetListOfTranscriptionJobsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::RevAI.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::RevAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -192,6 +224,8 @@ partial void ProcessGetListOfTranscriptionJobsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -201,8 +235,7 @@ partial void ProcessGetListOfTranscriptionJobsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::RevAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -211,6 +244,11 @@ partial void ProcessGetListOfTranscriptionJobsResponseContent( __attempt < __maxAttempts && global::RevAI.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::RevAI.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::RevAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::RevAI.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -227,14 +265,15 @@ partial void ProcessGetListOfTranscriptionJobsResponseContent( 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::RevAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -274,6 +313,8 @@ partial void ProcessGetListOfTranscriptionJobsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -294,6 +335,8 @@ partial void ProcessGetListOfTranscriptionJobsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Bad Request - Invalid parameters @@ -394,9 +437,13 @@ partial void ProcessGetListOfTranscriptionJobsResponseContent( { __response.EnsureSuccessStatusCode(); - return - (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? + var __value = (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::RevAI.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::RevAI.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -424,9 +471,13 @@ partial void ProcessGetListOfTranscriptionJobsResponseContent( #endif ).ConfigureAwait(false); - return - (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? + var __value = (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::RevAI.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::RevAI.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/RevAI/Generated/RevAI.TranscriptionJobsClient.GetTranscriptionJobById.g.cs b/src/libs/RevAI/Generated/RevAI.TranscriptionJobsClient.GetTranscriptionJobById.g.cs index 120ad4b..5869a89 100644 --- a/src/libs/RevAI/Generated/RevAI.TranscriptionJobsClient.GetTranscriptionJobById.g.cs +++ b/src/libs/RevAI/Generated/RevAI.TranscriptionJobsClient.GetTranscriptionJobById.g.cs @@ -53,6 +53,27 @@ partial void ProcessGetTranscriptionJobByIdResponseContent( string id, global::RevAI.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetTranscriptionJobByIdAsResponseAsync( + id: id, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Transcription Job By Id
+ /// Returns information about a transcription job + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetTranscriptionJobByIdAsResponseAsync( + string id, + global::RevAI.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -82,6 +103,7 @@ partial void ProcessGetTranscriptionJobByIdResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::RevAI.PathBuilder( path: $"/speechtotext/v1/jobs/{id}", baseUri: HttpClient.BaseAddress); @@ -155,6 +177,8 @@ partial void ProcessGetTranscriptionJobByIdResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -165,6 +189,11 @@ partial void ProcessGetTranscriptionJobByIdResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::RevAI.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::RevAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -182,6 +211,8 @@ partial void ProcessGetTranscriptionJobByIdResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -191,8 +222,7 @@ partial void ProcessGetTranscriptionJobByIdResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::RevAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -201,6 +231,11 @@ partial void ProcessGetTranscriptionJobByIdResponseContent( __attempt < __maxAttempts && global::RevAI.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::RevAI.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::RevAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::RevAI.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -217,14 +252,15 @@ partial void ProcessGetTranscriptionJobByIdResponseContent( 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::RevAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -264,6 +300,8 @@ partial void ProcessGetTranscriptionJobByIdResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -284,6 +322,8 @@ partial void ProcessGetTranscriptionJobByIdResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Authorization has been denied for this request @@ -384,9 +424,13 @@ partial void ProcessGetTranscriptionJobByIdResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::RevAI.TranscriptionJob.FromJson(__content, JsonSerializerContext) ?? + var __value = global::RevAI.TranscriptionJob.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::RevAI.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::RevAI.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -414,9 +458,13 @@ partial void ProcessGetTranscriptionJobByIdResponseContent( #endif ).ConfigureAwait(false); - return - await global::RevAI.TranscriptionJob.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::RevAI.TranscriptionJob.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::RevAI.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::RevAI.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/RevAI/Generated/RevAI.TranscriptionJobsClient.SubmitTranscriptionJob.g.cs b/src/libs/RevAI/Generated/RevAI.TranscriptionJobsClient.SubmitTranscriptionJob.g.cs index 6b2f9ea..fde3cb3 100644 --- a/src/libs/RevAI/Generated/RevAI.TranscriptionJobsClient.SubmitTranscriptionJob.g.cs +++ b/src/libs/RevAI/Generated/RevAI.TranscriptionJobsClient.SubmitTranscriptionJob.g.cs @@ -51,6 +51,29 @@ partial void ProcessSubmitTranscriptionJobResponseContent( /// public async global::System.Threading.Tasks.Task SubmitTranscriptionJobAsync( + global::RevAI.SubmitTranscriptionJobRequest request, + global::RevAI.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await SubmitTranscriptionJobAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Submit Transcription Job
+ /// Starts an asynchronous job to transcribe speech-to-text for a media file. Media files can be specified by URL or uploaded directly. + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> SubmitTranscriptionJobAsResponseAsync( + global::RevAI.SubmitTranscriptionJobRequest request, global::RevAI.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -85,6 +108,7 @@ partial void ProcessSubmitTranscriptionJobResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::RevAI.PathBuilder( path: "/speechtotext/v1/jobs", baseUri: HttpClient.BaseAddress); @@ -164,6 +188,8 @@ partial void ProcessSubmitTranscriptionJobResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -174,6 +200,11 @@ partial void ProcessSubmitTranscriptionJobResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::RevAI.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::RevAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -191,6 +222,8 @@ partial void ProcessSubmitTranscriptionJobResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -200,8 +233,7 @@ partial void ProcessSubmitTranscriptionJobResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::RevAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -210,6 +242,11 @@ partial void ProcessSubmitTranscriptionJobResponseContent( __attempt < __maxAttempts && global::RevAI.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::RevAI.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::RevAI.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::RevAI.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -226,14 +263,15 @@ partial void ProcessSubmitTranscriptionJobResponseContent( 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::RevAI.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -273,6 +311,8 @@ partial void ProcessSubmitTranscriptionJobResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -293,6 +333,8 @@ partial void ProcessSubmitTranscriptionJobResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Bad Request - Invalid parameters @@ -426,9 +468,13 @@ partial void ProcessSubmitTranscriptionJobResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::RevAI.TranscriptionJob.FromJson(__content, JsonSerializerContext) ?? + var __value = global::RevAI.TranscriptionJob.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::RevAI.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::RevAI.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -456,9 +502,13 @@ partial void ProcessSubmitTranscriptionJobResponseContent( #endif ).ConfigureAwait(false); - return - await global::RevAI.TranscriptionJob.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::RevAI.TranscriptionJob.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::RevAI.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::RevAI.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/RevAI/Generated/RevAI.TranscriptionJobsClient.g.cs b/src/libs/RevAI/Generated/RevAI.TranscriptionJobsClient.g.cs index 2cf1f5a..8d5cd01 100644 --- a/src/libs/RevAI/Generated/RevAI.TranscriptionJobsClient.g.cs +++ b/src/libs/RevAI/Generated/RevAI.TranscriptionJobsClient.g.cs @@ -73,10 +73,10 @@ public TranscriptionJobsClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public TranscriptionJobsClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::RevAI.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::RevAI.AutoSDKClientOptions? options, bool disposeHttpClient = true) {