From e60fd37e1fbef747f132a02ef4011fe2607c0b7d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 5 May 2026 13:59:21 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- .../Voicebox.AutoSDKHttpResponse.g.cs | 121 ++ ...ileSampleProfilesProfileIdSamplesPost.g.cs | 56 + ...t.AddStoryItemStoriesStoryIdItemsPost.g.cs | 15 + ...sGenerationIdVersionsApplyEffectsPost.g.cs | 15 + ...erationGenerateGenerationIdCancelPost.g.cs | 12 + ...ModelDownloadModelsDownloadCancelPost.g.cs | 13 + ...eReadinessEndpointCaptureReadinessGet.g.cs | 14 + ...boxClient.ClearAllTasksTasksClearPost.g.cs | 10 + ...iceboxClient.ClearCacheCacheClearPost.g.cs | 10 + ...rFailedGenerationsHistoryFailedDelete.g.cs | 10 + ...CharacterProfilesProfileIdComposePost.g.cs | 12 + ...ent.CreateCaptureEndpointCapturesPost.g.cs | 62 + ...ceboxClient.CreateChannelChannelsPost.g.cs | 13 + ....CreateEffectPresetEffectsPresetsPost.g.cs | 13 + ...ceboxClient.CreateProfileProfilesPost.g.cs | 13 + ...VoiceboxClient.CreateStoryStoriesPost.g.cs | 13 + ...aptureEndpointCapturesCaptureIdDelete.g.cs | 11 + ....DeleteChannelChannelsChannelIdDelete.g.cs | 12 + ...nt.DeleteCudaBackendBackendCudaDelete.g.cs | 10 + ...ectPresetEffectsPresetsPresetIdDelete.g.cs | 12 + ...teGenerationHistoryGenerationIdDelete.g.cs | 12 + ...nsGenerationIdVersionsVersionIdDelete.g.cs | 14 + ...teMcpBindingMcpBindingsClientIdDelete.g.cs | 11 + ...ient.DeleteModelModelsModelNameDelete.g.cs | 12 + ...leAvatarProfilesProfileIdAvatarDelete.g.cs | 12 + ....DeleteProfileProfilesProfileIdDelete.g.cs | 12 + ...leSampleProfilesSamplesSampleIdDelete.g.cs | 12 + ...lient.DeleteStoryStoriesStoryIdDelete.g.cs | 12 + ...oadCudaBackendBackendDownloadCudaPost.g.cs | 10 + ...toriesStoryIdItemsItemIdDuplicatePost.g.cs | 14 + ...udioHistoryGenerationIdExportAudioGet.g.cs | 12 + ...enerationHistoryGenerationIdExportGet.g.cs | 12 + ...portProfileProfilesProfileIdExportGet.g.cs | 12 + ...toryAudioStoriesStoryIdExportAudioGet.g.cs | 12 + ...t.FilesystemHealthHealthFilesystemGet.g.cs | 10 + ...eboxClient.GenerateSpeechGeneratePost.g.cs | 13 + ...oxClient.GetActiveTasksTasksActiveGet.g.cs | 10 + ...oxClient.GetAudioAudioGenerationIdGet.g.cs | 12 + ...etAvailableEffectsEffectsAvailableGet.g.cs | 10 + ...udioEndpointCapturesCaptureIdAudioGet.g.cs | 12 + ...etCaptureEndpointCapturesCaptureIdGet.g.cs | 11 + ...reSettingsEndpointSettingsCapturesGet.g.cs | 9 + ...Client.GetChannelChannelsChannelIdGet.g.cs | 12 + ...annelVoicesChannelsChannelIdVoicesGet.g.cs | 12 + ...ownloadProgressBackendCudaProgressGet.g.cs | 10 + ...ent.GetCudaStatusBackendCudaStatusGet.g.cs | 10 + ...EffectPresetEffectsPresetsPresetIdGet.g.cs | 12 + ...t.GetGenerationHistoryGenerationIdGet.g.cs | 12 + ...SettingsEndpointSettingsGenerationGet.g.cs | 9 + ...onStatusGenerateGenerationIdStatusGet.g.cs | 12 + ...ationProgressModelsMigrateProgressGet.g.cs | 10 + ...delProgressModelsProgressModelNameGet.g.cs | 12 + ...xClient.GetModelStatusModelsStatusGet.g.cs | 10 + ...nt.GetModelsCacheDirModelsCacheDirGet.g.cs | 10 + ...ofileAvatarProfilesProfileIdAvatarGet.g.cs | 12 + ...eChannelsProfilesProfileIdChannelsGet.g.cs | 12 + ...Client.GetProfileProfilesProfileIdGet.g.cs | 12 + ...ileSamplesProfilesProfileIdSamplesGet.g.cs | 12 + ...ient.GetSampleAudioSamplesSampleIdGet.g.cs | 12 + ...oiceboxClient.GetStatsHistoryStatsGet.g.cs | 10 + ...ceboxClient.GetStoryStoriesStoryIdGet.g.cs | 12 + ...tVersionAudioAudioVersionVersionIdGet.g.cs | 12 + ...cebox.IVoiceboxClient.HealthHealthGet.g.cs | 10 + ...xClient.ImportAudioGenerateImportPost.g.cs | 55 + ...ent.ImportGenerationHistoryImportPost.g.cs | 46 + ...lient.ImportProfileProfilesImportPost.g.cs | 46 + ...lient.ListCapturesEndpointCapturesGet.g.cs | 17 + ...oiceboxClient.ListChannelsChannelsGet.g.cs | 10 + ...nt.ListEffectPresetsEffectsPresetsGet.g.cs | 10 + ...onsGenerationsGenerationIdVersionsGet.g.cs | 12 + ...IVoiceboxClient.ListHistoryHistoryGet.g.cs | 22 + ...xClient.ListMcpBindingsMcpBindingsGet.g.cs | 9 + ...tPresetVoicesProfilesPresetsEngineGet.g.cs | 12 + ...oiceboxClient.ListProfilesProfilesGet.g.cs | 10 + ...IVoiceboxClient.ListStoriesStoriesGet.g.cs | 10 + ...eboxClient.LlmGenerateLlmGeneratePost.g.cs | 13 + ...oiceboxClient.LoadModelModelsLoadPost.g.cs | 14 + ...Client.MigrateModelsModelsMigratePost.g.cs | 13 + ...yItemStoriesStoryIdItemsItemIdMovePut.g.cs | 17 + ...EffectsEffectsPreviewGenerationIdPost.g.cs | 15 + ...reEndpointCapturesCaptureIdRefinePost.g.cs | 14 + ...ionGenerateGenerationIdRegeneratePost.g.cs | 12 + ...ryItemStoriesStoryIdItemsItemIdDelete.g.cs | 14 + ...oryItemsStoriesStoryIdItemsReorderPut.g.cs | 15 + ...ointCapturesCaptureIdRetranscribePost.g.cs | 14 + ...nerationGenerateGenerationIdRetryPost.g.cs | 12 + .../Voicebox.IVoiceboxClient.RootGet.g.cs | 10 + ...annelVoicesChannelsChannelIdVoicesPut.g.cs | 15 + ...ationIdVersionsVersionIdSetDefaultPut.g.cs | 14 + ...eChannelsProfilesProfileIdChannelsPut.g.cs | 15 + ...onStoriesStoryIdItemsItemIdVersionPut.g.cs | 17 + ....IVoiceboxClient.ShutdownShutdownPost.g.cs | 10 + ...ceboxClient.SpeakEventsEventsSpeakGet.g.cs | 10 + ...icebox.IVoiceboxClient.SpeakSpeakPost.g.cs | 16 + ...temStoriesStoryIdItemsItemIdSplitPost.g.cs | 17 + ...Client.StreamSpeechGenerateStreamPost.g.cs | 13 + ...voriteHistoryGenerationIdFavoritePost.g.cs | 12 + ...xClient.TranscribeAudioTranscribePost.g.cs | 54 + ...riggerModelDownloadModelsDownloadPost.g.cs | 13 + ...yItemStoriesStoryIdItemsItemIdTrimPut.g.cs | 17 + ...dModelByNameModelsModelNameUnloadPost.g.cs | 12 + ...boxClient.UnloadModelModelsUnloadPost.g.cs | 10 + ...reSettingsEndpointSettingsCapturesPut.g.cs | 12 + ...ent.UpdateChannelChannelsChannelIdPut.g.cs | 15 + ...EffectPresetEffectsPresetsPresetIdPut.g.cs | 15 + ...SettingsEndpointSettingsGenerationPut.g.cs | 12 + ...ileEffectsProfilesProfileIdEffectsPut.g.cs | 15 + ...ent.UpdateProfileProfilesProfileIdPut.g.cs | 15 + ...ofileSampleProfilesSamplesSampleIdPut.g.cs | 15 + ...yItemTimesStoriesStoryIdItemsTimesPut.g.cs | 15 + ...umeStoriesStoryIdItemsItemIdVolumePut.g.cs | 17 + ...oxClient.UpdateStoryStoriesStoryIdPut.g.cs | 15 + ...fileAvatarProfilesProfileIdAvatarPost.g.cs | 52 + ...Client.UpsertMcpBindingMcpBindingsPut.g.cs | 13 + ...nt.WatchdogDisableWatchdogDisablePost.g.cs | 10 + .../Generated/Voicebox.OptionsSupport.g.cs | 231 +++- ...ileSampleProfilesProfileIdSamplesPost.g.cs | 963 +++++++++++++++- ...t.AddStoryItemStoriesStoryIdItemsPost.g.cs | 69 +- ...sGenerationIdVersionsApplyEffectsPost.g.cs | 69 +- ...erationGenerateGenerationIdCancelPost.g.cs | 60 +- ...ModelDownloadModelsDownloadCancelPost.g.cs | 62 +- ...eReadinessEndpointCaptureReadinessGet.g.cs | 65 +- ...boxClient.ClearAllTasksTasksClearPost.g.cs | 57 +- ...iceboxClient.ClearCacheCacheClearPost.g.cs | 57 +- ...rFailedGenerationsHistoryFailedDelete.g.cs | 57 +- ...CharacterProfilesProfileIdComposePost.g.cs | 64 +- ...ent.CreateCaptureEndpointCapturesPost.g.cs | 1008 ++++++++++++++++- ...ceboxClient.CreateChannelChannelsPost.g.cs | 66 +- ....CreateEffectPresetEffectsPresetsPost.g.cs | 66 +- ...ceboxClient.CreateProfileProfilesPost.g.cs | 66 +- ...VoiceboxClient.CreateStoryStoriesPost.g.cs | 66 +- ...aptureEndpointCapturesCaptureIdDelete.g.cs | 59 +- ....DeleteChannelChannelsChannelIdDelete.g.cs | 60 +- ...nt.DeleteCudaBackendBackendCudaDelete.g.cs | 57 +- ...ectPresetEffectsPresetsPresetIdDelete.g.cs | 60 +- ...teGenerationHistoryGenerationIdDelete.g.cs | 60 +- ...nsGenerationIdVersionsVersionIdDelete.g.cs | 63 +- ...teMcpBindingMcpBindingsClientIdDelete.g.cs | 59 +- ...ient.DeleteModelModelsModelNameDelete.g.cs | 60 +- ...leAvatarProfilesProfileIdAvatarDelete.g.cs | 60 +- ....DeleteProfileProfilesProfileIdDelete.g.cs | 60 +- ...leSampleProfilesSamplesSampleIdDelete.g.cs | 60 +- ...lient.DeleteStoryStoriesStoryIdDelete.g.cs | 60 +- ...oadCudaBackendBackendDownloadCudaPost.g.cs | 57 +- ...toriesStoryIdItemsItemIdDuplicatePost.g.cs | 67 +- ...udioHistoryGenerationIdExportAudioGet.g.cs | 60 +- ...enerationHistoryGenerationIdExportGet.g.cs | 60 +- ...portProfileProfilesProfileIdExportGet.g.cs | 60 +- ...toryAudioStoriesStoryIdExportAudioGet.g.cs | 60 +- ...t.FilesystemHealthHealthFilesystemGet.g.cs | 61 +- ...eboxClient.GenerateSpeechGeneratePost.g.cs | 66 +- ...oxClient.GetActiveTasksTasksActiveGet.g.cs | 61 +- ...oxClient.GetAudioAudioGenerationIdGet.g.cs | 60 +- ...etAvailableEffectsEffectsAvailableGet.g.cs | 61 +- ...udioEndpointCapturesCaptureIdAudioGet.g.cs | 60 +- ...etCaptureEndpointCapturesCaptureIdGet.g.cs | 63 +- ...reSettingsEndpointSettingsCapturesGet.g.cs | 60 +- ...Client.GetChannelChannelsChannelIdGet.g.cs | 64 +- ...annelVoicesChannelsChannelIdVoicesGet.g.cs | 60 +- ...ownloadProgressBackendCudaProgressGet.g.cs | 57 +- ...ent.GetCudaStatusBackendCudaStatusGet.g.cs | 57 +- ...EffectPresetEffectsPresetsPresetIdGet.g.cs | 64 +- ...t.GetGenerationHistoryGenerationIdGet.g.cs | 64 +- ...SettingsEndpointSettingsGenerationGet.g.cs | 60 +- ...onStatusGenerateGenerationIdStatusGet.g.cs | 60 +- ...ationProgressModelsMigrateProgressGet.g.cs | 57 +- ...delProgressModelsProgressModelNameGet.g.cs | 60 +- ...xClient.GetModelStatusModelsStatusGet.g.cs | 61 +- ...nt.GetModelsCacheDirModelsCacheDirGet.g.cs | 57 +- ...ofileAvatarProfilesProfileIdAvatarGet.g.cs | 60 +- ...eChannelsProfilesProfileIdChannelsGet.g.cs | 60 +- ...Client.GetProfileProfilesProfileIdGet.g.cs | 64 +- ...ileSamplesProfilesProfileIdSamplesGet.g.cs | 64 +- ...ient.GetSampleAudioSamplesSampleIdGet.g.cs | 60 +- ...oiceboxClient.GetStatsHistoryStatsGet.g.cs | 57 +- ...ceboxClient.GetStoryStoriesStoryIdGet.g.cs | 64 +- ...tVersionAudioAudioVersionVersionIdGet.g.cs | 60 +- ...icebox.VoiceboxClient.HealthHealthGet.g.cs | 61 +- ...xClient.ImportAudioGenerateImportPost.g.cs | 937 ++++++++++++++- ...ent.ImportGenerationHistoryImportPost.g.cs | 916 ++++++++++++++- ...lient.ImportProfileProfilesImportPost.g.cs | 928 ++++++++++++++- ...lient.ListCapturesEndpointCapturesGet.g.cs | 74 +- ...oiceboxClient.ListChannelsChannelsGet.g.cs | 61 +- ...nt.ListEffectPresetsEffectsPresetsGet.g.cs | 61 +- ...onsGenerationsGenerationIdVersionsGet.g.cs | 64 +- ....VoiceboxClient.ListHistoryHistoryGet.g.cs | 81 +- ...xClient.ListMcpBindingsMcpBindingsGet.g.cs | 60 +- ...tPresetVoicesProfilesPresetsEngineGet.g.cs | 60 +- ...oiceboxClient.ListProfilesProfilesGet.g.cs | 61 +- ....VoiceboxClient.ListStoriesStoriesGet.g.cs | 61 +- ...eboxClient.LlmGenerateLlmGeneratePost.g.cs | 66 +- ...oiceboxClient.LoadModelModelsLoadPost.g.cs | 66 +- ...Client.MigrateModelsModelsMigratePost.g.cs | 62 +- ...yItemStoriesStoryIdItemsItemIdMovePut.g.cs | 72 +- ...EffectsEffectsPreviewGenerationIdPost.g.cs | 65 +- ...reEndpointCapturesCaptureIdRefinePost.g.cs | 68 +- ...ionGenerateGenerationIdRegeneratePost.g.cs | 64 +- ...ryItemStoriesStoryIdItemsItemIdDelete.g.cs | 63 +- ...oryItemsStoriesStoryIdItemsReorderPut.g.cs | 69 +- ...ointCapturesCaptureIdRetranscribePost.g.cs | 68 +- ...nerationGenerateGenerationIdRetryPost.g.cs | 64 +- .../Voicebox.VoiceboxClient.RootGet.g.cs | 57 +- ...annelVoicesChannelsChannelIdVoicesPut.g.cs | 65 +- ...ationIdVersionsVersionIdSetDefaultPut.g.cs | 67 +- ...eChannelsProfilesProfileIdChannelsPut.g.cs | 65 +- ...onStoriesStoryIdItemsItemIdVersionPut.g.cs | 72 +- ...x.VoiceboxClient.ShutdownShutdownPost.g.cs | 57 +- ...ceboxClient.SpeakEventsEventsSpeakGet.g.cs | 57 +- ...oicebox.VoiceboxClient.SpeakSpeakPost.g.cs | 69 +- ...temStoriesStoryIdItemsItemIdSplitPost.g.cs | 72 +- ...Client.StreamSpeechGenerateStreamPost.g.cs | 62 +- ...voriteHistoryGenerationIdFavoritePost.g.cs | 60 +- ...xClient.TranscribeAudioTranscribePost.g.cs | 979 +++++++++++++++- ...riggerModelDownloadModelsDownloadPost.g.cs | 62 +- ...yItemStoriesStoryIdItemsItemIdTrimPut.g.cs | 72 +- ...dModelByNameModelsModelNameUnloadPost.g.cs | 60 +- ...boxClient.UnloadModelModelsUnloadPost.g.cs | 57 +- ...reSettingsEndpointSettingsCapturesPut.g.cs | 65 +- ...ent.UpdateChannelChannelsChannelIdPut.g.cs | 69 +- ...EffectPresetEffectsPresetsPresetIdPut.g.cs | 69 +- ...SettingsEndpointSettingsGenerationPut.g.cs | 65 +- ...ileEffectsProfilesProfileIdEffectsPut.g.cs | 69 +- ...ent.UpdateProfileProfilesProfileIdPut.g.cs | 69 +- ...ofileSampleProfilesSamplesSampleIdPut.g.cs | 69 +- ...yItemTimesStoriesStoryIdItemsTimesPut.g.cs | 65 +- ...umeStoriesStoryIdItemsItemIdVolumePut.g.cs | 72 +- ...oxClient.UpdateStoryStoriesStoryIdPut.g.cs | 69 +- ...fileAvatarProfilesProfileIdAvatarPost.g.cs | 948 +++++++++++++++- ...Client.UpsertMcpBindingMcpBindingsPut.g.cs | 66 +- ...nt.WatchdogDisableWatchdogDisablePost.g.cs | 57 +- .../Generated/Voicebox.VoiceboxClient.g.cs | 8 +- 231 files changed, 14651 insertions(+), 830 deletions(-) create mode 100644 src/libs/Voicebox/Generated/Voicebox.AutoSDKHttpResponse.g.cs diff --git a/src/libs/Voicebox/Generated/Voicebox.AutoSDKHttpResponse.g.cs b/src/libs/Voicebox/Generated/Voicebox.AutoSDKHttpResponse.g.cs new file mode 100644 index 0000000..e04a98f --- /dev/null +++ b/src/libs/Voicebox/Generated/Voicebox.AutoSDKHttpResponse.g.cs @@ -0,0 +1,121 @@ + +#nullable enable + +namespace Voicebox +{ + /// + /// 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/Voicebox/Generated/Voicebox.IVoiceboxClient.AddProfileSampleProfilesProfileIdSamplesPost.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.AddProfileSampleProfilesProfileIdSamplesPost.g.cs index 7e04270..987fc12 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.AddProfileSampleProfilesProfileIdSamplesPost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.AddProfileSampleProfilesProfileIdSamplesPost.g.cs @@ -24,6 +24,21 @@ public partial interface IVoiceboxClient /// Add a sample to a voice profile. /// /// + /// + /// 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> AddProfileSampleProfilesProfileIdSamplesPostAsResponseAsync( + string profileId, + + global::Voicebox.BodyAddProfileSampleProfilesProfileIdSamplesPost request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Add Profile Sample
+ /// Add a sample to a voice profile. + ///
+ /// /// /// /// @@ -37,5 +52,46 @@ public partial interface IVoiceboxClient string referenceText, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Add Profile Sample
+ /// Add a sample to a voice profile. + ///
+ /// + /// + /// The stream to send as the multipart 'file' file part. + /// + /// + /// + /// 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 AddProfileSampleProfilesProfileIdSamplesPostAsync( + string profileId, + global::System.IO.Stream file, + string filename, + string referenceText, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Add Profile Sample
+ /// Add a sample to a voice profile. + ///
+ /// + /// + /// The stream to send as the multipart 'file' file part. + /// + /// + /// + /// 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> AddProfileSampleProfilesProfileIdSamplesPostAsResponseAsync( + string profileId, + global::System.IO.Stream file, + string filename, + string referenceText, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.AddStoryItemStoriesStoryIdItemsPost.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.AddStoryItemStoriesStoryIdItemsPost.g.cs index 6c89c49..0481c5b 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.AddStoryItemStoriesStoryIdItemsPost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.AddStoryItemStoriesStoryIdItemsPost.g.cs @@ -24,6 +24,21 @@ public partial interface IVoiceboxClient /// Add a generation to a story. /// /// + /// + /// 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> AddStoryItemStoriesStoryIdItemsPostAsResponseAsync( + string storyId, + + global::Voicebox.StoryItemCreate request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Add Story Item
+ /// Add a generation to a story. + ///
+ /// /// /// /// diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ApplyEffectsToGenerationGenerationsGenerationIdVersionsApplyEffectsPost.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ApplyEffectsToGenerationGenerationsGenerationIdVersionsApplyEffectsPost.g.cs index 0f19e8a..60e122b 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ApplyEffectsToGenerationGenerationsGenerationIdVersionsApplyEffectsPost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ApplyEffectsToGenerationGenerationsGenerationIdVersionsApplyEffectsPost.g.cs @@ -24,6 +24,21 @@ public partial interface IVoiceboxClient /// Apply an effects chain to an existing generation, creating a new version. /// /// + /// + /// 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> ApplyEffectsToGenerationGenerationsGenerationIdVersionsApplyEffectsPostAsResponseAsync( + string generationId, + + global::Voicebox.ApplyEffectsRequest request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Apply Effects To Generation
+ /// Apply an effects chain to an existing generation, creating a new version. + ///
+ /// /// /// /// Label for this version (auto-generated if omitted) diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.CancelGenerationGenerateGenerationIdCancelPost.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.CancelGenerationGenerateGenerationIdCancelPost.g.cs index b9a7cda..5918d7c 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.CancelGenerationGenerateGenerationIdCancelPost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.CancelGenerationGenerateGenerationIdCancelPost.g.cs @@ -16,5 +16,17 @@ public partial interface IVoiceboxClient string generationId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Cancel Generation
+ /// Cancel a queued or running generation. + ///
+ /// + /// 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> CancelGenerationGenerateGenerationIdCancelPostAsResponseAsync( + string generationId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.CancelModelDownloadModelsDownloadCancelPost.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.CancelModelDownloadModelsDownloadCancelPost.g.cs index e6cab4e..9604fd9 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.CancelModelDownloadModelsDownloadCancelPost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.CancelModelDownloadModelsDownloadCancelPost.g.cs @@ -21,6 +21,19 @@ public partial interface IVoiceboxClient /// Cancel Model Download
/// Cancel or dismiss an errored/stale download task. /// + /// + /// 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> CancelModelDownloadModelsDownloadCancelPostAsResponseAsync( + + global::Voicebox.ModelDownloadRequest request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Cancel Model Download
+ /// Cancel or dismiss an errored/stale download task. + ///
/// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.CaptureReadinessEndpointCaptureReadinessGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.CaptureReadinessEndpointCaptureReadinessGet.g.cs index af272ed..794bd36 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.CaptureReadinessEndpointCaptureReadinessGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.CaptureReadinessEndpointCaptureReadinessGet.g.cs @@ -18,5 +18,19 @@ public partial interface IVoiceboxClient global::System.Threading.Tasks.Task CaptureReadinessEndpointCaptureReadinessGetAsync( global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Capture Readiness Endpoint
+ /// Whether the STT and LLM models the user has selected are downloaded.
+ /// The frontend gates the global hotkey on this — pressing the chord with
+ /// a missing model would otherwise produce a stuck "transcribing" pill that
+ /// waits forever for a download to finish. Checks on-disk cache, not RAM
+ /// load, so the answer survives backend restarts. + ///
+ /// 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> CaptureReadinessEndpointCaptureReadinessGetAsResponseAsync( + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ClearAllTasksTasksClearPost.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ClearAllTasksTasksClearPost.g.cs index 156ea1e..81df979 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ClearAllTasksTasksClearPost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ClearAllTasksTasksClearPost.g.cs @@ -14,5 +14,15 @@ public partial interface IVoiceboxClient global::System.Threading.Tasks.Task ClearAllTasksTasksClearPostAsync( global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Clear All Tasks
+ /// Clear all download tasks and progress state. + ///
+ /// 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> ClearAllTasksTasksClearPostAsResponseAsync( + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ClearCacheCacheClearPost.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ClearCacheCacheClearPost.g.cs index 5a5813d..82a4cfe 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ClearCacheCacheClearPost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ClearCacheCacheClearPost.g.cs @@ -14,5 +14,15 @@ public partial interface IVoiceboxClient global::System.Threading.Tasks.Task ClearCacheCacheClearPostAsync( global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Clear Cache
+ /// Clear all voice prompt caches (memory and disk). + ///
+ /// 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> ClearCacheCacheClearPostAsResponseAsync( + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ClearFailedGenerationsHistoryFailedDelete.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ClearFailedGenerationsHistoryFailedDelete.g.cs index 2968319..2838173 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ClearFailedGenerationsHistoryFailedDelete.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ClearFailedGenerationsHistoryFailedDelete.g.cs @@ -14,5 +14,15 @@ public partial interface IVoiceboxClient global::System.Threading.Tasks.Task ClearFailedGenerationsHistoryFailedDeleteAsync( global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Clear Failed Generations
+ /// Delete every generation with status='failed'. Used by the UI's 'Clear failed' button (#410). + ///
+ /// 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> ClearFailedGenerationsHistoryFailedDeleteAsResponseAsync( + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ComposeInCharacterProfilesProfileIdComposePost.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ComposeInCharacterProfilesProfileIdComposePost.g.cs index 37e89a3..f371ee7 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ComposeInCharacterProfilesProfileIdComposePost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ComposeInCharacterProfilesProfileIdComposePost.g.cs @@ -16,5 +16,17 @@ public partial interface IVoiceboxClient string profileId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Compose In Character
+ /// Produce a fresh utterance in the profile's character voice. + ///
+ /// + /// 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> ComposeInCharacterProfilesProfileIdComposePostAsResponseAsync( + string profileId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.CreateCaptureEndpointCapturesPost.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.CreateCaptureEndpointCapturesPost.g.cs index f2fafa3..2035268 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.CreateCaptureEndpointCapturesPost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.CreateCaptureEndpointCapturesPost.g.cs @@ -21,6 +21,19 @@ public partial interface IVoiceboxClient /// Create Capture Endpoint
/// Upload audio, run STT, persist the capture. /// + /// + /// 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> CreateCaptureEndpointCapturesPostAsResponseAsync( + + global::Voicebox.BodyCreateCaptureEndpointCapturesPost request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Create Capture Endpoint
+ /// Upload audio, run STT, persist the capture. + ///
/// /// /// @@ -39,5 +52,54 @@ public partial interface IVoiceboxClient string? sttModel = default, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Create Capture Endpoint
+ /// Upload audio, run STT, persist the capture. + ///
+ /// + /// The stream to send as the multipart 'file' file part. + /// + /// + /// + /// + /// Default Value: file + /// + /// + /// 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 CreateCaptureEndpointCapturesPostAsync( + global::System.IO.Stream file, + string filename, + string? language = default, + string? source = default, + string? sttModel = default, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Create Capture Endpoint
+ /// Upload audio, run STT, persist the capture. + ///
+ /// + /// The stream to send as the multipart 'file' file part. + /// + /// + /// + /// + /// Default Value: file + /// + /// + /// 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> CreateCaptureEndpointCapturesPostAsResponseAsync( + global::System.IO.Stream file, + string filename, + string? language = default, + string? source = default, + string? sttModel = default, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.CreateChannelChannelsPost.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.CreateChannelChannelsPost.g.cs index 8338662..aea2e1b 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.CreateChannelChannelsPost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.CreateChannelChannelsPost.g.cs @@ -21,6 +21,19 @@ public partial interface IVoiceboxClient /// Create Channel
/// Create a new audio channel. /// + /// + /// 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> CreateChannelChannelsPostAsResponseAsync( + + global::Voicebox.AudioChannelCreate request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Create Channel
+ /// Create a new audio channel. + ///
/// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.CreateEffectPresetEffectsPresetsPost.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.CreateEffectPresetEffectsPresetsPost.g.cs index 4bf7532..4ec0686 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.CreateEffectPresetEffectsPresetsPost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.CreateEffectPresetEffectsPresetsPost.g.cs @@ -21,6 +21,19 @@ public partial interface IVoiceboxClient /// Create Effect Preset
/// Create a new effect preset. /// + /// + /// 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> CreateEffectPresetEffectsPresetsPostAsResponseAsync( + + global::Voicebox.EffectPresetCreate request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Create Effect Preset
+ /// Create a new effect preset. + ///
/// /// /// diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.CreateProfileProfilesPost.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.CreateProfileProfilesPost.g.cs index 0645a4f..641d23d 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.CreateProfileProfilesPost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.CreateProfileProfilesPost.g.cs @@ -21,6 +21,19 @@ public partial interface IVoiceboxClient /// Create Profile
/// Create a new voice profile. /// + /// + /// 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> CreateProfileProfilesPostAsResponseAsync( + + global::Voicebox.VoiceProfileCreate request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Create Profile
+ /// Create a new voice profile. + ///
/// /// /// diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.CreateStoryStoriesPost.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.CreateStoryStoriesPost.g.cs index edf4fe0..5ba4aba 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.CreateStoryStoriesPost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.CreateStoryStoriesPost.g.cs @@ -21,6 +21,19 @@ public partial interface IVoiceboxClient /// Create Story
/// Create a new story. /// + /// + /// 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> CreateStoryStoriesPostAsResponseAsync( + + global::Voicebox.StoryCreate request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Create Story
+ /// Create a new story. + ///
/// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.DeleteCaptureEndpointCapturesCaptureIdDelete.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.DeleteCaptureEndpointCapturesCaptureIdDelete.g.cs index 0644282..5a6963a 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.DeleteCaptureEndpointCapturesCaptureIdDelete.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.DeleteCaptureEndpointCapturesCaptureIdDelete.g.cs @@ -15,5 +15,16 @@ public partial interface IVoiceboxClient string captureId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete Capture Endpoint + /// + /// + /// 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> DeleteCaptureEndpointCapturesCaptureIdDeleteAsResponseAsync( + string captureId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.DeleteChannelChannelsChannelIdDelete.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.DeleteChannelChannelsChannelIdDelete.g.cs index a4a6cf7..bf4bf5f 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.DeleteChannelChannelsChannelIdDelete.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.DeleteChannelChannelsChannelIdDelete.g.cs @@ -16,5 +16,17 @@ public partial interface IVoiceboxClient string channelId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete Channel
+ /// Delete an audio channel. + ///
+ /// + /// 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> DeleteChannelChannelsChannelIdDeleteAsResponseAsync( + string channelId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.DeleteCudaBackendBackendCudaDelete.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.DeleteCudaBackendBackendCudaDelete.g.cs index 9558ece..0d13a41 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.DeleteCudaBackendBackendCudaDelete.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.DeleteCudaBackendBackendCudaDelete.g.cs @@ -14,5 +14,15 @@ public partial interface IVoiceboxClient global::System.Threading.Tasks.Task DeleteCudaBackendBackendCudaDeleteAsync( global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete Cuda Backend
+ /// Delete the downloaded CUDA backend binary. + ///
+ /// 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> DeleteCudaBackendBackendCudaDeleteAsResponseAsync( + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.DeleteEffectPresetEffectsPresetsPresetIdDelete.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.DeleteEffectPresetEffectsPresetsPresetIdDelete.g.cs index fe5b762..b204762 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.DeleteEffectPresetEffectsPresetsPresetIdDelete.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.DeleteEffectPresetEffectsPresetsPresetIdDelete.g.cs @@ -16,5 +16,17 @@ public partial interface IVoiceboxClient string presetId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete Effect Preset
+ /// Delete a user effect preset. + ///
+ /// + /// 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> DeleteEffectPresetEffectsPresetsPresetIdDeleteAsResponseAsync( + string presetId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.DeleteGenerationHistoryGenerationIdDelete.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.DeleteGenerationHistoryGenerationIdDelete.g.cs index 2bc9705..31592b9 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.DeleteGenerationHistoryGenerationIdDelete.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.DeleteGenerationHistoryGenerationIdDelete.g.cs @@ -16,5 +16,17 @@ public partial interface IVoiceboxClient string generationId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete Generation
+ /// Delete a generation. + ///
+ /// + /// 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> DeleteGenerationHistoryGenerationIdDeleteAsResponseAsync( + string generationId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.DeleteGenerationVersionGenerationsGenerationIdVersionsVersionIdDelete.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.DeleteGenerationVersionGenerationsGenerationIdVersionsVersionIdDelete.g.cs index 1f96eec..54cf3fc 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.DeleteGenerationVersionGenerationsGenerationIdVersionsVersionIdDelete.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.DeleteGenerationVersionGenerationsGenerationIdVersionsVersionIdDelete.g.cs @@ -18,5 +18,19 @@ public partial interface IVoiceboxClient string versionId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete Generation Version
+ /// Delete a version. Cannot delete the last remaining version. + ///
+ /// + /// + /// 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> DeleteGenerationVersionGenerationsGenerationIdVersionsVersionIdDeleteAsResponseAsync( + string generationId, + string versionId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.DeleteMcpBindingMcpBindingsClientIdDelete.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.DeleteMcpBindingMcpBindingsClientIdDelete.g.cs index c20eae7..927a92d 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.DeleteMcpBindingMcpBindingsClientIdDelete.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.DeleteMcpBindingMcpBindingsClientIdDelete.g.cs @@ -15,5 +15,16 @@ public partial interface IVoiceboxClient string clientId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete Mcp Binding + /// + /// + /// 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> DeleteMcpBindingMcpBindingsClientIdDeleteAsResponseAsync( + string clientId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.DeleteModelModelsModelNameDelete.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.DeleteModelModelsModelNameDelete.g.cs index ca3d873..a98aaba 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.DeleteModelModelsModelNameDelete.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.DeleteModelModelsModelNameDelete.g.cs @@ -16,5 +16,17 @@ public partial interface IVoiceboxClient string modelName, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete Model
+ /// Delete a downloaded model from the HuggingFace cache. + ///
+ /// + /// 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> DeleteModelModelsModelNameDeleteAsResponseAsync( + string modelName, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.DeleteProfileAvatarProfilesProfileIdAvatarDelete.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.DeleteProfileAvatarProfilesProfileIdAvatarDelete.g.cs index f5eeb53..646dfe4 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.DeleteProfileAvatarProfilesProfileIdAvatarDelete.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.DeleteProfileAvatarProfilesProfileIdAvatarDelete.g.cs @@ -16,5 +16,17 @@ public partial interface IVoiceboxClient string profileId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete Profile Avatar
+ /// Delete avatar image for a profile. + ///
+ /// + /// 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> DeleteProfileAvatarProfilesProfileIdAvatarDeleteAsResponseAsync( + string profileId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.DeleteProfileProfilesProfileIdDelete.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.DeleteProfileProfilesProfileIdDelete.g.cs index f37bd29..b9af3bb 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.DeleteProfileProfilesProfileIdDelete.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.DeleteProfileProfilesProfileIdDelete.g.cs @@ -16,5 +16,17 @@ public partial interface IVoiceboxClient string profileId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete Profile
+ /// Delete a voice profile. + ///
+ /// + /// 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> DeleteProfileProfilesProfileIdDeleteAsResponseAsync( + string profileId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.DeleteProfileSampleProfilesSamplesSampleIdDelete.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.DeleteProfileSampleProfilesSamplesSampleIdDelete.g.cs index a8998c2..1b45bb6 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.DeleteProfileSampleProfilesSamplesSampleIdDelete.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.DeleteProfileSampleProfilesSamplesSampleIdDelete.g.cs @@ -16,5 +16,17 @@ public partial interface IVoiceboxClient string sampleId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete Profile Sample
+ /// Delete a profile sample. + ///
+ /// + /// 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> DeleteProfileSampleProfilesSamplesSampleIdDeleteAsResponseAsync( + string sampleId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.DeleteStoryStoriesStoryIdDelete.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.DeleteStoryStoriesStoryIdDelete.g.cs index 543f64d..3cd79b2 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.DeleteStoryStoriesStoryIdDelete.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.DeleteStoryStoriesStoryIdDelete.g.cs @@ -16,5 +16,17 @@ public partial interface IVoiceboxClient string storyId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete Story
+ /// Delete a story. + ///
+ /// + /// 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> DeleteStoryStoriesStoryIdDeleteAsResponseAsync( + string storyId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.DownloadCudaBackendBackendDownloadCudaPost.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.DownloadCudaBackendBackendDownloadCudaPost.g.cs index 6d2c0b1..b8a604a 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.DownloadCudaBackendBackendDownloadCudaPost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.DownloadCudaBackendBackendDownloadCudaPost.g.cs @@ -14,5 +14,15 @@ public partial interface IVoiceboxClient global::System.Threading.Tasks.Task DownloadCudaBackendBackendDownloadCudaPostAsync( global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Download Cuda Backend
+ /// Download the CUDA backend binary. + ///
+ /// 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> DownloadCudaBackendBackendDownloadCudaPostAsResponseAsync( + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.DuplicateStoryItemStoriesStoryIdItemsItemIdDuplicatePost.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.DuplicateStoryItemStoriesStoryIdItemsItemIdDuplicatePost.g.cs index 2b4dab8..edf85fa 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.DuplicateStoryItemStoriesStoryIdItemsItemIdDuplicatePost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.DuplicateStoryItemStoriesStoryIdItemsItemIdDuplicatePost.g.cs @@ -18,5 +18,19 @@ public partial interface IVoiceboxClient string itemId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Duplicate Story Item
+ /// Duplicate a story item. + ///
+ /// + /// + /// 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> DuplicateStoryItemStoriesStoryIdItemsItemIdDuplicatePostAsResponseAsync( + string storyId, + string itemId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ExportGenerationAudioHistoryGenerationIdExportAudioGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ExportGenerationAudioHistoryGenerationIdExportAudioGet.g.cs index c599dbb..1aa06fa 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ExportGenerationAudioHistoryGenerationIdExportAudioGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ExportGenerationAudioHistoryGenerationIdExportAudioGet.g.cs @@ -16,5 +16,17 @@ public partial interface IVoiceboxClient string generationId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Export Generation Audio
+ /// Export only the audio file from a generation. + ///
+ /// + /// 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> ExportGenerationAudioHistoryGenerationIdExportAudioGetAsResponseAsync( + string generationId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ExportGenerationHistoryGenerationIdExportGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ExportGenerationHistoryGenerationIdExportGet.g.cs index 17b98aa..f5e0d1b 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ExportGenerationHistoryGenerationIdExportGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ExportGenerationHistoryGenerationIdExportGet.g.cs @@ -16,5 +16,17 @@ public partial interface IVoiceboxClient string generationId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Export Generation
+ /// Export a generation as a ZIP archive. + ///
+ /// + /// 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> ExportGenerationHistoryGenerationIdExportGetAsResponseAsync( + string generationId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ExportProfileProfilesProfileIdExportGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ExportProfileProfilesProfileIdExportGet.g.cs index d4abd79..4cc66ad 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ExportProfileProfilesProfileIdExportGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ExportProfileProfilesProfileIdExportGet.g.cs @@ -16,5 +16,17 @@ public partial interface IVoiceboxClient string profileId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Export Profile
+ /// Export a voice profile as a ZIP archive. + ///
+ /// + /// 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> ExportProfileProfilesProfileIdExportGetAsResponseAsync( + string profileId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ExportStoryAudioStoriesStoryIdExportAudioGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ExportStoryAudioStoriesStoryIdExportAudioGet.g.cs index 6e1b082..ab8cdae 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ExportStoryAudioStoriesStoryIdExportAudioGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ExportStoryAudioStoriesStoryIdExportAudioGet.g.cs @@ -16,5 +16,17 @@ public partial interface IVoiceboxClient string storyId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Export Story Audio
+ /// Export story as single mixed audio file. + ///
+ /// + /// 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> ExportStoryAudioStoriesStoryIdExportAudioGetAsResponseAsync( + string storyId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.FilesystemHealthHealthFilesystemGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.FilesystemHealthHealthFilesystemGet.g.cs index d8b731a..08bbcb5 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.FilesystemHealthHealthFilesystemGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.FilesystemHealthHealthFilesystemGet.g.cs @@ -14,5 +14,15 @@ public partial interface IVoiceboxClient global::System.Threading.Tasks.Task FilesystemHealthHealthFilesystemGetAsync( global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Filesystem Health
+ /// Check filesystem health: directory existence, write permissions, and disk space. + ///
+ /// 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> FilesystemHealthHealthFilesystemGetAsResponseAsync( + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GenerateSpeechGeneratePost.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GenerateSpeechGeneratePost.g.cs index a491d62..f471aa9 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GenerateSpeechGeneratePost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GenerateSpeechGeneratePost.g.cs @@ -21,6 +21,19 @@ public partial interface IVoiceboxClient /// Generate Speech
/// Generate speech from text using a voice profile. /// + /// + /// 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> GenerateSpeechGeneratePostAsResponseAsync( + + global::Voicebox.GenerationRequest request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Generate Speech
+ /// Generate speech from text using a voice profile. + ///
/// /// Crossfade duration in ms between chunks (0 for hard cut)
/// Default Value: 50 diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetActiveTasksTasksActiveGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetActiveTasksTasksActiveGet.g.cs index ee08a98..938f282 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetActiveTasksTasksActiveGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetActiveTasksTasksActiveGet.g.cs @@ -14,5 +14,15 @@ public partial interface IVoiceboxClient global::System.Threading.Tasks.Task GetActiveTasksTasksActiveGetAsync( global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Active Tasks
+ /// Return all currently active downloads and generations. + ///
+ /// 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> GetActiveTasksTasksActiveGetAsResponseAsync( + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetAudioAudioGenerationIdGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetAudioAudioGenerationIdGet.g.cs index 6dbb131..1c8a8e2 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetAudioAudioGenerationIdGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetAudioAudioGenerationIdGet.g.cs @@ -16,5 +16,17 @@ public partial interface IVoiceboxClient string generationId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Audio
+ /// Serve generated audio file (serves the default version). + ///
+ /// + /// 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> GetAudioAudioGenerationIdGetAsResponseAsync( + string generationId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetAvailableEffectsEffectsAvailableGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetAvailableEffectsEffectsAvailableGet.g.cs index 661af6b..cc399fb 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetAvailableEffectsEffectsAvailableGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetAvailableEffectsEffectsAvailableGet.g.cs @@ -14,5 +14,15 @@ public partial interface IVoiceboxClient global::System.Threading.Tasks.Task GetAvailableEffectsEffectsAvailableGetAsync( global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Available Effects
+ /// List all available effect types with parameter definitions. + ///
+ /// 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> GetAvailableEffectsEffectsAvailableGetAsResponseAsync( + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetCaptureAudioEndpointCapturesCaptureIdAudioGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetCaptureAudioEndpointCapturesCaptureIdAudioGet.g.cs index f1ac026..10000e1 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetCaptureAudioEndpointCapturesCaptureIdAudioGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetCaptureAudioEndpointCapturesCaptureIdAudioGet.g.cs @@ -16,5 +16,17 @@ public partial interface IVoiceboxClient string captureId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Capture Audio Endpoint
+ /// Stream the original capture audio file. + ///
+ /// + /// 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> GetCaptureAudioEndpointCapturesCaptureIdAudioGetAsResponseAsync( + string captureId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetCaptureEndpointCapturesCaptureIdGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetCaptureEndpointCapturesCaptureIdGet.g.cs index 56cbd8d..64bb658 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetCaptureEndpointCapturesCaptureIdGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetCaptureEndpointCapturesCaptureIdGet.g.cs @@ -15,5 +15,16 @@ public partial interface IVoiceboxClient string captureId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Capture Endpoint + /// + /// + /// 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> GetCaptureEndpointCapturesCaptureIdGetAsResponseAsync( + string captureId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetCaptureSettingsEndpointSettingsCapturesGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetCaptureSettingsEndpointSettingsCapturesGet.g.cs index 7aa51fd..74a76f6 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetCaptureSettingsEndpointSettingsCapturesGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetCaptureSettingsEndpointSettingsCapturesGet.g.cs @@ -13,5 +13,14 @@ public partial interface IVoiceboxClient global::System.Threading.Tasks.Task GetCaptureSettingsEndpointSettingsCapturesGetAsync( global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Capture Settings Endpoint + /// + /// 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> GetCaptureSettingsEndpointSettingsCapturesGetAsResponseAsync( + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetChannelChannelsChannelIdGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetChannelChannelsChannelIdGet.g.cs index 59b28cf..4eab69b 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetChannelChannelsChannelIdGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetChannelChannelsChannelIdGet.g.cs @@ -16,5 +16,17 @@ public partial interface IVoiceboxClient string channelId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Channel
+ /// Get an audio channel by ID. + ///
+ /// + /// 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> GetChannelChannelsChannelIdGetAsResponseAsync( + string channelId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetChannelVoicesChannelsChannelIdVoicesGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetChannelVoicesChannelsChannelIdVoicesGet.g.cs index 584aac0..c4d85b7 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetChannelVoicesChannelsChannelIdVoicesGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetChannelVoicesChannelsChannelIdVoicesGet.g.cs @@ -16,5 +16,17 @@ public partial interface IVoiceboxClient string channelId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Channel Voices
+ /// Get list of profile IDs assigned to a channel. + ///
+ /// + /// 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> GetChannelVoicesChannelsChannelIdVoicesGetAsResponseAsync( + string channelId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetCudaDownloadProgressBackendCudaProgressGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetCudaDownloadProgressBackendCudaProgressGet.g.cs index 672c582..3b90659 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetCudaDownloadProgressBackendCudaProgressGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetCudaDownloadProgressBackendCudaProgressGet.g.cs @@ -14,5 +14,15 @@ public partial interface IVoiceboxClient global::System.Threading.Tasks.Task GetCudaDownloadProgressBackendCudaProgressGetAsync( global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Cuda Download Progress
+ /// Get CUDA backend download progress via Server-Sent Events. + ///
+ /// 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> GetCudaDownloadProgressBackendCudaProgressGetAsResponseAsync( + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetCudaStatusBackendCudaStatusGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetCudaStatusBackendCudaStatusGet.g.cs index bcb2ca6..04099f8 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetCudaStatusBackendCudaStatusGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetCudaStatusBackendCudaStatusGet.g.cs @@ -14,5 +14,15 @@ public partial interface IVoiceboxClient global::System.Threading.Tasks.Task GetCudaStatusBackendCudaStatusGetAsync( global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Cuda Status
+ /// Get CUDA backend download/availability status. + ///
+ /// 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> GetCudaStatusBackendCudaStatusGetAsResponseAsync( + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetEffectPresetEffectsPresetsPresetIdGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetEffectPresetEffectsPresetsPresetIdGet.g.cs index d95f5b2..706de8d 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetEffectPresetEffectsPresetsPresetIdGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetEffectPresetEffectsPresetsPresetIdGet.g.cs @@ -16,5 +16,17 @@ public partial interface IVoiceboxClient string presetId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Effect Preset
+ /// Get a specific effect preset. + ///
+ /// + /// 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> GetEffectPresetEffectsPresetsPresetIdGetAsResponseAsync( + string presetId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetGenerationHistoryGenerationIdGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetGenerationHistoryGenerationIdGet.g.cs index ffc7763..414765f 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetGenerationHistoryGenerationIdGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetGenerationHistoryGenerationIdGet.g.cs @@ -16,5 +16,17 @@ public partial interface IVoiceboxClient string generationId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Generation
+ /// Get a generation by ID. + ///
+ /// + /// 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> GetGenerationHistoryGenerationIdGetAsResponseAsync( + string generationId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetGenerationSettingsEndpointSettingsGenerationGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetGenerationSettingsEndpointSettingsGenerationGet.g.cs index 80ea522..f703cd8 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetGenerationSettingsEndpointSettingsGenerationGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetGenerationSettingsEndpointSettingsGenerationGet.g.cs @@ -13,5 +13,14 @@ public partial interface IVoiceboxClient global::System.Threading.Tasks.Task GetGenerationSettingsEndpointSettingsGenerationGetAsync( global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Generation Settings Endpoint + /// + /// 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> GetGenerationSettingsEndpointSettingsGenerationGetAsResponseAsync( + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetGenerationStatusGenerateGenerationIdStatusGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetGenerationStatusGenerateGenerationIdStatusGet.g.cs index d1e0f46..582253f 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetGenerationStatusGenerateGenerationIdStatusGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetGenerationStatusGenerateGenerationIdStatusGet.g.cs @@ -16,5 +16,17 @@ public partial interface IVoiceboxClient string generationId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Generation Status
+ /// SSE endpoint that streams generation status updates. + ///
+ /// + /// 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> GetGenerationStatusGenerateGenerationIdStatusGetAsResponseAsync( + string generationId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetMigrationProgressModelsMigrateProgressGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetMigrationProgressModelsMigrateProgressGet.g.cs index 4b4b0e8..7f617d0 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetMigrationProgressModelsMigrateProgressGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetMigrationProgressModelsMigrateProgressGet.g.cs @@ -14,5 +14,15 @@ public partial interface IVoiceboxClient global::System.Threading.Tasks.Task GetMigrationProgressModelsMigrateProgressGetAsync( global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Migration Progress
+ /// Get model migration progress via Server-Sent Events. + ///
+ /// 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> GetMigrationProgressModelsMigrateProgressGetAsResponseAsync( + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetModelProgressModelsProgressModelNameGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetModelProgressModelsProgressModelNameGet.g.cs index d0c9939..b15778c 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetModelProgressModelsProgressModelNameGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetModelProgressModelsProgressModelNameGet.g.cs @@ -16,5 +16,17 @@ public partial interface IVoiceboxClient string modelName, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Model Progress
+ /// Get model download progress via Server-Sent Events. + ///
+ /// + /// 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> GetModelProgressModelsProgressModelNameGetAsResponseAsync( + string modelName, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetModelStatusModelsStatusGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetModelStatusModelsStatusGet.g.cs index 0b4cd7b..5a1a8e5 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetModelStatusModelsStatusGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetModelStatusModelsStatusGet.g.cs @@ -14,5 +14,15 @@ public partial interface IVoiceboxClient global::System.Threading.Tasks.Task GetModelStatusModelsStatusGetAsync( global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Model Status
+ /// Get status of all available models. + ///
+ /// 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> GetModelStatusModelsStatusGetAsResponseAsync( + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetModelsCacheDirModelsCacheDirGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetModelsCacheDirModelsCacheDirGet.g.cs index 3e8d508..e98cae4 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetModelsCacheDirModelsCacheDirGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetModelsCacheDirModelsCacheDirGet.g.cs @@ -14,5 +14,15 @@ public partial interface IVoiceboxClient global::System.Threading.Tasks.Task GetModelsCacheDirModelsCacheDirGetAsync( global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Models Cache Dir
+ /// Get the path to the HuggingFace model cache directory. + ///
+ /// 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> GetModelsCacheDirModelsCacheDirGetAsResponseAsync( + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetProfileAvatarProfilesProfileIdAvatarGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetProfileAvatarProfilesProfileIdAvatarGet.g.cs index 72a76b1..e97e085 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetProfileAvatarProfilesProfileIdAvatarGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetProfileAvatarProfilesProfileIdAvatarGet.g.cs @@ -16,5 +16,17 @@ public partial interface IVoiceboxClient string profileId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Profile Avatar
+ /// Get avatar image for a profile. + ///
+ /// + /// 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> GetProfileAvatarProfilesProfileIdAvatarGetAsResponseAsync( + string profileId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetProfileChannelsProfilesProfileIdChannelsGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetProfileChannelsProfilesProfileIdChannelsGet.g.cs index 60b2c26..eb9ab3a 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetProfileChannelsProfilesProfileIdChannelsGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetProfileChannelsProfilesProfileIdChannelsGet.g.cs @@ -16,5 +16,17 @@ public partial interface IVoiceboxClient string profileId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Profile Channels
+ /// Get list of channel IDs assigned to a profile. + ///
+ /// + /// 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> GetProfileChannelsProfilesProfileIdChannelsGetAsResponseAsync( + string profileId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetProfileProfilesProfileIdGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetProfileProfilesProfileIdGet.g.cs index fcf12b0..8834454 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetProfileProfilesProfileIdGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetProfileProfilesProfileIdGet.g.cs @@ -16,5 +16,17 @@ public partial interface IVoiceboxClient string profileId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Profile
+ /// Get a voice profile by ID. + ///
+ /// + /// 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> GetProfileProfilesProfileIdGetAsResponseAsync( + string profileId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetProfileSamplesProfilesProfileIdSamplesGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetProfileSamplesProfilesProfileIdSamplesGet.g.cs index 81847b1..d18aedd 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetProfileSamplesProfilesProfileIdSamplesGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetProfileSamplesProfilesProfileIdSamplesGet.g.cs @@ -16,5 +16,17 @@ public partial interface IVoiceboxClient string profileId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Profile Samples
+ /// Get all samples for a profile. + ///
+ /// + /// 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>> GetProfileSamplesProfilesProfileIdSamplesGetAsResponseAsync( + string profileId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetSampleAudioSamplesSampleIdGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetSampleAudioSamplesSampleIdGet.g.cs index c1c9912..6d0cb0b 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetSampleAudioSamplesSampleIdGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetSampleAudioSamplesSampleIdGet.g.cs @@ -16,5 +16,17 @@ public partial interface IVoiceboxClient string sampleId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Sample Audio
+ /// Serve profile sample audio file. + ///
+ /// + /// 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> GetSampleAudioSamplesSampleIdGetAsResponseAsync( + string sampleId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetStatsHistoryStatsGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetStatsHistoryStatsGet.g.cs index d7f8a52..7b2ac6a 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetStatsHistoryStatsGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetStatsHistoryStatsGet.g.cs @@ -14,5 +14,15 @@ public partial interface IVoiceboxClient global::System.Threading.Tasks.Task GetStatsHistoryStatsGetAsync( global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Stats
+ /// Get generation statistics. + ///
+ /// 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> GetStatsHistoryStatsGetAsResponseAsync( + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetStoryStoriesStoryIdGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetStoryStoriesStoryIdGet.g.cs index ae305ca..ae10676 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetStoryStoriesStoryIdGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetStoryStoriesStoryIdGet.g.cs @@ -16,5 +16,17 @@ public partial interface IVoiceboxClient string storyId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Story
+ /// Get a story with all its items. + ///
+ /// + /// 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> GetStoryStoriesStoryIdGetAsResponseAsync( + string storyId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetVersionAudioAudioVersionVersionIdGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetVersionAudioAudioVersionVersionIdGet.g.cs index c9658ea..4492f9a 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetVersionAudioAudioVersionVersionIdGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.GetVersionAudioAudioVersionVersionIdGet.g.cs @@ -16,5 +16,17 @@ public partial interface IVoiceboxClient string versionId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Version Audio
+ /// Serve audio for a specific version. + ///
+ /// + /// 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> GetVersionAudioAudioVersionVersionIdGetAsResponseAsync( + string versionId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.HealthHealthGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.HealthHealthGet.g.cs index eb75114..dce7985 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.HealthHealthGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.HealthHealthGet.g.cs @@ -14,5 +14,15 @@ public partial interface IVoiceboxClient global::System.Threading.Tasks.Task HealthHealthGetAsync( global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Health
+ /// Health check endpoint. + ///
+ /// 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> HealthHealthGetAsResponseAsync( + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ImportAudioGenerateImportPost.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ImportAudioGenerateImportPost.g.cs index 92a2ac1..3e7684e 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ImportAudioGenerateImportPost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ImportAudioGenerateImportPost.g.cs @@ -27,6 +27,22 @@ public partial interface IVoiceboxClient /// non-TTS audio. The row points at a singleton "Imported Audio" profile
/// so the existing generation/story plumbing keeps working unchanged. /// + /// + /// 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> ImportAudioGenerateImportPostAsResponseAsync( + + global::Voicebox.BodyImportAudioGenerateImportPost request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Import Audio
+ /// Register an external audio file as a generation row.
+ /// Designed for the story timeline so users can drop in music or other
+ /// non-TTS audio. The row points at a singleton "Imported Audio" profile
+ /// so the existing generation/story plumbing keeps working unchanged. + ///
/// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. @@ -37,5 +53,44 @@ public partial interface IVoiceboxClient string filename, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Import Audio
+ /// Register an external audio file as a generation row.
+ /// Designed for the story timeline so users can drop in music or other
+ /// non-TTS audio. The row points at a singleton "Imported Audio" profile
+ /// so the existing generation/story plumbing keeps working unchanged. + ///
+ /// + /// The stream to send as the multipart 'file' file part. + /// + /// + /// 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 ImportAudioGenerateImportPostAsync( + global::System.IO.Stream file, + string filename, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Import Audio
+ /// Register an external audio file as a generation row.
+ /// Designed for the story timeline so users can drop in music or other
+ /// non-TTS audio. The row points at a singleton "Imported Audio" profile
+ /// so the existing generation/story plumbing keeps working unchanged. + ///
+ /// + /// The stream to send as the multipart 'file' file part. + /// + /// + /// 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> ImportAudioGenerateImportPostAsResponseAsync( + global::System.IO.Stream file, + string filename, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ImportGenerationHistoryImportPost.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ImportGenerationHistoryImportPost.g.cs index b73fbf0..7546910 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ImportGenerationHistoryImportPost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ImportGenerationHistoryImportPost.g.cs @@ -21,6 +21,19 @@ public partial interface IVoiceboxClient /// Import Generation
/// Import a generation from a ZIP archive. /// + /// + /// 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> ImportGenerationHistoryImportPostAsResponseAsync( + + global::Voicebox.BodyImportGenerationHistoryImportPost request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Import Generation
+ /// Import a generation from a ZIP archive. + ///
/// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. @@ -31,5 +44,38 @@ public partial interface IVoiceboxClient string filename, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Import Generation
+ /// Import a generation from a ZIP archive. + ///
+ /// + /// The stream to send as the multipart 'file' file part. + /// + /// + /// 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 ImportGenerationHistoryImportPostAsync( + global::System.IO.Stream file, + string filename, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Import Generation
+ /// Import a generation from a ZIP archive. + ///
+ /// + /// The stream to send as the multipart 'file' file part. + /// + /// + /// 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> ImportGenerationHistoryImportPostAsResponseAsync( + global::System.IO.Stream file, + string filename, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ImportProfileProfilesImportPost.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ImportProfileProfilesImportPost.g.cs index 7cfb600..0fddbb8 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ImportProfileProfilesImportPost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ImportProfileProfilesImportPost.g.cs @@ -21,6 +21,19 @@ public partial interface IVoiceboxClient /// Import Profile
/// Import a voice profile from a ZIP archive. /// + /// + /// 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> ImportProfileProfilesImportPostAsResponseAsync( + + global::Voicebox.BodyImportProfileProfilesImportPost request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Import Profile
+ /// Import a voice profile from a ZIP archive. + ///
/// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. @@ -31,5 +44,38 @@ public partial interface IVoiceboxClient string filename, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Import Profile
+ /// Import a voice profile from a ZIP archive. + ///
+ /// + /// The stream to send as the multipart 'file' file part. + /// + /// + /// 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 ImportProfileProfilesImportPostAsync( + global::System.IO.Stream file, + string filename, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Import Profile
+ /// Import a voice profile from a ZIP archive. + ///
+ /// + /// The stream to send as the multipart 'file' file part. + /// + /// + /// 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> ImportProfileProfilesImportPostAsResponseAsync( + global::System.IO.Stream file, + string filename, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ListCapturesEndpointCapturesGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ListCapturesEndpointCapturesGet.g.cs index 92d3bff..1338bd4 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ListCapturesEndpointCapturesGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ListCapturesEndpointCapturesGet.g.cs @@ -21,5 +21,22 @@ public partial interface IVoiceboxClient int? offset = default, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List Captures Endpoint + /// + /// + /// Default Value: 50 + /// + /// + /// Default Value: 0 + /// + /// 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> ListCapturesEndpointCapturesGetAsResponseAsync( + int? limit = default, + int? offset = default, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ListChannelsChannelsGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ListChannelsChannelsGet.g.cs index 216d8b8..586e884 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ListChannelsChannelsGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ListChannelsChannelsGet.g.cs @@ -14,5 +14,15 @@ public partial interface IVoiceboxClient global::System.Threading.Tasks.Task> ListChannelsChannelsGetAsync( global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List Channels
+ /// List all audio channels. + ///
+ /// 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>> ListChannelsChannelsGetAsResponseAsync( + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ListEffectPresetsEffectsPresetsGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ListEffectPresetsEffectsPresetsGet.g.cs index ce13fda..3f2f5c9 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ListEffectPresetsEffectsPresetsGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ListEffectPresetsEffectsPresetsGet.g.cs @@ -14,5 +14,15 @@ public partial interface IVoiceboxClient global::System.Threading.Tasks.Task> ListEffectPresetsEffectsPresetsGetAsync( global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List Effect Presets
+ /// List all effect presets (built-in + user-created). + ///
+ /// 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>> ListEffectPresetsEffectsPresetsGetAsResponseAsync( + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ListGenerationVersionsGenerationsGenerationIdVersionsGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ListGenerationVersionsGenerationsGenerationIdVersionsGet.g.cs index fc19c14..a692db8 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ListGenerationVersionsGenerationsGenerationIdVersionsGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ListGenerationVersionsGenerationsGenerationIdVersionsGet.g.cs @@ -16,5 +16,17 @@ public partial interface IVoiceboxClient string generationId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List Generation Versions
+ /// List all versions for a generation. + ///
+ /// + /// 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>> ListGenerationVersionsGenerationsGenerationIdVersionsGetAsResponseAsync( + string generationId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ListHistoryHistoryGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ListHistoryHistoryGet.g.cs index 402884d..9b88470 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ListHistoryHistoryGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ListHistoryHistoryGet.g.cs @@ -26,5 +26,27 @@ public partial interface IVoiceboxClient int? offset = default, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List History
+ /// List generation history with optional filters. + ///
+ /// + /// + /// + /// Default Value: 50 + /// + /// + /// Default Value: 0 + /// + /// 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> ListHistoryHistoryGetAsResponseAsync( + string? profileId = default, + string? search = default, + int? limit = default, + int? offset = default, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ListMcpBindingsMcpBindingsGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ListMcpBindingsMcpBindingsGet.g.cs index a3eee20..c3f90a8 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ListMcpBindingsMcpBindingsGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ListMcpBindingsMcpBindingsGet.g.cs @@ -13,5 +13,14 @@ public partial interface IVoiceboxClient global::System.Threading.Tasks.Task ListMcpBindingsMcpBindingsGetAsync( global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List Mcp Bindings + /// + /// 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> ListMcpBindingsMcpBindingsGetAsResponseAsync( + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ListPresetVoicesProfilesPresetsEngineGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ListPresetVoicesProfilesPresetsEngineGet.g.cs index 3dfc1a8..d49ceaf 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ListPresetVoicesProfilesPresetsEngineGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ListPresetVoicesProfilesPresetsEngineGet.g.cs @@ -16,5 +16,17 @@ public partial interface IVoiceboxClient string engine, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List Preset Voices
+ /// List available preset voices for an engine. + ///
+ /// + /// 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> ListPresetVoicesProfilesPresetsEngineGetAsResponseAsync( + string engine, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ListProfilesProfilesGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ListProfilesProfilesGet.g.cs index ea017b7..c43d81d 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ListProfilesProfilesGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ListProfilesProfilesGet.g.cs @@ -14,5 +14,15 @@ public partial interface IVoiceboxClient global::System.Threading.Tasks.Task> ListProfilesProfilesGetAsync( global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List Profiles
+ /// List all voice profiles. + ///
+ /// 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>> ListProfilesProfilesGetAsResponseAsync( + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ListStoriesStoriesGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ListStoriesStoriesGet.g.cs index b673948..17dc9f6 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ListStoriesStoriesGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ListStoriesStoriesGet.g.cs @@ -14,5 +14,15 @@ public partial interface IVoiceboxClient global::System.Threading.Tasks.Task> ListStoriesStoriesGetAsync( global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List Stories
+ /// List all stories. + ///
+ /// 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>> ListStoriesStoriesGetAsResponseAsync( + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.LlmGenerateLlmGeneratePost.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.LlmGenerateLlmGeneratePost.g.cs index 7af8eb5..10a8b94 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.LlmGenerateLlmGeneratePost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.LlmGenerateLlmGeneratePost.g.cs @@ -21,6 +21,19 @@ public partial interface IVoiceboxClient /// Llm Generate
/// Run a single-turn Qwen3 completion. /// + /// + /// 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> LlmGenerateLlmGeneratePostAsResponseAsync( + + global::Voicebox.LLMGenerateRequest request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Llm Generate
+ /// Run a single-turn Qwen3 completion. + ///
/// /// /// Default Value: 512 diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.LoadModelModelsLoadPost.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.LoadModelModelsLoadPost.g.cs index 3aa60fb..dba49ed 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.LoadModelModelsLoadPost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.LoadModelModelsLoadPost.g.cs @@ -18,5 +18,19 @@ public partial interface IVoiceboxClient string? modelSize = default, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Load Model
+ /// Manually load TTS model. + ///
+ /// + /// Default Value: 1.7B + /// + /// 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> LoadModelModelsLoadPostAsResponseAsync( + string? modelSize = default, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.MigrateModelsModelsMigratePost.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.MigrateModelsModelsMigratePost.g.cs index d5f17c6..393cf99 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.MigrateModelsModelsMigratePost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.MigrateModelsModelsMigratePost.g.cs @@ -21,6 +21,19 @@ public partial interface IVoiceboxClient /// Migrate Models
/// Move all downloaded models to a new directory with byte-level progress via SSE. /// + /// + /// 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> MigrateModelsModelsMigratePostAsResponseAsync( + + global::Voicebox.ModelMigrateRequest request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Migrate Models
+ /// Move all downloaded models to a new directory with byte-level progress via SSE. + ///
/// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.MoveStoryItemStoriesStoryIdItemsItemIdMovePut.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.MoveStoryItemStoriesStoryIdItemsItemIdMovePut.g.cs index 36de6be..7193b1f 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.MoveStoryItemStoriesStoryIdItemsItemIdMovePut.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.MoveStoryItemStoriesStoryIdItemsItemIdMovePut.g.cs @@ -27,6 +27,23 @@ public partial interface IVoiceboxClient /// /// /// + /// + /// 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> MoveStoryItemStoriesStoryIdItemsItemIdMovePutAsResponseAsync( + string storyId, + string itemId, + + global::Voicebox.StoryItemMove request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Move Story Item
+ /// Move a story item (update position and/or track). + ///
+ /// + /// /// /// /// Default Value: 0 diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.PreviewEffectsEffectsPreviewGenerationIdPost.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.PreviewEffectsEffectsPreviewGenerationIdPost.g.cs index dc82041..d264e91 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.PreviewEffectsEffectsPreviewGenerationIdPost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.PreviewEffectsEffectsPreviewGenerationIdPost.g.cs @@ -24,6 +24,21 @@ public partial interface IVoiceboxClient /// Apply effects to a generation's clean audio and stream back without saving. /// /// + /// + /// 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> PreviewEffectsEffectsPreviewGenerationIdPostAsResponseAsync( + string generationId, + + global::Voicebox.ApplyEffectsRequest request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Preview Effects
+ /// Apply effects to a generation's clean audio and stream back without saving. + ///
+ /// /// /// /// Label for this version (auto-generated if omitted) diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.RefineCaptureEndpointCapturesCaptureIdRefinePost.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.RefineCaptureEndpointCapturesCaptureIdRefinePost.g.cs index b5e1229..9f186a3 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.RefineCaptureEndpointCapturesCaptureIdRefinePost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.RefineCaptureEndpointCapturesCaptureIdRefinePost.g.cs @@ -22,6 +22,20 @@ public partial interface IVoiceboxClient /// Refine Capture Endpoint /// /// + /// + /// 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> RefineCaptureEndpointCapturesCaptureIdRefinePostAsResponseAsync( + string captureId, + + global::Voicebox.CaptureRefineRequest request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Refine Capture Endpoint + /// + /// /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.RegenerateGenerationGenerateGenerationIdRegeneratePost.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.RegenerateGenerationGenerateGenerationIdRegeneratePost.g.cs index 059f2b1..ad7dc62 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.RegenerateGenerationGenerateGenerationIdRegeneratePost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.RegenerateGenerationGenerateGenerationIdRegeneratePost.g.cs @@ -16,5 +16,17 @@ public partial interface IVoiceboxClient string generationId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Regenerate Generation
+ /// Re-run TTS with the same parameters and save the result as a new version. + ///
+ /// + /// 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> RegenerateGenerationGenerateGenerationIdRegeneratePostAsResponseAsync( + string generationId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.RemoveStoryItemStoriesStoryIdItemsItemIdDelete.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.RemoveStoryItemStoriesStoryIdItemsItemIdDelete.g.cs index 0e04f80..6b5462b 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.RemoveStoryItemStoriesStoryIdItemsItemIdDelete.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.RemoveStoryItemStoriesStoryIdItemsItemIdDelete.g.cs @@ -18,5 +18,19 @@ public partial interface IVoiceboxClient string itemId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Remove Story Item
+ /// Remove a story item from a story. + ///
+ /// + /// + /// 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> RemoveStoryItemStoriesStoryIdItemsItemIdDeleteAsResponseAsync( + string storyId, + string itemId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ReorderStoryItemsStoriesStoryIdItemsReorderPut.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ReorderStoryItemsStoriesStoryIdItemsReorderPut.g.cs index 08b313c..b0c6d57 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ReorderStoryItemsStoriesStoryIdItemsReorderPut.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ReorderStoryItemsStoriesStoryIdItemsReorderPut.g.cs @@ -24,6 +24,21 @@ public partial interface IVoiceboxClient /// Reorder story items and recalculate timecodes. /// /// + /// + /// 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>> ReorderStoryItemsStoriesStoryIdItemsReorderPutAsResponseAsync( + string storyId, + + global::Voicebox.StoryItemReorder request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Reorder Story Items
+ /// Reorder story items and recalculate timecodes. + ///
+ /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.RetranscribeCaptureEndpointCapturesCaptureIdRetranscribePost.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.RetranscribeCaptureEndpointCapturesCaptureIdRetranscribePost.g.cs index 95c44c7..fc4fdb6 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.RetranscribeCaptureEndpointCapturesCaptureIdRetranscribePost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.RetranscribeCaptureEndpointCapturesCaptureIdRetranscribePost.g.cs @@ -22,6 +22,20 @@ public partial interface IVoiceboxClient /// Retranscribe Capture Endpoint /// /// + /// + /// 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> RetranscribeCaptureEndpointCapturesCaptureIdRetranscribePostAsResponseAsync( + string captureId, + + global::Voicebox.CaptureRetranscribeRequest request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Retranscribe Capture Endpoint + /// + /// /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.RetryGenerationGenerateGenerationIdRetryPost.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.RetryGenerationGenerateGenerationIdRetryPost.g.cs index db02f04..d2251c8 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.RetryGenerationGenerateGenerationIdRetryPost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.RetryGenerationGenerateGenerationIdRetryPost.g.cs @@ -16,5 +16,17 @@ public partial interface IVoiceboxClient string generationId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Retry Generation
+ /// Retry a failed generation using the same parameters. + ///
+ /// + /// 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> RetryGenerationGenerateGenerationIdRetryPostAsResponseAsync( + string generationId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.RootGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.RootGet.g.cs index 622d974..11812e0 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.RootGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.RootGet.g.cs @@ -14,5 +14,15 @@ public partial interface IVoiceboxClient global::System.Threading.Tasks.Task RootGetAsync( global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Root
+ /// Root endpoint — serves SPA index.html in Docker, JSON otherwise. + ///
+ /// 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> RootGetAsResponseAsync( + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.SetChannelVoicesChannelsChannelIdVoicesPut.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.SetChannelVoicesChannelsChannelIdVoicesPut.g.cs index efdf1ee..de0d4f3 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.SetChannelVoicesChannelsChannelIdVoicesPut.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.SetChannelVoicesChannelsChannelIdVoicesPut.g.cs @@ -24,6 +24,21 @@ public partial interface IVoiceboxClient /// Set which voices are assigned to a channel. /// /// + /// + /// 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> SetChannelVoicesChannelsChannelIdVoicesPutAsResponseAsync( + string channelId, + + global::Voicebox.ChannelVoiceAssignment request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Set Channel Voices
+ /// Set which voices are assigned to a channel. + ///
+ /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.SetDefaultVersionGenerationsGenerationIdVersionsVersionIdSetDefaultPut.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.SetDefaultVersionGenerationsGenerationIdVersionsVersionIdSetDefaultPut.g.cs index ae6db8d..c083025 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.SetDefaultVersionGenerationsGenerationIdVersionsVersionIdSetDefaultPut.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.SetDefaultVersionGenerationsGenerationIdVersionsVersionIdSetDefaultPut.g.cs @@ -18,5 +18,19 @@ public partial interface IVoiceboxClient string versionId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Set Default Version
+ /// Set a specific version as the default for a generation. + ///
+ /// + /// + /// 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> SetDefaultVersionGenerationsGenerationIdVersionsVersionIdSetDefaultPutAsResponseAsync( + string generationId, + string versionId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.SetProfileChannelsProfilesProfileIdChannelsPut.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.SetProfileChannelsProfilesProfileIdChannelsPut.g.cs index 80a05fa..506b3a3 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.SetProfileChannelsProfilesProfileIdChannelsPut.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.SetProfileChannelsProfilesProfileIdChannelsPut.g.cs @@ -24,6 +24,21 @@ public partial interface IVoiceboxClient /// Set which channels a profile is assigned to. /// /// + /// + /// 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> SetProfileChannelsProfilesProfileIdChannelsPutAsResponseAsync( + string profileId, + + global::Voicebox.ProfileChannelAssignment request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Set Profile Channels
+ /// Set which channels a profile is assigned to. + ///
+ /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.SetStoryItemVersionStoriesStoryIdItemsItemIdVersionPut.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.SetStoryItemVersionStoriesStoryIdItemsItemIdVersionPut.g.cs index ba692e9..a6df2ec 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.SetStoryItemVersionStoriesStoryIdItemsItemIdVersionPut.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.SetStoryItemVersionStoriesStoryIdItemsItemIdVersionPut.g.cs @@ -27,6 +27,23 @@ public partial interface IVoiceboxClient /// /// /// + /// + /// 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> SetStoryItemVersionStoriesStoryIdItemsItemIdVersionPutAsResponseAsync( + string storyId, + string itemId, + + global::Voicebox.StoryItemVersionUpdate request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Set Story Item Version
+ /// Pin a story item to a specific generation version. + ///
+ /// + /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ShutdownShutdownPost.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ShutdownShutdownPost.g.cs index d844b83..db021d9 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ShutdownShutdownPost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ShutdownShutdownPost.g.cs @@ -14,5 +14,15 @@ public partial interface IVoiceboxClient global::System.Threading.Tasks.Task ShutdownShutdownPostAsync( global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Shutdown
+ /// Gracefully shutdown the server. + ///
+ /// 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> ShutdownShutdownPostAsResponseAsync( + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.SpeakEventsEventsSpeakGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.SpeakEventsEventsSpeakGet.g.cs index f4d1a16..847ece7 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.SpeakEventsEventsSpeakGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.SpeakEventsEventsSpeakGet.g.cs @@ -14,5 +14,15 @@ public partial interface IVoiceboxClient global::System.Threading.Tasks.Task SpeakEventsEventsSpeakGetAsync( global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Speak Events
+ /// SSE stream of speak-start / speak-end events. + ///
+ /// 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> SpeakEventsEventsSpeakGetAsResponseAsync( + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.SpeakSpeakPost.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.SpeakSpeakPost.g.cs index 195047d..ceb7192 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.SpeakSpeakPost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.SpeakSpeakPost.g.cs @@ -27,6 +27,22 @@ public partial interface IVoiceboxClient /// ``status="generating"`` and an ``id`` the caller polls at
/// ``GET /generate/{id}/status``. /// + /// + /// 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> SpeakSpeakPostAsResponseAsync( + + global::Voicebox.SpeakRequest request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Speak
+ /// Speak text in a voice profile. Mirrors voicebox.speak (MCP).
+ /// Response shape matches POST /generate — a ``GenerationResponse`` with
+ /// ``status="generating"`` and an ``id`` the caller polls at
+ /// ``GET /generate/{id}/status``. + ///
/// /// /// diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.SplitStoryItemStoriesStoryIdItemsItemIdSplitPost.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.SplitStoryItemStoriesStoryIdItemsItemIdSplitPost.g.cs index 2155b2c..1108ced 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.SplitStoryItemStoriesStoryIdItemsItemIdSplitPost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.SplitStoryItemStoriesStoryIdItemsItemIdSplitPost.g.cs @@ -27,6 +27,23 @@ public partial interface IVoiceboxClient /// /// /// + /// + /// 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>> SplitStoryItemStoriesStoryIdItemsItemIdSplitPostAsResponseAsync( + string storyId, + string itemId, + + global::Voicebox.StoryItemSplit request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Split Story Item
+ /// Split a story item at a given time, creating two clips. + ///
+ /// + /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.StreamSpeechGenerateStreamPost.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.StreamSpeechGenerateStreamPost.g.cs index f5b6dd9..7dc4bff 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.StreamSpeechGenerateStreamPost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.StreamSpeechGenerateStreamPost.g.cs @@ -21,6 +21,19 @@ public partial interface IVoiceboxClient /// Stream Speech
/// Generate speech and stream the WAV audio directly without saving to disk. /// + /// + /// 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> StreamSpeechGenerateStreamPostAsResponseAsync( + + global::Voicebox.GenerationRequest request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Stream Speech
+ /// Generate speech and stream the WAV audio directly without saving to disk. + ///
/// /// Crossfade duration in ms between chunks (0 for hard cut)
/// Default Value: 50 diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ToggleFavoriteHistoryGenerationIdFavoritePost.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ToggleFavoriteHistoryGenerationIdFavoritePost.g.cs index efdb717..95b6fcd 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ToggleFavoriteHistoryGenerationIdFavoritePost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.ToggleFavoriteHistoryGenerationIdFavoritePost.g.cs @@ -16,5 +16,17 @@ public partial interface IVoiceboxClient string generationId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Toggle Favorite
+ /// Toggle the favorite status of a generation. + ///
+ /// + /// 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> ToggleFavoriteHistoryGenerationIdFavoritePostAsResponseAsync( + string generationId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.TranscribeAudioTranscribePost.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.TranscribeAudioTranscribePost.g.cs index d2cc68e..32761dc 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.TranscribeAudioTranscribePost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.TranscribeAudioTranscribePost.g.cs @@ -21,6 +21,19 @@ public partial interface IVoiceboxClient /// Transcribe Audio
/// Transcribe audio file to text. /// + /// + /// 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> TranscribeAudioTranscribePostAsResponseAsync( + + global::Voicebox.BodyTranscribeAudioTranscribePost request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Transcribe Audio
+ /// Transcribe audio file to text. + ///
/// /// /// @@ -35,5 +48,46 @@ public partial interface IVoiceboxClient string? model = default, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Transcribe Audio
+ /// Transcribe audio file to text. + ///
+ /// + /// The stream to send as the multipart 'file' file part. + /// + /// + /// + /// + /// 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 TranscribeAudioTranscribePostAsync( + global::System.IO.Stream file, + string filename, + string? language = default, + string? model = default, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Transcribe Audio
+ /// Transcribe audio file to text. + ///
+ /// + /// The stream to send as the multipart 'file' file part. + /// + /// + /// + /// + /// 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> TranscribeAudioTranscribePostAsResponseAsync( + global::System.IO.Stream file, + string filename, + string? language = default, + string? model = default, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.TriggerModelDownloadModelsDownloadPost.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.TriggerModelDownloadModelsDownloadPost.g.cs index 2cad40d..334088a 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.TriggerModelDownloadModelsDownloadPost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.TriggerModelDownloadModelsDownloadPost.g.cs @@ -21,6 +21,19 @@ public partial interface IVoiceboxClient /// Trigger Model Download
/// Trigger download of a specific model. /// + /// + /// 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> TriggerModelDownloadModelsDownloadPostAsResponseAsync( + + global::Voicebox.ModelDownloadRequest request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Trigger Model Download
+ /// Trigger download of a specific model. + ///
/// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.TrimStoryItemStoriesStoryIdItemsItemIdTrimPut.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.TrimStoryItemStoriesStoryIdItemsItemIdTrimPut.g.cs index cf99081..98da84f 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.TrimStoryItemStoriesStoryIdItemsItemIdTrimPut.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.TrimStoryItemStoriesStoryIdItemsItemIdTrimPut.g.cs @@ -27,6 +27,23 @@ public partial interface IVoiceboxClient /// /// /// + /// + /// 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> TrimStoryItemStoriesStoryIdItemsItemIdTrimPutAsResponseAsync( + string storyId, + string itemId, + + global::Voicebox.StoryItemTrim request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Trim Story Item
+ /// Trim a story item. + ///
+ /// + /// /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.UnloadModelByNameModelsModelNameUnloadPost.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.UnloadModelByNameModelsModelNameUnloadPost.g.cs index fbfbd66..1d45fd0 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.UnloadModelByNameModelsModelNameUnloadPost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.UnloadModelByNameModelsModelNameUnloadPost.g.cs @@ -16,5 +16,17 @@ public partial interface IVoiceboxClient string modelName, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Unload Model By Name
+ /// Unload a specific model from memory without deleting it from disk. + ///
+ /// + /// 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> UnloadModelByNameModelsModelNameUnloadPostAsResponseAsync( + string modelName, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.UnloadModelModelsUnloadPost.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.UnloadModelModelsUnloadPost.g.cs index c006a0c..a9317c8 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.UnloadModelModelsUnloadPost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.UnloadModelModelsUnloadPost.g.cs @@ -14,5 +14,15 @@ public partial interface IVoiceboxClient global::System.Threading.Tasks.Task UnloadModelModelsUnloadPostAsync( global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Unload Model
+ /// Unload the default Qwen TTS model to free memory. + ///
+ /// 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> UnloadModelModelsUnloadPostAsResponseAsync( + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.UpdateCaptureSettingsEndpointSettingsCapturesPut.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.UpdateCaptureSettingsEndpointSettingsCapturesPut.g.cs index d5039c9..4fd6e02 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.UpdateCaptureSettingsEndpointSettingsCapturesPut.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.UpdateCaptureSettingsEndpointSettingsCapturesPut.g.cs @@ -19,6 +19,18 @@ public partial interface IVoiceboxClient /// /// Update Capture Settings Endpoint /// + /// + /// 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> UpdateCaptureSettingsEndpointSettingsCapturesPutAsResponseAsync( + + global::Voicebox.CaptureSettingsUpdate request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Update Capture Settings Endpoint + /// /// /// /// diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.UpdateChannelChannelsChannelIdPut.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.UpdateChannelChannelsChannelIdPut.g.cs index 5f9b4df..15ba0dd 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.UpdateChannelChannelsChannelIdPut.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.UpdateChannelChannelsChannelIdPut.g.cs @@ -24,6 +24,21 @@ public partial interface IVoiceboxClient /// Update an audio channel. /// /// + /// + /// 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> UpdateChannelChannelsChannelIdPutAsResponseAsync( + string channelId, + + global::Voicebox.AudioChannelUpdate request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Update Channel
+ /// Update an audio channel. + ///
+ /// /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.UpdateEffectPresetEffectsPresetsPresetIdPut.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.UpdateEffectPresetEffectsPresetsPresetIdPut.g.cs index 8c448af..7906a35 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.UpdateEffectPresetEffectsPresetsPresetIdPut.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.UpdateEffectPresetEffectsPresetsPresetIdPut.g.cs @@ -24,6 +24,21 @@ public partial interface IVoiceboxClient /// Update an effect preset. /// /// + /// + /// 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> UpdateEffectPresetEffectsPresetsPresetIdPutAsResponseAsync( + string presetId, + + global::Voicebox.EffectPresetUpdate request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Update Effect Preset
+ /// Update an effect preset. + ///
+ /// /// /// /// diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.UpdateGenerationSettingsEndpointSettingsGenerationPut.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.UpdateGenerationSettingsEndpointSettingsGenerationPut.g.cs index 742f350..9509d44 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.UpdateGenerationSettingsEndpointSettingsGenerationPut.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.UpdateGenerationSettingsEndpointSettingsGenerationPut.g.cs @@ -19,6 +19,18 @@ public partial interface IVoiceboxClient /// /// Update Generation Settings Endpoint /// + /// + /// 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> UpdateGenerationSettingsEndpointSettingsGenerationPutAsResponseAsync( + + global::Voicebox.GenerationSettingsUpdate request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Update Generation Settings Endpoint + /// /// /// /// diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.UpdateProfileEffectsProfilesProfileIdEffectsPut.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.UpdateProfileEffectsProfilesProfileIdEffectsPut.g.cs index 8e88567..edb240f 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.UpdateProfileEffectsProfilesProfileIdEffectsPut.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.UpdateProfileEffectsProfilesProfileIdEffectsPut.g.cs @@ -24,6 +24,21 @@ public partial interface IVoiceboxClient /// Set or clear the default effects chain for a voice profile. /// /// + /// + /// 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> UpdateProfileEffectsProfilesProfileIdEffectsPutAsResponseAsync( + string profileId, + + global::Voicebox.ProfileEffectsUpdate request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Update Profile Effects
+ /// Set or clear the default effects chain for a voice profile. + ///
+ /// /// /// Effects chain (null to remove) /// diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.UpdateProfileProfilesProfileIdPut.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.UpdateProfileProfilesProfileIdPut.g.cs index 9e3b85b..e8fdbed 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.UpdateProfileProfilesProfileIdPut.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.UpdateProfileProfilesProfileIdPut.g.cs @@ -24,6 +24,21 @@ public partial interface IVoiceboxClient /// Update a voice profile. /// /// + /// + /// 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> UpdateProfileProfilesProfileIdPutAsResponseAsync( + string profileId, + + global::Voicebox.VoiceProfileCreate request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Update Profile
+ /// Update a voice profile. + ///
+ /// /// /// /// diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.UpdateProfileSampleProfilesSamplesSampleIdPut.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.UpdateProfileSampleProfilesSamplesSampleIdPut.g.cs index 7f1c6c0..75793e1 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.UpdateProfileSampleProfilesSamplesSampleIdPut.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.UpdateProfileSampleProfilesSamplesSampleIdPut.g.cs @@ -24,6 +24,21 @@ public partial interface IVoiceboxClient /// Update a profile sample's reference text. /// /// + /// + /// 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> UpdateProfileSampleProfilesSamplesSampleIdPutAsResponseAsync( + string sampleId, + + global::Voicebox.ProfileSampleUpdate request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Update Profile Sample
+ /// Update a profile sample's reference text. + ///
+ /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.UpdateStoryItemTimesStoriesStoryIdItemsTimesPut.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.UpdateStoryItemTimesStoriesStoryIdItemsTimesPut.g.cs index 164aba4..c9c1a66 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.UpdateStoryItemTimesStoriesStoryIdItemsTimesPut.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.UpdateStoryItemTimesStoriesStoryIdItemsTimesPut.g.cs @@ -24,6 +24,21 @@ public partial interface IVoiceboxClient /// Update story item timecodes. /// /// + /// + /// 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> UpdateStoryItemTimesStoriesStoryIdItemsTimesPutAsResponseAsync( + string storyId, + + global::Voicebox.StoryItemBatchUpdate request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Update Story Item Times
+ /// Update story item timecodes. + ///
+ /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.UpdateStoryItemVolumeStoriesStoryIdItemsItemIdVolumePut.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.UpdateStoryItemVolumeStoriesStoryIdItemsItemIdVolumePut.g.cs index 32cf691..69ae1ea 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.UpdateStoryItemVolumeStoriesStoryIdItemsItemIdVolumePut.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.UpdateStoryItemVolumeStoriesStoryIdItemsItemIdVolumePut.g.cs @@ -27,6 +27,23 @@ public partial interface IVoiceboxClient /// /// /// + /// + /// 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> UpdateStoryItemVolumeStoriesStoryIdItemsItemIdVolumePutAsResponseAsync( + string storyId, + string itemId, + + global::Voicebox.StoryItemVolumeUpdate request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Update Story Item Volume
+ /// Set a story item's per-clip volume (linear gain, 0.0–2.0). + ///
+ /// + /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.UpdateStoryStoriesStoryIdPut.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.UpdateStoryStoriesStoryIdPut.g.cs index 4a08aa1..174bb0d 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.UpdateStoryStoriesStoryIdPut.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.UpdateStoryStoriesStoryIdPut.g.cs @@ -24,6 +24,21 @@ public partial interface IVoiceboxClient /// Update a story. /// /// + /// + /// 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> UpdateStoryStoriesStoryIdPutAsResponseAsync( + string storyId, + + global::Voicebox.StoryCreate request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Update Story
+ /// Update a story. + ///
+ /// /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.UploadProfileAvatarProfilesProfileIdAvatarPost.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.UploadProfileAvatarProfilesProfileIdAvatarPost.g.cs index 70cde31..b873094 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.UploadProfileAvatarProfilesProfileIdAvatarPost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.UploadProfileAvatarProfilesProfileIdAvatarPost.g.cs @@ -24,6 +24,21 @@ public partial interface IVoiceboxClient /// Upload or update avatar image for a profile. /// /// + /// + /// 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> UploadProfileAvatarProfilesProfileIdAvatarPostAsResponseAsync( + string profileId, + + global::Voicebox.BodyUploadProfileAvatarProfilesProfileIdAvatarPost request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Upload Profile Avatar
+ /// Upload or update avatar image for a profile. + ///
+ /// /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. @@ -35,5 +50,42 @@ public partial interface IVoiceboxClient string filename, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Upload Profile Avatar
+ /// Upload or update avatar image for a profile. + ///
+ /// + /// + /// The stream to send as the multipart 'file' file part. + /// + /// + /// 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 UploadProfileAvatarProfilesProfileIdAvatarPostAsync( + string profileId, + global::System.IO.Stream file, + string filename, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Upload Profile Avatar
+ /// Upload or update avatar image for a profile. + ///
+ /// + /// + /// The stream to send as the multipart 'file' file part. + /// + /// + /// 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> UploadProfileAvatarProfilesProfileIdAvatarPostAsResponseAsync( + string profileId, + global::System.IO.Stream file, + string filename, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.UpsertMcpBindingMcpBindingsPut.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.UpsertMcpBindingMcpBindingsPut.g.cs index 1671d5d..d83d9ca 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.UpsertMcpBindingMcpBindingsPut.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.UpsertMcpBindingMcpBindingsPut.g.cs @@ -21,6 +21,19 @@ public partial interface IVoiceboxClient /// Upsert Mcp Binding
/// Create-or-update a binding. Matches by client_id. /// + /// + /// 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> UpsertMcpBindingMcpBindingsPutAsResponseAsync( + + global::Voicebox.MCPClientBindingUpsert request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Upsert Mcp Binding
+ /// Create-or-update a binding. Matches by client_id. + ///
/// /// /// diff --git a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.WatchdogDisableWatchdogDisablePost.g.cs b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.WatchdogDisableWatchdogDisablePost.g.cs index 61e9f86..b9c5f31 100644 --- a/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.WatchdogDisableWatchdogDisablePost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.IVoiceboxClient.WatchdogDisableWatchdogDisablePost.g.cs @@ -14,5 +14,15 @@ public partial interface IVoiceboxClient global::System.Threading.Tasks.Task WatchdogDisableWatchdogDisablePostAsync( global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Watchdog Disable
+ /// Disable the parent process watchdog so the server keeps running. + ///
+ /// 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> WatchdogDisableWatchdogDisablePostAsResponseAsync( + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.OptionsSupport.g.cs b/src/libs/Voicebox/Generated/Voicebox.OptionsSupport.g.cs index 8ea1102..798150e 100644 --- a/src/libs/Voicebox/Generated/Voicebox.OptionsSupport.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.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::Voicebox.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::Voicebox.AutoSDKClientOptions clientOptions, global::Voicebox.AutoSDKRequestOptions? requestOptions, + global::System.Net.Http.HttpResponseMessage? response, + int attempt) + { + var retryOptions = requestOptions?.Retry ?? clientOptions.Retry ?? new global::Voicebox.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::Voicebox.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/Voicebox/Generated/Voicebox.VoiceboxClient.AddProfileSampleProfilesProfileIdSamplesPost.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.AddProfileSampleProfilesProfileIdSamplesPost.g.cs index b62f851..63425e3 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.AddProfileSampleProfilesProfileIdSamplesPost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.AddProfileSampleProfilesProfileIdSamplesPost.g.cs @@ -35,6 +35,32 @@ partial void ProcessAddProfileSampleProfilesProfileIdSamplesPostResponseContent( public async global::System.Threading.Tasks.Task AddProfileSampleProfilesProfileIdSamplesPostAsync( string profileId, + global::Voicebox.BodyAddProfileSampleProfilesProfileIdSamplesPost request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await AddProfileSampleProfilesProfileIdSamplesPostAsResponseAsync( + profileId: profileId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Add Profile Sample
+ /// Add a sample to a voice profile. + ///
+ /// + /// + /// 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> AddProfileSampleProfilesProfileIdSamplesPostAsResponseAsync( + string profileId, + global::Voicebox.BodyAddProfileSampleProfilesProfileIdSamplesPost request, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -60,10 +86,11 @@ partial void ProcessAddProfileSampleProfilesProfileIdSamplesPostResponseContent( var __maxAttempts = global::Voicebox.AutoSDKRequestOptionsSupport.GetMaxAttempts( clientOptions: Options, requestOptions: requestOptions, - supportsRetry: true); + supportsRetry: false); global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: $"/profiles/{profileId}/samples", baseUri: HttpClient.BaseAddress); @@ -79,10 +106,12 @@ partial void ProcessAddProfileSampleProfilesProfileIdSamplesPostResponseContent( __httpRequest.Version = global::System.Net.HttpVersion.Version11; __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; #endif + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); __httpRequestContent.Add( content: new global::System.Net.Http.StringContent(profileId ?? string.Empty), name: "\"profile_id\""); + var __contentFile = new global::System.Net.Http.ByteArrayContent(request.File ?? global::System.Array.Empty()); __contentFile.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( request.Filename is null @@ -120,10 +149,13 @@ request.Filename is null { __contentFile.Headers.ContentDisposition.FileNameStar = null; } + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent(request.ReferenceText ?? string.Empty), name: "\"reference_text\""); + __httpRequest.Content = __httpRequestContent; + global::Voicebox.AutoSDKRequestOptionsSupport.ApplyHeaders( request: __httpRequest, clientHeaders: Options.Headers, @@ -166,6 +198,8 @@ request.Filename is null attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -176,6 +210,11 @@ request.Filename is null } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -193,6 +232,8 @@ request.Filename is null attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -202,8 +243,7 @@ request.Filename is null __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -212,6 +252,11 @@ request.Filename is null __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -228,14 +273,15 @@ request.Filename is null 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -275,6 +321,8 @@ request.Filename is null attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -295,6 +343,8 @@ request.Filename is null attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -357,9 +407,13 @@ request.Filename is null { __response.EnsureSuccessStatusCode(); - return - global::Voicebox.ProfileSampleResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Voicebox.ProfileSampleResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -387,9 +441,13 @@ request.Filename is null #endif ).ConfigureAwait(false); - return - await global::Voicebox.ProfileSampleResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Voicebox.ProfileSampleResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -459,5 +517,892 @@ request.Filename is null requestOptions: requestOptions, cancellationToken: cancellationToken).ConfigureAwait(false); } + + /// + /// Add Profile Sample
+ /// Add a sample to a voice profile. + ///
+ /// + /// + /// The stream to send as the multipart 'file' file part. + /// + /// + /// + /// 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 AddProfileSampleProfilesProfileIdSamplesPostAsync( + string profileId, + global::System.IO.Stream file, + string filename, + string referenceText, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + + file = file ?? throw new global::System.ArgumentNullException(nameof(file)); + var request = new global::Voicebox.BodyAddProfileSampleProfilesProfileIdSamplesPost + { + File = global::System.Array.Empty(), + Filename = filename, + ReferenceText = referenceText, + }; + PrepareArguments( + client: HttpClient); + PrepareAddProfileSampleProfilesProfileIdSamplesPostArguments( + httpClient: HttpClient, + profileId: ref profileId, + request: request); + + using var __timeoutCancellationTokenSource = global::Voicebox.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Voicebox.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Voicebox.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: false); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Voicebox.PathBuilder( + path: $"/profiles/{profileId}/samples", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Voicebox.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(profileId ?? string.Empty), + name: "\"profile_id\""); + + var __contentFile = new global::System.Net.Http.StreamContent(file); + __contentFile.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( + request.Filename is null + ? "application/octet-stream" + : (global::System.IO.Path.GetExtension(request.Filename) ?? string.Empty).ToLowerInvariant() switch + { + ".aac" => "audio/aac", + ".flac" => "audio/flac", + ".gif" => "image/gif", + ".jpeg" => "image/jpeg", + ".jpg" => "image/jpeg", + ".json" => "application/json", + ".m4a" => "audio/mp4", + ".mp3" => "audio/mpeg", + ".mp4" => "video/mp4", + ".mpeg" => "audio/mpeg", + ".mpga" => "audio/mpeg", + ".oga" => "audio/ogg", + ".ogg" => "audio/ogg", + ".opus" => "audio/ogg", + ".pdf" => "application/pdf", + ".png" => "image/png", + ".txt" => "text/plain", + ".wav" => "audio/wav", + ".weba" => "audio/webm", + ".webm" => "video/webm", + ".webp" => "image/webp", + _ => "application/octet-stream", + }); + __httpRequestContent.Add( + content: __contentFile, + name: "\"file\"", + fileName: request.Filename != null ? $"\"{request.Filename}\"" : string.Empty); + if (__contentFile.Headers.ContentDisposition != null) + { + __contentFile.Headers.ContentDisposition.FileNameStar = null; + } + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.ReferenceText ?? string.Empty), + name: "\"reference_text\""); + + __httpRequest.Content = __httpRequestContent; + + global::Voicebox.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareAddProfileSampleProfilesProfileIdSamplesPostRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + profileId: profileId!, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Voicebox.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "AddProfileSampleProfilesProfileIdSamplesPost", + methodName: "AddProfileSampleProfilesProfileIdSamplesPostAsync", + pathTemplate: "$\"/profiles/{profileId}/samples\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "AddProfileSampleProfilesProfileIdSamplesPost", + methodName: "AddProfileSampleProfilesProfileIdSamplesPostAsync", + pathTemplate: "$\"/profiles/{profileId}/samples\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "AddProfileSampleProfilesProfileIdSamplesPost", + methodName: "AddProfileSampleProfilesProfileIdSamplesPostAsync", + pathTemplate: "$\"/profiles/{profileId}/samples\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessAddProfileSampleProfilesProfileIdSamplesPostResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "AddProfileSampleProfilesProfileIdSamplesPost", + methodName: "AddProfileSampleProfilesProfileIdSamplesPostAsync", + pathTemplate: "$\"/profiles/{profileId}/samples\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "AddProfileSampleProfilesProfileIdSamplesPost", + methodName: "AddProfileSampleProfilesProfileIdSamplesPostAsync", + pathTemplate: "$\"/profiles/{profileId}/samples\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::Voicebox.HTTPValidationError? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::Voicebox.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::Voicebox.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + throw new global::Voicebox.ApiException( + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessAddProfileSampleProfilesProfileIdSamplesPostResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::Voicebox.ProfileSampleResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::Voicebox.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + return + await global::Voicebox.ProfileSampleResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw new global::Voicebox.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + /// + /// Add Profile Sample
+ /// Add a sample to a voice profile. + ///
+ /// + /// + /// The stream to send as the multipart 'file' file part. + /// + /// + /// + /// 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> AddProfileSampleProfilesProfileIdSamplesPostAsResponseAsync( + string profileId, + global::System.IO.Stream file, + string filename, + string referenceText, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + + file = file ?? throw new global::System.ArgumentNullException(nameof(file)); + var request = new global::Voicebox.BodyAddProfileSampleProfilesProfileIdSamplesPost + { + File = global::System.Array.Empty(), + Filename = filename, + ReferenceText = referenceText, + }; + PrepareArguments( + client: HttpClient); + PrepareAddProfileSampleProfilesProfileIdSamplesPostArguments( + httpClient: HttpClient, + profileId: ref profileId, + request: request); + + using var __timeoutCancellationTokenSource = global::Voicebox.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Voicebox.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Voicebox.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: false); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Voicebox.PathBuilder( + path: $"/profiles/{profileId}/samples", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Voicebox.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(profileId ?? string.Empty), + name: "\"profile_id\""); + + var __contentFile = new global::System.Net.Http.StreamContent(file); + __contentFile.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( + request.Filename is null + ? "application/octet-stream" + : (global::System.IO.Path.GetExtension(request.Filename) ?? string.Empty).ToLowerInvariant() switch + { + ".aac" => "audio/aac", + ".flac" => "audio/flac", + ".gif" => "image/gif", + ".jpeg" => "image/jpeg", + ".jpg" => "image/jpeg", + ".json" => "application/json", + ".m4a" => "audio/mp4", + ".mp3" => "audio/mpeg", + ".mp4" => "video/mp4", + ".mpeg" => "audio/mpeg", + ".mpga" => "audio/mpeg", + ".oga" => "audio/ogg", + ".ogg" => "audio/ogg", + ".opus" => "audio/ogg", + ".pdf" => "application/pdf", + ".png" => "image/png", + ".txt" => "text/plain", + ".wav" => "audio/wav", + ".weba" => "audio/webm", + ".webm" => "video/webm", + ".webp" => "image/webp", + _ => "application/octet-stream", + }); + __httpRequestContent.Add( + content: __contentFile, + name: "\"file\"", + fileName: request.Filename != null ? $"\"{request.Filename}\"" : string.Empty); + if (__contentFile.Headers.ContentDisposition != null) + { + __contentFile.Headers.ContentDisposition.FileNameStar = null; + } + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.ReferenceText ?? string.Empty), + name: "\"reference_text\""); + + __httpRequest.Content = __httpRequestContent; + + global::Voicebox.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareAddProfileSampleProfilesProfileIdSamplesPostRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + profileId: profileId!, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Voicebox.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "AddProfileSampleProfilesProfileIdSamplesPost", + methodName: "AddProfileSampleProfilesProfileIdSamplesPostAsync", + pathTemplate: "$\"/profiles/{profileId}/samples\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "AddProfileSampleProfilesProfileIdSamplesPost", + methodName: "AddProfileSampleProfilesProfileIdSamplesPostAsync", + pathTemplate: "$\"/profiles/{profileId}/samples\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "AddProfileSampleProfilesProfileIdSamplesPost", + methodName: "AddProfileSampleProfilesProfileIdSamplesPostAsync", + pathTemplate: "$\"/profiles/{profileId}/samples\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessAddProfileSampleProfilesProfileIdSamplesPostResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "AddProfileSampleProfilesProfileIdSamplesPost", + methodName: "AddProfileSampleProfilesProfileIdSamplesPostAsync", + pathTemplate: "$\"/profiles/{profileId}/samples\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "AddProfileSampleProfilesProfileIdSamplesPost", + methodName: "AddProfileSampleProfilesProfileIdSamplesPostAsync", + pathTemplate: "$\"/profiles/{profileId}/samples\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::Voicebox.HTTPValidationError? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::Voicebox.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::Voicebox.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + throw new global::Voicebox.ApiException( + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessAddProfileSampleProfilesProfileIdSamplesPostResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Voicebox.ProfileSampleResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw new global::Voicebox.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::Voicebox.ProfileSampleResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw new global::Voicebox.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.AddStoryItemStoriesStoryIdItemsPost.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.AddStoryItemStoriesStoryIdItemsPost.g.cs index 89c294f..27326c5 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.AddStoryItemStoriesStoryIdItemsPost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.AddStoryItemStoriesStoryIdItemsPost.g.cs @@ -35,6 +35,32 @@ partial void ProcessAddStoryItemStoriesStoryIdItemsPostResponseContent( public async global::System.Threading.Tasks.Task AddStoryItemStoriesStoryIdItemsPostAsync( string storyId, + global::Voicebox.StoryItemCreate request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await AddStoryItemStoriesStoryIdItemsPostAsResponseAsync( + storyId: storyId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Add Story Item
+ /// Add a generation to a story. + ///
+ /// + /// + /// 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> AddStoryItemStoriesStoryIdItemsPostAsResponseAsync( + string storyId, + global::Voicebox.StoryItemCreate request, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -64,6 +90,7 @@ partial void ProcessAddStoryItemStoriesStoryIdItemsPostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: $"/stories/{storyId}/items", baseUri: HttpClient.BaseAddress); @@ -127,6 +154,8 @@ partial void ProcessAddStoryItemStoriesStoryIdItemsPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -137,6 +166,11 @@ partial void ProcessAddStoryItemStoriesStoryIdItemsPostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -154,6 +188,8 @@ partial void ProcessAddStoryItemStoriesStoryIdItemsPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -163,8 +199,7 @@ partial void ProcessAddStoryItemStoriesStoryIdItemsPostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -173,6 +208,11 @@ partial void ProcessAddStoryItemStoriesStoryIdItemsPostResponseContent( __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -189,14 +229,15 @@ partial void ProcessAddStoryItemStoriesStoryIdItemsPostResponseContent( 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -236,6 +277,8 @@ partial void ProcessAddStoryItemStoriesStoryIdItemsPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -256,6 +299,8 @@ partial void ProcessAddStoryItemStoriesStoryIdItemsPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -318,9 +363,13 @@ partial void ProcessAddStoryItemStoriesStoryIdItemsPostResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Voicebox.StoryItemDetail.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Voicebox.StoryItemDetail.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -348,9 +397,13 @@ partial void ProcessAddStoryItemStoriesStoryIdItemsPostResponseContent( #endif ).ConfigureAwait(false); - return - await global::Voicebox.StoryItemDetail.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Voicebox.StoryItemDetail.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ApplyEffectsToGenerationGenerationsGenerationIdVersionsApplyEffectsPost.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ApplyEffectsToGenerationGenerationsGenerationIdVersionsApplyEffectsPost.g.cs index e78e056..ba5a8a9 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ApplyEffectsToGenerationGenerationsGenerationIdVersionsApplyEffectsPost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ApplyEffectsToGenerationGenerationsGenerationIdVersionsApplyEffectsPost.g.cs @@ -35,6 +35,32 @@ partial void ProcessApplyEffectsToGenerationGenerationsGenerationIdVersionsApply public async global::System.Threading.Tasks.Task ApplyEffectsToGenerationGenerationsGenerationIdVersionsApplyEffectsPostAsync( string generationId, + global::Voicebox.ApplyEffectsRequest request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ApplyEffectsToGenerationGenerationsGenerationIdVersionsApplyEffectsPostAsResponseAsync( + generationId: generationId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Apply Effects To Generation
+ /// Apply an effects chain to an existing generation, creating a new version. + ///
+ /// + /// + /// 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> ApplyEffectsToGenerationGenerationsGenerationIdVersionsApplyEffectsPostAsResponseAsync( + string generationId, + global::Voicebox.ApplyEffectsRequest request, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -64,6 +90,7 @@ partial void ProcessApplyEffectsToGenerationGenerationsGenerationIdVersionsApply global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: $"/generations/{generationId}/versions/apply-effects", baseUri: HttpClient.BaseAddress); @@ -127,6 +154,8 @@ partial void ProcessApplyEffectsToGenerationGenerationsGenerationIdVersionsApply attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -137,6 +166,11 @@ partial void ProcessApplyEffectsToGenerationGenerationsGenerationIdVersionsApply } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -154,6 +188,8 @@ partial void ProcessApplyEffectsToGenerationGenerationsGenerationIdVersionsApply attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -163,8 +199,7 @@ partial void ProcessApplyEffectsToGenerationGenerationsGenerationIdVersionsApply __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -173,6 +208,11 @@ partial void ProcessApplyEffectsToGenerationGenerationsGenerationIdVersionsApply __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -189,14 +229,15 @@ partial void ProcessApplyEffectsToGenerationGenerationsGenerationIdVersionsApply 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -236,6 +277,8 @@ partial void ProcessApplyEffectsToGenerationGenerationsGenerationIdVersionsApply attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -256,6 +299,8 @@ partial void ProcessApplyEffectsToGenerationGenerationsGenerationIdVersionsApply attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -318,9 +363,13 @@ partial void ProcessApplyEffectsToGenerationGenerationsGenerationIdVersionsApply { __response.EnsureSuccessStatusCode(); - return - global::Voicebox.GenerationVersionResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Voicebox.GenerationVersionResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -348,9 +397,13 @@ partial void ProcessApplyEffectsToGenerationGenerationsGenerationIdVersionsApply #endif ).ConfigureAwait(false); - return - await global::Voicebox.GenerationVersionResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Voicebox.GenerationVersionResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.CancelGenerationGenerateGenerationIdCancelPost.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.CancelGenerationGenerateGenerationIdCancelPost.g.cs index 4726380..6864a7e 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.CancelGenerationGenerateGenerationIdCancelPost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.CancelGenerationGenerateGenerationIdCancelPost.g.cs @@ -33,6 +33,27 @@ partial void ProcessCancelGenerationGenerateGenerationIdCancelPostResponseConten string generationId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CancelGenerationGenerateGenerationIdCancelPostAsResponseAsync( + generationId: generationId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Cancel Generation
+ /// Cancel a queued or running generation. + ///
+ /// + /// 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> CancelGenerationGenerateGenerationIdCancelPostAsResponseAsync( + string generationId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -56,6 +77,7 @@ partial void ProcessCancelGenerationGenerateGenerationIdCancelPostResponseConten global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: $"/generate/{generationId}/cancel", baseUri: HttpClient.BaseAddress); @@ -112,6 +134,8 @@ partial void ProcessCancelGenerationGenerateGenerationIdCancelPostResponseConten attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -122,6 +146,11 @@ partial void ProcessCancelGenerationGenerateGenerationIdCancelPostResponseConten } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -139,6 +168,8 @@ partial void ProcessCancelGenerationGenerateGenerationIdCancelPostResponseConten attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -148,8 +179,7 @@ partial void ProcessCancelGenerationGenerateGenerationIdCancelPostResponseConten __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -158,6 +188,11 @@ partial void ProcessCancelGenerationGenerateGenerationIdCancelPostResponseConten __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -174,14 +209,15 @@ partial void ProcessCancelGenerationGenerateGenerationIdCancelPostResponseConten 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -221,6 +257,8 @@ partial void ProcessCancelGenerationGenerateGenerationIdCancelPostResponseConten attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -241,6 +279,8 @@ partial void ProcessCancelGenerationGenerateGenerationIdCancelPostResponseConten attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -303,7 +343,11 @@ partial void ProcessCancelGenerationGenerateGenerationIdCancelPostResponseConten { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -331,7 +375,11 @@ partial void ProcessCancelGenerationGenerateGenerationIdCancelPostResponseConten #endif ).ConfigureAwait(false); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.CancelModelDownloadModelsDownloadCancelPost.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.CancelModelDownloadModelsDownloadCancelPost.g.cs index ee4e094..28f4dfe 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.CancelModelDownloadModelsDownloadCancelPost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.CancelModelDownloadModelsDownloadCancelPost.g.cs @@ -31,6 +31,29 @@ partial void ProcessCancelModelDownloadModelsDownloadCancelPostResponseContent( /// public async global::System.Threading.Tasks.Task CancelModelDownloadModelsDownloadCancelPostAsync( + global::Voicebox.ModelDownloadRequest request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CancelModelDownloadModelsDownloadCancelPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Cancel Model Download
+ /// Cancel or dismiss an errored/stale download task. + ///
+ /// + /// 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> CancelModelDownloadModelsDownloadCancelPostAsResponseAsync( + global::Voicebox.ModelDownloadRequest request, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -59,6 +82,7 @@ partial void ProcessCancelModelDownloadModelsDownloadCancelPostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: "/models/download/cancel", baseUri: HttpClient.BaseAddress); @@ -121,6 +145,8 @@ partial void ProcessCancelModelDownloadModelsDownloadCancelPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -131,6 +157,11 @@ partial void ProcessCancelModelDownloadModelsDownloadCancelPostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -148,6 +179,8 @@ partial void ProcessCancelModelDownloadModelsDownloadCancelPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -157,8 +190,7 @@ partial void ProcessCancelModelDownloadModelsDownloadCancelPostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -167,6 +199,11 @@ partial void ProcessCancelModelDownloadModelsDownloadCancelPostResponseContent( __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -183,14 +220,15 @@ partial void ProcessCancelModelDownloadModelsDownloadCancelPostResponseContent( 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -230,6 +268,8 @@ partial void ProcessCancelModelDownloadModelsDownloadCancelPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -250,6 +290,8 @@ partial void ProcessCancelModelDownloadModelsDownloadCancelPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -312,7 +354,11 @@ partial void ProcessCancelModelDownloadModelsDownloadCancelPostResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -340,7 +386,11 @@ partial void ProcessCancelModelDownloadModelsDownloadCancelPostResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.CaptureReadinessEndpointCaptureReadinessGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.CaptureReadinessEndpointCaptureReadinessGet.g.cs index 963f20d..4ce6d4b 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.CaptureReadinessEndpointCaptureReadinessGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.CaptureReadinessEndpointCaptureReadinessGet.g.cs @@ -33,6 +33,28 @@ partial void ProcessCaptureReadinessEndpointCaptureReadinessGetResponseContent( public async global::System.Threading.Tasks.Task CaptureReadinessEndpointCaptureReadinessGetAsync( global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CaptureReadinessEndpointCaptureReadinessGetAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Capture Readiness Endpoint
+ /// Whether the STT and LLM models the user has selected are downloaded.
+ /// The frontend gates the global hotkey on this — pressing the chord with
+ /// a missing model would otherwise produce a stuck "transcribing" pill that
+ /// waits forever for a download to finish. Checks on-disk cache, not RAM
+ /// load, so the answer survives backend restarts. + ///
+ /// 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> CaptureReadinessEndpointCaptureReadinessGetAsResponseAsync( + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -55,6 +77,7 @@ partial void ProcessCaptureReadinessEndpointCaptureReadinessGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: "/capture/readiness", baseUri: HttpClient.BaseAddress); @@ -110,6 +133,8 @@ partial void ProcessCaptureReadinessEndpointCaptureReadinessGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -120,6 +145,11 @@ partial void ProcessCaptureReadinessEndpointCaptureReadinessGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -137,6 +167,8 @@ partial void ProcessCaptureReadinessEndpointCaptureReadinessGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -146,8 +178,7 @@ partial void ProcessCaptureReadinessEndpointCaptureReadinessGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -156,6 +187,11 @@ partial void ProcessCaptureReadinessEndpointCaptureReadinessGetResponseContent( __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -172,14 +208,15 @@ partial void ProcessCaptureReadinessEndpointCaptureReadinessGetResponseContent( 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -219,6 +256,8 @@ partial void ProcessCaptureReadinessEndpointCaptureReadinessGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -239,6 +278,8 @@ partial void ProcessCaptureReadinessEndpointCaptureReadinessGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -263,9 +304,13 @@ partial void ProcessCaptureReadinessEndpointCaptureReadinessGetResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Voicebox.CaptureReadinessResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Voicebox.CaptureReadinessResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -293,9 +338,13 @@ partial void ProcessCaptureReadinessEndpointCaptureReadinessGetResponseContent( #endif ).ConfigureAwait(false); - return - await global::Voicebox.CaptureReadinessResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Voicebox.CaptureReadinessResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ClearAllTasksTasksClearPost.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ClearAllTasksTasksClearPost.g.cs index f7cc404..a6c6c43 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ClearAllTasksTasksClearPost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ClearAllTasksTasksClearPost.g.cs @@ -29,6 +29,24 @@ partial void ProcessClearAllTasksTasksClearPostResponseContent( public async global::System.Threading.Tasks.Task ClearAllTasksTasksClearPostAsync( global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ClearAllTasksTasksClearPostAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Clear All Tasks
+ /// Clear all download tasks and progress state. + ///
+ /// 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> ClearAllTasksTasksClearPostAsResponseAsync( + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -51,6 +69,7 @@ partial void ProcessClearAllTasksTasksClearPostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: "/tasks/clear", baseUri: HttpClient.BaseAddress); @@ -106,6 +125,8 @@ partial void ProcessClearAllTasksTasksClearPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -116,6 +137,11 @@ partial void ProcessClearAllTasksTasksClearPostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -133,6 +159,8 @@ partial void ProcessClearAllTasksTasksClearPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -142,8 +170,7 @@ partial void ProcessClearAllTasksTasksClearPostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -152,6 +179,11 @@ partial void ProcessClearAllTasksTasksClearPostResponseContent( __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -168,14 +200,15 @@ partial void ProcessClearAllTasksTasksClearPostResponseContent( 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +248,8 @@ partial void ProcessClearAllTasksTasksClearPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -235,6 +270,8 @@ partial void ProcessClearAllTasksTasksClearPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -259,7 +296,11 @@ partial void ProcessClearAllTasksTasksClearPostResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -287,7 +328,11 @@ partial void ProcessClearAllTasksTasksClearPostResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ClearCacheCacheClearPost.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ClearCacheCacheClearPost.g.cs index 5d94195..23efbe4 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ClearCacheCacheClearPost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ClearCacheCacheClearPost.g.cs @@ -29,6 +29,24 @@ partial void ProcessClearCacheCacheClearPostResponseContent( public async global::System.Threading.Tasks.Task ClearCacheCacheClearPostAsync( global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ClearCacheCacheClearPostAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Clear Cache
+ /// Clear all voice prompt caches (memory and disk). + ///
+ /// 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> ClearCacheCacheClearPostAsResponseAsync( + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -51,6 +69,7 @@ partial void ProcessClearCacheCacheClearPostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: "/cache/clear", baseUri: HttpClient.BaseAddress); @@ -106,6 +125,8 @@ partial void ProcessClearCacheCacheClearPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -116,6 +137,11 @@ partial void ProcessClearCacheCacheClearPostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -133,6 +159,8 @@ partial void ProcessClearCacheCacheClearPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -142,8 +170,7 @@ partial void ProcessClearCacheCacheClearPostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -152,6 +179,11 @@ partial void ProcessClearCacheCacheClearPostResponseContent( __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -168,14 +200,15 @@ partial void ProcessClearCacheCacheClearPostResponseContent( 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +248,8 @@ partial void ProcessClearCacheCacheClearPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -235,6 +270,8 @@ partial void ProcessClearCacheCacheClearPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -259,7 +296,11 @@ partial void ProcessClearCacheCacheClearPostResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -287,7 +328,11 @@ partial void ProcessClearCacheCacheClearPostResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ClearFailedGenerationsHistoryFailedDelete.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ClearFailedGenerationsHistoryFailedDelete.g.cs index ca5e6c1..26fba5b 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ClearFailedGenerationsHistoryFailedDelete.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ClearFailedGenerationsHistoryFailedDelete.g.cs @@ -29,6 +29,24 @@ partial void ProcessClearFailedGenerationsHistoryFailedDeleteResponseContent( public async global::System.Threading.Tasks.Task ClearFailedGenerationsHistoryFailedDeleteAsync( global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ClearFailedGenerationsHistoryFailedDeleteAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Clear Failed Generations
+ /// Delete every generation with status='failed'. Used by the UI's 'Clear failed' button (#410). + ///
+ /// 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> ClearFailedGenerationsHistoryFailedDeleteAsResponseAsync( + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -51,6 +69,7 @@ partial void ProcessClearFailedGenerationsHistoryFailedDeleteResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: "/history/failed", baseUri: HttpClient.BaseAddress); @@ -106,6 +125,8 @@ partial void ProcessClearFailedGenerationsHistoryFailedDeleteResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -116,6 +137,11 @@ partial void ProcessClearFailedGenerationsHistoryFailedDeleteResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -133,6 +159,8 @@ partial void ProcessClearFailedGenerationsHistoryFailedDeleteResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -142,8 +170,7 @@ partial void ProcessClearFailedGenerationsHistoryFailedDeleteResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -152,6 +179,11 @@ partial void ProcessClearFailedGenerationsHistoryFailedDeleteResponseContent( __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -168,14 +200,15 @@ partial void ProcessClearFailedGenerationsHistoryFailedDeleteResponseContent( 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +248,8 @@ partial void ProcessClearFailedGenerationsHistoryFailedDeleteResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -235,6 +270,8 @@ partial void ProcessClearFailedGenerationsHistoryFailedDeleteResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -259,7 +296,11 @@ partial void ProcessClearFailedGenerationsHistoryFailedDeleteResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -287,7 +328,11 @@ partial void ProcessClearFailedGenerationsHistoryFailedDeleteResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ComposeInCharacterProfilesProfileIdComposePost.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ComposeInCharacterProfilesProfileIdComposePost.g.cs index 5f5912d..724db92 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ComposeInCharacterProfilesProfileIdComposePost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ComposeInCharacterProfilesProfileIdComposePost.g.cs @@ -33,6 +33,27 @@ partial void ProcessComposeInCharacterProfilesProfileIdComposePostResponseConten string profileId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ComposeInCharacterProfilesProfileIdComposePostAsResponseAsync( + profileId: profileId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Compose In Character
+ /// Produce a fresh utterance in the profile's character voice. + ///
+ /// + /// 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> ComposeInCharacterProfilesProfileIdComposePostAsResponseAsync( + string profileId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -56,6 +77,7 @@ partial void ProcessComposeInCharacterProfilesProfileIdComposePostResponseConten global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: $"/profiles/{profileId}/compose", baseUri: HttpClient.BaseAddress); @@ -112,6 +134,8 @@ partial void ProcessComposeInCharacterProfilesProfileIdComposePostResponseConten attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -122,6 +146,11 @@ partial void ProcessComposeInCharacterProfilesProfileIdComposePostResponseConten } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -139,6 +168,8 @@ partial void ProcessComposeInCharacterProfilesProfileIdComposePostResponseConten attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -148,8 +179,7 @@ partial void ProcessComposeInCharacterProfilesProfileIdComposePostResponseConten __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -158,6 +188,11 @@ partial void ProcessComposeInCharacterProfilesProfileIdComposePostResponseConten __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -174,14 +209,15 @@ partial void ProcessComposeInCharacterProfilesProfileIdComposePostResponseConten 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -221,6 +257,8 @@ partial void ProcessComposeInCharacterProfilesProfileIdComposePostResponseConten attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -241,6 +279,8 @@ partial void ProcessComposeInCharacterProfilesProfileIdComposePostResponseConten attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -303,9 +343,13 @@ partial void ProcessComposeInCharacterProfilesProfileIdComposePostResponseConten { __response.EnsureSuccessStatusCode(); - return - global::Voicebox.PersonalityTextResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Voicebox.PersonalityTextResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -333,9 +377,13 @@ partial void ProcessComposeInCharacterProfilesProfileIdComposePostResponseConten #endif ).ConfigureAwait(false); - return - await global::Voicebox.PersonalityTextResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Voicebox.PersonalityTextResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.CreateCaptureEndpointCapturesPost.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.CreateCaptureEndpointCapturesPost.g.cs index fa2cd01..94cde8e 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.CreateCaptureEndpointCapturesPost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.CreateCaptureEndpointCapturesPost.g.cs @@ -31,6 +31,29 @@ partial void ProcessCreateCaptureEndpointCapturesPostResponseContent( /// public async global::System.Threading.Tasks.Task CreateCaptureEndpointCapturesPostAsync( + global::Voicebox.BodyCreateCaptureEndpointCapturesPost request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateCaptureEndpointCapturesPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Create Capture Endpoint
+ /// Upload audio, run STT, persist the capture. + ///
+ /// + /// 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> CreateCaptureEndpointCapturesPostAsResponseAsync( + global::Voicebox.BodyCreateCaptureEndpointCapturesPost request, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -55,10 +78,11 @@ partial void ProcessCreateCaptureEndpointCapturesPostResponseContent( var __maxAttempts = global::Voicebox.AutoSDKRequestOptionsSupport.GetMaxAttempts( clientOptions: Options, requestOptions: requestOptions, - supportsRetry: true); + supportsRetry: false); global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: "/captures", baseUri: HttpClient.BaseAddress); @@ -74,6 +98,7 @@ partial void ProcessCreateCaptureEndpointCapturesPostResponseContent( __httpRequest.Version = global::System.Net.HttpVersion.Version11; __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; #endif + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); var __contentFile = new global::System.Net.Http.ByteArrayContent(request.File ?? global::System.Array.Empty()); __contentFile.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( @@ -112,28 +137,34 @@ request.Filename is null { __contentFile.Headers.ContentDisposition.FileNameStar = null; } + if (request.Language != default) { __httpRequestContent.Add( content: new global::System.Net.Http.StringContent(request.Language ?? string.Empty), name: "\"language\""); - } + + } if (request.Source != default) { __httpRequestContent.Add( content: new global::System.Net.Http.StringContent(request.Source ?? string.Empty), name: "\"source\""); - } + + } if (request.SttModel != default) { __httpRequestContent.Add( content: new global::System.Net.Http.StringContent(request.SttModel ?? string.Empty), name: "\"stt_model\""); + } + __httpRequest.Content = __httpRequestContent; + global::Voicebox.AutoSDKRequestOptionsSupport.ApplyHeaders( request: __httpRequest, clientHeaders: Options.Headers, @@ -175,6 +206,8 @@ request.Filename is null attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -185,6 +218,11 @@ request.Filename is null } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -202,6 +240,8 @@ request.Filename is null attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -211,8 +251,7 @@ request.Filename is null __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -221,6 +260,11 @@ request.Filename is null __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -237,14 +281,15 @@ request.Filename is null 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -284,6 +329,8 @@ request.Filename is null attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -304,6 +351,8 @@ request.Filename is null attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -366,9 +415,13 @@ request.Filename is null { __response.EnsureSuccessStatusCode(); - return - global::Voicebox.CaptureCreateResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Voicebox.CaptureCreateResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -396,9 +449,13 @@ request.Filename is null #endif ).ConfigureAwait(false); - return - await global::Voicebox.CaptureCreateResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Voicebox.CaptureCreateResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -473,5 +530,934 @@ request.Filename is null requestOptions: requestOptions, cancellationToken: cancellationToken).ConfigureAwait(false); } + + /// + /// Create Capture Endpoint
+ /// Upload audio, run STT, persist the capture. + ///
+ /// + /// The stream to send as the multipart 'file' file part. + /// + /// + /// + /// + /// Default Value: file + /// + /// + /// 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 CreateCaptureEndpointCapturesPostAsync( + global::System.IO.Stream file, + string filename, + string? language = default, + string? source = default, + string? sttModel = default, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + + file = file ?? throw new global::System.ArgumentNullException(nameof(file)); + var request = new global::Voicebox.BodyCreateCaptureEndpointCapturesPost + { + File = global::System.Array.Empty(), + Filename = filename, + Language = language, + Source = source, + SttModel = sttModel, + }; + PrepareArguments( + client: HttpClient); + PrepareCreateCaptureEndpointCapturesPostArguments( + httpClient: HttpClient, + request: request); + + using var __timeoutCancellationTokenSource = global::Voicebox.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Voicebox.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Voicebox.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: false); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Voicebox.PathBuilder( + path: "/captures", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Voicebox.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + var __contentFile = new global::System.Net.Http.StreamContent(file); + __contentFile.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( + request.Filename is null + ? "application/octet-stream" + : (global::System.IO.Path.GetExtension(request.Filename) ?? string.Empty).ToLowerInvariant() switch + { + ".aac" => "audio/aac", + ".flac" => "audio/flac", + ".gif" => "image/gif", + ".jpeg" => "image/jpeg", + ".jpg" => "image/jpeg", + ".json" => "application/json", + ".m4a" => "audio/mp4", + ".mp3" => "audio/mpeg", + ".mp4" => "video/mp4", + ".mpeg" => "audio/mpeg", + ".mpga" => "audio/mpeg", + ".oga" => "audio/ogg", + ".ogg" => "audio/ogg", + ".opus" => "audio/ogg", + ".pdf" => "application/pdf", + ".png" => "image/png", + ".txt" => "text/plain", + ".wav" => "audio/wav", + ".weba" => "audio/webm", + ".webm" => "video/webm", + ".webp" => "image/webp", + _ => "application/octet-stream", + }); + __httpRequestContent.Add( + content: __contentFile, + name: "\"file\"", + fileName: request.Filename != null ? $"\"{request.Filename}\"" : string.Empty); + if (__contentFile.Headers.ContentDisposition != null) + { + __contentFile.Headers.ContentDisposition.FileNameStar = null; + } + + if (request.Language != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.Language ?? string.Empty), + name: "\"language\""); + + } + if (request.Source != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.Source ?? string.Empty), + name: "\"source\""); + + } + if (request.SttModel != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.SttModel ?? string.Empty), + name: "\"stt_model\""); + + } + + __httpRequest.Content = __httpRequestContent; + + global::Voicebox.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareCreateCaptureEndpointCapturesPostRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Voicebox.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateCaptureEndpointCapturesPost", + methodName: "CreateCaptureEndpointCapturesPostAsync", + pathTemplate: "\"/captures\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateCaptureEndpointCapturesPost", + methodName: "CreateCaptureEndpointCapturesPostAsync", + pathTemplate: "\"/captures\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateCaptureEndpointCapturesPost", + methodName: "CreateCaptureEndpointCapturesPostAsync", + pathTemplate: "\"/captures\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessCreateCaptureEndpointCapturesPostResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateCaptureEndpointCapturesPost", + methodName: "CreateCaptureEndpointCapturesPostAsync", + pathTemplate: "\"/captures\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateCaptureEndpointCapturesPost", + methodName: "CreateCaptureEndpointCapturesPostAsync", + pathTemplate: "\"/captures\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::Voicebox.HTTPValidationError? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::Voicebox.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::Voicebox.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + throw new global::Voicebox.ApiException( + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessCreateCaptureEndpointCapturesPostResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::Voicebox.CaptureCreateResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::Voicebox.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + return + await global::Voicebox.CaptureCreateResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw new global::Voicebox.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + /// + /// Create Capture Endpoint
+ /// Upload audio, run STT, persist the capture. + ///
+ /// + /// The stream to send as the multipart 'file' file part. + /// + /// + /// + /// + /// Default Value: file + /// + /// + /// 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> CreateCaptureEndpointCapturesPostAsResponseAsync( + global::System.IO.Stream file, + string filename, + string? language = default, + string? source = default, + string? sttModel = default, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + + file = file ?? throw new global::System.ArgumentNullException(nameof(file)); + var request = new global::Voicebox.BodyCreateCaptureEndpointCapturesPost + { + File = global::System.Array.Empty(), + Filename = filename, + Language = language, + Source = source, + SttModel = sttModel, + }; + PrepareArguments( + client: HttpClient); + PrepareCreateCaptureEndpointCapturesPostArguments( + httpClient: HttpClient, + request: request); + + using var __timeoutCancellationTokenSource = global::Voicebox.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Voicebox.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Voicebox.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: false); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Voicebox.PathBuilder( + path: "/captures", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Voicebox.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + var __contentFile = new global::System.Net.Http.StreamContent(file); + __contentFile.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( + request.Filename is null + ? "application/octet-stream" + : (global::System.IO.Path.GetExtension(request.Filename) ?? string.Empty).ToLowerInvariant() switch + { + ".aac" => "audio/aac", + ".flac" => "audio/flac", + ".gif" => "image/gif", + ".jpeg" => "image/jpeg", + ".jpg" => "image/jpeg", + ".json" => "application/json", + ".m4a" => "audio/mp4", + ".mp3" => "audio/mpeg", + ".mp4" => "video/mp4", + ".mpeg" => "audio/mpeg", + ".mpga" => "audio/mpeg", + ".oga" => "audio/ogg", + ".ogg" => "audio/ogg", + ".opus" => "audio/ogg", + ".pdf" => "application/pdf", + ".png" => "image/png", + ".txt" => "text/plain", + ".wav" => "audio/wav", + ".weba" => "audio/webm", + ".webm" => "video/webm", + ".webp" => "image/webp", + _ => "application/octet-stream", + }); + __httpRequestContent.Add( + content: __contentFile, + name: "\"file\"", + fileName: request.Filename != null ? $"\"{request.Filename}\"" : string.Empty); + if (__contentFile.Headers.ContentDisposition != null) + { + __contentFile.Headers.ContentDisposition.FileNameStar = null; + } + + if (request.Language != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.Language ?? string.Empty), + name: "\"language\""); + + } + if (request.Source != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.Source ?? string.Empty), + name: "\"source\""); + + } + if (request.SttModel != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.SttModel ?? string.Empty), + name: "\"stt_model\""); + + } + + __httpRequest.Content = __httpRequestContent; + + global::Voicebox.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareCreateCaptureEndpointCapturesPostRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Voicebox.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateCaptureEndpointCapturesPost", + methodName: "CreateCaptureEndpointCapturesPostAsync", + pathTemplate: "\"/captures\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateCaptureEndpointCapturesPost", + methodName: "CreateCaptureEndpointCapturesPostAsync", + pathTemplate: "\"/captures\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateCaptureEndpointCapturesPost", + methodName: "CreateCaptureEndpointCapturesPostAsync", + pathTemplate: "\"/captures\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessCreateCaptureEndpointCapturesPostResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateCaptureEndpointCapturesPost", + methodName: "CreateCaptureEndpointCapturesPostAsync", + pathTemplate: "\"/captures\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CreateCaptureEndpointCapturesPost", + methodName: "CreateCaptureEndpointCapturesPostAsync", + pathTemplate: "\"/captures\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::Voicebox.HTTPValidationError? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::Voicebox.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::Voicebox.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + throw new global::Voicebox.ApiException( + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessCreateCaptureEndpointCapturesPostResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Voicebox.CaptureCreateResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw new global::Voicebox.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::Voicebox.CaptureCreateResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw new global::Voicebox.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.CreateChannelChannelsPost.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.CreateChannelChannelsPost.g.cs index 07576e6..00548d3 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.CreateChannelChannelsPost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.CreateChannelChannelsPost.g.cs @@ -31,6 +31,29 @@ partial void ProcessCreateChannelChannelsPostResponseContent( /// public async global::System.Threading.Tasks.Task CreateChannelChannelsPostAsync( + global::Voicebox.AudioChannelCreate request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateChannelChannelsPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Create Channel
+ /// Create a new audio channel. + ///
+ /// + /// 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> CreateChannelChannelsPostAsResponseAsync( + global::Voicebox.AudioChannelCreate request, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -59,6 +82,7 @@ partial void ProcessCreateChannelChannelsPostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: "/channels", baseUri: HttpClient.BaseAddress); @@ -121,6 +145,8 @@ partial void ProcessCreateChannelChannelsPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -131,6 +157,11 @@ partial void ProcessCreateChannelChannelsPostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -148,6 +179,8 @@ partial void ProcessCreateChannelChannelsPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -157,8 +190,7 @@ partial void ProcessCreateChannelChannelsPostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -167,6 +199,11 @@ partial void ProcessCreateChannelChannelsPostResponseContent( __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -183,14 +220,15 @@ partial void ProcessCreateChannelChannelsPostResponseContent( 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -230,6 +268,8 @@ partial void ProcessCreateChannelChannelsPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -250,6 +290,8 @@ partial void ProcessCreateChannelChannelsPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -312,9 +354,13 @@ partial void ProcessCreateChannelChannelsPostResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Voicebox.AudioChannelResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Voicebox.AudioChannelResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -342,9 +388,13 @@ partial void ProcessCreateChannelChannelsPostResponseContent( #endif ).ConfigureAwait(false); - return - await global::Voicebox.AudioChannelResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Voicebox.AudioChannelResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.CreateEffectPresetEffectsPresetsPost.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.CreateEffectPresetEffectsPresetsPost.g.cs index 5947e9d..f55534d 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.CreateEffectPresetEffectsPresetsPost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.CreateEffectPresetEffectsPresetsPost.g.cs @@ -31,6 +31,29 @@ partial void ProcessCreateEffectPresetEffectsPresetsPostResponseContent( /// public async global::System.Threading.Tasks.Task CreateEffectPresetEffectsPresetsPostAsync( + global::Voicebox.EffectPresetCreate request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateEffectPresetEffectsPresetsPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Create Effect Preset
+ /// Create a new effect preset. + ///
+ /// + /// 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> CreateEffectPresetEffectsPresetsPostAsResponseAsync( + global::Voicebox.EffectPresetCreate request, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -59,6 +82,7 @@ partial void ProcessCreateEffectPresetEffectsPresetsPostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: "/effects/presets", baseUri: HttpClient.BaseAddress); @@ -121,6 +145,8 @@ partial void ProcessCreateEffectPresetEffectsPresetsPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -131,6 +157,11 @@ partial void ProcessCreateEffectPresetEffectsPresetsPostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -148,6 +179,8 @@ partial void ProcessCreateEffectPresetEffectsPresetsPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -157,8 +190,7 @@ partial void ProcessCreateEffectPresetEffectsPresetsPostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -167,6 +199,11 @@ partial void ProcessCreateEffectPresetEffectsPresetsPostResponseContent( __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -183,14 +220,15 @@ partial void ProcessCreateEffectPresetEffectsPresetsPostResponseContent( 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -230,6 +268,8 @@ partial void ProcessCreateEffectPresetEffectsPresetsPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -250,6 +290,8 @@ partial void ProcessCreateEffectPresetEffectsPresetsPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -312,9 +354,13 @@ partial void ProcessCreateEffectPresetEffectsPresetsPostResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Voicebox.EffectPresetResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Voicebox.EffectPresetResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -342,9 +388,13 @@ partial void ProcessCreateEffectPresetEffectsPresetsPostResponseContent( #endif ).ConfigureAwait(false); - return - await global::Voicebox.EffectPresetResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Voicebox.EffectPresetResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.CreateProfileProfilesPost.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.CreateProfileProfilesPost.g.cs index 51a6175..6ef55b6 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.CreateProfileProfilesPost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.CreateProfileProfilesPost.g.cs @@ -31,6 +31,29 @@ partial void ProcessCreateProfileProfilesPostResponseContent( /// public async global::System.Threading.Tasks.Task CreateProfileProfilesPostAsync( + global::Voicebox.VoiceProfileCreate request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateProfileProfilesPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Create Profile
+ /// Create a new voice profile. + ///
+ /// + /// 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> CreateProfileProfilesPostAsResponseAsync( + global::Voicebox.VoiceProfileCreate request, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -59,6 +82,7 @@ partial void ProcessCreateProfileProfilesPostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: "/profiles", baseUri: HttpClient.BaseAddress); @@ -121,6 +145,8 @@ partial void ProcessCreateProfileProfilesPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -131,6 +157,11 @@ partial void ProcessCreateProfileProfilesPostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -148,6 +179,8 @@ partial void ProcessCreateProfileProfilesPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -157,8 +190,7 @@ partial void ProcessCreateProfileProfilesPostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -167,6 +199,11 @@ partial void ProcessCreateProfileProfilesPostResponseContent( __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -183,14 +220,15 @@ partial void ProcessCreateProfileProfilesPostResponseContent( 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -230,6 +268,8 @@ partial void ProcessCreateProfileProfilesPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -250,6 +290,8 @@ partial void ProcessCreateProfileProfilesPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -312,9 +354,13 @@ partial void ProcessCreateProfileProfilesPostResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Voicebox.VoiceProfileResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Voicebox.VoiceProfileResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -342,9 +388,13 @@ partial void ProcessCreateProfileProfilesPostResponseContent( #endif ).ConfigureAwait(false); - return - await global::Voicebox.VoiceProfileResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Voicebox.VoiceProfileResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.CreateStoryStoriesPost.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.CreateStoryStoriesPost.g.cs index 269f254..9d2cf8e 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.CreateStoryStoriesPost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.CreateStoryStoriesPost.g.cs @@ -31,6 +31,29 @@ partial void ProcessCreateStoryStoriesPostResponseContent( /// public async global::System.Threading.Tasks.Task CreateStoryStoriesPostAsync( + global::Voicebox.StoryCreate request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateStoryStoriesPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Create Story
+ /// Create a new story. + ///
+ /// + /// 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> CreateStoryStoriesPostAsResponseAsync( + global::Voicebox.StoryCreate request, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -59,6 +82,7 @@ partial void ProcessCreateStoryStoriesPostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: "/stories", baseUri: HttpClient.BaseAddress); @@ -121,6 +145,8 @@ partial void ProcessCreateStoryStoriesPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -131,6 +157,11 @@ partial void ProcessCreateStoryStoriesPostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -148,6 +179,8 @@ partial void ProcessCreateStoryStoriesPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -157,8 +190,7 @@ partial void ProcessCreateStoryStoriesPostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -167,6 +199,11 @@ partial void ProcessCreateStoryStoriesPostResponseContent( __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -183,14 +220,15 @@ partial void ProcessCreateStoryStoriesPostResponseContent( 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -230,6 +268,8 @@ partial void ProcessCreateStoryStoriesPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -250,6 +290,8 @@ partial void ProcessCreateStoryStoriesPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -312,9 +354,13 @@ partial void ProcessCreateStoryStoriesPostResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Voicebox.StoryResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Voicebox.StoryResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -342,9 +388,13 @@ partial void ProcessCreateStoryStoriesPostResponseContent( #endif ).ConfigureAwait(false); - return - await global::Voicebox.StoryResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Voicebox.StoryResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.DeleteCaptureEndpointCapturesCaptureIdDelete.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.DeleteCaptureEndpointCapturesCaptureIdDelete.g.cs index 4d9452f..cceb895 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.DeleteCaptureEndpointCapturesCaptureIdDelete.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.DeleteCaptureEndpointCapturesCaptureIdDelete.g.cs @@ -32,6 +32,26 @@ partial void ProcessDeleteCaptureEndpointCapturesCaptureIdDeleteResponseContent( string captureId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await DeleteCaptureEndpointCapturesCaptureIdDeleteAsResponseAsync( + captureId: captureId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Delete Capture Endpoint + /// + /// + /// 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> DeleteCaptureEndpointCapturesCaptureIdDeleteAsResponseAsync( + string captureId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -55,6 +75,7 @@ partial void ProcessDeleteCaptureEndpointCapturesCaptureIdDeleteResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: $"/captures/{captureId}", baseUri: HttpClient.BaseAddress); @@ -111,6 +132,8 @@ partial void ProcessDeleteCaptureEndpointCapturesCaptureIdDeleteResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -121,6 +144,11 @@ partial void ProcessDeleteCaptureEndpointCapturesCaptureIdDeleteResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -138,6 +166,8 @@ partial void ProcessDeleteCaptureEndpointCapturesCaptureIdDeleteResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -147,8 +177,7 @@ partial void ProcessDeleteCaptureEndpointCapturesCaptureIdDeleteResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -157,6 +186,11 @@ partial void ProcessDeleteCaptureEndpointCapturesCaptureIdDeleteResponseContent( __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -173,14 +207,15 @@ partial void ProcessDeleteCaptureEndpointCapturesCaptureIdDeleteResponseContent( 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -220,6 +255,8 @@ partial void ProcessDeleteCaptureEndpointCapturesCaptureIdDeleteResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -240,6 +277,8 @@ partial void ProcessDeleteCaptureEndpointCapturesCaptureIdDeleteResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -302,7 +341,11 @@ partial void ProcessDeleteCaptureEndpointCapturesCaptureIdDeleteResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -330,7 +373,11 @@ partial void ProcessDeleteCaptureEndpointCapturesCaptureIdDeleteResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.DeleteChannelChannelsChannelIdDelete.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.DeleteChannelChannelsChannelIdDelete.g.cs index 460dce6..fb07206 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.DeleteChannelChannelsChannelIdDelete.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.DeleteChannelChannelsChannelIdDelete.g.cs @@ -33,6 +33,27 @@ partial void ProcessDeleteChannelChannelsChannelIdDeleteResponseContent( string channelId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await DeleteChannelChannelsChannelIdDeleteAsResponseAsync( + channelId: channelId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Delete Channel
+ /// Delete an audio channel. + ///
+ /// + /// 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> DeleteChannelChannelsChannelIdDeleteAsResponseAsync( + string channelId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -56,6 +77,7 @@ partial void ProcessDeleteChannelChannelsChannelIdDeleteResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: $"/channels/{channelId}", baseUri: HttpClient.BaseAddress); @@ -112,6 +134,8 @@ partial void ProcessDeleteChannelChannelsChannelIdDeleteResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -122,6 +146,11 @@ partial void ProcessDeleteChannelChannelsChannelIdDeleteResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -139,6 +168,8 @@ partial void ProcessDeleteChannelChannelsChannelIdDeleteResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -148,8 +179,7 @@ partial void ProcessDeleteChannelChannelsChannelIdDeleteResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -158,6 +188,11 @@ partial void ProcessDeleteChannelChannelsChannelIdDeleteResponseContent( __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -174,14 +209,15 @@ partial void ProcessDeleteChannelChannelsChannelIdDeleteResponseContent( 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -221,6 +257,8 @@ partial void ProcessDeleteChannelChannelsChannelIdDeleteResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -241,6 +279,8 @@ partial void ProcessDeleteChannelChannelsChannelIdDeleteResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -303,7 +343,11 @@ partial void ProcessDeleteChannelChannelsChannelIdDeleteResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -331,7 +375,11 @@ partial void ProcessDeleteChannelChannelsChannelIdDeleteResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.DeleteCudaBackendBackendCudaDelete.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.DeleteCudaBackendBackendCudaDelete.g.cs index c50cbb5..8ae915d 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.DeleteCudaBackendBackendCudaDelete.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.DeleteCudaBackendBackendCudaDelete.g.cs @@ -29,6 +29,24 @@ partial void ProcessDeleteCudaBackendBackendCudaDeleteResponseContent( public async global::System.Threading.Tasks.Task DeleteCudaBackendBackendCudaDeleteAsync( global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await DeleteCudaBackendBackendCudaDeleteAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Delete Cuda Backend
+ /// Delete the downloaded CUDA backend binary. + ///
+ /// 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> DeleteCudaBackendBackendCudaDeleteAsResponseAsync( + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -51,6 +69,7 @@ partial void ProcessDeleteCudaBackendBackendCudaDeleteResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: "/backend/cuda", baseUri: HttpClient.BaseAddress); @@ -106,6 +125,8 @@ partial void ProcessDeleteCudaBackendBackendCudaDeleteResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -116,6 +137,11 @@ partial void ProcessDeleteCudaBackendBackendCudaDeleteResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -133,6 +159,8 @@ partial void ProcessDeleteCudaBackendBackendCudaDeleteResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -142,8 +170,7 @@ partial void ProcessDeleteCudaBackendBackendCudaDeleteResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -152,6 +179,11 @@ partial void ProcessDeleteCudaBackendBackendCudaDeleteResponseContent( __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -168,14 +200,15 @@ partial void ProcessDeleteCudaBackendBackendCudaDeleteResponseContent( 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +248,8 @@ partial void ProcessDeleteCudaBackendBackendCudaDeleteResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -235,6 +270,8 @@ partial void ProcessDeleteCudaBackendBackendCudaDeleteResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -259,7 +296,11 @@ partial void ProcessDeleteCudaBackendBackendCudaDeleteResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -287,7 +328,11 @@ partial void ProcessDeleteCudaBackendBackendCudaDeleteResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.DeleteEffectPresetEffectsPresetsPresetIdDelete.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.DeleteEffectPresetEffectsPresetsPresetIdDelete.g.cs index b1bba2c..327799d 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.DeleteEffectPresetEffectsPresetsPresetIdDelete.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.DeleteEffectPresetEffectsPresetsPresetIdDelete.g.cs @@ -33,6 +33,27 @@ partial void ProcessDeleteEffectPresetEffectsPresetsPresetIdDeleteResponseConten string presetId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await DeleteEffectPresetEffectsPresetsPresetIdDeleteAsResponseAsync( + presetId: presetId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Delete Effect Preset
+ /// Delete a user effect preset. + ///
+ /// + /// 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> DeleteEffectPresetEffectsPresetsPresetIdDeleteAsResponseAsync( + string presetId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -56,6 +77,7 @@ partial void ProcessDeleteEffectPresetEffectsPresetsPresetIdDeleteResponseConten global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: $"/effects/presets/{presetId}", baseUri: HttpClient.BaseAddress); @@ -112,6 +134,8 @@ partial void ProcessDeleteEffectPresetEffectsPresetsPresetIdDeleteResponseConten attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -122,6 +146,11 @@ partial void ProcessDeleteEffectPresetEffectsPresetsPresetIdDeleteResponseConten } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -139,6 +168,8 @@ partial void ProcessDeleteEffectPresetEffectsPresetsPresetIdDeleteResponseConten attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -148,8 +179,7 @@ partial void ProcessDeleteEffectPresetEffectsPresetsPresetIdDeleteResponseConten __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -158,6 +188,11 @@ partial void ProcessDeleteEffectPresetEffectsPresetsPresetIdDeleteResponseConten __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -174,14 +209,15 @@ partial void ProcessDeleteEffectPresetEffectsPresetsPresetIdDeleteResponseConten 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -221,6 +257,8 @@ partial void ProcessDeleteEffectPresetEffectsPresetsPresetIdDeleteResponseConten attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -241,6 +279,8 @@ partial void ProcessDeleteEffectPresetEffectsPresetsPresetIdDeleteResponseConten attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -303,7 +343,11 @@ partial void ProcessDeleteEffectPresetEffectsPresetsPresetIdDeleteResponseConten { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -331,7 +375,11 @@ partial void ProcessDeleteEffectPresetEffectsPresetsPresetIdDeleteResponseConten #endif ).ConfigureAwait(false); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.DeleteGenerationHistoryGenerationIdDelete.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.DeleteGenerationHistoryGenerationIdDelete.g.cs index a3e98cd..deb4018 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.DeleteGenerationHistoryGenerationIdDelete.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.DeleteGenerationHistoryGenerationIdDelete.g.cs @@ -33,6 +33,27 @@ partial void ProcessDeleteGenerationHistoryGenerationIdDeleteResponseContent( string generationId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await DeleteGenerationHistoryGenerationIdDeleteAsResponseAsync( + generationId: generationId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Delete Generation
+ /// Delete a generation. + ///
+ /// + /// 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> DeleteGenerationHistoryGenerationIdDeleteAsResponseAsync( + string generationId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -56,6 +77,7 @@ partial void ProcessDeleteGenerationHistoryGenerationIdDeleteResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: $"/history/{generationId}", baseUri: HttpClient.BaseAddress); @@ -112,6 +134,8 @@ partial void ProcessDeleteGenerationHistoryGenerationIdDeleteResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -122,6 +146,11 @@ partial void ProcessDeleteGenerationHistoryGenerationIdDeleteResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -139,6 +168,8 @@ partial void ProcessDeleteGenerationHistoryGenerationIdDeleteResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -148,8 +179,7 @@ partial void ProcessDeleteGenerationHistoryGenerationIdDeleteResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -158,6 +188,11 @@ partial void ProcessDeleteGenerationHistoryGenerationIdDeleteResponseContent( __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -174,14 +209,15 @@ partial void ProcessDeleteGenerationHistoryGenerationIdDeleteResponseContent( 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -221,6 +257,8 @@ partial void ProcessDeleteGenerationHistoryGenerationIdDeleteResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -241,6 +279,8 @@ partial void ProcessDeleteGenerationHistoryGenerationIdDeleteResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -303,7 +343,11 @@ partial void ProcessDeleteGenerationHistoryGenerationIdDeleteResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -331,7 +375,11 @@ partial void ProcessDeleteGenerationHistoryGenerationIdDeleteResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.DeleteGenerationVersionGenerationsGenerationIdVersionsVersionIdDelete.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.DeleteGenerationVersionGenerationsGenerationIdVersionsVersionIdDelete.g.cs index 4f29a8f..037f32f 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.DeleteGenerationVersionGenerationsGenerationIdVersionsVersionIdDelete.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.DeleteGenerationVersionGenerationsGenerationIdVersionsVersionIdDelete.g.cs @@ -37,6 +37,30 @@ partial void ProcessDeleteGenerationVersionGenerationsGenerationIdVersionsVersio string versionId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await DeleteGenerationVersionGenerationsGenerationIdVersionsVersionIdDeleteAsResponseAsync( + generationId: generationId, + versionId: versionId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Delete Generation Version
+ /// Delete a version. Cannot delete the last remaining version. + ///
+ /// + /// + /// 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> DeleteGenerationVersionGenerationsGenerationIdVersionsVersionIdDeleteAsResponseAsync( + string generationId, + string versionId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -61,6 +85,7 @@ partial void ProcessDeleteGenerationVersionGenerationsGenerationIdVersionsVersio global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: $"/generations/{generationId}/versions/{versionId}", baseUri: HttpClient.BaseAddress); @@ -118,6 +143,8 @@ partial void ProcessDeleteGenerationVersionGenerationsGenerationIdVersionsVersio attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -128,6 +155,11 @@ partial void ProcessDeleteGenerationVersionGenerationsGenerationIdVersionsVersio } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -145,6 +177,8 @@ partial void ProcessDeleteGenerationVersionGenerationsGenerationIdVersionsVersio attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -154,8 +188,7 @@ partial void ProcessDeleteGenerationVersionGenerationsGenerationIdVersionsVersio __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -164,6 +197,11 @@ partial void ProcessDeleteGenerationVersionGenerationsGenerationIdVersionsVersio __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -180,14 +218,15 @@ partial void ProcessDeleteGenerationVersionGenerationsGenerationIdVersionsVersio 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -227,6 +266,8 @@ partial void ProcessDeleteGenerationVersionGenerationsGenerationIdVersionsVersio attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -247,6 +288,8 @@ partial void ProcessDeleteGenerationVersionGenerationsGenerationIdVersionsVersio attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -309,7 +352,11 @@ partial void ProcessDeleteGenerationVersionGenerationsGenerationIdVersionsVersio { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -337,7 +384,11 @@ partial void ProcessDeleteGenerationVersionGenerationsGenerationIdVersionsVersio #endif ).ConfigureAwait(false); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.DeleteMcpBindingMcpBindingsClientIdDelete.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.DeleteMcpBindingMcpBindingsClientIdDelete.g.cs index c94e42d..7df003f 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.DeleteMcpBindingMcpBindingsClientIdDelete.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.DeleteMcpBindingMcpBindingsClientIdDelete.g.cs @@ -32,6 +32,26 @@ partial void ProcessDeleteMcpBindingMcpBindingsClientIdDeleteResponseContent( string clientId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await DeleteMcpBindingMcpBindingsClientIdDeleteAsResponseAsync( + clientId: clientId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Delete Mcp Binding + /// + /// + /// 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> DeleteMcpBindingMcpBindingsClientIdDeleteAsResponseAsync( + string clientId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -55,6 +75,7 @@ partial void ProcessDeleteMcpBindingMcpBindingsClientIdDeleteResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: $"/mcp/bindings/{clientId}", baseUri: HttpClient.BaseAddress); @@ -111,6 +132,8 @@ partial void ProcessDeleteMcpBindingMcpBindingsClientIdDeleteResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -121,6 +144,11 @@ partial void ProcessDeleteMcpBindingMcpBindingsClientIdDeleteResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -138,6 +166,8 @@ partial void ProcessDeleteMcpBindingMcpBindingsClientIdDeleteResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -147,8 +177,7 @@ partial void ProcessDeleteMcpBindingMcpBindingsClientIdDeleteResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -157,6 +186,11 @@ partial void ProcessDeleteMcpBindingMcpBindingsClientIdDeleteResponseContent( __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -173,14 +207,15 @@ partial void ProcessDeleteMcpBindingMcpBindingsClientIdDeleteResponseContent( 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -220,6 +255,8 @@ partial void ProcessDeleteMcpBindingMcpBindingsClientIdDeleteResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -240,6 +277,8 @@ partial void ProcessDeleteMcpBindingMcpBindingsClientIdDeleteResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -302,7 +341,11 @@ partial void ProcessDeleteMcpBindingMcpBindingsClientIdDeleteResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -330,7 +373,11 @@ partial void ProcessDeleteMcpBindingMcpBindingsClientIdDeleteResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.DeleteModelModelsModelNameDelete.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.DeleteModelModelsModelNameDelete.g.cs index 7cce834..ec3c99d 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.DeleteModelModelsModelNameDelete.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.DeleteModelModelsModelNameDelete.g.cs @@ -33,6 +33,27 @@ partial void ProcessDeleteModelModelsModelNameDeleteResponseContent( string modelName, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await DeleteModelModelsModelNameDeleteAsResponseAsync( + modelName: modelName, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Delete Model
+ /// Delete a downloaded model from the HuggingFace cache. + ///
+ /// + /// 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> DeleteModelModelsModelNameDeleteAsResponseAsync( + string modelName, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -56,6 +77,7 @@ partial void ProcessDeleteModelModelsModelNameDeleteResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: $"/models/{modelName}", baseUri: HttpClient.BaseAddress); @@ -112,6 +134,8 @@ partial void ProcessDeleteModelModelsModelNameDeleteResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -122,6 +146,11 @@ partial void ProcessDeleteModelModelsModelNameDeleteResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -139,6 +168,8 @@ partial void ProcessDeleteModelModelsModelNameDeleteResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -148,8 +179,7 @@ partial void ProcessDeleteModelModelsModelNameDeleteResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -158,6 +188,11 @@ partial void ProcessDeleteModelModelsModelNameDeleteResponseContent( __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -174,14 +209,15 @@ partial void ProcessDeleteModelModelsModelNameDeleteResponseContent( 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -221,6 +257,8 @@ partial void ProcessDeleteModelModelsModelNameDeleteResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -241,6 +279,8 @@ partial void ProcessDeleteModelModelsModelNameDeleteResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -303,7 +343,11 @@ partial void ProcessDeleteModelModelsModelNameDeleteResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -331,7 +375,11 @@ partial void ProcessDeleteModelModelsModelNameDeleteResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.DeleteProfileAvatarProfilesProfileIdAvatarDelete.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.DeleteProfileAvatarProfilesProfileIdAvatarDelete.g.cs index 01c9721..75ae85b 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.DeleteProfileAvatarProfilesProfileIdAvatarDelete.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.DeleteProfileAvatarProfilesProfileIdAvatarDelete.g.cs @@ -33,6 +33,27 @@ partial void ProcessDeleteProfileAvatarProfilesProfileIdAvatarDeleteResponseCont string profileId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await DeleteProfileAvatarProfilesProfileIdAvatarDeleteAsResponseAsync( + profileId: profileId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Delete Profile Avatar
+ /// Delete avatar image for a profile. + ///
+ /// + /// 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> DeleteProfileAvatarProfilesProfileIdAvatarDeleteAsResponseAsync( + string profileId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -56,6 +77,7 @@ partial void ProcessDeleteProfileAvatarProfilesProfileIdAvatarDeleteResponseCont global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: $"/profiles/{profileId}/avatar", baseUri: HttpClient.BaseAddress); @@ -112,6 +134,8 @@ partial void ProcessDeleteProfileAvatarProfilesProfileIdAvatarDeleteResponseCont attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -122,6 +146,11 @@ partial void ProcessDeleteProfileAvatarProfilesProfileIdAvatarDeleteResponseCont } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -139,6 +168,8 @@ partial void ProcessDeleteProfileAvatarProfilesProfileIdAvatarDeleteResponseCont attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -148,8 +179,7 @@ partial void ProcessDeleteProfileAvatarProfilesProfileIdAvatarDeleteResponseCont __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -158,6 +188,11 @@ partial void ProcessDeleteProfileAvatarProfilesProfileIdAvatarDeleteResponseCont __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -174,14 +209,15 @@ partial void ProcessDeleteProfileAvatarProfilesProfileIdAvatarDeleteResponseCont 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -221,6 +257,8 @@ partial void ProcessDeleteProfileAvatarProfilesProfileIdAvatarDeleteResponseCont attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -241,6 +279,8 @@ partial void ProcessDeleteProfileAvatarProfilesProfileIdAvatarDeleteResponseCont attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -303,7 +343,11 @@ partial void ProcessDeleteProfileAvatarProfilesProfileIdAvatarDeleteResponseCont { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -331,7 +375,11 @@ partial void ProcessDeleteProfileAvatarProfilesProfileIdAvatarDeleteResponseCont #endif ).ConfigureAwait(false); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.DeleteProfileProfilesProfileIdDelete.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.DeleteProfileProfilesProfileIdDelete.g.cs index a50cb33..b366bc4 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.DeleteProfileProfilesProfileIdDelete.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.DeleteProfileProfilesProfileIdDelete.g.cs @@ -33,6 +33,27 @@ partial void ProcessDeleteProfileProfilesProfileIdDeleteResponseContent( string profileId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await DeleteProfileProfilesProfileIdDeleteAsResponseAsync( + profileId: profileId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Delete Profile
+ /// Delete a voice profile. + ///
+ /// + /// 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> DeleteProfileProfilesProfileIdDeleteAsResponseAsync( + string profileId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -56,6 +77,7 @@ partial void ProcessDeleteProfileProfilesProfileIdDeleteResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: $"/profiles/{profileId}", baseUri: HttpClient.BaseAddress); @@ -112,6 +134,8 @@ partial void ProcessDeleteProfileProfilesProfileIdDeleteResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -122,6 +146,11 @@ partial void ProcessDeleteProfileProfilesProfileIdDeleteResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -139,6 +168,8 @@ partial void ProcessDeleteProfileProfilesProfileIdDeleteResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -148,8 +179,7 @@ partial void ProcessDeleteProfileProfilesProfileIdDeleteResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -158,6 +188,11 @@ partial void ProcessDeleteProfileProfilesProfileIdDeleteResponseContent( __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -174,14 +209,15 @@ partial void ProcessDeleteProfileProfilesProfileIdDeleteResponseContent( 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -221,6 +257,8 @@ partial void ProcessDeleteProfileProfilesProfileIdDeleteResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -241,6 +279,8 @@ partial void ProcessDeleteProfileProfilesProfileIdDeleteResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -303,7 +343,11 @@ partial void ProcessDeleteProfileProfilesProfileIdDeleteResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -331,7 +375,11 @@ partial void ProcessDeleteProfileProfilesProfileIdDeleteResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.DeleteProfileSampleProfilesSamplesSampleIdDelete.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.DeleteProfileSampleProfilesSamplesSampleIdDelete.g.cs index 964723a..2883335 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.DeleteProfileSampleProfilesSamplesSampleIdDelete.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.DeleteProfileSampleProfilesSamplesSampleIdDelete.g.cs @@ -33,6 +33,27 @@ partial void ProcessDeleteProfileSampleProfilesSamplesSampleIdDeleteResponseCont string sampleId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await DeleteProfileSampleProfilesSamplesSampleIdDeleteAsResponseAsync( + sampleId: sampleId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Delete Profile Sample
+ /// Delete a profile sample. + ///
+ /// + /// 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> DeleteProfileSampleProfilesSamplesSampleIdDeleteAsResponseAsync( + string sampleId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -56,6 +77,7 @@ partial void ProcessDeleteProfileSampleProfilesSamplesSampleIdDeleteResponseCont global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: $"/profiles/samples/{sampleId}", baseUri: HttpClient.BaseAddress); @@ -112,6 +134,8 @@ partial void ProcessDeleteProfileSampleProfilesSamplesSampleIdDeleteResponseCont attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -122,6 +146,11 @@ partial void ProcessDeleteProfileSampleProfilesSamplesSampleIdDeleteResponseCont } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -139,6 +168,8 @@ partial void ProcessDeleteProfileSampleProfilesSamplesSampleIdDeleteResponseCont attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -148,8 +179,7 @@ partial void ProcessDeleteProfileSampleProfilesSamplesSampleIdDeleteResponseCont __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -158,6 +188,11 @@ partial void ProcessDeleteProfileSampleProfilesSamplesSampleIdDeleteResponseCont __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -174,14 +209,15 @@ partial void ProcessDeleteProfileSampleProfilesSamplesSampleIdDeleteResponseCont 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -221,6 +257,8 @@ partial void ProcessDeleteProfileSampleProfilesSamplesSampleIdDeleteResponseCont attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -241,6 +279,8 @@ partial void ProcessDeleteProfileSampleProfilesSamplesSampleIdDeleteResponseCont attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -303,7 +343,11 @@ partial void ProcessDeleteProfileSampleProfilesSamplesSampleIdDeleteResponseCont { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -331,7 +375,11 @@ partial void ProcessDeleteProfileSampleProfilesSamplesSampleIdDeleteResponseCont #endif ).ConfigureAwait(false); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.DeleteStoryStoriesStoryIdDelete.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.DeleteStoryStoriesStoryIdDelete.g.cs index 6236d89..60f4931 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.DeleteStoryStoriesStoryIdDelete.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.DeleteStoryStoriesStoryIdDelete.g.cs @@ -33,6 +33,27 @@ partial void ProcessDeleteStoryStoriesStoryIdDeleteResponseContent( string storyId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await DeleteStoryStoriesStoryIdDeleteAsResponseAsync( + storyId: storyId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Delete Story
+ /// Delete a story. + ///
+ /// + /// 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> DeleteStoryStoriesStoryIdDeleteAsResponseAsync( + string storyId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -56,6 +77,7 @@ partial void ProcessDeleteStoryStoriesStoryIdDeleteResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: $"/stories/{storyId}", baseUri: HttpClient.BaseAddress); @@ -112,6 +134,8 @@ partial void ProcessDeleteStoryStoriesStoryIdDeleteResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -122,6 +146,11 @@ partial void ProcessDeleteStoryStoriesStoryIdDeleteResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -139,6 +168,8 @@ partial void ProcessDeleteStoryStoriesStoryIdDeleteResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -148,8 +179,7 @@ partial void ProcessDeleteStoryStoriesStoryIdDeleteResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -158,6 +188,11 @@ partial void ProcessDeleteStoryStoriesStoryIdDeleteResponseContent( __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -174,14 +209,15 @@ partial void ProcessDeleteStoryStoriesStoryIdDeleteResponseContent( 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -221,6 +257,8 @@ partial void ProcessDeleteStoryStoriesStoryIdDeleteResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -241,6 +279,8 @@ partial void ProcessDeleteStoryStoriesStoryIdDeleteResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -303,7 +343,11 @@ partial void ProcessDeleteStoryStoriesStoryIdDeleteResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -331,7 +375,11 @@ partial void ProcessDeleteStoryStoriesStoryIdDeleteResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.DownloadCudaBackendBackendDownloadCudaPost.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.DownloadCudaBackendBackendDownloadCudaPost.g.cs index 6945a06..3ab7013 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.DownloadCudaBackendBackendDownloadCudaPost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.DownloadCudaBackendBackendDownloadCudaPost.g.cs @@ -29,6 +29,24 @@ partial void ProcessDownloadCudaBackendBackendDownloadCudaPostResponseContent( public async global::System.Threading.Tasks.Task DownloadCudaBackendBackendDownloadCudaPostAsync( global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await DownloadCudaBackendBackendDownloadCudaPostAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Download Cuda Backend
+ /// Download the CUDA backend binary. + ///
+ /// 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> DownloadCudaBackendBackendDownloadCudaPostAsResponseAsync( + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -51,6 +69,7 @@ partial void ProcessDownloadCudaBackendBackendDownloadCudaPostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: "/backend/download-cuda", baseUri: HttpClient.BaseAddress); @@ -106,6 +125,8 @@ partial void ProcessDownloadCudaBackendBackendDownloadCudaPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -116,6 +137,11 @@ partial void ProcessDownloadCudaBackendBackendDownloadCudaPostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -133,6 +159,8 @@ partial void ProcessDownloadCudaBackendBackendDownloadCudaPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -142,8 +170,7 @@ partial void ProcessDownloadCudaBackendBackendDownloadCudaPostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -152,6 +179,11 @@ partial void ProcessDownloadCudaBackendBackendDownloadCudaPostResponseContent( __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -168,14 +200,15 @@ partial void ProcessDownloadCudaBackendBackendDownloadCudaPostResponseContent( 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +248,8 @@ partial void ProcessDownloadCudaBackendBackendDownloadCudaPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -235,6 +270,8 @@ partial void ProcessDownloadCudaBackendBackendDownloadCudaPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -259,7 +296,11 @@ partial void ProcessDownloadCudaBackendBackendDownloadCudaPostResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -287,7 +328,11 @@ partial void ProcessDownloadCudaBackendBackendDownloadCudaPostResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.DuplicateStoryItemStoriesStoryIdItemsItemIdDuplicatePost.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.DuplicateStoryItemStoriesStoryIdItemsItemIdDuplicatePost.g.cs index 2bddfb8..ea829a6 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.DuplicateStoryItemStoriesStoryIdItemsItemIdDuplicatePost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.DuplicateStoryItemStoriesStoryIdItemsItemIdDuplicatePost.g.cs @@ -37,6 +37,30 @@ partial void ProcessDuplicateStoryItemStoriesStoryIdItemsItemIdDuplicatePostResp string itemId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await DuplicateStoryItemStoriesStoryIdItemsItemIdDuplicatePostAsResponseAsync( + storyId: storyId, + itemId: itemId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Duplicate Story Item
+ /// Duplicate a story item. + ///
+ /// + /// + /// 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> DuplicateStoryItemStoriesStoryIdItemsItemIdDuplicatePostAsResponseAsync( + string storyId, + string itemId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -61,6 +85,7 @@ partial void ProcessDuplicateStoryItemStoriesStoryIdItemsItemIdDuplicatePostResp global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: $"/stories/{storyId}/items/{itemId}/duplicate", baseUri: HttpClient.BaseAddress); @@ -118,6 +143,8 @@ partial void ProcessDuplicateStoryItemStoriesStoryIdItemsItemIdDuplicatePostResp attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -128,6 +155,11 @@ partial void ProcessDuplicateStoryItemStoriesStoryIdItemsItemIdDuplicatePostResp } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -145,6 +177,8 @@ partial void ProcessDuplicateStoryItemStoriesStoryIdItemsItemIdDuplicatePostResp attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -154,8 +188,7 @@ partial void ProcessDuplicateStoryItemStoriesStoryIdItemsItemIdDuplicatePostResp __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -164,6 +197,11 @@ partial void ProcessDuplicateStoryItemStoriesStoryIdItemsItemIdDuplicatePostResp __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -180,14 +218,15 @@ partial void ProcessDuplicateStoryItemStoriesStoryIdItemsItemIdDuplicatePostResp 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -227,6 +266,8 @@ partial void ProcessDuplicateStoryItemStoriesStoryIdItemsItemIdDuplicatePostResp attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -247,6 +288,8 @@ partial void ProcessDuplicateStoryItemStoriesStoryIdItemsItemIdDuplicatePostResp attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -309,9 +352,13 @@ partial void ProcessDuplicateStoryItemStoriesStoryIdItemsItemIdDuplicatePostResp { __response.EnsureSuccessStatusCode(); - return - global::Voicebox.StoryItemDetail.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Voicebox.StoryItemDetail.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -339,9 +386,13 @@ partial void ProcessDuplicateStoryItemStoriesStoryIdItemsItemIdDuplicatePostResp #endif ).ConfigureAwait(false); - return - await global::Voicebox.StoryItemDetail.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Voicebox.StoryItemDetail.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ExportGenerationAudioHistoryGenerationIdExportAudioGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ExportGenerationAudioHistoryGenerationIdExportAudioGet.g.cs index 605c23a..35a6cdb 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ExportGenerationAudioHistoryGenerationIdExportAudioGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ExportGenerationAudioHistoryGenerationIdExportAudioGet.g.cs @@ -33,6 +33,27 @@ partial void ProcessExportGenerationAudioHistoryGenerationIdExportAudioGetRespon string generationId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ExportGenerationAudioHistoryGenerationIdExportAudioGetAsResponseAsync( + generationId: generationId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Export Generation Audio
+ /// Export only the audio file from a generation. + ///
+ /// + /// 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> ExportGenerationAudioHistoryGenerationIdExportAudioGetAsResponseAsync( + string generationId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -56,6 +77,7 @@ partial void ProcessExportGenerationAudioHistoryGenerationIdExportAudioGetRespon global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: $"/history/{generationId}/export-audio", baseUri: HttpClient.BaseAddress); @@ -112,6 +134,8 @@ partial void ProcessExportGenerationAudioHistoryGenerationIdExportAudioGetRespon attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -122,6 +146,11 @@ partial void ProcessExportGenerationAudioHistoryGenerationIdExportAudioGetRespon } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -139,6 +168,8 @@ partial void ProcessExportGenerationAudioHistoryGenerationIdExportAudioGetRespon attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -148,8 +179,7 @@ partial void ProcessExportGenerationAudioHistoryGenerationIdExportAudioGetRespon __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -158,6 +188,11 @@ partial void ProcessExportGenerationAudioHistoryGenerationIdExportAudioGetRespon __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -174,14 +209,15 @@ partial void ProcessExportGenerationAudioHistoryGenerationIdExportAudioGetRespon 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -221,6 +257,8 @@ partial void ProcessExportGenerationAudioHistoryGenerationIdExportAudioGetRespon attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -241,6 +279,8 @@ partial void ProcessExportGenerationAudioHistoryGenerationIdExportAudioGetRespon attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -303,7 +343,11 @@ partial void ProcessExportGenerationAudioHistoryGenerationIdExportAudioGetRespon { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -331,7 +375,11 @@ partial void ProcessExportGenerationAudioHistoryGenerationIdExportAudioGetRespon #endif ).ConfigureAwait(false); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ExportGenerationHistoryGenerationIdExportGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ExportGenerationHistoryGenerationIdExportGet.g.cs index 35839cf..efaed38 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ExportGenerationHistoryGenerationIdExportGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ExportGenerationHistoryGenerationIdExportGet.g.cs @@ -33,6 +33,27 @@ partial void ProcessExportGenerationHistoryGenerationIdExportGetResponseContent( string generationId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ExportGenerationHistoryGenerationIdExportGetAsResponseAsync( + generationId: generationId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Export Generation
+ /// Export a generation as a ZIP archive. + ///
+ /// + /// 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> ExportGenerationHistoryGenerationIdExportGetAsResponseAsync( + string generationId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -56,6 +77,7 @@ partial void ProcessExportGenerationHistoryGenerationIdExportGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: $"/history/{generationId}/export", baseUri: HttpClient.BaseAddress); @@ -112,6 +134,8 @@ partial void ProcessExportGenerationHistoryGenerationIdExportGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -122,6 +146,11 @@ partial void ProcessExportGenerationHistoryGenerationIdExportGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -139,6 +168,8 @@ partial void ProcessExportGenerationHistoryGenerationIdExportGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -148,8 +179,7 @@ partial void ProcessExportGenerationHistoryGenerationIdExportGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -158,6 +188,11 @@ partial void ProcessExportGenerationHistoryGenerationIdExportGetResponseContent( __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -174,14 +209,15 @@ partial void ProcessExportGenerationHistoryGenerationIdExportGetResponseContent( 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -221,6 +257,8 @@ partial void ProcessExportGenerationHistoryGenerationIdExportGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -241,6 +279,8 @@ partial void ProcessExportGenerationHistoryGenerationIdExportGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -303,7 +343,11 @@ partial void ProcessExportGenerationHistoryGenerationIdExportGetResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -331,7 +375,11 @@ partial void ProcessExportGenerationHistoryGenerationIdExportGetResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ExportProfileProfilesProfileIdExportGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ExportProfileProfilesProfileIdExportGet.g.cs index 660ef49..1a68180 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ExportProfileProfilesProfileIdExportGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ExportProfileProfilesProfileIdExportGet.g.cs @@ -33,6 +33,27 @@ partial void ProcessExportProfileProfilesProfileIdExportGetResponseContent( string profileId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ExportProfileProfilesProfileIdExportGetAsResponseAsync( + profileId: profileId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Export Profile
+ /// Export a voice profile as a ZIP archive. + ///
+ /// + /// 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> ExportProfileProfilesProfileIdExportGetAsResponseAsync( + string profileId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -56,6 +77,7 @@ partial void ProcessExportProfileProfilesProfileIdExportGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: $"/profiles/{profileId}/export", baseUri: HttpClient.BaseAddress); @@ -112,6 +134,8 @@ partial void ProcessExportProfileProfilesProfileIdExportGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -122,6 +146,11 @@ partial void ProcessExportProfileProfilesProfileIdExportGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -139,6 +168,8 @@ partial void ProcessExportProfileProfilesProfileIdExportGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -148,8 +179,7 @@ partial void ProcessExportProfileProfilesProfileIdExportGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -158,6 +188,11 @@ partial void ProcessExportProfileProfilesProfileIdExportGetResponseContent( __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -174,14 +209,15 @@ partial void ProcessExportProfileProfilesProfileIdExportGetResponseContent( 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -221,6 +257,8 @@ partial void ProcessExportProfileProfilesProfileIdExportGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -241,6 +279,8 @@ partial void ProcessExportProfileProfilesProfileIdExportGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -303,7 +343,11 @@ partial void ProcessExportProfileProfilesProfileIdExportGetResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -331,7 +375,11 @@ partial void ProcessExportProfileProfilesProfileIdExportGetResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ExportStoryAudioStoriesStoryIdExportAudioGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ExportStoryAudioStoriesStoryIdExportAudioGet.g.cs index be49984..b695d5c 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ExportStoryAudioStoriesStoryIdExportAudioGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ExportStoryAudioStoriesStoryIdExportAudioGet.g.cs @@ -33,6 +33,27 @@ partial void ProcessExportStoryAudioStoriesStoryIdExportAudioGetResponseContent( string storyId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ExportStoryAudioStoriesStoryIdExportAudioGetAsResponseAsync( + storyId: storyId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Export Story Audio
+ /// Export story as single mixed audio file. + ///
+ /// + /// 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> ExportStoryAudioStoriesStoryIdExportAudioGetAsResponseAsync( + string storyId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -56,6 +77,7 @@ partial void ProcessExportStoryAudioStoriesStoryIdExportAudioGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: $"/stories/{storyId}/export-audio", baseUri: HttpClient.BaseAddress); @@ -112,6 +134,8 @@ partial void ProcessExportStoryAudioStoriesStoryIdExportAudioGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -122,6 +146,11 @@ partial void ProcessExportStoryAudioStoriesStoryIdExportAudioGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -139,6 +168,8 @@ partial void ProcessExportStoryAudioStoriesStoryIdExportAudioGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -148,8 +179,7 @@ partial void ProcessExportStoryAudioStoriesStoryIdExportAudioGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -158,6 +188,11 @@ partial void ProcessExportStoryAudioStoriesStoryIdExportAudioGetResponseContent( __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -174,14 +209,15 @@ partial void ProcessExportStoryAudioStoriesStoryIdExportAudioGetResponseContent( 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -221,6 +257,8 @@ partial void ProcessExportStoryAudioStoriesStoryIdExportAudioGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -241,6 +279,8 @@ partial void ProcessExportStoryAudioStoriesStoryIdExportAudioGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -303,7 +343,11 @@ partial void ProcessExportStoryAudioStoriesStoryIdExportAudioGetResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -331,7 +375,11 @@ partial void ProcessExportStoryAudioStoriesStoryIdExportAudioGetResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.FilesystemHealthHealthFilesystemGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.FilesystemHealthHealthFilesystemGet.g.cs index 656e301..c3305bc 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.FilesystemHealthHealthFilesystemGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.FilesystemHealthHealthFilesystemGet.g.cs @@ -29,6 +29,24 @@ partial void ProcessFilesystemHealthHealthFilesystemGetResponseContent( public async global::System.Threading.Tasks.Task FilesystemHealthHealthFilesystemGetAsync( global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await FilesystemHealthHealthFilesystemGetAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Filesystem Health
+ /// Check filesystem health: directory existence, write permissions, and disk space. + ///
+ /// 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> FilesystemHealthHealthFilesystemGetAsResponseAsync( + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -51,6 +69,7 @@ partial void ProcessFilesystemHealthHealthFilesystemGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: "/health/filesystem", baseUri: HttpClient.BaseAddress); @@ -106,6 +125,8 @@ partial void ProcessFilesystemHealthHealthFilesystemGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -116,6 +137,11 @@ partial void ProcessFilesystemHealthHealthFilesystemGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -133,6 +159,8 @@ partial void ProcessFilesystemHealthHealthFilesystemGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -142,8 +170,7 @@ partial void ProcessFilesystemHealthHealthFilesystemGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -152,6 +179,11 @@ partial void ProcessFilesystemHealthHealthFilesystemGetResponseContent( __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -168,14 +200,15 @@ partial void ProcessFilesystemHealthHealthFilesystemGetResponseContent( 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +248,8 @@ partial void ProcessFilesystemHealthHealthFilesystemGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -235,6 +270,8 @@ partial void ProcessFilesystemHealthHealthFilesystemGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -259,9 +296,13 @@ partial void ProcessFilesystemHealthHealthFilesystemGetResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Voicebox.FilesystemHealthResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Voicebox.FilesystemHealthResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -289,9 +330,13 @@ partial void ProcessFilesystemHealthHealthFilesystemGetResponseContent( #endif ).ConfigureAwait(false); - return - await global::Voicebox.FilesystemHealthResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Voicebox.FilesystemHealthResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GenerateSpeechGeneratePost.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GenerateSpeechGeneratePost.g.cs index 0298df0..a646e7f 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GenerateSpeechGeneratePost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GenerateSpeechGeneratePost.g.cs @@ -31,6 +31,29 @@ partial void ProcessGenerateSpeechGeneratePostResponseContent( /// public async global::System.Threading.Tasks.Task GenerateSpeechGeneratePostAsync( + global::Voicebox.GenerationRequest request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GenerateSpeechGeneratePostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Generate Speech
+ /// Generate speech from text using a voice profile. + ///
+ /// + /// 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> GenerateSpeechGeneratePostAsResponseAsync( + global::Voicebox.GenerationRequest request, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -59,6 +82,7 @@ partial void ProcessGenerateSpeechGeneratePostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: "/generate", baseUri: HttpClient.BaseAddress); @@ -121,6 +145,8 @@ partial void ProcessGenerateSpeechGeneratePostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -131,6 +157,11 @@ partial void ProcessGenerateSpeechGeneratePostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -148,6 +179,8 @@ partial void ProcessGenerateSpeechGeneratePostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -157,8 +190,7 @@ partial void ProcessGenerateSpeechGeneratePostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -167,6 +199,11 @@ partial void ProcessGenerateSpeechGeneratePostResponseContent( __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -183,14 +220,15 @@ partial void ProcessGenerateSpeechGeneratePostResponseContent( 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -230,6 +268,8 @@ partial void ProcessGenerateSpeechGeneratePostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -250,6 +290,8 @@ partial void ProcessGenerateSpeechGeneratePostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -312,9 +354,13 @@ partial void ProcessGenerateSpeechGeneratePostResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Voicebox.GenerationResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Voicebox.GenerationResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -342,9 +388,13 @@ partial void ProcessGenerateSpeechGeneratePostResponseContent( #endif ).ConfigureAwait(false); - return - await global::Voicebox.GenerationResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Voicebox.GenerationResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetActiveTasksTasksActiveGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetActiveTasksTasksActiveGet.g.cs index 71ea22b..f1abbad 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetActiveTasksTasksActiveGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetActiveTasksTasksActiveGet.g.cs @@ -29,6 +29,24 @@ partial void ProcessGetActiveTasksTasksActiveGetResponseContent( public async global::System.Threading.Tasks.Task GetActiveTasksTasksActiveGetAsync( global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetActiveTasksTasksActiveGetAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Active Tasks
+ /// Return all currently active downloads and generations. + ///
+ /// 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> GetActiveTasksTasksActiveGetAsResponseAsync( + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -51,6 +69,7 @@ partial void ProcessGetActiveTasksTasksActiveGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: "/tasks/active", baseUri: HttpClient.BaseAddress); @@ -106,6 +125,8 @@ partial void ProcessGetActiveTasksTasksActiveGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -116,6 +137,11 @@ partial void ProcessGetActiveTasksTasksActiveGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -133,6 +159,8 @@ partial void ProcessGetActiveTasksTasksActiveGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -142,8 +170,7 @@ partial void ProcessGetActiveTasksTasksActiveGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -152,6 +179,11 @@ partial void ProcessGetActiveTasksTasksActiveGetResponseContent( __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -168,14 +200,15 @@ partial void ProcessGetActiveTasksTasksActiveGetResponseContent( 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +248,8 @@ partial void ProcessGetActiveTasksTasksActiveGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -235,6 +270,8 @@ partial void ProcessGetActiveTasksTasksActiveGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -259,9 +296,13 @@ partial void ProcessGetActiveTasksTasksActiveGetResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Voicebox.ActiveTasksResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Voicebox.ActiveTasksResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -289,9 +330,13 @@ partial void ProcessGetActiveTasksTasksActiveGetResponseContent( #endif ).ConfigureAwait(false); - return - await global::Voicebox.ActiveTasksResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Voicebox.ActiveTasksResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetAudioAudioGenerationIdGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetAudioAudioGenerationIdGet.g.cs index 6b9a475..aeb851b 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetAudioAudioGenerationIdGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetAudioAudioGenerationIdGet.g.cs @@ -33,6 +33,27 @@ partial void ProcessGetAudioAudioGenerationIdGetResponseContent( string generationId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetAudioAudioGenerationIdGetAsResponseAsync( + generationId: generationId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Audio
+ /// Serve generated audio file (serves the default version). + ///
+ /// + /// 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> GetAudioAudioGenerationIdGetAsResponseAsync( + string generationId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -56,6 +77,7 @@ partial void ProcessGetAudioAudioGenerationIdGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: $"/audio/{generationId}", baseUri: HttpClient.BaseAddress); @@ -112,6 +134,8 @@ partial void ProcessGetAudioAudioGenerationIdGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -122,6 +146,11 @@ partial void ProcessGetAudioAudioGenerationIdGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -139,6 +168,8 @@ partial void ProcessGetAudioAudioGenerationIdGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -148,8 +179,7 @@ partial void ProcessGetAudioAudioGenerationIdGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -158,6 +188,11 @@ partial void ProcessGetAudioAudioGenerationIdGetResponseContent( __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -174,14 +209,15 @@ partial void ProcessGetAudioAudioGenerationIdGetResponseContent( 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -221,6 +257,8 @@ partial void ProcessGetAudioAudioGenerationIdGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -241,6 +279,8 @@ partial void ProcessGetAudioAudioGenerationIdGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -303,7 +343,11 @@ partial void ProcessGetAudioAudioGenerationIdGetResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -331,7 +375,11 @@ partial void ProcessGetAudioAudioGenerationIdGetResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetAvailableEffectsEffectsAvailableGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetAvailableEffectsEffectsAvailableGet.g.cs index 7000fe5..f45db16 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetAvailableEffectsEffectsAvailableGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetAvailableEffectsEffectsAvailableGet.g.cs @@ -29,6 +29,24 @@ partial void ProcessGetAvailableEffectsEffectsAvailableGetResponseContent( public async global::System.Threading.Tasks.Task GetAvailableEffectsEffectsAvailableGetAsync( global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetAvailableEffectsEffectsAvailableGetAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Available Effects
+ /// List all available effect types with parameter definitions. + ///
+ /// 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> GetAvailableEffectsEffectsAvailableGetAsResponseAsync( + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -51,6 +69,7 @@ partial void ProcessGetAvailableEffectsEffectsAvailableGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: "/effects/available", baseUri: HttpClient.BaseAddress); @@ -106,6 +125,8 @@ partial void ProcessGetAvailableEffectsEffectsAvailableGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -116,6 +137,11 @@ partial void ProcessGetAvailableEffectsEffectsAvailableGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -133,6 +159,8 @@ partial void ProcessGetAvailableEffectsEffectsAvailableGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -142,8 +170,7 @@ partial void ProcessGetAvailableEffectsEffectsAvailableGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -152,6 +179,11 @@ partial void ProcessGetAvailableEffectsEffectsAvailableGetResponseContent( __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -168,14 +200,15 @@ partial void ProcessGetAvailableEffectsEffectsAvailableGetResponseContent( 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +248,8 @@ partial void ProcessGetAvailableEffectsEffectsAvailableGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -235,6 +270,8 @@ partial void ProcessGetAvailableEffectsEffectsAvailableGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -259,9 +296,13 @@ partial void ProcessGetAvailableEffectsEffectsAvailableGetResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Voicebox.AvailableEffectsResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Voicebox.AvailableEffectsResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -289,9 +330,13 @@ partial void ProcessGetAvailableEffectsEffectsAvailableGetResponseContent( #endif ).ConfigureAwait(false); - return - await global::Voicebox.AvailableEffectsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Voicebox.AvailableEffectsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetCaptureAudioEndpointCapturesCaptureIdAudioGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetCaptureAudioEndpointCapturesCaptureIdAudioGet.g.cs index dafb20f..43e9744 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetCaptureAudioEndpointCapturesCaptureIdAudioGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetCaptureAudioEndpointCapturesCaptureIdAudioGet.g.cs @@ -33,6 +33,27 @@ partial void ProcessGetCaptureAudioEndpointCapturesCaptureIdAudioGetResponseCont string captureId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetCaptureAudioEndpointCapturesCaptureIdAudioGetAsResponseAsync( + captureId: captureId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Capture Audio Endpoint
+ /// Stream the original capture audio file. + ///
+ /// + /// 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> GetCaptureAudioEndpointCapturesCaptureIdAudioGetAsResponseAsync( + string captureId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -56,6 +77,7 @@ partial void ProcessGetCaptureAudioEndpointCapturesCaptureIdAudioGetResponseCont global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: $"/captures/{captureId}/audio", baseUri: HttpClient.BaseAddress); @@ -112,6 +134,8 @@ partial void ProcessGetCaptureAudioEndpointCapturesCaptureIdAudioGetResponseCont attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -122,6 +146,11 @@ partial void ProcessGetCaptureAudioEndpointCapturesCaptureIdAudioGetResponseCont } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -139,6 +168,8 @@ partial void ProcessGetCaptureAudioEndpointCapturesCaptureIdAudioGetResponseCont attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -148,8 +179,7 @@ partial void ProcessGetCaptureAudioEndpointCapturesCaptureIdAudioGetResponseCont __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -158,6 +188,11 @@ partial void ProcessGetCaptureAudioEndpointCapturesCaptureIdAudioGetResponseCont __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -174,14 +209,15 @@ partial void ProcessGetCaptureAudioEndpointCapturesCaptureIdAudioGetResponseCont 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -221,6 +257,8 @@ partial void ProcessGetCaptureAudioEndpointCapturesCaptureIdAudioGetResponseCont attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -241,6 +279,8 @@ partial void ProcessGetCaptureAudioEndpointCapturesCaptureIdAudioGetResponseCont attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -303,7 +343,11 @@ partial void ProcessGetCaptureAudioEndpointCapturesCaptureIdAudioGetResponseCont { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -331,7 +375,11 @@ partial void ProcessGetCaptureAudioEndpointCapturesCaptureIdAudioGetResponseCont #endif ).ConfigureAwait(false); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetCaptureEndpointCapturesCaptureIdGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetCaptureEndpointCapturesCaptureIdGet.g.cs index 3f70386..db0cb51 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetCaptureEndpointCapturesCaptureIdGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetCaptureEndpointCapturesCaptureIdGet.g.cs @@ -32,6 +32,26 @@ partial void ProcessGetCaptureEndpointCapturesCaptureIdGetResponseContent( string captureId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetCaptureEndpointCapturesCaptureIdGetAsResponseAsync( + captureId: captureId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Capture Endpoint + /// + /// + /// 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> GetCaptureEndpointCapturesCaptureIdGetAsResponseAsync( + string captureId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -55,6 +75,7 @@ partial void ProcessGetCaptureEndpointCapturesCaptureIdGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: $"/captures/{captureId}", baseUri: HttpClient.BaseAddress); @@ -111,6 +132,8 @@ partial void ProcessGetCaptureEndpointCapturesCaptureIdGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -121,6 +144,11 @@ partial void ProcessGetCaptureEndpointCapturesCaptureIdGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -138,6 +166,8 @@ partial void ProcessGetCaptureEndpointCapturesCaptureIdGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -147,8 +177,7 @@ partial void ProcessGetCaptureEndpointCapturesCaptureIdGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -157,6 +186,11 @@ partial void ProcessGetCaptureEndpointCapturesCaptureIdGetResponseContent( __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -173,14 +207,15 @@ partial void ProcessGetCaptureEndpointCapturesCaptureIdGetResponseContent( 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -220,6 +255,8 @@ partial void ProcessGetCaptureEndpointCapturesCaptureIdGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -240,6 +277,8 @@ partial void ProcessGetCaptureEndpointCapturesCaptureIdGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -302,9 +341,13 @@ partial void ProcessGetCaptureEndpointCapturesCaptureIdGetResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Voicebox.CaptureResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Voicebox.CaptureResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -332,9 +375,13 @@ partial void ProcessGetCaptureEndpointCapturesCaptureIdGetResponseContent( #endif ).ConfigureAwait(false); - return - await global::Voicebox.CaptureResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Voicebox.CaptureResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetCaptureSettingsEndpointSettingsCapturesGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetCaptureSettingsEndpointSettingsCapturesGet.g.cs index 69fee13..6dbc5b7 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetCaptureSettingsEndpointSettingsCapturesGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetCaptureSettingsEndpointSettingsCapturesGet.g.cs @@ -28,6 +28,23 @@ partial void ProcessGetCaptureSettingsEndpointSettingsCapturesGetResponseContent public async global::System.Threading.Tasks.Task GetCaptureSettingsEndpointSettingsCapturesGetAsync( global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetCaptureSettingsEndpointSettingsCapturesGetAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Capture Settings Endpoint + /// + /// 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> GetCaptureSettingsEndpointSettingsCapturesGetAsResponseAsync( + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -50,6 +67,7 @@ partial void ProcessGetCaptureSettingsEndpointSettingsCapturesGetResponseContent global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: "/settings/captures", baseUri: HttpClient.BaseAddress); @@ -105,6 +123,8 @@ partial void ProcessGetCaptureSettingsEndpointSettingsCapturesGetResponseContent attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -115,6 +135,11 @@ partial void ProcessGetCaptureSettingsEndpointSettingsCapturesGetResponseContent } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -132,6 +157,8 @@ partial void ProcessGetCaptureSettingsEndpointSettingsCapturesGetResponseContent attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -141,8 +168,7 @@ partial void ProcessGetCaptureSettingsEndpointSettingsCapturesGetResponseContent __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -151,6 +177,11 @@ partial void ProcessGetCaptureSettingsEndpointSettingsCapturesGetResponseContent __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -167,14 +198,15 @@ partial void ProcessGetCaptureSettingsEndpointSettingsCapturesGetResponseContent 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -214,6 +246,8 @@ partial void ProcessGetCaptureSettingsEndpointSettingsCapturesGetResponseContent attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -234,6 +268,8 @@ partial void ProcessGetCaptureSettingsEndpointSettingsCapturesGetResponseContent attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -258,9 +294,13 @@ partial void ProcessGetCaptureSettingsEndpointSettingsCapturesGetResponseContent { __response.EnsureSuccessStatusCode(); - return - global::Voicebox.CaptureSettingsResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Voicebox.CaptureSettingsResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -288,9 +328,13 @@ partial void ProcessGetCaptureSettingsEndpointSettingsCapturesGetResponseContent #endif ).ConfigureAwait(false); - return - await global::Voicebox.CaptureSettingsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Voicebox.CaptureSettingsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetChannelChannelsChannelIdGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetChannelChannelsChannelIdGet.g.cs index 399d04d..f4bdc06 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetChannelChannelsChannelIdGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetChannelChannelsChannelIdGet.g.cs @@ -33,6 +33,27 @@ partial void ProcessGetChannelChannelsChannelIdGetResponseContent( string channelId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetChannelChannelsChannelIdGetAsResponseAsync( + channelId: channelId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Channel
+ /// Get an audio channel by ID. + ///
+ /// + /// 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> GetChannelChannelsChannelIdGetAsResponseAsync( + string channelId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -56,6 +77,7 @@ partial void ProcessGetChannelChannelsChannelIdGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: $"/channels/{channelId}", baseUri: HttpClient.BaseAddress); @@ -112,6 +134,8 @@ partial void ProcessGetChannelChannelsChannelIdGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -122,6 +146,11 @@ partial void ProcessGetChannelChannelsChannelIdGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -139,6 +168,8 @@ partial void ProcessGetChannelChannelsChannelIdGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -148,8 +179,7 @@ partial void ProcessGetChannelChannelsChannelIdGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -158,6 +188,11 @@ partial void ProcessGetChannelChannelsChannelIdGetResponseContent( __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -174,14 +209,15 @@ partial void ProcessGetChannelChannelsChannelIdGetResponseContent( 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -221,6 +257,8 @@ partial void ProcessGetChannelChannelsChannelIdGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -241,6 +279,8 @@ partial void ProcessGetChannelChannelsChannelIdGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -303,9 +343,13 @@ partial void ProcessGetChannelChannelsChannelIdGetResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Voicebox.AudioChannelResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Voicebox.AudioChannelResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -333,9 +377,13 @@ partial void ProcessGetChannelChannelsChannelIdGetResponseContent( #endif ).ConfigureAwait(false); - return - await global::Voicebox.AudioChannelResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Voicebox.AudioChannelResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetChannelVoicesChannelsChannelIdVoicesGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetChannelVoicesChannelsChannelIdVoicesGet.g.cs index 7b152ce..12e3f76 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetChannelVoicesChannelsChannelIdVoicesGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetChannelVoicesChannelsChannelIdVoicesGet.g.cs @@ -33,6 +33,27 @@ partial void ProcessGetChannelVoicesChannelsChannelIdVoicesGetResponseContent( string channelId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetChannelVoicesChannelsChannelIdVoicesGetAsResponseAsync( + channelId: channelId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Channel Voices
+ /// Get list of profile IDs assigned to a channel. + ///
+ /// + /// 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> GetChannelVoicesChannelsChannelIdVoicesGetAsResponseAsync( + string channelId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -56,6 +77,7 @@ partial void ProcessGetChannelVoicesChannelsChannelIdVoicesGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: $"/channels/{channelId}/voices", baseUri: HttpClient.BaseAddress); @@ -112,6 +134,8 @@ partial void ProcessGetChannelVoicesChannelsChannelIdVoicesGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -122,6 +146,11 @@ partial void ProcessGetChannelVoicesChannelsChannelIdVoicesGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -139,6 +168,8 @@ partial void ProcessGetChannelVoicesChannelsChannelIdVoicesGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -148,8 +179,7 @@ partial void ProcessGetChannelVoicesChannelsChannelIdVoicesGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -158,6 +188,11 @@ partial void ProcessGetChannelVoicesChannelsChannelIdVoicesGetResponseContent( __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -174,14 +209,15 @@ partial void ProcessGetChannelVoicesChannelsChannelIdVoicesGetResponseContent( 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -221,6 +257,8 @@ partial void ProcessGetChannelVoicesChannelsChannelIdVoicesGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -241,6 +279,8 @@ partial void ProcessGetChannelVoicesChannelsChannelIdVoicesGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -303,7 +343,11 @@ partial void ProcessGetChannelVoicesChannelsChannelIdVoicesGetResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -331,7 +375,11 @@ partial void ProcessGetChannelVoicesChannelsChannelIdVoicesGetResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetCudaDownloadProgressBackendCudaProgressGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetCudaDownloadProgressBackendCudaProgressGet.g.cs index 623ff5e..8151143 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetCudaDownloadProgressBackendCudaProgressGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetCudaDownloadProgressBackendCudaProgressGet.g.cs @@ -29,6 +29,24 @@ partial void ProcessGetCudaDownloadProgressBackendCudaProgressGetResponseContent public async global::System.Threading.Tasks.Task GetCudaDownloadProgressBackendCudaProgressGetAsync( global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetCudaDownloadProgressBackendCudaProgressGetAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Cuda Download Progress
+ /// Get CUDA backend download progress via Server-Sent Events. + ///
+ /// 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> GetCudaDownloadProgressBackendCudaProgressGetAsResponseAsync( + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -51,6 +69,7 @@ partial void ProcessGetCudaDownloadProgressBackendCudaProgressGetResponseContent global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: "/backend/cuda-progress", baseUri: HttpClient.BaseAddress); @@ -106,6 +125,8 @@ partial void ProcessGetCudaDownloadProgressBackendCudaProgressGetResponseContent attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -116,6 +137,11 @@ partial void ProcessGetCudaDownloadProgressBackendCudaProgressGetResponseContent } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -133,6 +159,8 @@ partial void ProcessGetCudaDownloadProgressBackendCudaProgressGetResponseContent attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -142,8 +170,7 @@ partial void ProcessGetCudaDownloadProgressBackendCudaProgressGetResponseContent __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -152,6 +179,11 @@ partial void ProcessGetCudaDownloadProgressBackendCudaProgressGetResponseContent __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -168,14 +200,15 @@ partial void ProcessGetCudaDownloadProgressBackendCudaProgressGetResponseContent 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +248,8 @@ partial void ProcessGetCudaDownloadProgressBackendCudaProgressGetResponseContent attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -235,6 +270,8 @@ partial void ProcessGetCudaDownloadProgressBackendCudaProgressGetResponseContent attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -259,7 +296,11 @@ partial void ProcessGetCudaDownloadProgressBackendCudaProgressGetResponseContent { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -287,7 +328,11 @@ partial void ProcessGetCudaDownloadProgressBackendCudaProgressGetResponseContent #endif ).ConfigureAwait(false); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetCudaStatusBackendCudaStatusGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetCudaStatusBackendCudaStatusGet.g.cs index 8b3ce68..6f02084 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetCudaStatusBackendCudaStatusGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetCudaStatusBackendCudaStatusGet.g.cs @@ -29,6 +29,24 @@ partial void ProcessGetCudaStatusBackendCudaStatusGetResponseContent( public async global::System.Threading.Tasks.Task GetCudaStatusBackendCudaStatusGetAsync( global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetCudaStatusBackendCudaStatusGetAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Cuda Status
+ /// Get CUDA backend download/availability status. + ///
+ /// 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> GetCudaStatusBackendCudaStatusGetAsResponseAsync( + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -51,6 +69,7 @@ partial void ProcessGetCudaStatusBackendCudaStatusGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: "/backend/cuda-status", baseUri: HttpClient.BaseAddress); @@ -106,6 +125,8 @@ partial void ProcessGetCudaStatusBackendCudaStatusGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -116,6 +137,11 @@ partial void ProcessGetCudaStatusBackendCudaStatusGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -133,6 +159,8 @@ partial void ProcessGetCudaStatusBackendCudaStatusGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -142,8 +170,7 @@ partial void ProcessGetCudaStatusBackendCudaStatusGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -152,6 +179,11 @@ partial void ProcessGetCudaStatusBackendCudaStatusGetResponseContent( __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -168,14 +200,15 @@ partial void ProcessGetCudaStatusBackendCudaStatusGetResponseContent( 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +248,8 @@ partial void ProcessGetCudaStatusBackendCudaStatusGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -235,6 +270,8 @@ partial void ProcessGetCudaStatusBackendCudaStatusGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -259,7 +296,11 @@ partial void ProcessGetCudaStatusBackendCudaStatusGetResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -287,7 +328,11 @@ partial void ProcessGetCudaStatusBackendCudaStatusGetResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetEffectPresetEffectsPresetsPresetIdGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetEffectPresetEffectsPresetsPresetIdGet.g.cs index 045888a..51499e1 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetEffectPresetEffectsPresetsPresetIdGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetEffectPresetEffectsPresetsPresetIdGet.g.cs @@ -33,6 +33,27 @@ partial void ProcessGetEffectPresetEffectsPresetsPresetIdGetResponseContent( string presetId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetEffectPresetEffectsPresetsPresetIdGetAsResponseAsync( + presetId: presetId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Effect Preset
+ /// Get a specific effect preset. + ///
+ /// + /// 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> GetEffectPresetEffectsPresetsPresetIdGetAsResponseAsync( + string presetId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -56,6 +77,7 @@ partial void ProcessGetEffectPresetEffectsPresetsPresetIdGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: $"/effects/presets/{presetId}", baseUri: HttpClient.BaseAddress); @@ -112,6 +134,8 @@ partial void ProcessGetEffectPresetEffectsPresetsPresetIdGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -122,6 +146,11 @@ partial void ProcessGetEffectPresetEffectsPresetsPresetIdGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -139,6 +168,8 @@ partial void ProcessGetEffectPresetEffectsPresetsPresetIdGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -148,8 +179,7 @@ partial void ProcessGetEffectPresetEffectsPresetsPresetIdGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -158,6 +188,11 @@ partial void ProcessGetEffectPresetEffectsPresetsPresetIdGetResponseContent( __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -174,14 +209,15 @@ partial void ProcessGetEffectPresetEffectsPresetsPresetIdGetResponseContent( 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -221,6 +257,8 @@ partial void ProcessGetEffectPresetEffectsPresetsPresetIdGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -241,6 +279,8 @@ partial void ProcessGetEffectPresetEffectsPresetsPresetIdGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -303,9 +343,13 @@ partial void ProcessGetEffectPresetEffectsPresetsPresetIdGetResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Voicebox.EffectPresetResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Voicebox.EffectPresetResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -333,9 +377,13 @@ partial void ProcessGetEffectPresetEffectsPresetsPresetIdGetResponseContent( #endif ).ConfigureAwait(false); - return - await global::Voicebox.EffectPresetResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Voicebox.EffectPresetResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetGenerationHistoryGenerationIdGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetGenerationHistoryGenerationIdGet.g.cs index ea40e1f..242949d 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetGenerationHistoryGenerationIdGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetGenerationHistoryGenerationIdGet.g.cs @@ -33,6 +33,27 @@ partial void ProcessGetGenerationHistoryGenerationIdGetResponseContent( string generationId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetGenerationHistoryGenerationIdGetAsResponseAsync( + generationId: generationId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Generation
+ /// Get a generation by ID. + ///
+ /// + /// 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> GetGenerationHistoryGenerationIdGetAsResponseAsync( + string generationId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -56,6 +77,7 @@ partial void ProcessGetGenerationHistoryGenerationIdGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: $"/history/{generationId}", baseUri: HttpClient.BaseAddress); @@ -112,6 +134,8 @@ partial void ProcessGetGenerationHistoryGenerationIdGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -122,6 +146,11 @@ partial void ProcessGetGenerationHistoryGenerationIdGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -139,6 +168,8 @@ partial void ProcessGetGenerationHistoryGenerationIdGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -148,8 +179,7 @@ partial void ProcessGetGenerationHistoryGenerationIdGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -158,6 +188,11 @@ partial void ProcessGetGenerationHistoryGenerationIdGetResponseContent( __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -174,14 +209,15 @@ partial void ProcessGetGenerationHistoryGenerationIdGetResponseContent( 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -221,6 +257,8 @@ partial void ProcessGetGenerationHistoryGenerationIdGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -241,6 +279,8 @@ partial void ProcessGetGenerationHistoryGenerationIdGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -303,9 +343,13 @@ partial void ProcessGetGenerationHistoryGenerationIdGetResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Voicebox.HistoryResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Voicebox.HistoryResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -333,9 +377,13 @@ partial void ProcessGetGenerationHistoryGenerationIdGetResponseContent( #endif ).ConfigureAwait(false); - return - await global::Voicebox.HistoryResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Voicebox.HistoryResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetGenerationSettingsEndpointSettingsGenerationGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetGenerationSettingsEndpointSettingsGenerationGet.g.cs index 7c2f637..a2d7585 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetGenerationSettingsEndpointSettingsGenerationGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetGenerationSettingsEndpointSettingsGenerationGet.g.cs @@ -28,6 +28,23 @@ partial void ProcessGetGenerationSettingsEndpointSettingsGenerationGetResponseCo public async global::System.Threading.Tasks.Task GetGenerationSettingsEndpointSettingsGenerationGetAsync( global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetGenerationSettingsEndpointSettingsGenerationGetAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Generation Settings Endpoint + /// + /// 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> GetGenerationSettingsEndpointSettingsGenerationGetAsResponseAsync( + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -50,6 +67,7 @@ partial void ProcessGetGenerationSettingsEndpointSettingsGenerationGetResponseCo global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: "/settings/generation", baseUri: HttpClient.BaseAddress); @@ -105,6 +123,8 @@ partial void ProcessGetGenerationSettingsEndpointSettingsGenerationGetResponseCo attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -115,6 +135,11 @@ partial void ProcessGetGenerationSettingsEndpointSettingsGenerationGetResponseCo } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -132,6 +157,8 @@ partial void ProcessGetGenerationSettingsEndpointSettingsGenerationGetResponseCo attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -141,8 +168,7 @@ partial void ProcessGetGenerationSettingsEndpointSettingsGenerationGetResponseCo __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -151,6 +177,11 @@ partial void ProcessGetGenerationSettingsEndpointSettingsGenerationGetResponseCo __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -167,14 +198,15 @@ partial void ProcessGetGenerationSettingsEndpointSettingsGenerationGetResponseCo 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -214,6 +246,8 @@ partial void ProcessGetGenerationSettingsEndpointSettingsGenerationGetResponseCo attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -234,6 +268,8 @@ partial void ProcessGetGenerationSettingsEndpointSettingsGenerationGetResponseCo attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -258,9 +294,13 @@ partial void ProcessGetGenerationSettingsEndpointSettingsGenerationGetResponseCo { __response.EnsureSuccessStatusCode(); - return - global::Voicebox.GenerationSettingsResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Voicebox.GenerationSettingsResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -288,9 +328,13 @@ partial void ProcessGetGenerationSettingsEndpointSettingsGenerationGetResponseCo #endif ).ConfigureAwait(false); - return - await global::Voicebox.GenerationSettingsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Voicebox.GenerationSettingsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetGenerationStatusGenerateGenerationIdStatusGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetGenerationStatusGenerateGenerationIdStatusGet.g.cs index dbd606e..246c1ed 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetGenerationStatusGenerateGenerationIdStatusGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetGenerationStatusGenerateGenerationIdStatusGet.g.cs @@ -33,6 +33,27 @@ partial void ProcessGetGenerationStatusGenerateGenerationIdStatusGetResponseCont string generationId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetGenerationStatusGenerateGenerationIdStatusGetAsResponseAsync( + generationId: generationId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Generation Status
+ /// SSE endpoint that streams generation status updates. + ///
+ /// + /// 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> GetGenerationStatusGenerateGenerationIdStatusGetAsResponseAsync( + string generationId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -56,6 +77,7 @@ partial void ProcessGetGenerationStatusGenerateGenerationIdStatusGetResponseCont global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: $"/generate/{generationId}/status", baseUri: HttpClient.BaseAddress); @@ -112,6 +134,8 @@ partial void ProcessGetGenerationStatusGenerateGenerationIdStatusGetResponseCont attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -122,6 +146,11 @@ partial void ProcessGetGenerationStatusGenerateGenerationIdStatusGetResponseCont } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -139,6 +168,8 @@ partial void ProcessGetGenerationStatusGenerateGenerationIdStatusGetResponseCont attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -148,8 +179,7 @@ partial void ProcessGetGenerationStatusGenerateGenerationIdStatusGetResponseCont __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -158,6 +188,11 @@ partial void ProcessGetGenerationStatusGenerateGenerationIdStatusGetResponseCont __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -174,14 +209,15 @@ partial void ProcessGetGenerationStatusGenerateGenerationIdStatusGetResponseCont 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -221,6 +257,8 @@ partial void ProcessGetGenerationStatusGenerateGenerationIdStatusGetResponseCont attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -241,6 +279,8 @@ partial void ProcessGetGenerationStatusGenerateGenerationIdStatusGetResponseCont attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -303,7 +343,11 @@ partial void ProcessGetGenerationStatusGenerateGenerationIdStatusGetResponseCont { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -331,7 +375,11 @@ partial void ProcessGetGenerationStatusGenerateGenerationIdStatusGetResponseCont #endif ).ConfigureAwait(false); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetMigrationProgressModelsMigrateProgressGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetMigrationProgressModelsMigrateProgressGet.g.cs index 01c03ea..54fcb70 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetMigrationProgressModelsMigrateProgressGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetMigrationProgressModelsMigrateProgressGet.g.cs @@ -29,6 +29,24 @@ partial void ProcessGetMigrationProgressModelsMigrateProgressGetResponseContent( public async global::System.Threading.Tasks.Task GetMigrationProgressModelsMigrateProgressGetAsync( global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetMigrationProgressModelsMigrateProgressGetAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Migration Progress
+ /// Get model migration progress via Server-Sent Events. + ///
+ /// 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> GetMigrationProgressModelsMigrateProgressGetAsResponseAsync( + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -51,6 +69,7 @@ partial void ProcessGetMigrationProgressModelsMigrateProgressGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: "/models/migrate/progress", baseUri: HttpClient.BaseAddress); @@ -106,6 +125,8 @@ partial void ProcessGetMigrationProgressModelsMigrateProgressGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -116,6 +137,11 @@ partial void ProcessGetMigrationProgressModelsMigrateProgressGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -133,6 +159,8 @@ partial void ProcessGetMigrationProgressModelsMigrateProgressGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -142,8 +170,7 @@ partial void ProcessGetMigrationProgressModelsMigrateProgressGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -152,6 +179,11 @@ partial void ProcessGetMigrationProgressModelsMigrateProgressGetResponseContent( __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -168,14 +200,15 @@ partial void ProcessGetMigrationProgressModelsMigrateProgressGetResponseContent( 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +248,8 @@ partial void ProcessGetMigrationProgressModelsMigrateProgressGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -235,6 +270,8 @@ partial void ProcessGetMigrationProgressModelsMigrateProgressGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -259,7 +296,11 @@ partial void ProcessGetMigrationProgressModelsMigrateProgressGetResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -287,7 +328,11 @@ partial void ProcessGetMigrationProgressModelsMigrateProgressGetResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetModelProgressModelsProgressModelNameGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetModelProgressModelsProgressModelNameGet.g.cs index cc417b1..6ca7def 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetModelProgressModelsProgressModelNameGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetModelProgressModelsProgressModelNameGet.g.cs @@ -33,6 +33,27 @@ partial void ProcessGetModelProgressModelsProgressModelNameGetResponseContent( string modelName, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetModelProgressModelsProgressModelNameGetAsResponseAsync( + modelName: modelName, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Model Progress
+ /// Get model download progress via Server-Sent Events. + ///
+ /// + /// 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> GetModelProgressModelsProgressModelNameGetAsResponseAsync( + string modelName, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -56,6 +77,7 @@ partial void ProcessGetModelProgressModelsProgressModelNameGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: $"/models/progress/{modelName}", baseUri: HttpClient.BaseAddress); @@ -112,6 +134,8 @@ partial void ProcessGetModelProgressModelsProgressModelNameGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -122,6 +146,11 @@ partial void ProcessGetModelProgressModelsProgressModelNameGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -139,6 +168,8 @@ partial void ProcessGetModelProgressModelsProgressModelNameGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -148,8 +179,7 @@ partial void ProcessGetModelProgressModelsProgressModelNameGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -158,6 +188,11 @@ partial void ProcessGetModelProgressModelsProgressModelNameGetResponseContent( __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -174,14 +209,15 @@ partial void ProcessGetModelProgressModelsProgressModelNameGetResponseContent( 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -221,6 +257,8 @@ partial void ProcessGetModelProgressModelsProgressModelNameGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -241,6 +279,8 @@ partial void ProcessGetModelProgressModelsProgressModelNameGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -303,7 +343,11 @@ partial void ProcessGetModelProgressModelsProgressModelNameGetResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -331,7 +375,11 @@ partial void ProcessGetModelProgressModelsProgressModelNameGetResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetModelStatusModelsStatusGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetModelStatusModelsStatusGet.g.cs index db78504..d6a1948 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetModelStatusModelsStatusGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetModelStatusModelsStatusGet.g.cs @@ -29,6 +29,24 @@ partial void ProcessGetModelStatusModelsStatusGetResponseContent( public async global::System.Threading.Tasks.Task GetModelStatusModelsStatusGetAsync( global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetModelStatusModelsStatusGetAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Model Status
+ /// Get status of all available models. + ///
+ /// 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> GetModelStatusModelsStatusGetAsResponseAsync( + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -51,6 +69,7 @@ partial void ProcessGetModelStatusModelsStatusGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: "/models/status", baseUri: HttpClient.BaseAddress); @@ -106,6 +125,8 @@ partial void ProcessGetModelStatusModelsStatusGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -116,6 +137,11 @@ partial void ProcessGetModelStatusModelsStatusGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -133,6 +159,8 @@ partial void ProcessGetModelStatusModelsStatusGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -142,8 +170,7 @@ partial void ProcessGetModelStatusModelsStatusGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -152,6 +179,11 @@ partial void ProcessGetModelStatusModelsStatusGetResponseContent( __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -168,14 +200,15 @@ partial void ProcessGetModelStatusModelsStatusGetResponseContent( 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +248,8 @@ partial void ProcessGetModelStatusModelsStatusGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -235,6 +270,8 @@ partial void ProcessGetModelStatusModelsStatusGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -259,9 +296,13 @@ partial void ProcessGetModelStatusModelsStatusGetResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Voicebox.ModelStatusListResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Voicebox.ModelStatusListResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -289,9 +330,13 @@ partial void ProcessGetModelStatusModelsStatusGetResponseContent( #endif ).ConfigureAwait(false); - return - await global::Voicebox.ModelStatusListResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Voicebox.ModelStatusListResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetModelsCacheDirModelsCacheDirGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetModelsCacheDirModelsCacheDirGet.g.cs index 92c3be0..0c78491 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetModelsCacheDirModelsCacheDirGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetModelsCacheDirModelsCacheDirGet.g.cs @@ -29,6 +29,24 @@ partial void ProcessGetModelsCacheDirModelsCacheDirGetResponseContent( public async global::System.Threading.Tasks.Task GetModelsCacheDirModelsCacheDirGetAsync( global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetModelsCacheDirModelsCacheDirGetAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Models Cache Dir
+ /// Get the path to the HuggingFace model cache directory. + ///
+ /// 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> GetModelsCacheDirModelsCacheDirGetAsResponseAsync( + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -51,6 +69,7 @@ partial void ProcessGetModelsCacheDirModelsCacheDirGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: "/models/cache-dir", baseUri: HttpClient.BaseAddress); @@ -106,6 +125,8 @@ partial void ProcessGetModelsCacheDirModelsCacheDirGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -116,6 +137,11 @@ partial void ProcessGetModelsCacheDirModelsCacheDirGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -133,6 +159,8 @@ partial void ProcessGetModelsCacheDirModelsCacheDirGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -142,8 +170,7 @@ partial void ProcessGetModelsCacheDirModelsCacheDirGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -152,6 +179,11 @@ partial void ProcessGetModelsCacheDirModelsCacheDirGetResponseContent( __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -168,14 +200,15 @@ partial void ProcessGetModelsCacheDirModelsCacheDirGetResponseContent( 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +248,8 @@ partial void ProcessGetModelsCacheDirModelsCacheDirGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -235,6 +270,8 @@ partial void ProcessGetModelsCacheDirModelsCacheDirGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -259,7 +296,11 @@ partial void ProcessGetModelsCacheDirModelsCacheDirGetResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -287,7 +328,11 @@ partial void ProcessGetModelsCacheDirModelsCacheDirGetResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetProfileAvatarProfilesProfileIdAvatarGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetProfileAvatarProfilesProfileIdAvatarGet.g.cs index 8efae74..4c777a8 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetProfileAvatarProfilesProfileIdAvatarGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetProfileAvatarProfilesProfileIdAvatarGet.g.cs @@ -33,6 +33,27 @@ partial void ProcessGetProfileAvatarProfilesProfileIdAvatarGetResponseContent( string profileId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetProfileAvatarProfilesProfileIdAvatarGetAsResponseAsync( + profileId: profileId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Profile Avatar
+ /// Get avatar image for a profile. + ///
+ /// + /// 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> GetProfileAvatarProfilesProfileIdAvatarGetAsResponseAsync( + string profileId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -56,6 +77,7 @@ partial void ProcessGetProfileAvatarProfilesProfileIdAvatarGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: $"/profiles/{profileId}/avatar", baseUri: HttpClient.BaseAddress); @@ -112,6 +134,8 @@ partial void ProcessGetProfileAvatarProfilesProfileIdAvatarGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -122,6 +146,11 @@ partial void ProcessGetProfileAvatarProfilesProfileIdAvatarGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -139,6 +168,8 @@ partial void ProcessGetProfileAvatarProfilesProfileIdAvatarGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -148,8 +179,7 @@ partial void ProcessGetProfileAvatarProfilesProfileIdAvatarGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -158,6 +188,11 @@ partial void ProcessGetProfileAvatarProfilesProfileIdAvatarGetResponseContent( __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -174,14 +209,15 @@ partial void ProcessGetProfileAvatarProfilesProfileIdAvatarGetResponseContent( 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -221,6 +257,8 @@ partial void ProcessGetProfileAvatarProfilesProfileIdAvatarGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -241,6 +279,8 @@ partial void ProcessGetProfileAvatarProfilesProfileIdAvatarGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -303,7 +343,11 @@ partial void ProcessGetProfileAvatarProfilesProfileIdAvatarGetResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -331,7 +375,11 @@ partial void ProcessGetProfileAvatarProfilesProfileIdAvatarGetResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetProfileChannelsProfilesProfileIdChannelsGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetProfileChannelsProfilesProfileIdChannelsGet.g.cs index 4cf8322..6ed0a98 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetProfileChannelsProfilesProfileIdChannelsGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetProfileChannelsProfilesProfileIdChannelsGet.g.cs @@ -33,6 +33,27 @@ partial void ProcessGetProfileChannelsProfilesProfileIdChannelsGetResponseConten string profileId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetProfileChannelsProfilesProfileIdChannelsGetAsResponseAsync( + profileId: profileId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Profile Channels
+ /// Get list of channel IDs assigned to a profile. + ///
+ /// + /// 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> GetProfileChannelsProfilesProfileIdChannelsGetAsResponseAsync( + string profileId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -56,6 +77,7 @@ partial void ProcessGetProfileChannelsProfilesProfileIdChannelsGetResponseConten global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: $"/profiles/{profileId}/channels", baseUri: HttpClient.BaseAddress); @@ -112,6 +134,8 @@ partial void ProcessGetProfileChannelsProfilesProfileIdChannelsGetResponseConten attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -122,6 +146,11 @@ partial void ProcessGetProfileChannelsProfilesProfileIdChannelsGetResponseConten } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -139,6 +168,8 @@ partial void ProcessGetProfileChannelsProfilesProfileIdChannelsGetResponseConten attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -148,8 +179,7 @@ partial void ProcessGetProfileChannelsProfilesProfileIdChannelsGetResponseConten __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -158,6 +188,11 @@ partial void ProcessGetProfileChannelsProfilesProfileIdChannelsGetResponseConten __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -174,14 +209,15 @@ partial void ProcessGetProfileChannelsProfilesProfileIdChannelsGetResponseConten 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -221,6 +257,8 @@ partial void ProcessGetProfileChannelsProfilesProfileIdChannelsGetResponseConten attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -241,6 +279,8 @@ partial void ProcessGetProfileChannelsProfilesProfileIdChannelsGetResponseConten attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -303,7 +343,11 @@ partial void ProcessGetProfileChannelsProfilesProfileIdChannelsGetResponseConten { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -331,7 +375,11 @@ partial void ProcessGetProfileChannelsProfilesProfileIdChannelsGetResponseConten #endif ).ConfigureAwait(false); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetProfileProfilesProfileIdGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetProfileProfilesProfileIdGet.g.cs index 976bc45..c889c6e 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetProfileProfilesProfileIdGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetProfileProfilesProfileIdGet.g.cs @@ -33,6 +33,27 @@ partial void ProcessGetProfileProfilesProfileIdGetResponseContent( string profileId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetProfileProfilesProfileIdGetAsResponseAsync( + profileId: profileId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Profile
+ /// Get a voice profile by ID. + ///
+ /// + /// 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> GetProfileProfilesProfileIdGetAsResponseAsync( + string profileId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -56,6 +77,7 @@ partial void ProcessGetProfileProfilesProfileIdGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: $"/profiles/{profileId}", baseUri: HttpClient.BaseAddress); @@ -112,6 +134,8 @@ partial void ProcessGetProfileProfilesProfileIdGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -122,6 +146,11 @@ partial void ProcessGetProfileProfilesProfileIdGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -139,6 +168,8 @@ partial void ProcessGetProfileProfilesProfileIdGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -148,8 +179,7 @@ partial void ProcessGetProfileProfilesProfileIdGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -158,6 +188,11 @@ partial void ProcessGetProfileProfilesProfileIdGetResponseContent( __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -174,14 +209,15 @@ partial void ProcessGetProfileProfilesProfileIdGetResponseContent( 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -221,6 +257,8 @@ partial void ProcessGetProfileProfilesProfileIdGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -241,6 +279,8 @@ partial void ProcessGetProfileProfilesProfileIdGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -303,9 +343,13 @@ partial void ProcessGetProfileProfilesProfileIdGetResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Voicebox.VoiceProfileResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Voicebox.VoiceProfileResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -333,9 +377,13 @@ partial void ProcessGetProfileProfilesProfileIdGetResponseContent( #endif ).ConfigureAwait(false); - return - await global::Voicebox.VoiceProfileResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Voicebox.VoiceProfileResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetProfileSamplesProfilesProfileIdSamplesGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetProfileSamplesProfilesProfileIdSamplesGet.g.cs index 81ec322..8fe4a60 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetProfileSamplesProfilesProfileIdSamplesGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetProfileSamplesProfilesProfileIdSamplesGet.g.cs @@ -33,6 +33,27 @@ partial void ProcessGetProfileSamplesProfilesProfileIdSamplesGetResponseContent( string profileId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetProfileSamplesProfilesProfileIdSamplesGetAsResponseAsync( + profileId: profileId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Profile Samples
+ /// Get all samples for a profile. + ///
+ /// + /// 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>> GetProfileSamplesProfilesProfileIdSamplesGetAsResponseAsync( + string profileId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -56,6 +77,7 @@ partial void ProcessGetProfileSamplesProfilesProfileIdSamplesGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: $"/profiles/{profileId}/samples", baseUri: HttpClient.BaseAddress); @@ -112,6 +134,8 @@ partial void ProcessGetProfileSamplesProfilesProfileIdSamplesGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -122,6 +146,11 @@ partial void ProcessGetProfileSamplesProfilesProfileIdSamplesGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -139,6 +168,8 @@ partial void ProcessGetProfileSamplesProfilesProfileIdSamplesGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -148,8 +179,7 @@ partial void ProcessGetProfileSamplesProfilesProfileIdSamplesGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -158,6 +188,11 @@ partial void ProcessGetProfileSamplesProfilesProfileIdSamplesGetResponseContent( __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -174,14 +209,15 @@ partial void ProcessGetProfileSamplesProfilesProfileIdSamplesGetResponseContent( 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -221,6 +257,8 @@ partial void ProcessGetProfileSamplesProfilesProfileIdSamplesGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -241,6 +279,8 @@ partial void ProcessGetProfileSamplesProfilesProfileIdSamplesGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -303,9 +343,13 @@ partial void ProcessGetProfileSamplesProfilesProfileIdSamplesGetResponseContent( { __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::Voicebox.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -333,9 +377,13 @@ partial void ProcessGetProfileSamplesProfilesProfileIdSamplesGetResponseContent( #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::Voicebox.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetSampleAudioSamplesSampleIdGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetSampleAudioSamplesSampleIdGet.g.cs index d05b5c5..48de57b 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetSampleAudioSamplesSampleIdGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetSampleAudioSamplesSampleIdGet.g.cs @@ -33,6 +33,27 @@ partial void ProcessGetSampleAudioSamplesSampleIdGetResponseContent( string sampleId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetSampleAudioSamplesSampleIdGetAsResponseAsync( + sampleId: sampleId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Sample Audio
+ /// Serve profile sample audio file. + ///
+ /// + /// 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> GetSampleAudioSamplesSampleIdGetAsResponseAsync( + string sampleId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -56,6 +77,7 @@ partial void ProcessGetSampleAudioSamplesSampleIdGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: $"/samples/{sampleId}", baseUri: HttpClient.BaseAddress); @@ -112,6 +134,8 @@ partial void ProcessGetSampleAudioSamplesSampleIdGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -122,6 +146,11 @@ partial void ProcessGetSampleAudioSamplesSampleIdGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -139,6 +168,8 @@ partial void ProcessGetSampleAudioSamplesSampleIdGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -148,8 +179,7 @@ partial void ProcessGetSampleAudioSamplesSampleIdGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -158,6 +188,11 @@ partial void ProcessGetSampleAudioSamplesSampleIdGetResponseContent( __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -174,14 +209,15 @@ partial void ProcessGetSampleAudioSamplesSampleIdGetResponseContent( 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -221,6 +257,8 @@ partial void ProcessGetSampleAudioSamplesSampleIdGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -241,6 +279,8 @@ partial void ProcessGetSampleAudioSamplesSampleIdGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -303,7 +343,11 @@ partial void ProcessGetSampleAudioSamplesSampleIdGetResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -331,7 +375,11 @@ partial void ProcessGetSampleAudioSamplesSampleIdGetResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetStatsHistoryStatsGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetStatsHistoryStatsGet.g.cs index 1081cb6..2b6aebe 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetStatsHistoryStatsGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetStatsHistoryStatsGet.g.cs @@ -29,6 +29,24 @@ partial void ProcessGetStatsHistoryStatsGetResponseContent( public async global::System.Threading.Tasks.Task GetStatsHistoryStatsGetAsync( global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetStatsHistoryStatsGetAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Stats
+ /// Get generation statistics. + ///
+ /// 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> GetStatsHistoryStatsGetAsResponseAsync( + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -51,6 +69,7 @@ partial void ProcessGetStatsHistoryStatsGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: "/history/stats", baseUri: HttpClient.BaseAddress); @@ -106,6 +125,8 @@ partial void ProcessGetStatsHistoryStatsGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -116,6 +137,11 @@ partial void ProcessGetStatsHistoryStatsGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -133,6 +159,8 @@ partial void ProcessGetStatsHistoryStatsGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -142,8 +170,7 @@ partial void ProcessGetStatsHistoryStatsGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -152,6 +179,11 @@ partial void ProcessGetStatsHistoryStatsGetResponseContent( __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -168,14 +200,15 @@ partial void ProcessGetStatsHistoryStatsGetResponseContent( 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +248,8 @@ partial void ProcessGetStatsHistoryStatsGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -235,6 +270,8 @@ partial void ProcessGetStatsHistoryStatsGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -259,7 +296,11 @@ partial void ProcessGetStatsHistoryStatsGetResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -287,7 +328,11 @@ partial void ProcessGetStatsHistoryStatsGetResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetStoryStoriesStoryIdGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetStoryStoriesStoryIdGet.g.cs index a790f3e..b6395b4 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetStoryStoriesStoryIdGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetStoryStoriesStoryIdGet.g.cs @@ -33,6 +33,27 @@ partial void ProcessGetStoryStoriesStoryIdGetResponseContent( string storyId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetStoryStoriesStoryIdGetAsResponseAsync( + storyId: storyId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Story
+ /// Get a story with all its items. + ///
+ /// + /// 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> GetStoryStoriesStoryIdGetAsResponseAsync( + string storyId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -56,6 +77,7 @@ partial void ProcessGetStoryStoriesStoryIdGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: $"/stories/{storyId}", baseUri: HttpClient.BaseAddress); @@ -112,6 +134,8 @@ partial void ProcessGetStoryStoriesStoryIdGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -122,6 +146,11 @@ partial void ProcessGetStoryStoriesStoryIdGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -139,6 +168,8 @@ partial void ProcessGetStoryStoriesStoryIdGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -148,8 +179,7 @@ partial void ProcessGetStoryStoriesStoryIdGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -158,6 +188,11 @@ partial void ProcessGetStoryStoriesStoryIdGetResponseContent( __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -174,14 +209,15 @@ partial void ProcessGetStoryStoriesStoryIdGetResponseContent( 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -221,6 +257,8 @@ partial void ProcessGetStoryStoriesStoryIdGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -241,6 +279,8 @@ partial void ProcessGetStoryStoriesStoryIdGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -303,9 +343,13 @@ partial void ProcessGetStoryStoriesStoryIdGetResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Voicebox.StoryDetailResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Voicebox.StoryDetailResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -333,9 +377,13 @@ partial void ProcessGetStoryStoriesStoryIdGetResponseContent( #endif ).ConfigureAwait(false); - return - await global::Voicebox.StoryDetailResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Voicebox.StoryDetailResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetVersionAudioAudioVersionVersionIdGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetVersionAudioAudioVersionVersionIdGet.g.cs index ce05394..97a0420 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetVersionAudioAudioVersionVersionIdGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.GetVersionAudioAudioVersionVersionIdGet.g.cs @@ -33,6 +33,27 @@ partial void ProcessGetVersionAudioAudioVersionVersionIdGetResponseContent( string versionId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetVersionAudioAudioVersionVersionIdGetAsResponseAsync( + versionId: versionId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Version Audio
+ /// Serve audio for a specific version. + ///
+ /// + /// 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> GetVersionAudioAudioVersionVersionIdGetAsResponseAsync( + string versionId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -56,6 +77,7 @@ partial void ProcessGetVersionAudioAudioVersionVersionIdGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: $"/audio/version/{versionId}", baseUri: HttpClient.BaseAddress); @@ -112,6 +134,8 @@ partial void ProcessGetVersionAudioAudioVersionVersionIdGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -122,6 +146,11 @@ partial void ProcessGetVersionAudioAudioVersionVersionIdGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -139,6 +168,8 @@ partial void ProcessGetVersionAudioAudioVersionVersionIdGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -148,8 +179,7 @@ partial void ProcessGetVersionAudioAudioVersionVersionIdGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -158,6 +188,11 @@ partial void ProcessGetVersionAudioAudioVersionVersionIdGetResponseContent( __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -174,14 +209,15 @@ partial void ProcessGetVersionAudioAudioVersionVersionIdGetResponseContent( 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -221,6 +257,8 @@ partial void ProcessGetVersionAudioAudioVersionVersionIdGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -241,6 +279,8 @@ partial void ProcessGetVersionAudioAudioVersionVersionIdGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -303,7 +343,11 @@ partial void ProcessGetVersionAudioAudioVersionVersionIdGetResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -331,7 +375,11 @@ partial void ProcessGetVersionAudioAudioVersionVersionIdGetResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.HealthHealthGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.HealthHealthGet.g.cs index 39c0f01..b066cf4 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.HealthHealthGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.HealthHealthGet.g.cs @@ -29,6 +29,24 @@ partial void ProcessHealthHealthGetResponseContent( public async global::System.Threading.Tasks.Task HealthHealthGetAsync( global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await HealthHealthGetAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Health
+ /// Health check endpoint. + ///
+ /// 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> HealthHealthGetAsResponseAsync( + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -51,6 +69,7 @@ partial void ProcessHealthHealthGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: "/health", baseUri: HttpClient.BaseAddress); @@ -106,6 +125,8 @@ partial void ProcessHealthHealthGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -116,6 +137,11 @@ partial void ProcessHealthHealthGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -133,6 +159,8 @@ partial void ProcessHealthHealthGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -142,8 +170,7 @@ partial void ProcessHealthHealthGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -152,6 +179,11 @@ partial void ProcessHealthHealthGetResponseContent( __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -168,14 +200,15 @@ partial void ProcessHealthHealthGetResponseContent( 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +248,8 @@ partial void ProcessHealthHealthGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -235,6 +270,8 @@ partial void ProcessHealthHealthGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -259,9 +296,13 @@ partial void ProcessHealthHealthGetResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Voicebox.HealthResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Voicebox.HealthResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -289,9 +330,13 @@ partial void ProcessHealthHealthGetResponseContent( #endif ).ConfigureAwait(false); - return - await global::Voicebox.HealthResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Voicebox.HealthResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ImportAudioGenerateImportPost.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ImportAudioGenerateImportPost.g.cs index 78db15f..3a4120a 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ImportAudioGenerateImportPost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ImportAudioGenerateImportPost.g.cs @@ -34,6 +34,32 @@ partial void ProcessImportAudioGenerateImportPostResponseContent( /// public async global::System.Threading.Tasks.Task ImportAudioGenerateImportPostAsync( + global::Voicebox.BodyImportAudioGenerateImportPost request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ImportAudioGenerateImportPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Import Audio
+ /// Register an external audio file as a generation row.
+ /// Designed for the story timeline so users can drop in music or other
+ /// non-TTS audio. The row points at a singleton "Imported Audio" profile
+ /// so the existing generation/story plumbing keeps working unchanged. + ///
+ /// + /// 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> ImportAudioGenerateImportPostAsResponseAsync( + global::Voicebox.BodyImportAudioGenerateImportPost request, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -58,10 +84,11 @@ partial void ProcessImportAudioGenerateImportPostResponseContent( var __maxAttempts = global::Voicebox.AutoSDKRequestOptionsSupport.GetMaxAttempts( clientOptions: Options, requestOptions: requestOptions, - supportsRetry: true); + supportsRetry: false); global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: "/generate/import", baseUri: HttpClient.BaseAddress); @@ -77,6 +104,7 @@ partial void ProcessImportAudioGenerateImportPostResponseContent( __httpRequest.Version = global::System.Net.HttpVersion.Version11; __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; #endif + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); var __contentFile = new global::System.Net.Http.ByteArrayContent(request.File ?? global::System.Array.Empty()); __contentFile.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( @@ -115,7 +143,9 @@ request.Filename is null { __contentFile.Headers.ContentDisposition.FileNameStar = null; } + __httpRequest.Content = __httpRequestContent; + global::Voicebox.AutoSDKRequestOptionsSupport.ApplyHeaders( request: __httpRequest, clientHeaders: Options.Headers, @@ -157,6 +187,8 @@ request.Filename is null attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -167,6 +199,11 @@ request.Filename is null } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -184,6 +221,8 @@ request.Filename is null attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -193,8 +232,7 @@ request.Filename is null __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -203,6 +241,11 @@ request.Filename is null __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -219,14 +262,15 @@ request.Filename is null 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -266,6 +310,8 @@ request.Filename is null attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -286,6 +332,8 @@ request.Filename is null attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -348,9 +396,13 @@ request.Filename is null { __response.EnsureSuccessStatusCode(); - return - global::Voicebox.GenerationResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Voicebox.GenerationResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -378,9 +430,13 @@ request.Filename is null #endif ).ConfigureAwait(false); - return - await global::Voicebox.GenerationResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Voicebox.GenerationResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -447,5 +503,868 @@ request.Filename is null requestOptions: requestOptions, cancellationToken: cancellationToken).ConfigureAwait(false); } + + /// + /// Import Audio
+ /// Register an external audio file as a generation row.
+ /// Designed for the story timeline so users can drop in music or other
+ /// non-TTS audio. The row points at a singleton "Imported Audio" profile
+ /// so the existing generation/story plumbing keeps working unchanged. + ///
+ /// + /// The stream to send as the multipart 'file' file part. + /// + /// + /// 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 ImportAudioGenerateImportPostAsync( + global::System.IO.Stream file, + string filename, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + + file = file ?? throw new global::System.ArgumentNullException(nameof(file)); + var request = new global::Voicebox.BodyImportAudioGenerateImportPost + { + File = global::System.Array.Empty(), + Filename = filename, + }; + PrepareArguments( + client: HttpClient); + PrepareImportAudioGenerateImportPostArguments( + httpClient: HttpClient, + request: request); + + using var __timeoutCancellationTokenSource = global::Voicebox.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Voicebox.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Voicebox.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: false); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Voicebox.PathBuilder( + path: "/generate/import", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Voicebox.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + var __contentFile = new global::System.Net.Http.StreamContent(file); + __contentFile.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( + request.Filename is null + ? "application/octet-stream" + : (global::System.IO.Path.GetExtension(request.Filename) ?? string.Empty).ToLowerInvariant() switch + { + ".aac" => "audio/aac", + ".flac" => "audio/flac", + ".gif" => "image/gif", + ".jpeg" => "image/jpeg", + ".jpg" => "image/jpeg", + ".json" => "application/json", + ".m4a" => "audio/mp4", + ".mp3" => "audio/mpeg", + ".mp4" => "video/mp4", + ".mpeg" => "audio/mpeg", + ".mpga" => "audio/mpeg", + ".oga" => "audio/ogg", + ".ogg" => "audio/ogg", + ".opus" => "audio/ogg", + ".pdf" => "application/pdf", + ".png" => "image/png", + ".txt" => "text/plain", + ".wav" => "audio/wav", + ".weba" => "audio/webm", + ".webm" => "video/webm", + ".webp" => "image/webp", + _ => "application/octet-stream", + }); + __httpRequestContent.Add( + content: __contentFile, + name: "\"file\"", + fileName: request.Filename != null ? $"\"{request.Filename}\"" : string.Empty); + if (__contentFile.Headers.ContentDisposition != null) + { + __contentFile.Headers.ContentDisposition.FileNameStar = null; + } + + __httpRequest.Content = __httpRequestContent; + + global::Voicebox.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareImportAudioGenerateImportPostRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Voicebox.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ImportAudioGenerateImportPost", + methodName: "ImportAudioGenerateImportPostAsync", + pathTemplate: "\"/generate/import\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ImportAudioGenerateImportPost", + methodName: "ImportAudioGenerateImportPostAsync", + pathTemplate: "\"/generate/import\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ImportAudioGenerateImportPost", + methodName: "ImportAudioGenerateImportPostAsync", + pathTemplate: "\"/generate/import\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessImportAudioGenerateImportPostResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ImportAudioGenerateImportPost", + methodName: "ImportAudioGenerateImportPostAsync", + pathTemplate: "\"/generate/import\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ImportAudioGenerateImportPost", + methodName: "ImportAudioGenerateImportPostAsync", + pathTemplate: "\"/generate/import\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::Voicebox.HTTPValidationError? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::Voicebox.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::Voicebox.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + throw new global::Voicebox.ApiException( + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessImportAudioGenerateImportPostResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::Voicebox.GenerationResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::Voicebox.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + return + await global::Voicebox.GenerationResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw new global::Voicebox.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + /// + /// Import Audio
+ /// Register an external audio file as a generation row.
+ /// Designed for the story timeline so users can drop in music or other
+ /// non-TTS audio. The row points at a singleton "Imported Audio" profile
+ /// so the existing generation/story plumbing keeps working unchanged. + ///
+ /// + /// The stream to send as the multipart 'file' file part. + /// + /// + /// 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> ImportAudioGenerateImportPostAsResponseAsync( + global::System.IO.Stream file, + string filename, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + + file = file ?? throw new global::System.ArgumentNullException(nameof(file)); + var request = new global::Voicebox.BodyImportAudioGenerateImportPost + { + File = global::System.Array.Empty(), + Filename = filename, + }; + PrepareArguments( + client: HttpClient); + PrepareImportAudioGenerateImportPostArguments( + httpClient: HttpClient, + request: request); + + using var __timeoutCancellationTokenSource = global::Voicebox.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Voicebox.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Voicebox.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: false); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Voicebox.PathBuilder( + path: "/generate/import", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Voicebox.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + var __contentFile = new global::System.Net.Http.StreamContent(file); + __contentFile.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( + request.Filename is null + ? "application/octet-stream" + : (global::System.IO.Path.GetExtension(request.Filename) ?? string.Empty).ToLowerInvariant() switch + { + ".aac" => "audio/aac", + ".flac" => "audio/flac", + ".gif" => "image/gif", + ".jpeg" => "image/jpeg", + ".jpg" => "image/jpeg", + ".json" => "application/json", + ".m4a" => "audio/mp4", + ".mp3" => "audio/mpeg", + ".mp4" => "video/mp4", + ".mpeg" => "audio/mpeg", + ".mpga" => "audio/mpeg", + ".oga" => "audio/ogg", + ".ogg" => "audio/ogg", + ".opus" => "audio/ogg", + ".pdf" => "application/pdf", + ".png" => "image/png", + ".txt" => "text/plain", + ".wav" => "audio/wav", + ".weba" => "audio/webm", + ".webm" => "video/webm", + ".webp" => "image/webp", + _ => "application/octet-stream", + }); + __httpRequestContent.Add( + content: __contentFile, + name: "\"file\"", + fileName: request.Filename != null ? $"\"{request.Filename}\"" : string.Empty); + if (__contentFile.Headers.ContentDisposition != null) + { + __contentFile.Headers.ContentDisposition.FileNameStar = null; + } + + __httpRequest.Content = __httpRequestContent; + + global::Voicebox.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareImportAudioGenerateImportPostRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Voicebox.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ImportAudioGenerateImportPost", + methodName: "ImportAudioGenerateImportPostAsync", + pathTemplate: "\"/generate/import\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ImportAudioGenerateImportPost", + methodName: "ImportAudioGenerateImportPostAsync", + pathTemplate: "\"/generate/import\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ImportAudioGenerateImportPost", + methodName: "ImportAudioGenerateImportPostAsync", + pathTemplate: "\"/generate/import\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessImportAudioGenerateImportPostResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ImportAudioGenerateImportPost", + methodName: "ImportAudioGenerateImportPostAsync", + pathTemplate: "\"/generate/import\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ImportAudioGenerateImportPost", + methodName: "ImportAudioGenerateImportPostAsync", + pathTemplate: "\"/generate/import\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::Voicebox.HTTPValidationError? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::Voicebox.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::Voicebox.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + throw new global::Voicebox.ApiException( + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessImportAudioGenerateImportPostResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Voicebox.GenerationResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw new global::Voicebox.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::Voicebox.GenerationResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw new global::Voicebox.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ImportGenerationHistoryImportPost.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ImportGenerationHistoryImportPost.g.cs index b9c9e94..688ea0e 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ImportGenerationHistoryImportPost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ImportGenerationHistoryImportPost.g.cs @@ -31,6 +31,29 @@ partial void ProcessImportGenerationHistoryImportPostResponseContent( /// public async global::System.Threading.Tasks.Task ImportGenerationHistoryImportPostAsync( + global::Voicebox.BodyImportGenerationHistoryImportPost request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ImportGenerationHistoryImportPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Import Generation
+ /// Import a generation from a ZIP archive. + ///
+ /// + /// 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> ImportGenerationHistoryImportPostAsResponseAsync( + global::Voicebox.BodyImportGenerationHistoryImportPost request, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -55,10 +78,11 @@ partial void ProcessImportGenerationHistoryImportPostResponseContent( var __maxAttempts = global::Voicebox.AutoSDKRequestOptionsSupport.GetMaxAttempts( clientOptions: Options, requestOptions: requestOptions, - supportsRetry: true); + supportsRetry: false); global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: "/history/import", baseUri: HttpClient.BaseAddress); @@ -74,6 +98,7 @@ partial void ProcessImportGenerationHistoryImportPostResponseContent( __httpRequest.Version = global::System.Net.HttpVersion.Version11; __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; #endif + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); var __contentFile = new global::System.Net.Http.ByteArrayContent(request.File ?? global::System.Array.Empty()); __contentFile.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( @@ -112,7 +137,9 @@ request.Filename is null { __contentFile.Headers.ContentDisposition.FileNameStar = null; } + __httpRequest.Content = __httpRequestContent; + global::Voicebox.AutoSDKRequestOptionsSupport.ApplyHeaders( request: __httpRequest, clientHeaders: Options.Headers, @@ -154,6 +181,8 @@ request.Filename is null attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -164,6 +193,11 @@ request.Filename is null } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -181,6 +215,8 @@ request.Filename is null attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -190,8 +226,7 @@ request.Filename is null __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -200,6 +235,11 @@ request.Filename is null __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -216,14 +256,15 @@ request.Filename is null 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -263,6 +304,8 @@ request.Filename is null attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -283,6 +326,8 @@ request.Filename is null attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -345,7 +390,11 @@ request.Filename is null { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -373,7 +422,11 @@ request.Filename is null #endif ).ConfigureAwait(false); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -437,5 +490,854 @@ request.Filename is null requestOptions: requestOptions, cancellationToken: cancellationToken).ConfigureAwait(false); } + + /// + /// Import Generation
+ /// Import a generation from a ZIP archive. + ///
+ /// + /// The stream to send as the multipart 'file' file part. + /// + /// + /// 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 ImportGenerationHistoryImportPostAsync( + global::System.IO.Stream file, + string filename, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + + file = file ?? throw new global::System.ArgumentNullException(nameof(file)); + var request = new global::Voicebox.BodyImportGenerationHistoryImportPost + { + File = global::System.Array.Empty(), + Filename = filename, + }; + PrepareArguments( + client: HttpClient); + PrepareImportGenerationHistoryImportPostArguments( + httpClient: HttpClient, + request: request); + + using var __timeoutCancellationTokenSource = global::Voicebox.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Voicebox.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Voicebox.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: false); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Voicebox.PathBuilder( + path: "/history/import", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Voicebox.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + var __contentFile = new global::System.Net.Http.StreamContent(file); + __contentFile.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( + request.Filename is null + ? "application/octet-stream" + : (global::System.IO.Path.GetExtension(request.Filename) ?? string.Empty).ToLowerInvariant() switch + { + ".aac" => "audio/aac", + ".flac" => "audio/flac", + ".gif" => "image/gif", + ".jpeg" => "image/jpeg", + ".jpg" => "image/jpeg", + ".json" => "application/json", + ".m4a" => "audio/mp4", + ".mp3" => "audio/mpeg", + ".mp4" => "video/mp4", + ".mpeg" => "audio/mpeg", + ".mpga" => "audio/mpeg", + ".oga" => "audio/ogg", + ".ogg" => "audio/ogg", + ".opus" => "audio/ogg", + ".pdf" => "application/pdf", + ".png" => "image/png", + ".txt" => "text/plain", + ".wav" => "audio/wav", + ".weba" => "audio/webm", + ".webm" => "video/webm", + ".webp" => "image/webp", + _ => "application/octet-stream", + }); + __httpRequestContent.Add( + content: __contentFile, + name: "\"file\"", + fileName: request.Filename != null ? $"\"{request.Filename}\"" : string.Empty); + if (__contentFile.Headers.ContentDisposition != null) + { + __contentFile.Headers.ContentDisposition.FileNameStar = null; + } + + __httpRequest.Content = __httpRequestContent; + + global::Voicebox.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareImportGenerationHistoryImportPostRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Voicebox.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ImportGenerationHistoryImportPost", + methodName: "ImportGenerationHistoryImportPostAsync", + pathTemplate: "\"/history/import\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ImportGenerationHistoryImportPost", + methodName: "ImportGenerationHistoryImportPostAsync", + pathTemplate: "\"/history/import\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ImportGenerationHistoryImportPost", + methodName: "ImportGenerationHistoryImportPostAsync", + pathTemplate: "\"/history/import\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessImportGenerationHistoryImportPostResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ImportGenerationHistoryImportPost", + methodName: "ImportGenerationHistoryImportPostAsync", + pathTemplate: "\"/history/import\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ImportGenerationHistoryImportPost", + methodName: "ImportGenerationHistoryImportPostAsync", + pathTemplate: "\"/history/import\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::Voicebox.HTTPValidationError? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::Voicebox.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::Voicebox.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + throw new global::Voicebox.ApiException( + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessImportGenerationHistoryImportPostResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return __content; + } + catch (global::System.Exception __ex) + { + throw new global::Voicebox.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + return __content; + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw new global::Voicebox.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + /// + /// Import Generation
+ /// Import a generation from a ZIP archive. + ///
+ /// + /// The stream to send as the multipart 'file' file part. + /// + /// + /// 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> ImportGenerationHistoryImportPostAsResponseAsync( + global::System.IO.Stream file, + string filename, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + + file = file ?? throw new global::System.ArgumentNullException(nameof(file)); + var request = new global::Voicebox.BodyImportGenerationHistoryImportPost + { + File = global::System.Array.Empty(), + Filename = filename, + }; + PrepareArguments( + client: HttpClient); + PrepareImportGenerationHistoryImportPostArguments( + httpClient: HttpClient, + request: request); + + using var __timeoutCancellationTokenSource = global::Voicebox.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Voicebox.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Voicebox.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: false); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Voicebox.PathBuilder( + path: "/history/import", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Voicebox.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + var __contentFile = new global::System.Net.Http.StreamContent(file); + __contentFile.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( + request.Filename is null + ? "application/octet-stream" + : (global::System.IO.Path.GetExtension(request.Filename) ?? string.Empty).ToLowerInvariant() switch + { + ".aac" => "audio/aac", + ".flac" => "audio/flac", + ".gif" => "image/gif", + ".jpeg" => "image/jpeg", + ".jpg" => "image/jpeg", + ".json" => "application/json", + ".m4a" => "audio/mp4", + ".mp3" => "audio/mpeg", + ".mp4" => "video/mp4", + ".mpeg" => "audio/mpeg", + ".mpga" => "audio/mpeg", + ".oga" => "audio/ogg", + ".ogg" => "audio/ogg", + ".opus" => "audio/ogg", + ".pdf" => "application/pdf", + ".png" => "image/png", + ".txt" => "text/plain", + ".wav" => "audio/wav", + ".weba" => "audio/webm", + ".webm" => "video/webm", + ".webp" => "image/webp", + _ => "application/octet-stream", + }); + __httpRequestContent.Add( + content: __contentFile, + name: "\"file\"", + fileName: request.Filename != null ? $"\"{request.Filename}\"" : string.Empty); + if (__contentFile.Headers.ContentDisposition != null) + { + __contentFile.Headers.ContentDisposition.FileNameStar = null; + } + + __httpRequest.Content = __httpRequestContent; + + global::Voicebox.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareImportGenerationHistoryImportPostRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Voicebox.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ImportGenerationHistoryImportPost", + methodName: "ImportGenerationHistoryImportPostAsync", + pathTemplate: "\"/history/import\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ImportGenerationHistoryImportPost", + methodName: "ImportGenerationHistoryImportPostAsync", + pathTemplate: "\"/history/import\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ImportGenerationHistoryImportPost", + methodName: "ImportGenerationHistoryImportPostAsync", + pathTemplate: "\"/history/import\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessImportGenerationHistoryImportPostResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ImportGenerationHistoryImportPost", + methodName: "ImportGenerationHistoryImportPostAsync", + pathTemplate: "\"/history/import\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ImportGenerationHistoryImportPost", + methodName: "ImportGenerationHistoryImportPostAsync", + pathTemplate: "\"/history/import\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::Voicebox.HTTPValidationError? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::Voicebox.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::Voicebox.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + throw new global::Voicebox.ApiException( + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessImportGenerationHistoryImportPostResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); + } + catch (global::System.Exception __ex) + { + throw new global::Voicebox.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw new global::Voicebox.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ImportProfileProfilesImportPost.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ImportProfileProfilesImportPost.g.cs index 7596e0b..68e4771 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ImportProfileProfilesImportPost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ImportProfileProfilesImportPost.g.cs @@ -31,6 +31,29 @@ partial void ProcessImportProfileProfilesImportPostResponseContent( /// public async global::System.Threading.Tasks.Task ImportProfileProfilesImportPostAsync( + global::Voicebox.BodyImportProfileProfilesImportPost request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ImportProfileProfilesImportPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Import Profile
+ /// Import a voice profile from a ZIP archive. + ///
+ /// + /// 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> ImportProfileProfilesImportPostAsResponseAsync( + global::Voicebox.BodyImportProfileProfilesImportPost request, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -55,10 +78,11 @@ partial void ProcessImportProfileProfilesImportPostResponseContent( var __maxAttempts = global::Voicebox.AutoSDKRequestOptionsSupport.GetMaxAttempts( clientOptions: Options, requestOptions: requestOptions, - supportsRetry: true); + supportsRetry: false); global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: "/profiles/import", baseUri: HttpClient.BaseAddress); @@ -74,6 +98,7 @@ partial void ProcessImportProfileProfilesImportPostResponseContent( __httpRequest.Version = global::System.Net.HttpVersion.Version11; __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; #endif + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); var __contentFile = new global::System.Net.Http.ByteArrayContent(request.File ?? global::System.Array.Empty()); __contentFile.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( @@ -112,7 +137,9 @@ request.Filename is null { __contentFile.Headers.ContentDisposition.FileNameStar = null; } + __httpRequest.Content = __httpRequestContent; + global::Voicebox.AutoSDKRequestOptionsSupport.ApplyHeaders( request: __httpRequest, clientHeaders: Options.Headers, @@ -154,6 +181,8 @@ request.Filename is null attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -164,6 +193,11 @@ request.Filename is null } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -181,6 +215,8 @@ request.Filename is null attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -190,8 +226,7 @@ request.Filename is null __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -200,6 +235,11 @@ request.Filename is null __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -216,14 +256,15 @@ request.Filename is null 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -263,6 +304,8 @@ request.Filename is null attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -283,6 +326,8 @@ request.Filename is null attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -345,9 +390,13 @@ request.Filename is null { __response.EnsureSuccessStatusCode(); - return - global::Voicebox.VoiceProfileResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Voicebox.VoiceProfileResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -375,9 +424,13 @@ request.Filename is null #endif ).ConfigureAwait(false); - return - await global::Voicebox.VoiceProfileResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Voicebox.VoiceProfileResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -441,5 +494,862 @@ request.Filename is null requestOptions: requestOptions, cancellationToken: cancellationToken).ConfigureAwait(false); } + + /// + /// Import Profile
+ /// Import a voice profile from a ZIP archive. + ///
+ /// + /// The stream to send as the multipart 'file' file part. + /// + /// + /// 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 ImportProfileProfilesImportPostAsync( + global::System.IO.Stream file, + string filename, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + + file = file ?? throw new global::System.ArgumentNullException(nameof(file)); + var request = new global::Voicebox.BodyImportProfileProfilesImportPost + { + File = global::System.Array.Empty(), + Filename = filename, + }; + PrepareArguments( + client: HttpClient); + PrepareImportProfileProfilesImportPostArguments( + httpClient: HttpClient, + request: request); + + using var __timeoutCancellationTokenSource = global::Voicebox.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Voicebox.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Voicebox.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: false); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Voicebox.PathBuilder( + path: "/profiles/import", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Voicebox.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + var __contentFile = new global::System.Net.Http.StreamContent(file); + __contentFile.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( + request.Filename is null + ? "application/octet-stream" + : (global::System.IO.Path.GetExtension(request.Filename) ?? string.Empty).ToLowerInvariant() switch + { + ".aac" => "audio/aac", + ".flac" => "audio/flac", + ".gif" => "image/gif", + ".jpeg" => "image/jpeg", + ".jpg" => "image/jpeg", + ".json" => "application/json", + ".m4a" => "audio/mp4", + ".mp3" => "audio/mpeg", + ".mp4" => "video/mp4", + ".mpeg" => "audio/mpeg", + ".mpga" => "audio/mpeg", + ".oga" => "audio/ogg", + ".ogg" => "audio/ogg", + ".opus" => "audio/ogg", + ".pdf" => "application/pdf", + ".png" => "image/png", + ".txt" => "text/plain", + ".wav" => "audio/wav", + ".weba" => "audio/webm", + ".webm" => "video/webm", + ".webp" => "image/webp", + _ => "application/octet-stream", + }); + __httpRequestContent.Add( + content: __contentFile, + name: "\"file\"", + fileName: request.Filename != null ? $"\"{request.Filename}\"" : string.Empty); + if (__contentFile.Headers.ContentDisposition != null) + { + __contentFile.Headers.ContentDisposition.FileNameStar = null; + } + + __httpRequest.Content = __httpRequestContent; + + global::Voicebox.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareImportProfileProfilesImportPostRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Voicebox.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ImportProfileProfilesImportPost", + methodName: "ImportProfileProfilesImportPostAsync", + pathTemplate: "\"/profiles/import\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ImportProfileProfilesImportPost", + methodName: "ImportProfileProfilesImportPostAsync", + pathTemplate: "\"/profiles/import\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ImportProfileProfilesImportPost", + methodName: "ImportProfileProfilesImportPostAsync", + pathTemplate: "\"/profiles/import\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessImportProfileProfilesImportPostResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ImportProfileProfilesImportPost", + methodName: "ImportProfileProfilesImportPostAsync", + pathTemplate: "\"/profiles/import\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ImportProfileProfilesImportPost", + methodName: "ImportProfileProfilesImportPostAsync", + pathTemplate: "\"/profiles/import\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::Voicebox.HTTPValidationError? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::Voicebox.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::Voicebox.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + throw new global::Voicebox.ApiException( + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessImportProfileProfilesImportPostResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::Voicebox.VoiceProfileResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::Voicebox.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + return + await global::Voicebox.VoiceProfileResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw new global::Voicebox.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + /// + /// Import Profile
+ /// Import a voice profile from a ZIP archive. + ///
+ /// + /// The stream to send as the multipart 'file' file part. + /// + /// + /// 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> ImportProfileProfilesImportPostAsResponseAsync( + global::System.IO.Stream file, + string filename, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + + file = file ?? throw new global::System.ArgumentNullException(nameof(file)); + var request = new global::Voicebox.BodyImportProfileProfilesImportPost + { + File = global::System.Array.Empty(), + Filename = filename, + }; + PrepareArguments( + client: HttpClient); + PrepareImportProfileProfilesImportPostArguments( + httpClient: HttpClient, + request: request); + + using var __timeoutCancellationTokenSource = global::Voicebox.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Voicebox.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Voicebox.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: false); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Voicebox.PathBuilder( + path: "/profiles/import", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Voicebox.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + var __contentFile = new global::System.Net.Http.StreamContent(file); + __contentFile.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( + request.Filename is null + ? "application/octet-stream" + : (global::System.IO.Path.GetExtension(request.Filename) ?? string.Empty).ToLowerInvariant() switch + { + ".aac" => "audio/aac", + ".flac" => "audio/flac", + ".gif" => "image/gif", + ".jpeg" => "image/jpeg", + ".jpg" => "image/jpeg", + ".json" => "application/json", + ".m4a" => "audio/mp4", + ".mp3" => "audio/mpeg", + ".mp4" => "video/mp4", + ".mpeg" => "audio/mpeg", + ".mpga" => "audio/mpeg", + ".oga" => "audio/ogg", + ".ogg" => "audio/ogg", + ".opus" => "audio/ogg", + ".pdf" => "application/pdf", + ".png" => "image/png", + ".txt" => "text/plain", + ".wav" => "audio/wav", + ".weba" => "audio/webm", + ".webm" => "video/webm", + ".webp" => "image/webp", + _ => "application/octet-stream", + }); + __httpRequestContent.Add( + content: __contentFile, + name: "\"file\"", + fileName: request.Filename != null ? $"\"{request.Filename}\"" : string.Empty); + if (__contentFile.Headers.ContentDisposition != null) + { + __contentFile.Headers.ContentDisposition.FileNameStar = null; + } + + __httpRequest.Content = __httpRequestContent; + + global::Voicebox.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareImportProfileProfilesImportPostRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Voicebox.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ImportProfileProfilesImportPost", + methodName: "ImportProfileProfilesImportPostAsync", + pathTemplate: "\"/profiles/import\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ImportProfileProfilesImportPost", + methodName: "ImportProfileProfilesImportPostAsync", + pathTemplate: "\"/profiles/import\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ImportProfileProfilesImportPost", + methodName: "ImportProfileProfilesImportPostAsync", + pathTemplate: "\"/profiles/import\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessImportProfileProfilesImportPostResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ImportProfileProfilesImportPost", + methodName: "ImportProfileProfilesImportPostAsync", + pathTemplate: "\"/profiles/import\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ImportProfileProfilesImportPost", + methodName: "ImportProfileProfilesImportPostAsync", + pathTemplate: "\"/profiles/import\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::Voicebox.HTTPValidationError? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::Voicebox.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::Voicebox.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + throw new global::Voicebox.ApiException( + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessImportProfileProfilesImportPostResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Voicebox.VoiceProfileResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw new global::Voicebox.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::Voicebox.VoiceProfileResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw new global::Voicebox.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ListCapturesEndpointCapturesGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ListCapturesEndpointCapturesGet.g.cs index a7ea622..e466fdd 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ListCapturesEndpointCapturesGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ListCapturesEndpointCapturesGet.g.cs @@ -40,6 +40,33 @@ partial void ProcessListCapturesEndpointCapturesGetResponseContent( int? offset = default, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ListCapturesEndpointCapturesGetAsResponseAsync( + limit: limit, + offset: offset, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List Captures Endpoint + /// + /// + /// Default Value: 50 + /// + /// + /// Default Value: 0 + /// + /// 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> ListCapturesEndpointCapturesGetAsResponseAsync( + int? limit = default, + int? offset = default, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -64,12 +91,13 @@ partial void ProcessListCapturesEndpointCapturesGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: "/captures", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("limit", limit?.ToString()) - .AddOptionalParameter("offset", offset?.ToString()) + .AddOptionalParameter("offset", offset?.ToString()) ; var __path = __pathBuilder.ToString(); __path = global::Voicebox.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -125,6 +153,8 @@ partial void ProcessListCapturesEndpointCapturesGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -135,6 +165,11 @@ partial void ProcessListCapturesEndpointCapturesGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -152,6 +187,8 @@ partial void ProcessListCapturesEndpointCapturesGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -161,8 +198,7 @@ partial void ProcessListCapturesEndpointCapturesGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -171,6 +207,11 @@ partial void ProcessListCapturesEndpointCapturesGetResponseContent( __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -187,14 +228,15 @@ partial void ProcessListCapturesEndpointCapturesGetResponseContent( 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -234,6 +276,8 @@ partial void ProcessListCapturesEndpointCapturesGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -254,6 +298,8 @@ partial void ProcessListCapturesEndpointCapturesGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -316,9 +362,13 @@ partial void ProcessListCapturesEndpointCapturesGetResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Voicebox.CaptureListResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Voicebox.CaptureListResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -346,9 +396,13 @@ partial void ProcessListCapturesEndpointCapturesGetResponseContent( #endif ).ConfigureAwait(false); - return - await global::Voicebox.CaptureListResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Voicebox.CaptureListResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ListChannelsChannelsGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ListChannelsChannelsGet.g.cs index 3a7f050..06e9f38 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ListChannelsChannelsGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ListChannelsChannelsGet.g.cs @@ -29,6 +29,24 @@ partial void ProcessListChannelsChannelsGetResponseContent( public async global::System.Threading.Tasks.Task> ListChannelsChannelsGetAsync( global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ListChannelsChannelsGetAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List Channels
+ /// List all audio channels. + ///
+ /// 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>> ListChannelsChannelsGetAsResponseAsync( + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -51,6 +69,7 @@ partial void ProcessListChannelsChannelsGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: "/channels", baseUri: HttpClient.BaseAddress); @@ -106,6 +125,8 @@ partial void ProcessListChannelsChannelsGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -116,6 +137,11 @@ partial void ProcessListChannelsChannelsGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -133,6 +159,8 @@ partial void ProcessListChannelsChannelsGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -142,8 +170,7 @@ partial void ProcessListChannelsChannelsGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -152,6 +179,11 @@ partial void ProcessListChannelsChannelsGetResponseContent( __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -168,14 +200,15 @@ partial void ProcessListChannelsChannelsGetResponseContent( 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +248,8 @@ partial void ProcessListChannelsChannelsGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -235,6 +270,8 @@ partial void ProcessListChannelsChannelsGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -259,9 +296,13 @@ partial void ProcessListChannelsChannelsGetResponseContent( { __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::Voicebox.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -289,9 +330,13 @@ partial void ProcessListChannelsChannelsGetResponseContent( #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::Voicebox.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ListEffectPresetsEffectsPresetsGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ListEffectPresetsEffectsPresetsGet.g.cs index 81fa041..79c93a3 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ListEffectPresetsEffectsPresetsGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ListEffectPresetsEffectsPresetsGet.g.cs @@ -29,6 +29,24 @@ partial void ProcessListEffectPresetsEffectsPresetsGetResponseContent( public async global::System.Threading.Tasks.Task> ListEffectPresetsEffectsPresetsGetAsync( global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ListEffectPresetsEffectsPresetsGetAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List Effect Presets
+ /// List all effect presets (built-in + user-created). + ///
+ /// 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>> ListEffectPresetsEffectsPresetsGetAsResponseAsync( + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -51,6 +69,7 @@ partial void ProcessListEffectPresetsEffectsPresetsGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: "/effects/presets", baseUri: HttpClient.BaseAddress); @@ -106,6 +125,8 @@ partial void ProcessListEffectPresetsEffectsPresetsGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -116,6 +137,11 @@ partial void ProcessListEffectPresetsEffectsPresetsGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -133,6 +159,8 @@ partial void ProcessListEffectPresetsEffectsPresetsGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -142,8 +170,7 @@ partial void ProcessListEffectPresetsEffectsPresetsGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -152,6 +179,11 @@ partial void ProcessListEffectPresetsEffectsPresetsGetResponseContent( __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -168,14 +200,15 @@ partial void ProcessListEffectPresetsEffectsPresetsGetResponseContent( 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +248,8 @@ partial void ProcessListEffectPresetsEffectsPresetsGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -235,6 +270,8 @@ partial void ProcessListEffectPresetsEffectsPresetsGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -259,9 +296,13 @@ partial void ProcessListEffectPresetsEffectsPresetsGetResponseContent( { __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::Voicebox.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -289,9 +330,13 @@ partial void ProcessListEffectPresetsEffectsPresetsGetResponseContent( #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::Voicebox.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ListGenerationVersionsGenerationsGenerationIdVersionsGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ListGenerationVersionsGenerationsGenerationIdVersionsGet.g.cs index 5947999..ee13eb6 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ListGenerationVersionsGenerationsGenerationIdVersionsGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ListGenerationVersionsGenerationsGenerationIdVersionsGet.g.cs @@ -33,6 +33,27 @@ partial void ProcessListGenerationVersionsGenerationsGenerationIdVersionsGetResp string generationId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ListGenerationVersionsGenerationsGenerationIdVersionsGetAsResponseAsync( + generationId: generationId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List Generation Versions
+ /// List all versions for a generation. + ///
+ /// + /// 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>> ListGenerationVersionsGenerationsGenerationIdVersionsGetAsResponseAsync( + string generationId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -56,6 +77,7 @@ partial void ProcessListGenerationVersionsGenerationsGenerationIdVersionsGetResp global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: $"/generations/{generationId}/versions", baseUri: HttpClient.BaseAddress); @@ -112,6 +134,8 @@ partial void ProcessListGenerationVersionsGenerationsGenerationIdVersionsGetResp attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -122,6 +146,11 @@ partial void ProcessListGenerationVersionsGenerationsGenerationIdVersionsGetResp } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -139,6 +168,8 @@ partial void ProcessListGenerationVersionsGenerationsGenerationIdVersionsGetResp attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -148,8 +179,7 @@ partial void ProcessListGenerationVersionsGenerationsGenerationIdVersionsGetResp __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -158,6 +188,11 @@ partial void ProcessListGenerationVersionsGenerationsGenerationIdVersionsGetResp __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -174,14 +209,15 @@ partial void ProcessListGenerationVersionsGenerationsGenerationIdVersionsGetResp 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -221,6 +257,8 @@ partial void ProcessListGenerationVersionsGenerationsGenerationIdVersionsGetResp attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -241,6 +279,8 @@ partial void ProcessListGenerationVersionsGenerationsGenerationIdVersionsGetResp attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -303,9 +343,13 @@ partial void ProcessListGenerationVersionsGenerationsGenerationIdVersionsGetResp { __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::Voicebox.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -333,9 +377,13 @@ partial void ProcessListGenerationVersionsGenerationsGenerationIdVersionsGetResp #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::Voicebox.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ListHistoryHistoryGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ListHistoryHistoryGet.g.cs index a7bbcdd..4c523b0 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ListHistoryHistoryGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ListHistoryHistoryGet.g.cs @@ -49,6 +49,40 @@ partial void ProcessListHistoryHistoryGetResponseContent( int? offset = default, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ListHistoryHistoryGetAsResponseAsync( + profileId: profileId, + search: search, + limit: limit, + offset: offset, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List History
+ /// List generation history with optional filters. + ///
+ /// + /// + /// + /// Default Value: 50 + /// + /// + /// Default Value: 0 + /// + /// 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> ListHistoryHistoryGetAsResponseAsync( + string? profileId = default, + string? search = default, + int? limit = default, + int? offset = default, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -75,14 +109,15 @@ partial void ProcessListHistoryHistoryGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: "/history", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("profile_id", profileId) .AddOptionalParameter("search", search) .AddOptionalParameter("limit", limit?.ToString()) - .AddOptionalParameter("offset", offset?.ToString()) + .AddOptionalParameter("offset", offset?.ToString()) ; var __path = __pathBuilder.ToString(); __path = global::Voicebox.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -140,6 +175,8 @@ partial void ProcessListHistoryHistoryGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -150,6 +187,11 @@ partial void ProcessListHistoryHistoryGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -167,6 +209,8 @@ partial void ProcessListHistoryHistoryGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -176,8 +220,7 @@ partial void ProcessListHistoryHistoryGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -186,6 +229,11 @@ partial void ProcessListHistoryHistoryGetResponseContent( __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -202,14 +250,15 @@ partial void ProcessListHistoryHistoryGetResponseContent( 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -249,6 +298,8 @@ partial void ProcessListHistoryHistoryGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -269,6 +320,8 @@ partial void ProcessListHistoryHistoryGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -331,9 +384,13 @@ partial void ProcessListHistoryHistoryGetResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Voicebox.HistoryListResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Voicebox.HistoryListResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -361,9 +418,13 @@ partial void ProcessListHistoryHistoryGetResponseContent( #endif ).ConfigureAwait(false); - return - await global::Voicebox.HistoryListResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Voicebox.HistoryListResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ListMcpBindingsMcpBindingsGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ListMcpBindingsMcpBindingsGet.g.cs index a3f9398..958b2e1 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ListMcpBindingsMcpBindingsGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ListMcpBindingsMcpBindingsGet.g.cs @@ -28,6 +28,23 @@ partial void ProcessListMcpBindingsMcpBindingsGetResponseContent( public async global::System.Threading.Tasks.Task ListMcpBindingsMcpBindingsGetAsync( global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ListMcpBindingsMcpBindingsGetAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List Mcp Bindings + /// + /// 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> ListMcpBindingsMcpBindingsGetAsResponseAsync( + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -50,6 +67,7 @@ partial void ProcessListMcpBindingsMcpBindingsGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: "/mcp/bindings", baseUri: HttpClient.BaseAddress); @@ -105,6 +123,8 @@ partial void ProcessListMcpBindingsMcpBindingsGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -115,6 +135,11 @@ partial void ProcessListMcpBindingsMcpBindingsGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -132,6 +157,8 @@ partial void ProcessListMcpBindingsMcpBindingsGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -141,8 +168,7 @@ partial void ProcessListMcpBindingsMcpBindingsGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -151,6 +177,11 @@ partial void ProcessListMcpBindingsMcpBindingsGetResponseContent( __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -167,14 +198,15 @@ partial void ProcessListMcpBindingsMcpBindingsGetResponseContent( 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -214,6 +246,8 @@ partial void ProcessListMcpBindingsMcpBindingsGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -234,6 +268,8 @@ partial void ProcessListMcpBindingsMcpBindingsGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -258,9 +294,13 @@ partial void ProcessListMcpBindingsMcpBindingsGetResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Voicebox.MCPClientBindingListResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Voicebox.MCPClientBindingListResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -288,9 +328,13 @@ partial void ProcessListMcpBindingsMcpBindingsGetResponseContent( #endif ).ConfigureAwait(false); - return - await global::Voicebox.MCPClientBindingListResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Voicebox.MCPClientBindingListResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ListPresetVoicesProfilesPresetsEngineGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ListPresetVoicesProfilesPresetsEngineGet.g.cs index c511604..36c992a 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ListPresetVoicesProfilesPresetsEngineGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ListPresetVoicesProfilesPresetsEngineGet.g.cs @@ -33,6 +33,27 @@ partial void ProcessListPresetVoicesProfilesPresetsEngineGetResponseContent( string engine, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ListPresetVoicesProfilesPresetsEngineGetAsResponseAsync( + engine: engine, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List Preset Voices
+ /// List available preset voices for an engine. + ///
+ /// + /// 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> ListPresetVoicesProfilesPresetsEngineGetAsResponseAsync( + string engine, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -56,6 +77,7 @@ partial void ProcessListPresetVoicesProfilesPresetsEngineGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: $"/profiles/presets/{engine}", baseUri: HttpClient.BaseAddress); @@ -112,6 +134,8 @@ partial void ProcessListPresetVoicesProfilesPresetsEngineGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -122,6 +146,11 @@ partial void ProcessListPresetVoicesProfilesPresetsEngineGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -139,6 +168,8 @@ partial void ProcessListPresetVoicesProfilesPresetsEngineGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -148,8 +179,7 @@ partial void ProcessListPresetVoicesProfilesPresetsEngineGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -158,6 +188,11 @@ partial void ProcessListPresetVoicesProfilesPresetsEngineGetResponseContent( __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -174,14 +209,15 @@ partial void ProcessListPresetVoicesProfilesPresetsEngineGetResponseContent( 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -221,6 +257,8 @@ partial void ProcessListPresetVoicesProfilesPresetsEngineGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -241,6 +279,8 @@ partial void ProcessListPresetVoicesProfilesPresetsEngineGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -303,7 +343,11 @@ partial void ProcessListPresetVoicesProfilesPresetsEngineGetResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -331,7 +375,11 @@ partial void ProcessListPresetVoicesProfilesPresetsEngineGetResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ListProfilesProfilesGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ListProfilesProfilesGet.g.cs index 2408fff..90a6a8e 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ListProfilesProfilesGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ListProfilesProfilesGet.g.cs @@ -29,6 +29,24 @@ partial void ProcessListProfilesProfilesGetResponseContent( public async global::System.Threading.Tasks.Task> ListProfilesProfilesGetAsync( global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ListProfilesProfilesGetAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List Profiles
+ /// List all voice profiles. + ///
+ /// 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>> ListProfilesProfilesGetAsResponseAsync( + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -51,6 +69,7 @@ partial void ProcessListProfilesProfilesGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: "/profiles", baseUri: HttpClient.BaseAddress); @@ -106,6 +125,8 @@ partial void ProcessListProfilesProfilesGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -116,6 +137,11 @@ partial void ProcessListProfilesProfilesGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -133,6 +159,8 @@ partial void ProcessListProfilesProfilesGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -142,8 +170,7 @@ partial void ProcessListProfilesProfilesGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -152,6 +179,11 @@ partial void ProcessListProfilesProfilesGetResponseContent( __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -168,14 +200,15 @@ partial void ProcessListProfilesProfilesGetResponseContent( 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +248,8 @@ partial void ProcessListProfilesProfilesGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -235,6 +270,8 @@ partial void ProcessListProfilesProfilesGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -259,9 +296,13 @@ partial void ProcessListProfilesProfilesGetResponseContent( { __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::Voicebox.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -289,9 +330,13 @@ partial void ProcessListProfilesProfilesGetResponseContent( #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::Voicebox.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ListStoriesStoriesGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ListStoriesStoriesGet.g.cs index c693efe..b6170c8 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ListStoriesStoriesGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ListStoriesStoriesGet.g.cs @@ -29,6 +29,24 @@ partial void ProcessListStoriesStoriesGetResponseContent( public async global::System.Threading.Tasks.Task> ListStoriesStoriesGetAsync( global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ListStoriesStoriesGetAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List Stories
+ /// List all stories. + ///
+ /// 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>> ListStoriesStoriesGetAsResponseAsync( + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -51,6 +69,7 @@ partial void ProcessListStoriesStoriesGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: "/stories", baseUri: HttpClient.BaseAddress); @@ -106,6 +125,8 @@ partial void ProcessListStoriesStoriesGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -116,6 +137,11 @@ partial void ProcessListStoriesStoriesGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -133,6 +159,8 @@ partial void ProcessListStoriesStoriesGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -142,8 +170,7 @@ partial void ProcessListStoriesStoriesGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -152,6 +179,11 @@ partial void ProcessListStoriesStoriesGetResponseContent( __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -168,14 +200,15 @@ partial void ProcessListStoriesStoriesGetResponseContent( 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +248,8 @@ partial void ProcessListStoriesStoriesGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -235,6 +270,8 @@ partial void ProcessListStoriesStoriesGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -259,9 +296,13 @@ partial void ProcessListStoriesStoriesGetResponseContent( { __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::Voicebox.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -289,9 +330,13 @@ partial void ProcessListStoriesStoriesGetResponseContent( #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::Voicebox.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.LlmGenerateLlmGeneratePost.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.LlmGenerateLlmGeneratePost.g.cs index 1036665..81e2a85 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.LlmGenerateLlmGeneratePost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.LlmGenerateLlmGeneratePost.g.cs @@ -31,6 +31,29 @@ partial void ProcessLlmGenerateLlmGeneratePostResponseContent( /// public async global::System.Threading.Tasks.Task LlmGenerateLlmGeneratePostAsync( + global::Voicebox.LLMGenerateRequest request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await LlmGenerateLlmGeneratePostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Llm Generate
+ /// Run a single-turn Qwen3 completion. + ///
+ /// + /// 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> LlmGenerateLlmGeneratePostAsResponseAsync( + global::Voicebox.LLMGenerateRequest request, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -59,6 +82,7 @@ partial void ProcessLlmGenerateLlmGeneratePostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: "/llm/generate", baseUri: HttpClient.BaseAddress); @@ -121,6 +145,8 @@ partial void ProcessLlmGenerateLlmGeneratePostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -131,6 +157,11 @@ partial void ProcessLlmGenerateLlmGeneratePostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -148,6 +179,8 @@ partial void ProcessLlmGenerateLlmGeneratePostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -157,8 +190,7 @@ partial void ProcessLlmGenerateLlmGeneratePostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -167,6 +199,11 @@ partial void ProcessLlmGenerateLlmGeneratePostResponseContent( __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -183,14 +220,15 @@ partial void ProcessLlmGenerateLlmGeneratePostResponseContent( 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -230,6 +268,8 @@ partial void ProcessLlmGenerateLlmGeneratePostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -250,6 +290,8 @@ partial void ProcessLlmGenerateLlmGeneratePostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -312,9 +354,13 @@ partial void ProcessLlmGenerateLlmGeneratePostResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Voicebox.LLMGenerateResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Voicebox.LLMGenerateResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -342,9 +388,13 @@ partial void ProcessLlmGenerateLlmGeneratePostResponseContent( #endif ).ConfigureAwait(false); - return - await global::Voicebox.LLMGenerateResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Voicebox.LLMGenerateResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.LoadModelModelsLoadPost.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.LoadModelModelsLoadPost.g.cs index 9797434..0ce44b0 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.LoadModelModelsLoadPost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.LoadModelModelsLoadPost.g.cs @@ -35,6 +35,29 @@ partial void ProcessLoadModelModelsLoadPostResponseContent( string? modelSize = default, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await LoadModelModelsLoadPostAsResponseAsync( + modelSize: modelSize, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Load Model
+ /// Manually load TTS model. + ///
+ /// + /// Default Value: 1.7B + /// + /// 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> LoadModelModelsLoadPostAsResponseAsync( + string? modelSize = default, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -58,11 +81,12 @@ partial void ProcessLoadModelModelsLoadPostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: "/models/load", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder - .AddOptionalParameter("model_size", modelSize) + .AddOptionalParameter("model_size", modelSize) ; var __path = __pathBuilder.ToString(); __path = global::Voicebox.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -117,6 +141,8 @@ partial void ProcessLoadModelModelsLoadPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -127,6 +153,11 @@ partial void ProcessLoadModelModelsLoadPostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -144,6 +175,8 @@ partial void ProcessLoadModelModelsLoadPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -153,8 +186,7 @@ partial void ProcessLoadModelModelsLoadPostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -163,6 +195,11 @@ partial void ProcessLoadModelModelsLoadPostResponseContent( __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -179,14 +216,15 @@ partial void ProcessLoadModelModelsLoadPostResponseContent( 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -226,6 +264,8 @@ partial void ProcessLoadModelModelsLoadPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -246,6 +286,8 @@ partial void ProcessLoadModelModelsLoadPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -308,7 +350,11 @@ partial void ProcessLoadModelModelsLoadPostResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -336,7 +382,11 @@ partial void ProcessLoadModelModelsLoadPostResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.MigrateModelsModelsMigratePost.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.MigrateModelsModelsMigratePost.g.cs index 90b89ce..ac29609 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.MigrateModelsModelsMigratePost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.MigrateModelsModelsMigratePost.g.cs @@ -31,6 +31,29 @@ partial void ProcessMigrateModelsModelsMigratePostResponseContent( /// public async global::System.Threading.Tasks.Task MigrateModelsModelsMigratePostAsync( + global::Voicebox.ModelMigrateRequest request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await MigrateModelsModelsMigratePostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Migrate Models
+ /// Move all downloaded models to a new directory with byte-level progress via SSE. + ///
+ /// + /// 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> MigrateModelsModelsMigratePostAsResponseAsync( + global::Voicebox.ModelMigrateRequest request, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -59,6 +82,7 @@ partial void ProcessMigrateModelsModelsMigratePostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: "/models/migrate", baseUri: HttpClient.BaseAddress); @@ -121,6 +145,8 @@ partial void ProcessMigrateModelsModelsMigratePostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -131,6 +157,11 @@ partial void ProcessMigrateModelsModelsMigratePostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -148,6 +179,8 @@ partial void ProcessMigrateModelsModelsMigratePostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -157,8 +190,7 @@ partial void ProcessMigrateModelsModelsMigratePostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -167,6 +199,11 @@ partial void ProcessMigrateModelsModelsMigratePostResponseContent( __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -183,14 +220,15 @@ partial void ProcessMigrateModelsModelsMigratePostResponseContent( 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -230,6 +268,8 @@ partial void ProcessMigrateModelsModelsMigratePostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -250,6 +290,8 @@ partial void ProcessMigrateModelsModelsMigratePostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -312,7 +354,11 @@ partial void ProcessMigrateModelsModelsMigratePostResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -340,7 +386,11 @@ partial void ProcessMigrateModelsModelsMigratePostResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.MoveStoryItemStoriesStoryIdItemsItemIdMovePut.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.MoveStoryItemStoriesStoryIdItemsItemIdMovePut.g.cs index 8b4f638..833344c 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.MoveStoryItemStoriesStoryIdItemsItemIdMovePut.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.MoveStoryItemStoriesStoryIdItemsItemIdMovePut.g.cs @@ -39,6 +39,35 @@ partial void ProcessMoveStoryItemStoriesStoryIdItemsItemIdMovePutResponseContent string storyId, string itemId, + global::Voicebox.StoryItemMove request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await MoveStoryItemStoriesStoryIdItemsItemIdMovePutAsResponseAsync( + storyId: storyId, + itemId: itemId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Move Story Item
+ /// Move a story item (update position and/or track). + ///
+ /// + /// + /// + /// 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> MoveStoryItemStoriesStoryIdItemsItemIdMovePutAsResponseAsync( + string storyId, + string itemId, + global::Voicebox.StoryItemMove request, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -69,6 +98,7 @@ partial void ProcessMoveStoryItemStoriesStoryIdItemsItemIdMovePutResponseContent global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: $"/stories/{storyId}/items/{itemId}/move", baseUri: HttpClient.BaseAddress); @@ -133,6 +163,8 @@ partial void ProcessMoveStoryItemStoriesStoryIdItemsItemIdMovePutResponseContent attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -143,6 +175,11 @@ partial void ProcessMoveStoryItemStoriesStoryIdItemsItemIdMovePutResponseContent } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -160,6 +197,8 @@ partial void ProcessMoveStoryItemStoriesStoryIdItemsItemIdMovePutResponseContent attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -169,8 +208,7 @@ partial void ProcessMoveStoryItemStoriesStoryIdItemsItemIdMovePutResponseContent __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -179,6 +217,11 @@ partial void ProcessMoveStoryItemStoriesStoryIdItemsItemIdMovePutResponseContent __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -195,14 +238,15 @@ partial void ProcessMoveStoryItemStoriesStoryIdItemsItemIdMovePutResponseContent 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -242,6 +286,8 @@ partial void ProcessMoveStoryItemStoriesStoryIdItemsItemIdMovePutResponseContent attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -262,6 +308,8 @@ partial void ProcessMoveStoryItemStoriesStoryIdItemsItemIdMovePutResponseContent attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -324,9 +372,13 @@ partial void ProcessMoveStoryItemStoriesStoryIdItemsItemIdMovePutResponseContent { __response.EnsureSuccessStatusCode(); - return - global::Voicebox.StoryItemDetail.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Voicebox.StoryItemDetail.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -354,9 +406,13 @@ partial void ProcessMoveStoryItemStoriesStoryIdItemsItemIdMovePutResponseContent #endif ).ConfigureAwait(false); - return - await global::Voicebox.StoryItemDetail.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Voicebox.StoryItemDetail.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.PreviewEffectsEffectsPreviewGenerationIdPost.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.PreviewEffectsEffectsPreviewGenerationIdPost.g.cs index 9dfdc3a..f63ce09 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.PreviewEffectsEffectsPreviewGenerationIdPost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.PreviewEffectsEffectsPreviewGenerationIdPost.g.cs @@ -35,6 +35,32 @@ partial void ProcessPreviewEffectsEffectsPreviewGenerationIdPostResponseContent( public async global::System.Threading.Tasks.Task PreviewEffectsEffectsPreviewGenerationIdPostAsync( string generationId, + global::Voicebox.ApplyEffectsRequest request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await PreviewEffectsEffectsPreviewGenerationIdPostAsResponseAsync( + generationId: generationId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Preview Effects
+ /// Apply effects to a generation's clean audio and stream back without saving. + ///
+ /// + /// + /// 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> PreviewEffectsEffectsPreviewGenerationIdPostAsResponseAsync( + string generationId, + global::Voicebox.ApplyEffectsRequest request, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -64,6 +90,7 @@ partial void ProcessPreviewEffectsEffectsPreviewGenerationIdPostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: $"/effects/preview/{generationId}", baseUri: HttpClient.BaseAddress); @@ -127,6 +154,8 @@ partial void ProcessPreviewEffectsEffectsPreviewGenerationIdPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -137,6 +166,11 @@ partial void ProcessPreviewEffectsEffectsPreviewGenerationIdPostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -154,6 +188,8 @@ partial void ProcessPreviewEffectsEffectsPreviewGenerationIdPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -163,8 +199,7 @@ partial void ProcessPreviewEffectsEffectsPreviewGenerationIdPostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -173,6 +208,11 @@ partial void ProcessPreviewEffectsEffectsPreviewGenerationIdPostResponseContent( __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -189,14 +229,15 @@ partial void ProcessPreviewEffectsEffectsPreviewGenerationIdPostResponseContent( 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -236,6 +277,8 @@ partial void ProcessPreviewEffectsEffectsPreviewGenerationIdPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -256,6 +299,8 @@ partial void ProcessPreviewEffectsEffectsPreviewGenerationIdPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -318,7 +363,11 @@ partial void ProcessPreviewEffectsEffectsPreviewGenerationIdPostResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -346,7 +395,11 @@ partial void ProcessPreviewEffectsEffectsPreviewGenerationIdPostResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.RefineCaptureEndpointCapturesCaptureIdRefinePost.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.RefineCaptureEndpointCapturesCaptureIdRefinePost.g.cs index bf222cd..b5b8ec8 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.RefineCaptureEndpointCapturesCaptureIdRefinePost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.RefineCaptureEndpointCapturesCaptureIdRefinePost.g.cs @@ -34,6 +34,31 @@ partial void ProcessRefineCaptureEndpointCapturesCaptureIdRefinePostResponseCont public async global::System.Threading.Tasks.Task RefineCaptureEndpointCapturesCaptureIdRefinePostAsync( string captureId, + global::Voicebox.CaptureRefineRequest request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await RefineCaptureEndpointCapturesCaptureIdRefinePostAsResponseAsync( + captureId: captureId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Refine Capture Endpoint + /// + /// + /// + /// 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> RefineCaptureEndpointCapturesCaptureIdRefinePostAsResponseAsync( + string captureId, + global::Voicebox.CaptureRefineRequest request, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -63,6 +88,7 @@ partial void ProcessRefineCaptureEndpointCapturesCaptureIdRefinePostResponseCont global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: $"/captures/{captureId}/refine", baseUri: HttpClient.BaseAddress); @@ -126,6 +152,8 @@ partial void ProcessRefineCaptureEndpointCapturesCaptureIdRefinePostResponseCont attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -136,6 +164,11 @@ partial void ProcessRefineCaptureEndpointCapturesCaptureIdRefinePostResponseCont } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -153,6 +186,8 @@ partial void ProcessRefineCaptureEndpointCapturesCaptureIdRefinePostResponseCont attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -162,8 +197,7 @@ partial void ProcessRefineCaptureEndpointCapturesCaptureIdRefinePostResponseCont __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -172,6 +206,11 @@ partial void ProcessRefineCaptureEndpointCapturesCaptureIdRefinePostResponseCont __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -188,14 +227,15 @@ partial void ProcessRefineCaptureEndpointCapturesCaptureIdRefinePostResponseCont 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -235,6 +275,8 @@ partial void ProcessRefineCaptureEndpointCapturesCaptureIdRefinePostResponseCont attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -255,6 +297,8 @@ partial void ProcessRefineCaptureEndpointCapturesCaptureIdRefinePostResponseCont attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -317,9 +361,13 @@ partial void ProcessRefineCaptureEndpointCapturesCaptureIdRefinePostResponseCont { __response.EnsureSuccessStatusCode(); - return - global::Voicebox.CaptureResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Voicebox.CaptureResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -347,9 +395,13 @@ partial void ProcessRefineCaptureEndpointCapturesCaptureIdRefinePostResponseCont #endif ).ConfigureAwait(false); - return - await global::Voicebox.CaptureResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Voicebox.CaptureResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.RegenerateGenerationGenerateGenerationIdRegeneratePost.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.RegenerateGenerationGenerateGenerationIdRegeneratePost.g.cs index e9c6ce3..50177c5 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.RegenerateGenerationGenerateGenerationIdRegeneratePost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.RegenerateGenerationGenerateGenerationIdRegeneratePost.g.cs @@ -33,6 +33,27 @@ partial void ProcessRegenerateGenerationGenerateGenerationIdRegeneratePostRespon string generationId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await RegenerateGenerationGenerateGenerationIdRegeneratePostAsResponseAsync( + generationId: generationId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Regenerate Generation
+ /// Re-run TTS with the same parameters and save the result as a new version. + ///
+ /// + /// 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> RegenerateGenerationGenerateGenerationIdRegeneratePostAsResponseAsync( + string generationId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -56,6 +77,7 @@ partial void ProcessRegenerateGenerationGenerateGenerationIdRegeneratePostRespon global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: $"/generate/{generationId}/regenerate", baseUri: HttpClient.BaseAddress); @@ -112,6 +134,8 @@ partial void ProcessRegenerateGenerationGenerateGenerationIdRegeneratePostRespon attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -122,6 +146,11 @@ partial void ProcessRegenerateGenerationGenerateGenerationIdRegeneratePostRespon } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -139,6 +168,8 @@ partial void ProcessRegenerateGenerationGenerateGenerationIdRegeneratePostRespon attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -148,8 +179,7 @@ partial void ProcessRegenerateGenerationGenerateGenerationIdRegeneratePostRespon __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -158,6 +188,11 @@ partial void ProcessRegenerateGenerationGenerateGenerationIdRegeneratePostRespon __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -174,14 +209,15 @@ partial void ProcessRegenerateGenerationGenerateGenerationIdRegeneratePostRespon 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -221,6 +257,8 @@ partial void ProcessRegenerateGenerationGenerateGenerationIdRegeneratePostRespon attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -241,6 +279,8 @@ partial void ProcessRegenerateGenerationGenerateGenerationIdRegeneratePostRespon attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -303,9 +343,13 @@ partial void ProcessRegenerateGenerationGenerateGenerationIdRegeneratePostRespon { __response.EnsureSuccessStatusCode(); - return - global::Voicebox.GenerationResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Voicebox.GenerationResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -333,9 +377,13 @@ partial void ProcessRegenerateGenerationGenerateGenerationIdRegeneratePostRespon #endif ).ConfigureAwait(false); - return - await global::Voicebox.GenerationResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Voicebox.GenerationResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.RemoveStoryItemStoriesStoryIdItemsItemIdDelete.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.RemoveStoryItemStoriesStoryIdItemsItemIdDelete.g.cs index c2815ac..dbe2e2e 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.RemoveStoryItemStoriesStoryIdItemsItemIdDelete.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.RemoveStoryItemStoriesStoryIdItemsItemIdDelete.g.cs @@ -37,6 +37,30 @@ partial void ProcessRemoveStoryItemStoriesStoryIdItemsItemIdDeleteResponseConten string itemId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await RemoveStoryItemStoriesStoryIdItemsItemIdDeleteAsResponseAsync( + storyId: storyId, + itemId: itemId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Remove Story Item
+ /// Remove a story item from a story. + ///
+ /// + /// + /// 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> RemoveStoryItemStoriesStoryIdItemsItemIdDeleteAsResponseAsync( + string storyId, + string itemId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -61,6 +85,7 @@ partial void ProcessRemoveStoryItemStoriesStoryIdItemsItemIdDeleteResponseConten global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: $"/stories/{storyId}/items/{itemId}", baseUri: HttpClient.BaseAddress); @@ -118,6 +143,8 @@ partial void ProcessRemoveStoryItemStoriesStoryIdItemsItemIdDeleteResponseConten attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -128,6 +155,11 @@ partial void ProcessRemoveStoryItemStoriesStoryIdItemsItemIdDeleteResponseConten } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -145,6 +177,8 @@ partial void ProcessRemoveStoryItemStoriesStoryIdItemsItemIdDeleteResponseConten attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -154,8 +188,7 @@ partial void ProcessRemoveStoryItemStoriesStoryIdItemsItemIdDeleteResponseConten __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -164,6 +197,11 @@ partial void ProcessRemoveStoryItemStoriesStoryIdItemsItemIdDeleteResponseConten __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -180,14 +218,15 @@ partial void ProcessRemoveStoryItemStoriesStoryIdItemsItemIdDeleteResponseConten 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -227,6 +266,8 @@ partial void ProcessRemoveStoryItemStoriesStoryIdItemsItemIdDeleteResponseConten attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -247,6 +288,8 @@ partial void ProcessRemoveStoryItemStoriesStoryIdItemsItemIdDeleteResponseConten attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -309,7 +352,11 @@ partial void ProcessRemoveStoryItemStoriesStoryIdItemsItemIdDeleteResponseConten { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -337,7 +384,11 @@ partial void ProcessRemoveStoryItemStoriesStoryIdItemsItemIdDeleteResponseConten #endif ).ConfigureAwait(false); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ReorderStoryItemsStoriesStoryIdItemsReorderPut.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ReorderStoryItemsStoriesStoryIdItemsReorderPut.g.cs index 70c292a..8163236 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ReorderStoryItemsStoriesStoryIdItemsReorderPut.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ReorderStoryItemsStoriesStoryIdItemsReorderPut.g.cs @@ -35,6 +35,32 @@ partial void ProcessReorderStoryItemsStoriesStoryIdItemsReorderPutResponseConten public async global::System.Threading.Tasks.Task> ReorderStoryItemsStoriesStoryIdItemsReorderPutAsync( string storyId, + global::Voicebox.StoryItemReorder request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ReorderStoryItemsStoriesStoryIdItemsReorderPutAsResponseAsync( + storyId: storyId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Reorder Story Items
+ /// Reorder story items and recalculate timecodes. + ///
+ /// + /// + /// 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>> ReorderStoryItemsStoriesStoryIdItemsReorderPutAsResponseAsync( + string storyId, + global::Voicebox.StoryItemReorder request, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -64,6 +90,7 @@ partial void ProcessReorderStoryItemsStoriesStoryIdItemsReorderPutResponseConten global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: $"/stories/{storyId}/items/reorder", baseUri: HttpClient.BaseAddress); @@ -127,6 +154,8 @@ partial void ProcessReorderStoryItemsStoriesStoryIdItemsReorderPutResponseConten attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -137,6 +166,11 @@ partial void ProcessReorderStoryItemsStoriesStoryIdItemsReorderPutResponseConten } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -154,6 +188,8 @@ partial void ProcessReorderStoryItemsStoriesStoryIdItemsReorderPutResponseConten attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -163,8 +199,7 @@ partial void ProcessReorderStoryItemsStoriesStoryIdItemsReorderPutResponseConten __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -173,6 +208,11 @@ partial void ProcessReorderStoryItemsStoriesStoryIdItemsReorderPutResponseConten __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -189,14 +229,15 @@ partial void ProcessReorderStoryItemsStoriesStoryIdItemsReorderPutResponseConten 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -236,6 +277,8 @@ partial void ProcessReorderStoryItemsStoriesStoryIdItemsReorderPutResponseConten attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -256,6 +299,8 @@ partial void ProcessReorderStoryItemsStoriesStoryIdItemsReorderPutResponseConten attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -318,9 +363,13 @@ partial void ProcessReorderStoryItemsStoriesStoryIdItemsReorderPutResponseConten { __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::Voicebox.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -348,9 +397,13 @@ partial void ProcessReorderStoryItemsStoriesStoryIdItemsReorderPutResponseConten #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::Voicebox.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.RetranscribeCaptureEndpointCapturesCaptureIdRetranscribePost.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.RetranscribeCaptureEndpointCapturesCaptureIdRetranscribePost.g.cs index b9aec75..72ce27c 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.RetranscribeCaptureEndpointCapturesCaptureIdRetranscribePost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.RetranscribeCaptureEndpointCapturesCaptureIdRetranscribePost.g.cs @@ -34,6 +34,31 @@ partial void ProcessRetranscribeCaptureEndpointCapturesCaptureIdRetranscribePost public async global::System.Threading.Tasks.Task RetranscribeCaptureEndpointCapturesCaptureIdRetranscribePostAsync( string captureId, + global::Voicebox.CaptureRetranscribeRequest request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await RetranscribeCaptureEndpointCapturesCaptureIdRetranscribePostAsResponseAsync( + captureId: captureId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Retranscribe Capture Endpoint + /// + /// + /// + /// 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> RetranscribeCaptureEndpointCapturesCaptureIdRetranscribePostAsResponseAsync( + string captureId, + global::Voicebox.CaptureRetranscribeRequest request, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -63,6 +88,7 @@ partial void ProcessRetranscribeCaptureEndpointCapturesCaptureIdRetranscribePost global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: $"/captures/{captureId}/retranscribe", baseUri: HttpClient.BaseAddress); @@ -126,6 +152,8 @@ partial void ProcessRetranscribeCaptureEndpointCapturesCaptureIdRetranscribePost attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -136,6 +164,11 @@ partial void ProcessRetranscribeCaptureEndpointCapturesCaptureIdRetranscribePost } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -153,6 +186,8 @@ partial void ProcessRetranscribeCaptureEndpointCapturesCaptureIdRetranscribePost attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -162,8 +197,7 @@ partial void ProcessRetranscribeCaptureEndpointCapturesCaptureIdRetranscribePost __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -172,6 +206,11 @@ partial void ProcessRetranscribeCaptureEndpointCapturesCaptureIdRetranscribePost __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -188,14 +227,15 @@ partial void ProcessRetranscribeCaptureEndpointCapturesCaptureIdRetranscribePost 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -235,6 +275,8 @@ partial void ProcessRetranscribeCaptureEndpointCapturesCaptureIdRetranscribePost attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -255,6 +297,8 @@ partial void ProcessRetranscribeCaptureEndpointCapturesCaptureIdRetranscribePost attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -317,9 +361,13 @@ partial void ProcessRetranscribeCaptureEndpointCapturesCaptureIdRetranscribePost { __response.EnsureSuccessStatusCode(); - return - global::Voicebox.CaptureResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Voicebox.CaptureResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -347,9 +395,13 @@ partial void ProcessRetranscribeCaptureEndpointCapturesCaptureIdRetranscribePost #endif ).ConfigureAwait(false); - return - await global::Voicebox.CaptureResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Voicebox.CaptureResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.RetryGenerationGenerateGenerationIdRetryPost.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.RetryGenerationGenerateGenerationIdRetryPost.g.cs index 02a4466..051fabc 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.RetryGenerationGenerateGenerationIdRetryPost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.RetryGenerationGenerateGenerationIdRetryPost.g.cs @@ -33,6 +33,27 @@ partial void ProcessRetryGenerationGenerateGenerationIdRetryPostResponseContent( string generationId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await RetryGenerationGenerateGenerationIdRetryPostAsResponseAsync( + generationId: generationId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Retry Generation
+ /// Retry a failed generation using the same parameters. + ///
+ /// + /// 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> RetryGenerationGenerateGenerationIdRetryPostAsResponseAsync( + string generationId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -56,6 +77,7 @@ partial void ProcessRetryGenerationGenerateGenerationIdRetryPostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: $"/generate/{generationId}/retry", baseUri: HttpClient.BaseAddress); @@ -112,6 +134,8 @@ partial void ProcessRetryGenerationGenerateGenerationIdRetryPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -122,6 +146,11 @@ partial void ProcessRetryGenerationGenerateGenerationIdRetryPostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -139,6 +168,8 @@ partial void ProcessRetryGenerationGenerateGenerationIdRetryPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -148,8 +179,7 @@ partial void ProcessRetryGenerationGenerateGenerationIdRetryPostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -158,6 +188,11 @@ partial void ProcessRetryGenerationGenerateGenerationIdRetryPostResponseContent( __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -174,14 +209,15 @@ partial void ProcessRetryGenerationGenerateGenerationIdRetryPostResponseContent( 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -221,6 +257,8 @@ partial void ProcessRetryGenerationGenerateGenerationIdRetryPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -241,6 +279,8 @@ partial void ProcessRetryGenerationGenerateGenerationIdRetryPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -303,9 +343,13 @@ partial void ProcessRetryGenerationGenerateGenerationIdRetryPostResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Voicebox.GenerationResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Voicebox.GenerationResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -333,9 +377,13 @@ partial void ProcessRetryGenerationGenerateGenerationIdRetryPostResponseContent( #endif ).ConfigureAwait(false); - return - await global::Voicebox.GenerationResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Voicebox.GenerationResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.RootGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.RootGet.g.cs index e7052a6..4d74211 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.RootGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.RootGet.g.cs @@ -29,6 +29,24 @@ partial void ProcessRootGetResponseContent( public async global::System.Threading.Tasks.Task RootGetAsync( global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await RootGetAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Root
+ /// Root endpoint — serves SPA index.html in Docker, JSON otherwise. + ///
+ /// 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> RootGetAsResponseAsync( + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -51,6 +69,7 @@ partial void ProcessRootGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: "/", baseUri: HttpClient.BaseAddress); @@ -106,6 +125,8 @@ partial void ProcessRootGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -116,6 +137,11 @@ partial void ProcessRootGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -133,6 +159,8 @@ partial void ProcessRootGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -142,8 +170,7 @@ partial void ProcessRootGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -152,6 +179,11 @@ partial void ProcessRootGetResponseContent( __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -168,14 +200,15 @@ partial void ProcessRootGetResponseContent( 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +248,8 @@ partial void ProcessRootGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -235,6 +270,8 @@ partial void ProcessRootGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -259,7 +296,11 @@ partial void ProcessRootGetResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -287,7 +328,11 @@ partial void ProcessRootGetResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.SetChannelVoicesChannelsChannelIdVoicesPut.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.SetChannelVoicesChannelsChannelIdVoicesPut.g.cs index 9d5d4de..12d4e42 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.SetChannelVoicesChannelsChannelIdVoicesPut.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.SetChannelVoicesChannelsChannelIdVoicesPut.g.cs @@ -35,6 +35,32 @@ partial void ProcessSetChannelVoicesChannelsChannelIdVoicesPutResponseContent( public async global::System.Threading.Tasks.Task SetChannelVoicesChannelsChannelIdVoicesPutAsync( string channelId, + global::Voicebox.ChannelVoiceAssignment request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await SetChannelVoicesChannelsChannelIdVoicesPutAsResponseAsync( + channelId: channelId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Set Channel Voices
+ /// Set which voices are assigned to a channel. + ///
+ /// + /// + /// 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> SetChannelVoicesChannelsChannelIdVoicesPutAsResponseAsync( + string channelId, + global::Voicebox.ChannelVoiceAssignment request, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -64,6 +90,7 @@ partial void ProcessSetChannelVoicesChannelsChannelIdVoicesPutResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: $"/channels/{channelId}/voices", baseUri: HttpClient.BaseAddress); @@ -127,6 +154,8 @@ partial void ProcessSetChannelVoicesChannelsChannelIdVoicesPutResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -137,6 +166,11 @@ partial void ProcessSetChannelVoicesChannelsChannelIdVoicesPutResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -154,6 +188,8 @@ partial void ProcessSetChannelVoicesChannelsChannelIdVoicesPutResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -163,8 +199,7 @@ partial void ProcessSetChannelVoicesChannelsChannelIdVoicesPutResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -173,6 +208,11 @@ partial void ProcessSetChannelVoicesChannelsChannelIdVoicesPutResponseContent( __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -189,14 +229,15 @@ partial void ProcessSetChannelVoicesChannelsChannelIdVoicesPutResponseContent( 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -236,6 +277,8 @@ partial void ProcessSetChannelVoicesChannelsChannelIdVoicesPutResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -256,6 +299,8 @@ partial void ProcessSetChannelVoicesChannelsChannelIdVoicesPutResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -318,7 +363,11 @@ partial void ProcessSetChannelVoicesChannelsChannelIdVoicesPutResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -346,7 +395,11 @@ partial void ProcessSetChannelVoicesChannelsChannelIdVoicesPutResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.SetDefaultVersionGenerationsGenerationIdVersionsVersionIdSetDefaultPut.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.SetDefaultVersionGenerationsGenerationIdVersionsVersionIdSetDefaultPut.g.cs index 85e9466..65e0b58 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.SetDefaultVersionGenerationsGenerationIdVersionsVersionIdSetDefaultPut.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.SetDefaultVersionGenerationsGenerationIdVersionsVersionIdSetDefaultPut.g.cs @@ -37,6 +37,30 @@ partial void ProcessSetDefaultVersionGenerationsGenerationIdVersionsVersionIdSet string versionId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await SetDefaultVersionGenerationsGenerationIdVersionsVersionIdSetDefaultPutAsResponseAsync( + generationId: generationId, + versionId: versionId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Set Default Version
+ /// Set a specific version as the default for a generation. + ///
+ /// + /// + /// 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> SetDefaultVersionGenerationsGenerationIdVersionsVersionIdSetDefaultPutAsResponseAsync( + string generationId, + string versionId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -61,6 +85,7 @@ partial void ProcessSetDefaultVersionGenerationsGenerationIdVersionsVersionIdSet global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: $"/generations/{generationId}/versions/{versionId}/set-default", baseUri: HttpClient.BaseAddress); @@ -118,6 +143,8 @@ partial void ProcessSetDefaultVersionGenerationsGenerationIdVersionsVersionIdSet attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -128,6 +155,11 @@ partial void ProcessSetDefaultVersionGenerationsGenerationIdVersionsVersionIdSet } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -145,6 +177,8 @@ partial void ProcessSetDefaultVersionGenerationsGenerationIdVersionsVersionIdSet attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -154,8 +188,7 @@ partial void ProcessSetDefaultVersionGenerationsGenerationIdVersionsVersionIdSet __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -164,6 +197,11 @@ partial void ProcessSetDefaultVersionGenerationsGenerationIdVersionsVersionIdSet __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -180,14 +218,15 @@ partial void ProcessSetDefaultVersionGenerationsGenerationIdVersionsVersionIdSet 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -227,6 +266,8 @@ partial void ProcessSetDefaultVersionGenerationsGenerationIdVersionsVersionIdSet attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -247,6 +288,8 @@ partial void ProcessSetDefaultVersionGenerationsGenerationIdVersionsVersionIdSet attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -309,9 +352,13 @@ partial void ProcessSetDefaultVersionGenerationsGenerationIdVersionsVersionIdSet { __response.EnsureSuccessStatusCode(); - return - global::Voicebox.GenerationVersionResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Voicebox.GenerationVersionResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -339,9 +386,13 @@ partial void ProcessSetDefaultVersionGenerationsGenerationIdVersionsVersionIdSet #endif ).ConfigureAwait(false); - return - await global::Voicebox.GenerationVersionResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Voicebox.GenerationVersionResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.SetProfileChannelsProfilesProfileIdChannelsPut.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.SetProfileChannelsProfilesProfileIdChannelsPut.g.cs index 48db61d..88aaf03 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.SetProfileChannelsProfilesProfileIdChannelsPut.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.SetProfileChannelsProfilesProfileIdChannelsPut.g.cs @@ -35,6 +35,32 @@ partial void ProcessSetProfileChannelsProfilesProfileIdChannelsPutResponseConten public async global::System.Threading.Tasks.Task SetProfileChannelsProfilesProfileIdChannelsPutAsync( string profileId, + global::Voicebox.ProfileChannelAssignment request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await SetProfileChannelsProfilesProfileIdChannelsPutAsResponseAsync( + profileId: profileId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Set Profile Channels
+ /// Set which channels a profile is assigned to. + ///
+ /// + /// + /// 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> SetProfileChannelsProfilesProfileIdChannelsPutAsResponseAsync( + string profileId, + global::Voicebox.ProfileChannelAssignment request, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -64,6 +90,7 @@ partial void ProcessSetProfileChannelsProfilesProfileIdChannelsPutResponseConten global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: $"/profiles/{profileId}/channels", baseUri: HttpClient.BaseAddress); @@ -127,6 +154,8 @@ partial void ProcessSetProfileChannelsProfilesProfileIdChannelsPutResponseConten attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -137,6 +166,11 @@ partial void ProcessSetProfileChannelsProfilesProfileIdChannelsPutResponseConten } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -154,6 +188,8 @@ partial void ProcessSetProfileChannelsProfilesProfileIdChannelsPutResponseConten attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -163,8 +199,7 @@ partial void ProcessSetProfileChannelsProfilesProfileIdChannelsPutResponseConten __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -173,6 +208,11 @@ partial void ProcessSetProfileChannelsProfilesProfileIdChannelsPutResponseConten __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -189,14 +229,15 @@ partial void ProcessSetProfileChannelsProfilesProfileIdChannelsPutResponseConten 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -236,6 +277,8 @@ partial void ProcessSetProfileChannelsProfilesProfileIdChannelsPutResponseConten attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -256,6 +299,8 @@ partial void ProcessSetProfileChannelsProfilesProfileIdChannelsPutResponseConten attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -318,7 +363,11 @@ partial void ProcessSetProfileChannelsProfilesProfileIdChannelsPutResponseConten { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -346,7 +395,11 @@ partial void ProcessSetProfileChannelsProfilesProfileIdChannelsPutResponseConten #endif ).ConfigureAwait(false); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.SetStoryItemVersionStoriesStoryIdItemsItemIdVersionPut.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.SetStoryItemVersionStoriesStoryIdItemsItemIdVersionPut.g.cs index 22d700b..b898f99 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.SetStoryItemVersionStoriesStoryIdItemsItemIdVersionPut.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.SetStoryItemVersionStoriesStoryIdItemsItemIdVersionPut.g.cs @@ -39,6 +39,35 @@ partial void ProcessSetStoryItemVersionStoriesStoryIdItemsItemIdVersionPutRespon string storyId, string itemId, + global::Voicebox.StoryItemVersionUpdate request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await SetStoryItemVersionStoriesStoryIdItemsItemIdVersionPutAsResponseAsync( + storyId: storyId, + itemId: itemId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Set Story Item Version
+ /// Pin a story item to a specific generation version. + ///
+ /// + /// + /// + /// 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> SetStoryItemVersionStoriesStoryIdItemsItemIdVersionPutAsResponseAsync( + string storyId, + string itemId, + global::Voicebox.StoryItemVersionUpdate request, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -69,6 +98,7 @@ partial void ProcessSetStoryItemVersionStoriesStoryIdItemsItemIdVersionPutRespon global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: $"/stories/{storyId}/items/{itemId}/version", baseUri: HttpClient.BaseAddress); @@ -133,6 +163,8 @@ partial void ProcessSetStoryItemVersionStoriesStoryIdItemsItemIdVersionPutRespon attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -143,6 +175,11 @@ partial void ProcessSetStoryItemVersionStoriesStoryIdItemsItemIdVersionPutRespon } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -160,6 +197,8 @@ partial void ProcessSetStoryItemVersionStoriesStoryIdItemsItemIdVersionPutRespon attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -169,8 +208,7 @@ partial void ProcessSetStoryItemVersionStoriesStoryIdItemsItemIdVersionPutRespon __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -179,6 +217,11 @@ partial void ProcessSetStoryItemVersionStoriesStoryIdItemsItemIdVersionPutRespon __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -195,14 +238,15 @@ partial void ProcessSetStoryItemVersionStoriesStoryIdItemsItemIdVersionPutRespon 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -242,6 +286,8 @@ partial void ProcessSetStoryItemVersionStoriesStoryIdItemsItemIdVersionPutRespon attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -262,6 +308,8 @@ partial void ProcessSetStoryItemVersionStoriesStoryIdItemsItemIdVersionPutRespon attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -324,9 +372,13 @@ partial void ProcessSetStoryItemVersionStoriesStoryIdItemsItemIdVersionPutRespon { __response.EnsureSuccessStatusCode(); - return - global::Voicebox.StoryItemDetail.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Voicebox.StoryItemDetail.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -354,9 +406,13 @@ partial void ProcessSetStoryItemVersionStoriesStoryIdItemsItemIdVersionPutRespon #endif ).ConfigureAwait(false); - return - await global::Voicebox.StoryItemDetail.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Voicebox.StoryItemDetail.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ShutdownShutdownPost.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ShutdownShutdownPost.g.cs index 8de492c..142f564 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ShutdownShutdownPost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ShutdownShutdownPost.g.cs @@ -29,6 +29,24 @@ partial void ProcessShutdownShutdownPostResponseContent( public async global::System.Threading.Tasks.Task ShutdownShutdownPostAsync( global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ShutdownShutdownPostAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Shutdown
+ /// Gracefully shutdown the server. + ///
+ /// 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> ShutdownShutdownPostAsResponseAsync( + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -51,6 +69,7 @@ partial void ProcessShutdownShutdownPostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: "/shutdown", baseUri: HttpClient.BaseAddress); @@ -106,6 +125,8 @@ partial void ProcessShutdownShutdownPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -116,6 +137,11 @@ partial void ProcessShutdownShutdownPostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -133,6 +159,8 @@ partial void ProcessShutdownShutdownPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -142,8 +170,7 @@ partial void ProcessShutdownShutdownPostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -152,6 +179,11 @@ partial void ProcessShutdownShutdownPostResponseContent( __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -168,14 +200,15 @@ partial void ProcessShutdownShutdownPostResponseContent( 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +248,8 @@ partial void ProcessShutdownShutdownPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -235,6 +270,8 @@ partial void ProcessShutdownShutdownPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -259,7 +296,11 @@ partial void ProcessShutdownShutdownPostResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -287,7 +328,11 @@ partial void ProcessShutdownShutdownPostResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.SpeakEventsEventsSpeakGet.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.SpeakEventsEventsSpeakGet.g.cs index 33a75cd..288cf53 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.SpeakEventsEventsSpeakGet.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.SpeakEventsEventsSpeakGet.g.cs @@ -29,6 +29,24 @@ partial void ProcessSpeakEventsEventsSpeakGetResponseContent( public async global::System.Threading.Tasks.Task SpeakEventsEventsSpeakGetAsync( global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await SpeakEventsEventsSpeakGetAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Speak Events
+ /// SSE stream of speak-start / speak-end events. + ///
+ /// 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> SpeakEventsEventsSpeakGetAsResponseAsync( + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -51,6 +69,7 @@ partial void ProcessSpeakEventsEventsSpeakGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: "/events/speak", baseUri: HttpClient.BaseAddress); @@ -106,6 +125,8 @@ partial void ProcessSpeakEventsEventsSpeakGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -116,6 +137,11 @@ partial void ProcessSpeakEventsEventsSpeakGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -133,6 +159,8 @@ partial void ProcessSpeakEventsEventsSpeakGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -142,8 +170,7 @@ partial void ProcessSpeakEventsEventsSpeakGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -152,6 +179,11 @@ partial void ProcessSpeakEventsEventsSpeakGetResponseContent( __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -168,14 +200,15 @@ partial void ProcessSpeakEventsEventsSpeakGetResponseContent( 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +248,8 @@ partial void ProcessSpeakEventsEventsSpeakGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -235,6 +270,8 @@ partial void ProcessSpeakEventsEventsSpeakGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -259,7 +296,11 @@ partial void ProcessSpeakEventsEventsSpeakGetResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -287,7 +328,11 @@ partial void ProcessSpeakEventsEventsSpeakGetResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.SpeakSpeakPost.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.SpeakSpeakPost.g.cs index a6d62d2..333c2c6 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.SpeakSpeakPost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.SpeakSpeakPost.g.cs @@ -34,6 +34,32 @@ partial void ProcessSpeakSpeakPostResponseContent( /// public async global::System.Threading.Tasks.Task SpeakSpeakPostAsync( + global::Voicebox.SpeakRequest request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await SpeakSpeakPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Speak
+ /// Speak text in a voice profile. Mirrors voicebox.speak (MCP).
+ /// Response shape matches POST /generate — a ``GenerationResponse`` with
+ /// ``status="generating"`` and an ``id`` the caller polls at
+ /// ``GET /generate/{id}/status``. + ///
+ /// + /// 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> SpeakSpeakPostAsResponseAsync( + global::Voicebox.SpeakRequest request, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -62,6 +88,7 @@ partial void ProcessSpeakSpeakPostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: "/speak", baseUri: HttpClient.BaseAddress); @@ -124,6 +151,8 @@ partial void ProcessSpeakSpeakPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -134,6 +163,11 @@ partial void ProcessSpeakSpeakPostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -151,6 +185,8 @@ partial void ProcessSpeakSpeakPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -160,8 +196,7 @@ partial void ProcessSpeakSpeakPostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -170,6 +205,11 @@ partial void ProcessSpeakSpeakPostResponseContent( __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -186,14 +226,15 @@ partial void ProcessSpeakSpeakPostResponseContent( 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -233,6 +274,8 @@ partial void ProcessSpeakSpeakPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -253,6 +296,8 @@ partial void ProcessSpeakSpeakPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -315,9 +360,13 @@ partial void ProcessSpeakSpeakPostResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Voicebox.GenerationResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Voicebox.GenerationResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -345,9 +394,13 @@ partial void ProcessSpeakSpeakPostResponseContent( #endif ).ConfigureAwait(false); - return - await global::Voicebox.GenerationResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Voicebox.GenerationResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.SplitStoryItemStoriesStoryIdItemsItemIdSplitPost.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.SplitStoryItemStoriesStoryIdItemsItemIdSplitPost.g.cs index 0986226..6a5ef04 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.SplitStoryItemStoriesStoryIdItemsItemIdSplitPost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.SplitStoryItemStoriesStoryIdItemsItemIdSplitPost.g.cs @@ -39,6 +39,35 @@ partial void ProcessSplitStoryItemStoriesStoryIdItemsItemIdSplitPostResponseCont string storyId, string itemId, + global::Voicebox.StoryItemSplit request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await SplitStoryItemStoriesStoryIdItemsItemIdSplitPostAsResponseAsync( + storyId: storyId, + itemId: itemId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Split Story Item
+ /// Split a story item at a given time, creating two clips. + ///
+ /// + /// + /// + /// 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>> SplitStoryItemStoriesStoryIdItemsItemIdSplitPostAsResponseAsync( + string storyId, + string itemId, + global::Voicebox.StoryItemSplit request, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -69,6 +98,7 @@ partial void ProcessSplitStoryItemStoriesStoryIdItemsItemIdSplitPostResponseCont global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: $"/stories/{storyId}/items/{itemId}/split", baseUri: HttpClient.BaseAddress); @@ -133,6 +163,8 @@ partial void ProcessSplitStoryItemStoriesStoryIdItemsItemIdSplitPostResponseCont attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -143,6 +175,11 @@ partial void ProcessSplitStoryItemStoriesStoryIdItemsItemIdSplitPostResponseCont } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -160,6 +197,8 @@ partial void ProcessSplitStoryItemStoriesStoryIdItemsItemIdSplitPostResponseCont attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -169,8 +208,7 @@ partial void ProcessSplitStoryItemStoriesStoryIdItemsItemIdSplitPostResponseCont __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -179,6 +217,11 @@ partial void ProcessSplitStoryItemStoriesStoryIdItemsItemIdSplitPostResponseCont __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -195,14 +238,15 @@ partial void ProcessSplitStoryItemStoriesStoryIdItemsItemIdSplitPostResponseCont 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -242,6 +286,8 @@ partial void ProcessSplitStoryItemStoriesStoryIdItemsItemIdSplitPostResponseCont attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -262,6 +308,8 @@ partial void ProcessSplitStoryItemStoriesStoryIdItemsItemIdSplitPostResponseCont attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -324,9 +372,13 @@ partial void ProcessSplitStoryItemStoriesStoryIdItemsItemIdSplitPostResponseCont { __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::Voicebox.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -354,9 +406,13 @@ partial void ProcessSplitStoryItemStoriesStoryIdItemsItemIdSplitPostResponseCont #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::Voicebox.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.StreamSpeechGenerateStreamPost.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.StreamSpeechGenerateStreamPost.g.cs index ba7c6fd..789e468 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.StreamSpeechGenerateStreamPost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.StreamSpeechGenerateStreamPost.g.cs @@ -31,6 +31,29 @@ partial void ProcessStreamSpeechGenerateStreamPostResponseContent( /// public async global::System.Threading.Tasks.Task StreamSpeechGenerateStreamPostAsync( + global::Voicebox.GenerationRequest request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await StreamSpeechGenerateStreamPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Stream Speech
+ /// Generate speech and stream the WAV audio directly without saving to disk. + ///
+ /// + /// 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> StreamSpeechGenerateStreamPostAsResponseAsync( + global::Voicebox.GenerationRequest request, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -59,6 +82,7 @@ partial void ProcessStreamSpeechGenerateStreamPostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: "/generate/stream", baseUri: HttpClient.BaseAddress); @@ -121,6 +145,8 @@ partial void ProcessStreamSpeechGenerateStreamPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -131,6 +157,11 @@ partial void ProcessStreamSpeechGenerateStreamPostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -148,6 +179,8 @@ partial void ProcessStreamSpeechGenerateStreamPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -157,8 +190,7 @@ partial void ProcessStreamSpeechGenerateStreamPostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -167,6 +199,11 @@ partial void ProcessStreamSpeechGenerateStreamPostResponseContent( __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -183,14 +220,15 @@ partial void ProcessStreamSpeechGenerateStreamPostResponseContent( 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -230,6 +268,8 @@ partial void ProcessStreamSpeechGenerateStreamPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -250,6 +290,8 @@ partial void ProcessStreamSpeechGenerateStreamPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -312,7 +354,11 @@ partial void ProcessStreamSpeechGenerateStreamPostResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -340,7 +386,11 @@ partial void ProcessStreamSpeechGenerateStreamPostResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ToggleFavoriteHistoryGenerationIdFavoritePost.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ToggleFavoriteHistoryGenerationIdFavoritePost.g.cs index 5e9f1ff..c47c170 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ToggleFavoriteHistoryGenerationIdFavoritePost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.ToggleFavoriteHistoryGenerationIdFavoritePost.g.cs @@ -33,6 +33,27 @@ partial void ProcessToggleFavoriteHistoryGenerationIdFavoritePostResponseContent string generationId, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ToggleFavoriteHistoryGenerationIdFavoritePostAsResponseAsync( + generationId: generationId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Toggle Favorite
+ /// Toggle the favorite status of a generation. + ///
+ /// + /// 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> ToggleFavoriteHistoryGenerationIdFavoritePostAsResponseAsync( + string generationId, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -56,6 +77,7 @@ partial void ProcessToggleFavoriteHistoryGenerationIdFavoritePostResponseContent global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: $"/history/{generationId}/favorite", baseUri: HttpClient.BaseAddress); @@ -112,6 +134,8 @@ partial void ProcessToggleFavoriteHistoryGenerationIdFavoritePostResponseContent attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -122,6 +146,11 @@ partial void ProcessToggleFavoriteHistoryGenerationIdFavoritePostResponseContent } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -139,6 +168,8 @@ partial void ProcessToggleFavoriteHistoryGenerationIdFavoritePostResponseContent attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -148,8 +179,7 @@ partial void ProcessToggleFavoriteHistoryGenerationIdFavoritePostResponseContent __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -158,6 +188,11 @@ partial void ProcessToggleFavoriteHistoryGenerationIdFavoritePostResponseContent __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -174,14 +209,15 @@ partial void ProcessToggleFavoriteHistoryGenerationIdFavoritePostResponseContent 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -221,6 +257,8 @@ partial void ProcessToggleFavoriteHistoryGenerationIdFavoritePostResponseContent attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -241,6 +279,8 @@ partial void ProcessToggleFavoriteHistoryGenerationIdFavoritePostResponseContent attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -303,7 +343,11 @@ partial void ProcessToggleFavoriteHistoryGenerationIdFavoritePostResponseContent { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -331,7 +375,11 @@ partial void ProcessToggleFavoriteHistoryGenerationIdFavoritePostResponseContent #endif ).ConfigureAwait(false); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.TranscribeAudioTranscribePost.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.TranscribeAudioTranscribePost.g.cs index 24d2676..f77380f 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.TranscribeAudioTranscribePost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.TranscribeAudioTranscribePost.g.cs @@ -31,6 +31,29 @@ partial void ProcessTranscribeAudioTranscribePostResponseContent( /// public async global::System.Threading.Tasks.Task TranscribeAudioTranscribePostAsync( + global::Voicebox.BodyTranscribeAudioTranscribePost request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await TranscribeAudioTranscribePostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Transcribe Audio
+ /// Transcribe audio file to text. + ///
+ /// + /// 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> TranscribeAudioTranscribePostAsResponseAsync( + global::Voicebox.BodyTranscribeAudioTranscribePost request, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -55,10 +78,11 @@ partial void ProcessTranscribeAudioTranscribePostResponseContent( var __maxAttempts = global::Voicebox.AutoSDKRequestOptionsSupport.GetMaxAttempts( clientOptions: Options, requestOptions: requestOptions, - supportsRetry: true); + supportsRetry: false); global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: "/transcribe", baseUri: HttpClient.BaseAddress); @@ -74,6 +98,7 @@ partial void ProcessTranscribeAudioTranscribePostResponseContent( __httpRequest.Version = global::System.Net.HttpVersion.Version11; __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; #endif + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); var __contentFile = new global::System.Net.Http.ByteArrayContent(request.File ?? global::System.Array.Empty()); __contentFile.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( @@ -112,21 +137,26 @@ request.Filename is null { __contentFile.Headers.ContentDisposition.FileNameStar = null; } + if (request.Language != default) { __httpRequestContent.Add( content: new global::System.Net.Http.StringContent(request.Language ?? string.Empty), name: "\"language\""); - } + + } if (request.Model != default) { __httpRequestContent.Add( content: new global::System.Net.Http.StringContent(request.Model ?? string.Empty), name: "\"model\""); + } + __httpRequest.Content = __httpRequestContent; + global::Voicebox.AutoSDKRequestOptionsSupport.ApplyHeaders( request: __httpRequest, clientHeaders: Options.Headers, @@ -168,6 +198,8 @@ request.Filename is null attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -178,6 +210,11 @@ request.Filename is null } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -195,6 +232,8 @@ request.Filename is null attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -204,8 +243,7 @@ request.Filename is null __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -214,6 +252,11 @@ request.Filename is null __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -230,14 +273,15 @@ request.Filename is null 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -277,6 +321,8 @@ request.Filename is null attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -297,6 +343,8 @@ request.Filename is null attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -359,9 +407,13 @@ request.Filename is null { __response.EnsureSuccessStatusCode(); - return - global::Voicebox.TranscriptionResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Voicebox.TranscriptionResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -389,9 +441,13 @@ request.Filename is null #endif ).ConfigureAwait(false); - return - await global::Voicebox.TranscriptionResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Voicebox.TranscriptionResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -461,5 +517,908 @@ request.Filename is null requestOptions: requestOptions, cancellationToken: cancellationToken).ConfigureAwait(false); } + + /// + /// Transcribe Audio
+ /// Transcribe audio file to text. + ///
+ /// + /// The stream to send as the multipart 'file' file part. + /// + /// + /// + /// + /// 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 TranscribeAudioTranscribePostAsync( + global::System.IO.Stream file, + string filename, + string? language = default, + string? model = default, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + + file = file ?? throw new global::System.ArgumentNullException(nameof(file)); + var request = new global::Voicebox.BodyTranscribeAudioTranscribePost + { + File = global::System.Array.Empty(), + Filename = filename, + Language = language, + Model = model, + }; + PrepareArguments( + client: HttpClient); + PrepareTranscribeAudioTranscribePostArguments( + httpClient: HttpClient, + request: request); + + using var __timeoutCancellationTokenSource = global::Voicebox.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Voicebox.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Voicebox.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: false); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Voicebox.PathBuilder( + path: "/transcribe", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Voicebox.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + var __contentFile = new global::System.Net.Http.StreamContent(file); + __contentFile.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( + request.Filename is null + ? "application/octet-stream" + : (global::System.IO.Path.GetExtension(request.Filename) ?? string.Empty).ToLowerInvariant() switch + { + ".aac" => "audio/aac", + ".flac" => "audio/flac", + ".gif" => "image/gif", + ".jpeg" => "image/jpeg", + ".jpg" => "image/jpeg", + ".json" => "application/json", + ".m4a" => "audio/mp4", + ".mp3" => "audio/mpeg", + ".mp4" => "video/mp4", + ".mpeg" => "audio/mpeg", + ".mpga" => "audio/mpeg", + ".oga" => "audio/ogg", + ".ogg" => "audio/ogg", + ".opus" => "audio/ogg", + ".pdf" => "application/pdf", + ".png" => "image/png", + ".txt" => "text/plain", + ".wav" => "audio/wav", + ".weba" => "audio/webm", + ".webm" => "video/webm", + ".webp" => "image/webp", + _ => "application/octet-stream", + }); + __httpRequestContent.Add( + content: __contentFile, + name: "\"file\"", + fileName: request.Filename != null ? $"\"{request.Filename}\"" : string.Empty); + if (__contentFile.Headers.ContentDisposition != null) + { + __contentFile.Headers.ContentDisposition.FileNameStar = null; + } + + if (request.Language != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.Language ?? string.Empty), + name: "\"language\""); + + } + if (request.Model != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.Model ?? string.Empty), + name: "\"model\""); + + } + + __httpRequest.Content = __httpRequestContent; + + global::Voicebox.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareTranscribeAudioTranscribePostRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Voicebox.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "TranscribeAudioTranscribePost", + methodName: "TranscribeAudioTranscribePostAsync", + pathTemplate: "\"/transcribe\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "TranscribeAudioTranscribePost", + methodName: "TranscribeAudioTranscribePostAsync", + pathTemplate: "\"/transcribe\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "TranscribeAudioTranscribePost", + methodName: "TranscribeAudioTranscribePostAsync", + pathTemplate: "\"/transcribe\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessTranscribeAudioTranscribePostResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "TranscribeAudioTranscribePost", + methodName: "TranscribeAudioTranscribePostAsync", + pathTemplate: "\"/transcribe\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "TranscribeAudioTranscribePost", + methodName: "TranscribeAudioTranscribePostAsync", + pathTemplate: "\"/transcribe\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::Voicebox.HTTPValidationError? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::Voicebox.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::Voicebox.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + throw new global::Voicebox.ApiException( + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessTranscribeAudioTranscribePostResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::Voicebox.TranscriptionResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::Voicebox.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + return + await global::Voicebox.TranscriptionResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw new global::Voicebox.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + /// + /// Transcribe Audio
+ /// Transcribe audio file to text. + ///
+ /// + /// The stream to send as the multipart 'file' file part. + /// + /// + /// + /// + /// 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> TranscribeAudioTranscribePostAsResponseAsync( + global::System.IO.Stream file, + string filename, + string? language = default, + string? model = default, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + + file = file ?? throw new global::System.ArgumentNullException(nameof(file)); + var request = new global::Voicebox.BodyTranscribeAudioTranscribePost + { + File = global::System.Array.Empty(), + Filename = filename, + Language = language, + Model = model, + }; + PrepareArguments( + client: HttpClient); + PrepareTranscribeAudioTranscribePostArguments( + httpClient: HttpClient, + request: request); + + using var __timeoutCancellationTokenSource = global::Voicebox.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Voicebox.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Voicebox.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: false); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Voicebox.PathBuilder( + path: "/transcribe", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Voicebox.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + var __contentFile = new global::System.Net.Http.StreamContent(file); + __contentFile.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( + request.Filename is null + ? "application/octet-stream" + : (global::System.IO.Path.GetExtension(request.Filename) ?? string.Empty).ToLowerInvariant() switch + { + ".aac" => "audio/aac", + ".flac" => "audio/flac", + ".gif" => "image/gif", + ".jpeg" => "image/jpeg", + ".jpg" => "image/jpeg", + ".json" => "application/json", + ".m4a" => "audio/mp4", + ".mp3" => "audio/mpeg", + ".mp4" => "video/mp4", + ".mpeg" => "audio/mpeg", + ".mpga" => "audio/mpeg", + ".oga" => "audio/ogg", + ".ogg" => "audio/ogg", + ".opus" => "audio/ogg", + ".pdf" => "application/pdf", + ".png" => "image/png", + ".txt" => "text/plain", + ".wav" => "audio/wav", + ".weba" => "audio/webm", + ".webm" => "video/webm", + ".webp" => "image/webp", + _ => "application/octet-stream", + }); + __httpRequestContent.Add( + content: __contentFile, + name: "\"file\"", + fileName: request.Filename != null ? $"\"{request.Filename}\"" : string.Empty); + if (__contentFile.Headers.ContentDisposition != null) + { + __contentFile.Headers.ContentDisposition.FileNameStar = null; + } + + if (request.Language != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.Language ?? string.Empty), + name: "\"language\""); + + } + if (request.Model != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.Model ?? string.Empty), + name: "\"model\""); + + } + + __httpRequest.Content = __httpRequestContent; + + global::Voicebox.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareTranscribeAudioTranscribePostRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Voicebox.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "TranscribeAudioTranscribePost", + methodName: "TranscribeAudioTranscribePostAsync", + pathTemplate: "\"/transcribe\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "TranscribeAudioTranscribePost", + methodName: "TranscribeAudioTranscribePostAsync", + pathTemplate: "\"/transcribe\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "TranscribeAudioTranscribePost", + methodName: "TranscribeAudioTranscribePostAsync", + pathTemplate: "\"/transcribe\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessTranscribeAudioTranscribePostResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "TranscribeAudioTranscribePost", + methodName: "TranscribeAudioTranscribePostAsync", + pathTemplate: "\"/transcribe\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "TranscribeAudioTranscribePost", + methodName: "TranscribeAudioTranscribePostAsync", + pathTemplate: "\"/transcribe\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::Voicebox.HTTPValidationError? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::Voicebox.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::Voicebox.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + throw new global::Voicebox.ApiException( + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessTranscribeAudioTranscribePostResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Voicebox.TranscriptionResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw new global::Voicebox.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::Voicebox.TranscriptionResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw new global::Voicebox.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.TriggerModelDownloadModelsDownloadPost.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.TriggerModelDownloadModelsDownloadPost.g.cs index b042b24..2083d96 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.TriggerModelDownloadModelsDownloadPost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.TriggerModelDownloadModelsDownloadPost.g.cs @@ -31,6 +31,29 @@ partial void ProcessTriggerModelDownloadModelsDownloadPostResponseContent( /// public async global::System.Threading.Tasks.Task TriggerModelDownloadModelsDownloadPostAsync( + global::Voicebox.ModelDownloadRequest request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await TriggerModelDownloadModelsDownloadPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Trigger Model Download
+ /// Trigger download of a specific model. + ///
+ /// + /// 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> TriggerModelDownloadModelsDownloadPostAsResponseAsync( + global::Voicebox.ModelDownloadRequest request, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -59,6 +82,7 @@ partial void ProcessTriggerModelDownloadModelsDownloadPostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: "/models/download", baseUri: HttpClient.BaseAddress); @@ -121,6 +145,8 @@ partial void ProcessTriggerModelDownloadModelsDownloadPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -131,6 +157,11 @@ partial void ProcessTriggerModelDownloadModelsDownloadPostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -148,6 +179,8 @@ partial void ProcessTriggerModelDownloadModelsDownloadPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -157,8 +190,7 @@ partial void ProcessTriggerModelDownloadModelsDownloadPostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -167,6 +199,11 @@ partial void ProcessTriggerModelDownloadModelsDownloadPostResponseContent( __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -183,14 +220,15 @@ partial void ProcessTriggerModelDownloadModelsDownloadPostResponseContent( 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -230,6 +268,8 @@ partial void ProcessTriggerModelDownloadModelsDownloadPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -250,6 +290,8 @@ partial void ProcessTriggerModelDownloadModelsDownloadPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -312,7 +354,11 @@ partial void ProcessTriggerModelDownloadModelsDownloadPostResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -340,7 +386,11 @@ partial void ProcessTriggerModelDownloadModelsDownloadPostResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.TrimStoryItemStoriesStoryIdItemsItemIdTrimPut.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.TrimStoryItemStoriesStoryIdItemsItemIdTrimPut.g.cs index 2b6cbc9..fb43b29 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.TrimStoryItemStoriesStoryIdItemsItemIdTrimPut.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.TrimStoryItemStoriesStoryIdItemsItemIdTrimPut.g.cs @@ -39,6 +39,35 @@ partial void ProcessTrimStoryItemStoriesStoryIdItemsItemIdTrimPutResponseContent string storyId, string itemId, + global::Voicebox.StoryItemTrim request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await TrimStoryItemStoriesStoryIdItemsItemIdTrimPutAsResponseAsync( + storyId: storyId, + itemId: itemId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Trim Story Item
+ /// Trim a story item. + ///
+ /// + /// + /// + /// 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> TrimStoryItemStoriesStoryIdItemsItemIdTrimPutAsResponseAsync( + string storyId, + string itemId, + global::Voicebox.StoryItemTrim request, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -69,6 +98,7 @@ partial void ProcessTrimStoryItemStoriesStoryIdItemsItemIdTrimPutResponseContent global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: $"/stories/{storyId}/items/{itemId}/trim", baseUri: HttpClient.BaseAddress); @@ -133,6 +163,8 @@ partial void ProcessTrimStoryItemStoriesStoryIdItemsItemIdTrimPutResponseContent attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -143,6 +175,11 @@ partial void ProcessTrimStoryItemStoriesStoryIdItemsItemIdTrimPutResponseContent } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -160,6 +197,8 @@ partial void ProcessTrimStoryItemStoriesStoryIdItemsItemIdTrimPutResponseContent attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -169,8 +208,7 @@ partial void ProcessTrimStoryItemStoriesStoryIdItemsItemIdTrimPutResponseContent __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -179,6 +217,11 @@ partial void ProcessTrimStoryItemStoriesStoryIdItemsItemIdTrimPutResponseContent __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -195,14 +238,15 @@ partial void ProcessTrimStoryItemStoriesStoryIdItemsItemIdTrimPutResponseContent 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -242,6 +286,8 @@ partial void ProcessTrimStoryItemStoriesStoryIdItemsItemIdTrimPutResponseContent attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -262,6 +308,8 @@ partial void ProcessTrimStoryItemStoriesStoryIdItemsItemIdTrimPutResponseContent attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -324,9 +372,13 @@ partial void ProcessTrimStoryItemStoriesStoryIdItemsItemIdTrimPutResponseContent { __response.EnsureSuccessStatusCode(); - return - global::Voicebox.StoryItemDetail.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Voicebox.StoryItemDetail.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -354,9 +406,13 @@ partial void ProcessTrimStoryItemStoriesStoryIdItemsItemIdTrimPutResponseContent #endif ).ConfigureAwait(false); - return - await global::Voicebox.StoryItemDetail.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Voicebox.StoryItemDetail.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.UnloadModelByNameModelsModelNameUnloadPost.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.UnloadModelByNameModelsModelNameUnloadPost.g.cs index d8673c3..c3554a5 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.UnloadModelByNameModelsModelNameUnloadPost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.UnloadModelByNameModelsModelNameUnloadPost.g.cs @@ -33,6 +33,27 @@ partial void ProcessUnloadModelByNameModelsModelNameUnloadPostResponseContent( string modelName, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UnloadModelByNameModelsModelNameUnloadPostAsResponseAsync( + modelName: modelName, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Unload Model By Name
+ /// Unload a specific model from memory without deleting it from disk. + ///
+ /// + /// 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> UnloadModelByNameModelsModelNameUnloadPostAsResponseAsync( + string modelName, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -56,6 +77,7 @@ partial void ProcessUnloadModelByNameModelsModelNameUnloadPostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: $"/models/{modelName}/unload", baseUri: HttpClient.BaseAddress); @@ -112,6 +134,8 @@ partial void ProcessUnloadModelByNameModelsModelNameUnloadPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -122,6 +146,11 @@ partial void ProcessUnloadModelByNameModelsModelNameUnloadPostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -139,6 +168,8 @@ partial void ProcessUnloadModelByNameModelsModelNameUnloadPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -148,8 +179,7 @@ partial void ProcessUnloadModelByNameModelsModelNameUnloadPostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -158,6 +188,11 @@ partial void ProcessUnloadModelByNameModelsModelNameUnloadPostResponseContent( __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -174,14 +209,15 @@ partial void ProcessUnloadModelByNameModelsModelNameUnloadPostResponseContent( 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -221,6 +257,8 @@ partial void ProcessUnloadModelByNameModelsModelNameUnloadPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -241,6 +279,8 @@ partial void ProcessUnloadModelByNameModelsModelNameUnloadPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -303,7 +343,11 @@ partial void ProcessUnloadModelByNameModelsModelNameUnloadPostResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -331,7 +375,11 @@ partial void ProcessUnloadModelByNameModelsModelNameUnloadPostResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.UnloadModelModelsUnloadPost.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.UnloadModelModelsUnloadPost.g.cs index 5f501a2..1a8e955 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.UnloadModelModelsUnloadPost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.UnloadModelModelsUnloadPost.g.cs @@ -29,6 +29,24 @@ partial void ProcessUnloadModelModelsUnloadPostResponseContent( public async global::System.Threading.Tasks.Task UnloadModelModelsUnloadPostAsync( global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UnloadModelModelsUnloadPostAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Unload Model
+ /// Unload the default Qwen TTS model to free memory. + ///
+ /// 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> UnloadModelModelsUnloadPostAsResponseAsync( + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -51,6 +69,7 @@ partial void ProcessUnloadModelModelsUnloadPostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: "/models/unload", baseUri: HttpClient.BaseAddress); @@ -106,6 +125,8 @@ partial void ProcessUnloadModelModelsUnloadPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -116,6 +137,11 @@ partial void ProcessUnloadModelModelsUnloadPostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -133,6 +159,8 @@ partial void ProcessUnloadModelModelsUnloadPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -142,8 +170,7 @@ partial void ProcessUnloadModelModelsUnloadPostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -152,6 +179,11 @@ partial void ProcessUnloadModelModelsUnloadPostResponseContent( __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -168,14 +200,15 @@ partial void ProcessUnloadModelModelsUnloadPostResponseContent( 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +248,8 @@ partial void ProcessUnloadModelModelsUnloadPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -235,6 +270,8 @@ partial void ProcessUnloadModelModelsUnloadPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -259,7 +296,11 @@ partial void ProcessUnloadModelModelsUnloadPostResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -287,7 +328,11 @@ partial void ProcessUnloadModelModelsUnloadPostResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.UpdateCaptureSettingsEndpointSettingsCapturesPut.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.UpdateCaptureSettingsEndpointSettingsCapturesPut.g.cs index d054153..fcf638c 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.UpdateCaptureSettingsEndpointSettingsCapturesPut.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.UpdateCaptureSettingsEndpointSettingsCapturesPut.g.cs @@ -30,6 +30,28 @@ partial void ProcessUpdateCaptureSettingsEndpointSettingsCapturesPutResponseCont /// public async global::System.Threading.Tasks.Task UpdateCaptureSettingsEndpointSettingsCapturesPutAsync( + global::Voicebox.CaptureSettingsUpdate request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UpdateCaptureSettingsEndpointSettingsCapturesPutAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Update Capture Settings Endpoint + /// + /// + /// 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> UpdateCaptureSettingsEndpointSettingsCapturesPutAsResponseAsync( + global::Voicebox.CaptureSettingsUpdate request, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -58,6 +80,7 @@ partial void ProcessUpdateCaptureSettingsEndpointSettingsCapturesPutResponseCont global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: "/settings/captures", baseUri: HttpClient.BaseAddress); @@ -120,6 +143,8 @@ partial void ProcessUpdateCaptureSettingsEndpointSettingsCapturesPutResponseCont attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -130,6 +155,11 @@ partial void ProcessUpdateCaptureSettingsEndpointSettingsCapturesPutResponseCont } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -147,6 +177,8 @@ partial void ProcessUpdateCaptureSettingsEndpointSettingsCapturesPutResponseCont attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -156,8 +188,7 @@ partial void ProcessUpdateCaptureSettingsEndpointSettingsCapturesPutResponseCont __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -166,6 +197,11 @@ partial void ProcessUpdateCaptureSettingsEndpointSettingsCapturesPutResponseCont __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -182,14 +218,15 @@ partial void ProcessUpdateCaptureSettingsEndpointSettingsCapturesPutResponseCont 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -229,6 +266,8 @@ partial void ProcessUpdateCaptureSettingsEndpointSettingsCapturesPutResponseCont attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -249,6 +288,8 @@ partial void ProcessUpdateCaptureSettingsEndpointSettingsCapturesPutResponseCont attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -311,9 +352,13 @@ partial void ProcessUpdateCaptureSettingsEndpointSettingsCapturesPutResponseCont { __response.EnsureSuccessStatusCode(); - return - global::Voicebox.CaptureSettingsResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Voicebox.CaptureSettingsResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -341,9 +386,13 @@ partial void ProcessUpdateCaptureSettingsEndpointSettingsCapturesPutResponseCont #endif ).ConfigureAwait(false); - return - await global::Voicebox.CaptureSettingsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Voicebox.CaptureSettingsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.UpdateChannelChannelsChannelIdPut.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.UpdateChannelChannelsChannelIdPut.g.cs index f9968ea..9cf2f45 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.UpdateChannelChannelsChannelIdPut.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.UpdateChannelChannelsChannelIdPut.g.cs @@ -35,6 +35,32 @@ partial void ProcessUpdateChannelChannelsChannelIdPutResponseContent( public async global::System.Threading.Tasks.Task UpdateChannelChannelsChannelIdPutAsync( string channelId, + global::Voicebox.AudioChannelUpdate request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UpdateChannelChannelsChannelIdPutAsResponseAsync( + channelId: channelId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Update Channel
+ /// Update an audio channel. + ///
+ /// + /// + /// 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> UpdateChannelChannelsChannelIdPutAsResponseAsync( + string channelId, + global::Voicebox.AudioChannelUpdate request, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -64,6 +90,7 @@ partial void ProcessUpdateChannelChannelsChannelIdPutResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: $"/channels/{channelId}", baseUri: HttpClient.BaseAddress); @@ -127,6 +154,8 @@ partial void ProcessUpdateChannelChannelsChannelIdPutResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -137,6 +166,11 @@ partial void ProcessUpdateChannelChannelsChannelIdPutResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -154,6 +188,8 @@ partial void ProcessUpdateChannelChannelsChannelIdPutResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -163,8 +199,7 @@ partial void ProcessUpdateChannelChannelsChannelIdPutResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -173,6 +208,11 @@ partial void ProcessUpdateChannelChannelsChannelIdPutResponseContent( __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -189,14 +229,15 @@ partial void ProcessUpdateChannelChannelsChannelIdPutResponseContent( 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -236,6 +277,8 @@ partial void ProcessUpdateChannelChannelsChannelIdPutResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -256,6 +299,8 @@ partial void ProcessUpdateChannelChannelsChannelIdPutResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -318,9 +363,13 @@ partial void ProcessUpdateChannelChannelsChannelIdPutResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Voicebox.AudioChannelResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Voicebox.AudioChannelResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -348,9 +397,13 @@ partial void ProcessUpdateChannelChannelsChannelIdPutResponseContent( #endif ).ConfigureAwait(false); - return - await global::Voicebox.AudioChannelResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Voicebox.AudioChannelResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.UpdateEffectPresetEffectsPresetsPresetIdPut.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.UpdateEffectPresetEffectsPresetsPresetIdPut.g.cs index 26f9bfa..2686e93 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.UpdateEffectPresetEffectsPresetsPresetIdPut.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.UpdateEffectPresetEffectsPresetsPresetIdPut.g.cs @@ -35,6 +35,32 @@ partial void ProcessUpdateEffectPresetEffectsPresetsPresetIdPutResponseContent( public async global::System.Threading.Tasks.Task UpdateEffectPresetEffectsPresetsPresetIdPutAsync( string presetId, + global::Voicebox.EffectPresetUpdate request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UpdateEffectPresetEffectsPresetsPresetIdPutAsResponseAsync( + presetId: presetId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Update Effect Preset
+ /// Update an effect preset. + ///
+ /// + /// + /// 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> UpdateEffectPresetEffectsPresetsPresetIdPutAsResponseAsync( + string presetId, + global::Voicebox.EffectPresetUpdate request, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -64,6 +90,7 @@ partial void ProcessUpdateEffectPresetEffectsPresetsPresetIdPutResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: $"/effects/presets/{presetId}", baseUri: HttpClient.BaseAddress); @@ -127,6 +154,8 @@ partial void ProcessUpdateEffectPresetEffectsPresetsPresetIdPutResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -137,6 +166,11 @@ partial void ProcessUpdateEffectPresetEffectsPresetsPresetIdPutResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -154,6 +188,8 @@ partial void ProcessUpdateEffectPresetEffectsPresetsPresetIdPutResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -163,8 +199,7 @@ partial void ProcessUpdateEffectPresetEffectsPresetsPresetIdPutResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -173,6 +208,11 @@ partial void ProcessUpdateEffectPresetEffectsPresetsPresetIdPutResponseContent( __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -189,14 +229,15 @@ partial void ProcessUpdateEffectPresetEffectsPresetsPresetIdPutResponseContent( 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -236,6 +277,8 @@ partial void ProcessUpdateEffectPresetEffectsPresetsPresetIdPutResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -256,6 +299,8 @@ partial void ProcessUpdateEffectPresetEffectsPresetsPresetIdPutResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -318,9 +363,13 @@ partial void ProcessUpdateEffectPresetEffectsPresetsPresetIdPutResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Voicebox.EffectPresetResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Voicebox.EffectPresetResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -348,9 +397,13 @@ partial void ProcessUpdateEffectPresetEffectsPresetsPresetIdPutResponseContent( #endif ).ConfigureAwait(false); - return - await global::Voicebox.EffectPresetResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Voicebox.EffectPresetResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.UpdateGenerationSettingsEndpointSettingsGenerationPut.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.UpdateGenerationSettingsEndpointSettingsGenerationPut.g.cs index 5210428..931dc0b 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.UpdateGenerationSettingsEndpointSettingsGenerationPut.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.UpdateGenerationSettingsEndpointSettingsGenerationPut.g.cs @@ -30,6 +30,28 @@ partial void ProcessUpdateGenerationSettingsEndpointSettingsGenerationPutRespons /// public async global::System.Threading.Tasks.Task UpdateGenerationSettingsEndpointSettingsGenerationPutAsync( + global::Voicebox.GenerationSettingsUpdate request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UpdateGenerationSettingsEndpointSettingsGenerationPutAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Update Generation Settings Endpoint + /// + /// + /// 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> UpdateGenerationSettingsEndpointSettingsGenerationPutAsResponseAsync( + global::Voicebox.GenerationSettingsUpdate request, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -58,6 +80,7 @@ partial void ProcessUpdateGenerationSettingsEndpointSettingsGenerationPutRespons global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: "/settings/generation", baseUri: HttpClient.BaseAddress); @@ -120,6 +143,8 @@ partial void ProcessUpdateGenerationSettingsEndpointSettingsGenerationPutRespons attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -130,6 +155,11 @@ partial void ProcessUpdateGenerationSettingsEndpointSettingsGenerationPutRespons } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -147,6 +177,8 @@ partial void ProcessUpdateGenerationSettingsEndpointSettingsGenerationPutRespons attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -156,8 +188,7 @@ partial void ProcessUpdateGenerationSettingsEndpointSettingsGenerationPutRespons __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -166,6 +197,11 @@ partial void ProcessUpdateGenerationSettingsEndpointSettingsGenerationPutRespons __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -182,14 +218,15 @@ partial void ProcessUpdateGenerationSettingsEndpointSettingsGenerationPutRespons 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -229,6 +266,8 @@ partial void ProcessUpdateGenerationSettingsEndpointSettingsGenerationPutRespons attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -249,6 +288,8 @@ partial void ProcessUpdateGenerationSettingsEndpointSettingsGenerationPutRespons attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -311,9 +352,13 @@ partial void ProcessUpdateGenerationSettingsEndpointSettingsGenerationPutRespons { __response.EnsureSuccessStatusCode(); - return - global::Voicebox.GenerationSettingsResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Voicebox.GenerationSettingsResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -341,9 +386,13 @@ partial void ProcessUpdateGenerationSettingsEndpointSettingsGenerationPutRespons #endif ).ConfigureAwait(false); - return - await global::Voicebox.GenerationSettingsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Voicebox.GenerationSettingsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.UpdateProfileEffectsProfilesProfileIdEffectsPut.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.UpdateProfileEffectsProfilesProfileIdEffectsPut.g.cs index 6cc280f..b550672 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.UpdateProfileEffectsProfilesProfileIdEffectsPut.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.UpdateProfileEffectsProfilesProfileIdEffectsPut.g.cs @@ -35,6 +35,32 @@ partial void ProcessUpdateProfileEffectsProfilesProfileIdEffectsPutResponseConte public async global::System.Threading.Tasks.Task UpdateProfileEffectsProfilesProfileIdEffectsPutAsync( string profileId, + global::Voicebox.ProfileEffectsUpdate request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UpdateProfileEffectsProfilesProfileIdEffectsPutAsResponseAsync( + profileId: profileId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Update Profile Effects
+ /// Set or clear the default effects chain for a voice profile. + ///
+ /// + /// + /// 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> UpdateProfileEffectsProfilesProfileIdEffectsPutAsResponseAsync( + string profileId, + global::Voicebox.ProfileEffectsUpdate request, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -64,6 +90,7 @@ partial void ProcessUpdateProfileEffectsProfilesProfileIdEffectsPutResponseConte global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: $"/profiles/{profileId}/effects", baseUri: HttpClient.BaseAddress); @@ -127,6 +154,8 @@ partial void ProcessUpdateProfileEffectsProfilesProfileIdEffectsPutResponseConte attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -137,6 +166,11 @@ partial void ProcessUpdateProfileEffectsProfilesProfileIdEffectsPutResponseConte } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -154,6 +188,8 @@ partial void ProcessUpdateProfileEffectsProfilesProfileIdEffectsPutResponseConte attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -163,8 +199,7 @@ partial void ProcessUpdateProfileEffectsProfilesProfileIdEffectsPutResponseConte __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -173,6 +208,11 @@ partial void ProcessUpdateProfileEffectsProfilesProfileIdEffectsPutResponseConte __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -189,14 +229,15 @@ partial void ProcessUpdateProfileEffectsProfilesProfileIdEffectsPutResponseConte 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -236,6 +277,8 @@ partial void ProcessUpdateProfileEffectsProfilesProfileIdEffectsPutResponseConte attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -256,6 +299,8 @@ partial void ProcessUpdateProfileEffectsProfilesProfileIdEffectsPutResponseConte attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -318,9 +363,13 @@ partial void ProcessUpdateProfileEffectsProfilesProfileIdEffectsPutResponseConte { __response.EnsureSuccessStatusCode(); - return - global::Voicebox.VoiceProfileResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Voicebox.VoiceProfileResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -348,9 +397,13 @@ partial void ProcessUpdateProfileEffectsProfilesProfileIdEffectsPutResponseConte #endif ).ConfigureAwait(false); - return - await global::Voicebox.VoiceProfileResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Voicebox.VoiceProfileResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.UpdateProfileProfilesProfileIdPut.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.UpdateProfileProfilesProfileIdPut.g.cs index a32178e..d877ffd 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.UpdateProfileProfilesProfileIdPut.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.UpdateProfileProfilesProfileIdPut.g.cs @@ -35,6 +35,32 @@ partial void ProcessUpdateProfileProfilesProfileIdPutResponseContent( public async global::System.Threading.Tasks.Task UpdateProfileProfilesProfileIdPutAsync( string profileId, + global::Voicebox.VoiceProfileCreate request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UpdateProfileProfilesProfileIdPutAsResponseAsync( + profileId: profileId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Update Profile
+ /// Update a voice profile. + ///
+ /// + /// + /// 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> UpdateProfileProfilesProfileIdPutAsResponseAsync( + string profileId, + global::Voicebox.VoiceProfileCreate request, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -64,6 +90,7 @@ partial void ProcessUpdateProfileProfilesProfileIdPutResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: $"/profiles/{profileId}", baseUri: HttpClient.BaseAddress); @@ -127,6 +154,8 @@ partial void ProcessUpdateProfileProfilesProfileIdPutResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -137,6 +166,11 @@ partial void ProcessUpdateProfileProfilesProfileIdPutResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -154,6 +188,8 @@ partial void ProcessUpdateProfileProfilesProfileIdPutResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -163,8 +199,7 @@ partial void ProcessUpdateProfileProfilesProfileIdPutResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -173,6 +208,11 @@ partial void ProcessUpdateProfileProfilesProfileIdPutResponseContent( __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -189,14 +229,15 @@ partial void ProcessUpdateProfileProfilesProfileIdPutResponseContent( 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -236,6 +277,8 @@ partial void ProcessUpdateProfileProfilesProfileIdPutResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -256,6 +299,8 @@ partial void ProcessUpdateProfileProfilesProfileIdPutResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -318,9 +363,13 @@ partial void ProcessUpdateProfileProfilesProfileIdPutResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Voicebox.VoiceProfileResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Voicebox.VoiceProfileResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -348,9 +397,13 @@ partial void ProcessUpdateProfileProfilesProfileIdPutResponseContent( #endif ).ConfigureAwait(false); - return - await global::Voicebox.VoiceProfileResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Voicebox.VoiceProfileResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.UpdateProfileSampleProfilesSamplesSampleIdPut.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.UpdateProfileSampleProfilesSamplesSampleIdPut.g.cs index 890384d..5d0b2d8 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.UpdateProfileSampleProfilesSamplesSampleIdPut.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.UpdateProfileSampleProfilesSamplesSampleIdPut.g.cs @@ -35,6 +35,32 @@ partial void ProcessUpdateProfileSampleProfilesSamplesSampleIdPutResponseContent public async global::System.Threading.Tasks.Task UpdateProfileSampleProfilesSamplesSampleIdPutAsync( string sampleId, + global::Voicebox.ProfileSampleUpdate request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UpdateProfileSampleProfilesSamplesSampleIdPutAsResponseAsync( + sampleId: sampleId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Update Profile Sample
+ /// Update a profile sample's reference text. + ///
+ /// + /// + /// 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> UpdateProfileSampleProfilesSamplesSampleIdPutAsResponseAsync( + string sampleId, + global::Voicebox.ProfileSampleUpdate request, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -64,6 +90,7 @@ partial void ProcessUpdateProfileSampleProfilesSamplesSampleIdPutResponseContent global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: $"/profiles/samples/{sampleId}", baseUri: HttpClient.BaseAddress); @@ -127,6 +154,8 @@ partial void ProcessUpdateProfileSampleProfilesSamplesSampleIdPutResponseContent attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -137,6 +166,11 @@ partial void ProcessUpdateProfileSampleProfilesSamplesSampleIdPutResponseContent } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -154,6 +188,8 @@ partial void ProcessUpdateProfileSampleProfilesSamplesSampleIdPutResponseContent attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -163,8 +199,7 @@ partial void ProcessUpdateProfileSampleProfilesSamplesSampleIdPutResponseContent __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -173,6 +208,11 @@ partial void ProcessUpdateProfileSampleProfilesSamplesSampleIdPutResponseContent __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -189,14 +229,15 @@ partial void ProcessUpdateProfileSampleProfilesSamplesSampleIdPutResponseContent 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -236,6 +277,8 @@ partial void ProcessUpdateProfileSampleProfilesSamplesSampleIdPutResponseContent attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -256,6 +299,8 @@ partial void ProcessUpdateProfileSampleProfilesSamplesSampleIdPutResponseContent attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -318,9 +363,13 @@ partial void ProcessUpdateProfileSampleProfilesSamplesSampleIdPutResponseContent { __response.EnsureSuccessStatusCode(); - return - global::Voicebox.ProfileSampleResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Voicebox.ProfileSampleResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -348,9 +397,13 @@ partial void ProcessUpdateProfileSampleProfilesSamplesSampleIdPutResponseContent #endif ).ConfigureAwait(false); - return - await global::Voicebox.ProfileSampleResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Voicebox.ProfileSampleResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.UpdateStoryItemTimesStoriesStoryIdItemsTimesPut.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.UpdateStoryItemTimesStoriesStoryIdItemsTimesPut.g.cs index c61b4ba..bcac410 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.UpdateStoryItemTimesStoriesStoryIdItemsTimesPut.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.UpdateStoryItemTimesStoriesStoryIdItemsTimesPut.g.cs @@ -35,6 +35,32 @@ partial void ProcessUpdateStoryItemTimesStoriesStoryIdItemsTimesPutResponseConte public async global::System.Threading.Tasks.Task UpdateStoryItemTimesStoriesStoryIdItemsTimesPutAsync( string storyId, + global::Voicebox.StoryItemBatchUpdate request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UpdateStoryItemTimesStoriesStoryIdItemsTimesPutAsResponseAsync( + storyId: storyId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Update Story Item Times
+ /// Update story item timecodes. + ///
+ /// + /// + /// 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> UpdateStoryItemTimesStoriesStoryIdItemsTimesPutAsResponseAsync( + string storyId, + global::Voicebox.StoryItemBatchUpdate request, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -64,6 +90,7 @@ partial void ProcessUpdateStoryItemTimesStoriesStoryIdItemsTimesPutResponseConte global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: $"/stories/{storyId}/items/times", baseUri: HttpClient.BaseAddress); @@ -127,6 +154,8 @@ partial void ProcessUpdateStoryItemTimesStoriesStoryIdItemsTimesPutResponseConte attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -137,6 +166,11 @@ partial void ProcessUpdateStoryItemTimesStoriesStoryIdItemsTimesPutResponseConte } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -154,6 +188,8 @@ partial void ProcessUpdateStoryItemTimesStoriesStoryIdItemsTimesPutResponseConte attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -163,8 +199,7 @@ partial void ProcessUpdateStoryItemTimesStoriesStoryIdItemsTimesPutResponseConte __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -173,6 +208,11 @@ partial void ProcessUpdateStoryItemTimesStoriesStoryIdItemsTimesPutResponseConte __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -189,14 +229,15 @@ partial void ProcessUpdateStoryItemTimesStoriesStoryIdItemsTimesPutResponseConte 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -236,6 +277,8 @@ partial void ProcessUpdateStoryItemTimesStoriesStoryIdItemsTimesPutResponseConte attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -256,6 +299,8 @@ partial void ProcessUpdateStoryItemTimesStoriesStoryIdItemsTimesPutResponseConte attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -318,7 +363,11 @@ partial void ProcessUpdateStoryItemTimesStoriesStoryIdItemsTimesPutResponseConte { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -346,7 +395,11 @@ partial void ProcessUpdateStoryItemTimesStoriesStoryIdItemsTimesPutResponseConte #endif ).ConfigureAwait(false); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.UpdateStoryItemVolumeStoriesStoryIdItemsItemIdVolumePut.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.UpdateStoryItemVolumeStoriesStoryIdItemsItemIdVolumePut.g.cs index 57fda64..c342782 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.UpdateStoryItemVolumeStoriesStoryIdItemsItemIdVolumePut.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.UpdateStoryItemVolumeStoriesStoryIdItemsItemIdVolumePut.g.cs @@ -39,6 +39,35 @@ partial void ProcessUpdateStoryItemVolumeStoriesStoryIdItemsItemIdVolumePutRespo string storyId, string itemId, + global::Voicebox.StoryItemVolumeUpdate request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UpdateStoryItemVolumeStoriesStoryIdItemsItemIdVolumePutAsResponseAsync( + storyId: storyId, + itemId: itemId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Update Story Item Volume
+ /// Set a story item's per-clip volume (linear gain, 0.0–2.0). + ///
+ /// + /// + /// + /// 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> UpdateStoryItemVolumeStoriesStoryIdItemsItemIdVolumePutAsResponseAsync( + string storyId, + string itemId, + global::Voicebox.StoryItemVolumeUpdate request, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -69,6 +98,7 @@ partial void ProcessUpdateStoryItemVolumeStoriesStoryIdItemsItemIdVolumePutRespo global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: $"/stories/{storyId}/items/{itemId}/volume", baseUri: HttpClient.BaseAddress); @@ -133,6 +163,8 @@ partial void ProcessUpdateStoryItemVolumeStoriesStoryIdItemsItemIdVolumePutRespo attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -143,6 +175,11 @@ partial void ProcessUpdateStoryItemVolumeStoriesStoryIdItemsItemIdVolumePutRespo } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -160,6 +197,8 @@ partial void ProcessUpdateStoryItemVolumeStoriesStoryIdItemsItemIdVolumePutRespo attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -169,8 +208,7 @@ partial void ProcessUpdateStoryItemVolumeStoriesStoryIdItemsItemIdVolumePutRespo __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -179,6 +217,11 @@ partial void ProcessUpdateStoryItemVolumeStoriesStoryIdItemsItemIdVolumePutRespo __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -195,14 +238,15 @@ partial void ProcessUpdateStoryItemVolumeStoriesStoryIdItemsItemIdVolumePutRespo 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -242,6 +286,8 @@ partial void ProcessUpdateStoryItemVolumeStoriesStoryIdItemsItemIdVolumePutRespo attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -262,6 +308,8 @@ partial void ProcessUpdateStoryItemVolumeStoriesStoryIdItemsItemIdVolumePutRespo attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -324,9 +372,13 @@ partial void ProcessUpdateStoryItemVolumeStoriesStoryIdItemsItemIdVolumePutRespo { __response.EnsureSuccessStatusCode(); - return - global::Voicebox.StoryItemDetail.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Voicebox.StoryItemDetail.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -354,9 +406,13 @@ partial void ProcessUpdateStoryItemVolumeStoriesStoryIdItemsItemIdVolumePutRespo #endif ).ConfigureAwait(false); - return - await global::Voicebox.StoryItemDetail.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Voicebox.StoryItemDetail.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.UpdateStoryStoriesStoryIdPut.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.UpdateStoryStoriesStoryIdPut.g.cs index 3d6237e..0561055 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.UpdateStoryStoriesStoryIdPut.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.UpdateStoryStoriesStoryIdPut.g.cs @@ -35,6 +35,32 @@ partial void ProcessUpdateStoryStoriesStoryIdPutResponseContent( public async global::System.Threading.Tasks.Task UpdateStoryStoriesStoryIdPutAsync( string storyId, + global::Voicebox.StoryCreate request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UpdateStoryStoriesStoryIdPutAsResponseAsync( + storyId: storyId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Update Story
+ /// Update a story. + ///
+ /// + /// + /// 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> UpdateStoryStoriesStoryIdPutAsResponseAsync( + string storyId, + global::Voicebox.StoryCreate request, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -64,6 +90,7 @@ partial void ProcessUpdateStoryStoriesStoryIdPutResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: $"/stories/{storyId}", baseUri: HttpClient.BaseAddress); @@ -127,6 +154,8 @@ partial void ProcessUpdateStoryStoriesStoryIdPutResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -137,6 +166,11 @@ partial void ProcessUpdateStoryStoriesStoryIdPutResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -154,6 +188,8 @@ partial void ProcessUpdateStoryStoriesStoryIdPutResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -163,8 +199,7 @@ partial void ProcessUpdateStoryStoriesStoryIdPutResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -173,6 +208,11 @@ partial void ProcessUpdateStoryStoriesStoryIdPutResponseContent( __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -189,14 +229,15 @@ partial void ProcessUpdateStoryStoriesStoryIdPutResponseContent( 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -236,6 +277,8 @@ partial void ProcessUpdateStoryStoriesStoryIdPutResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -256,6 +299,8 @@ partial void ProcessUpdateStoryStoriesStoryIdPutResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -318,9 +363,13 @@ partial void ProcessUpdateStoryStoriesStoryIdPutResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Voicebox.StoryResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Voicebox.StoryResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -348,9 +397,13 @@ partial void ProcessUpdateStoryStoriesStoryIdPutResponseContent( #endif ).ConfigureAwait(false); - return - await global::Voicebox.StoryResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Voicebox.StoryResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.UploadProfileAvatarProfilesProfileIdAvatarPost.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.UploadProfileAvatarProfilesProfileIdAvatarPost.g.cs index 5d26243..472beab 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.UploadProfileAvatarProfilesProfileIdAvatarPost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.UploadProfileAvatarProfilesProfileIdAvatarPost.g.cs @@ -35,6 +35,32 @@ partial void ProcessUploadProfileAvatarProfilesProfileIdAvatarPostResponseConten public async global::System.Threading.Tasks.Task UploadProfileAvatarProfilesProfileIdAvatarPostAsync( string profileId, + global::Voicebox.BodyUploadProfileAvatarProfilesProfileIdAvatarPost request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UploadProfileAvatarProfilesProfileIdAvatarPostAsResponseAsync( + profileId: profileId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Upload Profile Avatar
+ /// Upload or update avatar image for a profile. + ///
+ /// + /// + /// 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> UploadProfileAvatarProfilesProfileIdAvatarPostAsResponseAsync( + string profileId, + global::Voicebox.BodyUploadProfileAvatarProfilesProfileIdAvatarPost request, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -60,10 +86,11 @@ partial void ProcessUploadProfileAvatarProfilesProfileIdAvatarPostResponseConten var __maxAttempts = global::Voicebox.AutoSDKRequestOptionsSupport.GetMaxAttempts( clientOptions: Options, requestOptions: requestOptions, - supportsRetry: true); + supportsRetry: false); global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: $"/profiles/{profileId}/avatar", baseUri: HttpClient.BaseAddress); @@ -79,10 +106,12 @@ partial void ProcessUploadProfileAvatarProfilesProfileIdAvatarPostResponseConten __httpRequest.Version = global::System.Net.HttpVersion.Version11; __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; #endif + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); __httpRequestContent.Add( content: new global::System.Net.Http.StringContent(profileId ?? string.Empty), name: "\"profile_id\""); + var __contentFile = new global::System.Net.Http.ByteArrayContent(request.File ?? global::System.Array.Empty()); __contentFile.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( request.Filename is null @@ -120,7 +149,9 @@ request.Filename is null { __contentFile.Headers.ContentDisposition.FileNameStar = null; } + __httpRequest.Content = __httpRequestContent; + global::Voicebox.AutoSDKRequestOptionsSupport.ApplyHeaders( request: __httpRequest, clientHeaders: Options.Headers, @@ -163,6 +194,8 @@ request.Filename is null attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +206,11 @@ request.Filename is null } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +228,8 @@ request.Filename is null attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +239,7 @@ request.Filename is null __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +248,11 @@ request.Filename is null __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +269,15 @@ request.Filename is null 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +317,8 @@ request.Filename is null attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +339,8 @@ request.Filename is null attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -354,9 +403,13 @@ request.Filename is null { __response.EnsureSuccessStatusCode(); - return - global::Voicebox.VoiceProfileResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Voicebox.VoiceProfileResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -384,9 +437,13 @@ request.Filename is null #endif ).ConfigureAwait(false); - return - await global::Voicebox.VoiceProfileResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Voicebox.VoiceProfileResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -453,5 +510,878 @@ request.Filename is null requestOptions: requestOptions, cancellationToken: cancellationToken).ConfigureAwait(false); } + + /// + /// Upload Profile Avatar
+ /// Upload or update avatar image for a profile. + ///
+ /// + /// + /// The stream to send as the multipart 'file' file part. + /// + /// + /// 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 UploadProfileAvatarProfilesProfileIdAvatarPostAsync( + string profileId, + global::System.IO.Stream file, + string filename, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + + file = file ?? throw new global::System.ArgumentNullException(nameof(file)); + var request = new global::Voicebox.BodyUploadProfileAvatarProfilesProfileIdAvatarPost + { + File = global::System.Array.Empty(), + Filename = filename, + }; + PrepareArguments( + client: HttpClient); + PrepareUploadProfileAvatarProfilesProfileIdAvatarPostArguments( + httpClient: HttpClient, + profileId: ref profileId, + request: request); + + using var __timeoutCancellationTokenSource = global::Voicebox.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Voicebox.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Voicebox.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: false); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Voicebox.PathBuilder( + path: $"/profiles/{profileId}/avatar", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Voicebox.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(profileId ?? string.Empty), + name: "\"profile_id\""); + + var __contentFile = new global::System.Net.Http.StreamContent(file); + __contentFile.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( + request.Filename is null + ? "application/octet-stream" + : (global::System.IO.Path.GetExtension(request.Filename) ?? string.Empty).ToLowerInvariant() switch + { + ".aac" => "audio/aac", + ".flac" => "audio/flac", + ".gif" => "image/gif", + ".jpeg" => "image/jpeg", + ".jpg" => "image/jpeg", + ".json" => "application/json", + ".m4a" => "audio/mp4", + ".mp3" => "audio/mpeg", + ".mp4" => "video/mp4", + ".mpeg" => "audio/mpeg", + ".mpga" => "audio/mpeg", + ".oga" => "audio/ogg", + ".ogg" => "audio/ogg", + ".opus" => "audio/ogg", + ".pdf" => "application/pdf", + ".png" => "image/png", + ".txt" => "text/plain", + ".wav" => "audio/wav", + ".weba" => "audio/webm", + ".webm" => "video/webm", + ".webp" => "image/webp", + _ => "application/octet-stream", + }); + __httpRequestContent.Add( + content: __contentFile, + name: "\"file\"", + fileName: request.Filename != null ? $"\"{request.Filename}\"" : string.Empty); + if (__contentFile.Headers.ContentDisposition != null) + { + __contentFile.Headers.ContentDisposition.FileNameStar = null; + } + + __httpRequest.Content = __httpRequestContent; + + global::Voicebox.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareUploadProfileAvatarProfilesProfileIdAvatarPostRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + profileId: profileId!, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Voicebox.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UploadProfileAvatarProfilesProfileIdAvatarPost", + methodName: "UploadProfileAvatarProfilesProfileIdAvatarPostAsync", + pathTemplate: "$\"/profiles/{profileId}/avatar\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UploadProfileAvatarProfilesProfileIdAvatarPost", + methodName: "UploadProfileAvatarProfilesProfileIdAvatarPostAsync", + pathTemplate: "$\"/profiles/{profileId}/avatar\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UploadProfileAvatarProfilesProfileIdAvatarPost", + methodName: "UploadProfileAvatarProfilesProfileIdAvatarPostAsync", + pathTemplate: "$\"/profiles/{profileId}/avatar\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessUploadProfileAvatarProfilesProfileIdAvatarPostResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UploadProfileAvatarProfilesProfileIdAvatarPost", + methodName: "UploadProfileAvatarProfilesProfileIdAvatarPostAsync", + pathTemplate: "$\"/profiles/{profileId}/avatar\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UploadProfileAvatarProfilesProfileIdAvatarPost", + methodName: "UploadProfileAvatarProfilesProfileIdAvatarPostAsync", + pathTemplate: "$\"/profiles/{profileId}/avatar\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::Voicebox.HTTPValidationError? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::Voicebox.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::Voicebox.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + throw new global::Voicebox.ApiException( + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessUploadProfileAvatarProfilesProfileIdAvatarPostResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::Voicebox.VoiceProfileResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::Voicebox.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + return + await global::Voicebox.VoiceProfileResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw new global::Voicebox.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + /// + /// Upload Profile Avatar
+ /// Upload or update avatar image for a profile. + ///
+ /// + /// + /// The stream to send as the multipart 'file' file part. + /// + /// + /// 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> UploadProfileAvatarProfilesProfileIdAvatarPostAsResponseAsync( + string profileId, + global::System.IO.Stream file, + string filename, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + + file = file ?? throw new global::System.ArgumentNullException(nameof(file)); + var request = new global::Voicebox.BodyUploadProfileAvatarProfilesProfileIdAvatarPost + { + File = global::System.Array.Empty(), + Filename = filename, + }; + PrepareArguments( + client: HttpClient); + PrepareUploadProfileAvatarProfilesProfileIdAvatarPostArguments( + httpClient: HttpClient, + profileId: ref profileId, + request: request); + + using var __timeoutCancellationTokenSource = global::Voicebox.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Voicebox.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Voicebox.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: false); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Voicebox.PathBuilder( + path: $"/profiles/{profileId}/avatar", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Voicebox.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(profileId ?? string.Empty), + name: "\"profile_id\""); + + var __contentFile = new global::System.Net.Http.StreamContent(file); + __contentFile.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( + request.Filename is null + ? "application/octet-stream" + : (global::System.IO.Path.GetExtension(request.Filename) ?? string.Empty).ToLowerInvariant() switch + { + ".aac" => "audio/aac", + ".flac" => "audio/flac", + ".gif" => "image/gif", + ".jpeg" => "image/jpeg", + ".jpg" => "image/jpeg", + ".json" => "application/json", + ".m4a" => "audio/mp4", + ".mp3" => "audio/mpeg", + ".mp4" => "video/mp4", + ".mpeg" => "audio/mpeg", + ".mpga" => "audio/mpeg", + ".oga" => "audio/ogg", + ".ogg" => "audio/ogg", + ".opus" => "audio/ogg", + ".pdf" => "application/pdf", + ".png" => "image/png", + ".txt" => "text/plain", + ".wav" => "audio/wav", + ".weba" => "audio/webm", + ".webm" => "video/webm", + ".webp" => "image/webp", + _ => "application/octet-stream", + }); + __httpRequestContent.Add( + content: __contentFile, + name: "\"file\"", + fileName: request.Filename != null ? $"\"{request.Filename}\"" : string.Empty); + if (__contentFile.Headers.ContentDisposition != null) + { + __contentFile.Headers.ContentDisposition.FileNameStar = null; + } + + __httpRequest.Content = __httpRequestContent; + + global::Voicebox.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareUploadProfileAvatarProfilesProfileIdAvatarPostRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + profileId: profileId!, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Voicebox.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UploadProfileAvatarProfilesProfileIdAvatarPost", + methodName: "UploadProfileAvatarProfilesProfileIdAvatarPostAsync", + pathTemplate: "$\"/profiles/{profileId}/avatar\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UploadProfileAvatarProfilesProfileIdAvatarPost", + methodName: "UploadProfileAvatarProfilesProfileIdAvatarPostAsync", + pathTemplate: "$\"/profiles/{profileId}/avatar\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UploadProfileAvatarProfilesProfileIdAvatarPost", + methodName: "UploadProfileAvatarProfilesProfileIdAvatarPostAsync", + pathTemplate: "$\"/profiles/{profileId}/avatar\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessUploadProfileAvatarProfilesProfileIdAvatarPostResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UploadProfileAvatarProfilesProfileIdAvatarPost", + methodName: "UploadProfileAvatarProfilesProfileIdAvatarPostAsync", + pathTemplate: "$\"/profiles/{profileId}/avatar\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UploadProfileAvatarProfilesProfileIdAvatarPost", + methodName: "UploadProfileAvatarProfilesProfileIdAvatarPostAsync", + pathTemplate: "$\"/profiles/{profileId}/avatar\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::Voicebox.HTTPValidationError? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::Voicebox.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::Voicebox.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + throw new global::Voicebox.ApiException( + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessUploadProfileAvatarProfilesProfileIdAvatarPostResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Voicebox.VoiceProfileResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw new global::Voicebox.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::Voicebox.VoiceProfileResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw new global::Voicebox.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } } } \ No newline at end of file diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.UpsertMcpBindingMcpBindingsPut.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.UpsertMcpBindingMcpBindingsPut.g.cs index cfdbab9..1ef2bb8 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.UpsertMcpBindingMcpBindingsPut.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.UpsertMcpBindingMcpBindingsPut.g.cs @@ -31,6 +31,29 @@ partial void ProcessUpsertMcpBindingMcpBindingsPutResponseContent( /// public async global::System.Threading.Tasks.Task UpsertMcpBindingMcpBindingsPutAsync( + global::Voicebox.MCPClientBindingUpsert request, + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UpsertMcpBindingMcpBindingsPutAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Upsert Mcp Binding
+ /// Create-or-update a binding. Matches by client_id. + ///
+ /// + /// 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> UpsertMcpBindingMcpBindingsPutAsResponseAsync( + global::Voicebox.MCPClientBindingUpsert request, global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -59,6 +82,7 @@ partial void ProcessUpsertMcpBindingMcpBindingsPutResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: "/mcp/bindings", baseUri: HttpClient.BaseAddress); @@ -121,6 +145,8 @@ partial void ProcessUpsertMcpBindingMcpBindingsPutResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -131,6 +157,11 @@ partial void ProcessUpsertMcpBindingMcpBindingsPutResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -148,6 +179,8 @@ partial void ProcessUpsertMcpBindingMcpBindingsPutResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -157,8 +190,7 @@ partial void ProcessUpsertMcpBindingMcpBindingsPutResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -167,6 +199,11 @@ partial void ProcessUpsertMcpBindingMcpBindingsPutResponseContent( __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -183,14 +220,15 @@ partial void ProcessUpsertMcpBindingMcpBindingsPutResponseContent( 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -230,6 +268,8 @@ partial void ProcessUpsertMcpBindingMcpBindingsPutResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -250,6 +290,8 @@ partial void ProcessUpsertMcpBindingMcpBindingsPutResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -312,9 +354,13 @@ partial void ProcessUpsertMcpBindingMcpBindingsPutResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Voicebox.MCPClientBindingResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Voicebox.MCPClientBindingResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -342,9 +388,13 @@ partial void ProcessUpsertMcpBindingMcpBindingsPutResponseContent( #endif ).ConfigureAwait(false); - return - await global::Voicebox.MCPClientBindingResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Voicebox.MCPClientBindingResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.WatchdogDisableWatchdogDisablePost.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.WatchdogDisableWatchdogDisablePost.g.cs index c4f1b41..050eea2 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.WatchdogDisableWatchdogDisablePost.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.WatchdogDisableWatchdogDisablePost.g.cs @@ -29,6 +29,24 @@ partial void ProcessWatchdogDisableWatchdogDisablePostResponseContent( public async global::System.Threading.Tasks.Task WatchdogDisableWatchdogDisablePostAsync( global::Voicebox.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await WatchdogDisableWatchdogDisablePostAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Watchdog Disable
+ /// Disable the parent process watchdog so the server keeps running. + ///
+ /// 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> WatchdogDisableWatchdogDisablePostAsResponseAsync( + global::Voicebox.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -51,6 +69,7 @@ partial void ProcessWatchdogDisableWatchdogDisablePostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Voicebox.PathBuilder( path: "/watchdog/disable", baseUri: HttpClient.BaseAddress); @@ -106,6 +125,8 @@ partial void ProcessWatchdogDisableWatchdogDisablePostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -116,6 +137,11 @@ partial void ProcessWatchdogDisableWatchdogDisablePostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -133,6 +159,8 @@ partial void ProcessWatchdogDisableWatchdogDisablePostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -142,8 +170,7 @@ partial void ProcessWatchdogDisableWatchdogDisablePostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -152,6 +179,11 @@ partial void ProcessWatchdogDisableWatchdogDisablePostResponseContent( __attempt < __maxAttempts && global::Voicebox.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Voicebox.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Voicebox.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Voicebox.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -168,14 +200,15 @@ partial void ProcessWatchdogDisableWatchdogDisablePostResponseContent( 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::Voicebox.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +248,8 @@ partial void ProcessWatchdogDisableWatchdogDisablePostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -235,6 +270,8 @@ partial void ProcessWatchdogDisableWatchdogDisablePostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -259,7 +296,11 @@ partial void ProcessWatchdogDisableWatchdogDisablePostResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -287,7 +328,11 @@ partial void ProcessWatchdogDisableWatchdogDisablePostResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::Voicebox.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Voicebox.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.g.cs b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.g.cs index 9741003..0eed61b 100644 --- a/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.g.cs +++ b/src/libs/Voicebox/Generated/Voicebox.VoiceboxClient.g.cs @@ -73,10 +73,10 @@ public VoiceboxClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public VoiceboxClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Voicebox.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Voicebox.AutoSDKClientOptions? options, bool disposeHttpClient = true) {