diff --git a/src/libs/Weave/Generated/Weave.AnnotationQueuesClient.AnnotationQueueAddCallsAnnotationQueuesQueueIdItemsPost.g.cs b/src/libs/Weave/Generated/Weave.AnnotationQueuesClient.AnnotationQueueAddCallsAnnotationQueuesQueueIdItemsPost.g.cs index 4d7ca89..11943e7 100644 --- a/src/libs/Weave/Generated/Weave.AnnotationQueuesClient.AnnotationQueueAddCallsAnnotationQueuesQueueIdItemsPost.g.cs +++ b/src/libs/Weave/Generated/Weave.AnnotationQueuesClient.AnnotationQueueAddCallsAnnotationQueuesQueueIdItemsPost.g.cs @@ -55,6 +55,32 @@ partial void ProcessAnnotationQueueAddCallsAnnotationQueuesQueueIdItemsPostRespo public async global::System.Threading.Tasks.Task AnnotationQueueAddCallsAnnotationQueuesQueueIdItemsPostAsync( string queueId, + global::Weave.AnnotationQueueAddCallsBody request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await AnnotationQueueAddCallsAnnotationQueuesQueueIdItemsPostAsResponseAsync( + queueId: queueId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Annotation Queue Add Calls
+ /// Add calls to an annotation queue. + ///
+ /// + /// + /// 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> AnnotationQueueAddCallsAnnotationQueuesQueueIdItemsPostAsResponseAsync( + string queueId, + global::Weave.AnnotationQueueAddCallsBody request, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -90,6 +116,7 @@ partial void ProcessAnnotationQueueAddCallsAnnotationQueuesQueueIdItemsPostRespo global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: $"/annotation_queues/{queueId}/items", baseUri: HttpClient.BaseAddress); @@ -170,6 +197,8 @@ partial void ProcessAnnotationQueueAddCallsAnnotationQueuesQueueIdItemsPostRespo attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -180,6 +209,11 @@ partial void ProcessAnnotationQueueAddCallsAnnotationQueuesQueueIdItemsPostRespo } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -197,6 +231,8 @@ partial void ProcessAnnotationQueueAddCallsAnnotationQueuesQueueIdItemsPostRespo attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -206,8 +242,7 @@ partial void ProcessAnnotationQueueAddCallsAnnotationQueuesQueueIdItemsPostRespo __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -216,6 +251,11 @@ partial void ProcessAnnotationQueueAddCallsAnnotationQueuesQueueIdItemsPostRespo __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -232,14 +272,15 @@ partial void ProcessAnnotationQueueAddCallsAnnotationQueuesQueueIdItemsPostRespo 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -279,6 +320,8 @@ partial void ProcessAnnotationQueueAddCallsAnnotationQueuesQueueIdItemsPostRespo attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -299,6 +342,8 @@ partial void ProcessAnnotationQueueAddCallsAnnotationQueuesQueueIdItemsPostRespo attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -361,9 +406,13 @@ partial void ProcessAnnotationQueueAddCallsAnnotationQueuesQueueIdItemsPostRespo { __response.EnsureSuccessStatusCode(); - return - global::Weave.AnnotationQueueAddCallsRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.AnnotationQueueAddCallsRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -391,9 +440,13 @@ partial void ProcessAnnotationQueueAddCallsAnnotationQueuesQueueIdItemsPostRespo #endif ).ConfigureAwait(false); - return - await global::Weave.AnnotationQueueAddCallsRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.AnnotationQueueAddCallsRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.AnnotationQueuesClient.AnnotationQueueCreateAnnotationQueuesPost.g.cs b/src/libs/Weave/Generated/Weave.AnnotationQueuesClient.AnnotationQueueCreateAnnotationQueuesPost.g.cs index 2d3b859..ab77ecf 100644 --- a/src/libs/Weave/Generated/Weave.AnnotationQueuesClient.AnnotationQueueCreateAnnotationQueuesPost.g.cs +++ b/src/libs/Weave/Generated/Weave.AnnotationQueuesClient.AnnotationQueueCreateAnnotationQueuesPost.g.cs @@ -51,6 +51,29 @@ partial void ProcessAnnotationQueueCreateAnnotationQueuesPostResponseContent( /// public async global::System.Threading.Tasks.Task AnnotationQueueCreateAnnotationQueuesPostAsync( + global::Weave.AnnotationQueueCreateReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await AnnotationQueueCreateAnnotationQueuesPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Annotation Queue Create
+ /// Create a new annotation queue. + ///
+ /// + /// 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> AnnotationQueueCreateAnnotationQueuesPostAsResponseAsync( + global::Weave.AnnotationQueueCreateReq request, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -85,6 +108,7 @@ partial void ProcessAnnotationQueueCreateAnnotationQueuesPostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: "/annotation_queues", baseUri: HttpClient.BaseAddress); @@ -164,6 +188,8 @@ partial void ProcessAnnotationQueueCreateAnnotationQueuesPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -174,6 +200,11 @@ partial void ProcessAnnotationQueueCreateAnnotationQueuesPostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -191,6 +222,8 @@ partial void ProcessAnnotationQueueCreateAnnotationQueuesPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -200,8 +233,7 @@ partial void ProcessAnnotationQueueCreateAnnotationQueuesPostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -210,6 +242,11 @@ partial void ProcessAnnotationQueueCreateAnnotationQueuesPostResponseContent( __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -226,14 +263,15 @@ partial void ProcessAnnotationQueueCreateAnnotationQueuesPostResponseContent( 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -273,6 +311,8 @@ partial void ProcessAnnotationQueueCreateAnnotationQueuesPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -293,6 +333,8 @@ partial void ProcessAnnotationQueueCreateAnnotationQueuesPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -355,9 +397,13 @@ partial void ProcessAnnotationQueueCreateAnnotationQueuesPostResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Weave.AnnotationQueueCreateRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.AnnotationQueueCreateRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -385,9 +431,13 @@ partial void ProcessAnnotationQueueCreateAnnotationQueuesPostResponseContent( #endif ).ConfigureAwait(false); - return - await global::Weave.AnnotationQueueCreateRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.AnnotationQueueCreateRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.AnnotationQueuesClient.AnnotationQueueDeleteAnnotationQueuesQueueIdDelete.g.cs b/src/libs/Weave/Generated/Weave.AnnotationQueuesClient.AnnotationQueueDeleteAnnotationQueuesQueueIdDelete.g.cs index ba0e5b9..c95a12b 100644 --- a/src/libs/Weave/Generated/Weave.AnnotationQueuesClient.AnnotationQueueDeleteAnnotationQueuesQueueIdDelete.g.cs +++ b/src/libs/Weave/Generated/Weave.AnnotationQueuesClient.AnnotationQueueDeleteAnnotationQueuesQueueIdDelete.g.cs @@ -57,6 +57,30 @@ partial void ProcessAnnotationQueueDeleteAnnotationQueuesQueueIdDeleteResponseCo string projectId, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await AnnotationQueueDeleteAnnotationQueuesQueueIdDeleteAsResponseAsync( + queueId: queueId, + projectId: projectId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Annotation Queue Delete
+ /// Delete (soft-delete) an annotation queue. + ///
+ /// + /// + /// 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> AnnotationQueueDeleteAnnotationQueuesQueueIdDeleteAsResponseAsync( + string queueId, + string projectId, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -87,11 +111,12 @@ partial void ProcessAnnotationQueueDeleteAnnotationQueuesQueueIdDeleteResponseCo global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: $"/annotation_queues/{queueId}", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder - .AddRequiredParameter("project_id", projectId) + .AddRequiredParameter("project_id", projectId) ; var __path = __pathBuilder.ToString(); __path = global::Weave.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -164,6 +189,8 @@ partial void ProcessAnnotationQueueDeleteAnnotationQueuesQueueIdDeleteResponseCo attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -174,6 +201,11 @@ partial void ProcessAnnotationQueueDeleteAnnotationQueuesQueueIdDeleteResponseCo } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -191,6 +223,8 @@ partial void ProcessAnnotationQueueDeleteAnnotationQueuesQueueIdDeleteResponseCo attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -200,8 +234,7 @@ partial void ProcessAnnotationQueueDeleteAnnotationQueuesQueueIdDeleteResponseCo __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -210,6 +243,11 @@ partial void ProcessAnnotationQueueDeleteAnnotationQueuesQueueIdDeleteResponseCo __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -226,14 +264,15 @@ partial void ProcessAnnotationQueueDeleteAnnotationQueuesQueueIdDeleteResponseCo 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -273,6 +312,8 @@ partial void ProcessAnnotationQueueDeleteAnnotationQueuesQueueIdDeleteResponseCo attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -293,6 +334,8 @@ partial void ProcessAnnotationQueueDeleteAnnotationQueuesQueueIdDeleteResponseCo attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -355,9 +398,13 @@ partial void ProcessAnnotationQueueDeleteAnnotationQueuesQueueIdDeleteResponseCo { __response.EnsureSuccessStatusCode(); - return - global::Weave.AnnotationQueueDeleteRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.AnnotationQueueDeleteRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -385,9 +432,13 @@ partial void ProcessAnnotationQueueDeleteAnnotationQueuesQueueIdDeleteResponseCo #endif ).ConfigureAwait(false); - return - await global::Weave.AnnotationQueueDeleteRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.AnnotationQueueDeleteRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.AnnotationQueuesClient.AnnotationQueueItemProgressUpdateAnnotationQueuesQueueIdItemsItemIdProgressPost.g.cs b/src/libs/Weave/Generated/Weave.AnnotationQueuesClient.AnnotationQueueItemProgressUpdateAnnotationQueuesQueueIdItemsItemIdProgressPost.g.cs index dc00e0a..d1b808b 100644 --- a/src/libs/Weave/Generated/Weave.AnnotationQueuesClient.AnnotationQueueItemProgressUpdateAnnotationQueuesQueueIdItemsItemIdProgressPost.g.cs +++ b/src/libs/Weave/Generated/Weave.AnnotationQueuesClient.AnnotationQueueItemProgressUpdateAnnotationQueuesQueueIdItemsItemIdProgressPost.g.cs @@ -59,6 +59,35 @@ partial void ProcessAnnotationQueueItemProgressUpdateAnnotationQueuesQueueIdItem string queueId, string itemId, + global::Weave.AnnotationQueueItemProgressUpdateBody request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await AnnotationQueueItemProgressUpdateAnnotationQueuesQueueIdItemsItemIdProgressPostAsResponseAsync( + queueId: queueId, + itemId: itemId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Annotation Queue Item Progress Update
+ /// Update the annotation state of a queue item for the current annotator. + ///
+ /// + /// + /// + /// 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> AnnotationQueueItemProgressUpdateAnnotationQueuesQueueIdItemsItemIdProgressPostAsResponseAsync( + string queueId, + string itemId, + global::Weave.AnnotationQueueItemProgressUpdateBody request, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -95,6 +124,7 @@ partial void ProcessAnnotationQueueItemProgressUpdateAnnotationQueuesQueueIdItem global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: $"/annotation_queues/{queueId}/items/{itemId}/progress", baseUri: HttpClient.BaseAddress); @@ -176,6 +206,8 @@ partial void ProcessAnnotationQueueItemProgressUpdateAnnotationQueuesQueueIdItem attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -186,6 +218,11 @@ partial void ProcessAnnotationQueueItemProgressUpdateAnnotationQueuesQueueIdItem } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -203,6 +240,8 @@ partial void ProcessAnnotationQueueItemProgressUpdateAnnotationQueuesQueueIdItem attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -212,8 +251,7 @@ partial void ProcessAnnotationQueueItemProgressUpdateAnnotationQueuesQueueIdItem __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -222,6 +260,11 @@ partial void ProcessAnnotationQueueItemProgressUpdateAnnotationQueuesQueueIdItem __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -238,14 +281,15 @@ partial void ProcessAnnotationQueueItemProgressUpdateAnnotationQueuesQueueIdItem 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -285,6 +329,8 @@ partial void ProcessAnnotationQueueItemProgressUpdateAnnotationQueuesQueueIdItem attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -305,6 +351,8 @@ partial void ProcessAnnotationQueueItemProgressUpdateAnnotationQueuesQueueIdItem attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -367,9 +415,13 @@ partial void ProcessAnnotationQueueItemProgressUpdateAnnotationQueuesQueueIdItem { __response.EnsureSuccessStatusCode(); - return - global::Weave.AnnotatorQueueItemsProgressUpdateRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.AnnotatorQueueItemsProgressUpdateRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -397,9 +449,13 @@ partial void ProcessAnnotationQueueItemProgressUpdateAnnotationQueuesQueueIdItem #endif ).ConfigureAwait(false); - return - await global::Weave.AnnotatorQueueItemsProgressUpdateRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.AnnotatorQueueItemsProgressUpdateRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.AnnotationQueuesClient.AnnotationQueueItemsQueryAnnotationQueuesQueueIdItemsQueryPost.g.cs b/src/libs/Weave/Generated/Weave.AnnotationQueuesClient.AnnotationQueueItemsQueryAnnotationQueuesQueueIdItemsQueryPost.g.cs index 953df12..4237387 100644 --- a/src/libs/Weave/Generated/Weave.AnnotationQueuesClient.AnnotationQueueItemsQueryAnnotationQueuesQueueIdItemsQueryPost.g.cs +++ b/src/libs/Weave/Generated/Weave.AnnotationQueuesClient.AnnotationQueueItemsQueryAnnotationQueuesQueueIdItemsQueryPost.g.cs @@ -55,6 +55,32 @@ partial void ProcessAnnotationQueueItemsQueryAnnotationQueuesQueueIdItemsQueryPo public async global::System.Threading.Tasks.Task AnnotationQueueItemsQueryAnnotationQueuesQueueIdItemsQueryPostAsync( string queueId, + global::Weave.AnnotationQueueItemsQueryBody request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await AnnotationQueueItemsQueryAnnotationQueuesQueueIdItemsQueryPostAsResponseAsync( + queueId: queueId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Annotation Queue Items Query
+ /// Query items in an annotation queue with pagination and sorting. + ///
+ /// + /// + /// 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> AnnotationQueueItemsQueryAnnotationQueuesQueueIdItemsQueryPostAsResponseAsync( + string queueId, + global::Weave.AnnotationQueueItemsQueryBody request, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -90,6 +116,7 @@ partial void ProcessAnnotationQueueItemsQueryAnnotationQueuesQueueIdItemsQueryPo global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: $"/annotation_queues/{queueId}/items/query", baseUri: HttpClient.BaseAddress); @@ -170,6 +197,8 @@ partial void ProcessAnnotationQueueItemsQueryAnnotationQueuesQueueIdItemsQueryPo attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -180,6 +209,11 @@ partial void ProcessAnnotationQueueItemsQueryAnnotationQueuesQueueIdItemsQueryPo } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -197,6 +231,8 @@ partial void ProcessAnnotationQueueItemsQueryAnnotationQueuesQueueIdItemsQueryPo attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -206,8 +242,7 @@ partial void ProcessAnnotationQueueItemsQueryAnnotationQueuesQueueIdItemsQueryPo __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -216,6 +251,11 @@ partial void ProcessAnnotationQueueItemsQueryAnnotationQueuesQueueIdItemsQueryPo __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -232,14 +272,15 @@ partial void ProcessAnnotationQueueItemsQueryAnnotationQueuesQueueIdItemsQueryPo 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -279,6 +320,8 @@ partial void ProcessAnnotationQueueItemsQueryAnnotationQueuesQueueIdItemsQueryPo attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -299,6 +342,8 @@ partial void ProcessAnnotationQueueItemsQueryAnnotationQueuesQueueIdItemsQueryPo attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -361,9 +406,13 @@ partial void ProcessAnnotationQueueItemsQueryAnnotationQueuesQueueIdItemsQueryPo { __response.EnsureSuccessStatusCode(); - return - global::Weave.AnnotationQueueItemsQueryRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.AnnotationQueueItemsQueryRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -391,9 +440,13 @@ partial void ProcessAnnotationQueueItemsQueryAnnotationQueuesQueueIdItemsQueryPo #endif ).ConfigureAwait(false); - return - await global::Weave.AnnotationQueueItemsQueryRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.AnnotationQueueItemsQueryRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.AnnotationQueuesClient.AnnotationQueueReadAnnotationQueuesQueueIdGet.g.cs b/src/libs/Weave/Generated/Weave.AnnotationQueuesClient.AnnotationQueueReadAnnotationQueuesQueueIdGet.g.cs index 557eb7c..0c88f1f 100644 --- a/src/libs/Weave/Generated/Weave.AnnotationQueuesClient.AnnotationQueueReadAnnotationQueuesQueueIdGet.g.cs +++ b/src/libs/Weave/Generated/Weave.AnnotationQueuesClient.AnnotationQueueReadAnnotationQueuesQueueIdGet.g.cs @@ -57,6 +57,30 @@ partial void ProcessAnnotationQueueReadAnnotationQueuesQueueIdGetResponseContent string projectId, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await AnnotationQueueReadAnnotationQueuesQueueIdGetAsResponseAsync( + queueId: queueId, + projectId: projectId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Annotation Queue Read
+ /// Read a specific annotation queue. + ///
+ /// + /// + /// 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> AnnotationQueueReadAnnotationQueuesQueueIdGetAsResponseAsync( + string queueId, + string projectId, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -87,11 +111,12 @@ partial void ProcessAnnotationQueueReadAnnotationQueuesQueueIdGetResponseContent global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: $"/annotation_queues/{queueId}", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder - .AddRequiredParameter("project_id", projectId) + .AddRequiredParameter("project_id", projectId) ; var __path = __pathBuilder.ToString(); __path = global::Weave.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -164,6 +189,8 @@ partial void ProcessAnnotationQueueReadAnnotationQueuesQueueIdGetResponseContent attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -174,6 +201,11 @@ partial void ProcessAnnotationQueueReadAnnotationQueuesQueueIdGetResponseContent } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -191,6 +223,8 @@ partial void ProcessAnnotationQueueReadAnnotationQueuesQueueIdGetResponseContent attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -200,8 +234,7 @@ partial void ProcessAnnotationQueueReadAnnotationQueuesQueueIdGetResponseContent __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -210,6 +243,11 @@ partial void ProcessAnnotationQueueReadAnnotationQueuesQueueIdGetResponseContent __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -226,14 +264,15 @@ partial void ProcessAnnotationQueueReadAnnotationQueuesQueueIdGetResponseContent 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -273,6 +312,8 @@ partial void ProcessAnnotationQueueReadAnnotationQueuesQueueIdGetResponseContent attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -293,6 +334,8 @@ partial void ProcessAnnotationQueueReadAnnotationQueuesQueueIdGetResponseContent attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -355,9 +398,13 @@ partial void ProcessAnnotationQueueReadAnnotationQueuesQueueIdGetResponseContent { __response.EnsureSuccessStatusCode(); - return - global::Weave.AnnotationQueueReadRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.AnnotationQueueReadRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -385,9 +432,13 @@ partial void ProcessAnnotationQueueReadAnnotationQueuesQueueIdGetResponseContent #endif ).ConfigureAwait(false); - return - await global::Weave.AnnotationQueueReadRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.AnnotationQueueReadRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.AnnotationQueuesClient.AnnotationQueueUpdateAnnotationQueuesQueueIdPut.g.cs b/src/libs/Weave/Generated/Weave.AnnotationQueuesClient.AnnotationQueueUpdateAnnotationQueuesQueueIdPut.g.cs index 7cecd66..fab37a0 100644 --- a/src/libs/Weave/Generated/Weave.AnnotationQueuesClient.AnnotationQueueUpdateAnnotationQueuesQueueIdPut.g.cs +++ b/src/libs/Weave/Generated/Weave.AnnotationQueuesClient.AnnotationQueueUpdateAnnotationQueuesQueueIdPut.g.cs @@ -55,6 +55,32 @@ partial void ProcessAnnotationQueueUpdateAnnotationQueuesQueueIdPutResponseConte public async global::System.Threading.Tasks.Task AnnotationQueueUpdateAnnotationQueuesQueueIdPutAsync( string queueId, + global::Weave.AnnotationQueueUpdateBody request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await AnnotationQueueUpdateAnnotationQueuesQueueIdPutAsResponseAsync( + queueId: queueId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Annotation Queue Update
+ /// Update an annotation queue's metadata (name, description, scorer_refs). + ///
+ /// + /// + /// 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> AnnotationQueueUpdateAnnotationQueuesQueueIdPutAsResponseAsync( + string queueId, + global::Weave.AnnotationQueueUpdateBody request, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -90,6 +116,7 @@ partial void ProcessAnnotationQueueUpdateAnnotationQueuesQueueIdPutResponseConte global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: $"/annotation_queues/{queueId}", baseUri: HttpClient.BaseAddress); @@ -170,6 +197,8 @@ partial void ProcessAnnotationQueueUpdateAnnotationQueuesQueueIdPutResponseConte attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -180,6 +209,11 @@ partial void ProcessAnnotationQueueUpdateAnnotationQueuesQueueIdPutResponseConte } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -197,6 +231,8 @@ partial void ProcessAnnotationQueueUpdateAnnotationQueuesQueueIdPutResponseConte attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -206,8 +242,7 @@ partial void ProcessAnnotationQueueUpdateAnnotationQueuesQueueIdPutResponseConte __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -216,6 +251,11 @@ partial void ProcessAnnotationQueueUpdateAnnotationQueuesQueueIdPutResponseConte __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -232,14 +272,15 @@ partial void ProcessAnnotationQueueUpdateAnnotationQueuesQueueIdPutResponseConte 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -279,6 +320,8 @@ partial void ProcessAnnotationQueueUpdateAnnotationQueuesQueueIdPutResponseConte attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -299,6 +342,8 @@ partial void ProcessAnnotationQueueUpdateAnnotationQueuesQueueIdPutResponseConte attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -361,9 +406,13 @@ partial void ProcessAnnotationQueueUpdateAnnotationQueuesQueueIdPutResponseConte { __response.EnsureSuccessStatusCode(); - return - global::Weave.AnnotationQueueUpdateRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.AnnotationQueueUpdateRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -391,9 +440,13 @@ partial void ProcessAnnotationQueueUpdateAnnotationQueuesQueueIdPutResponseConte #endif ).ConfigureAwait(false); - return - await global::Weave.AnnotationQueueUpdateRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.AnnotationQueueUpdateRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.AnnotationQueuesClient.AnnotationQueuesQueryStreamAnnotationQueuesQueryPost.g.cs b/src/libs/Weave/Generated/Weave.AnnotationQueuesClient.AnnotationQueuesQueryStreamAnnotationQueuesQueryPost.g.cs index 38b3cbc..dd15e9b 100644 --- a/src/libs/Weave/Generated/Weave.AnnotationQueuesClient.AnnotationQueuesQueryStreamAnnotationQueuesQueryPost.g.cs +++ b/src/libs/Weave/Generated/Weave.AnnotationQueuesClient.AnnotationQueuesQueryStreamAnnotationQueuesQueryPost.g.cs @@ -51,6 +51,29 @@ partial void ProcessAnnotationQueuesQueryStreamAnnotationQueuesQueryPostResponse /// public async global::System.Threading.Tasks.Task AnnotationQueuesQueryStreamAnnotationQueuesQueryPostAsync( + global::Weave.AnnotationQueuesQueryReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await AnnotationQueuesQueryStreamAnnotationQueuesQueryPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Annotation Queues Query Stream
+ /// Query annotation queues for a project (streaming NDJSON response). + ///
+ /// + /// 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> AnnotationQueuesQueryStreamAnnotationQueuesQueryPostAsResponseAsync( + global::Weave.AnnotationQueuesQueryReq request, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -85,6 +108,7 @@ partial void ProcessAnnotationQueuesQueryStreamAnnotationQueuesQueryPostResponse global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: "/annotation_queues/query", baseUri: HttpClient.BaseAddress); @@ -164,6 +188,8 @@ partial void ProcessAnnotationQueuesQueryStreamAnnotationQueuesQueryPostResponse attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -174,6 +200,11 @@ partial void ProcessAnnotationQueuesQueryStreamAnnotationQueuesQueryPostResponse } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -191,6 +222,8 @@ partial void ProcessAnnotationQueuesQueryStreamAnnotationQueuesQueryPostResponse attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -200,8 +233,7 @@ partial void ProcessAnnotationQueuesQueryStreamAnnotationQueuesQueryPostResponse __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -210,6 +242,11 @@ partial void ProcessAnnotationQueuesQueryStreamAnnotationQueuesQueryPostResponse __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -226,14 +263,15 @@ partial void ProcessAnnotationQueuesQueryStreamAnnotationQueuesQueryPostResponse 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -273,6 +311,8 @@ partial void ProcessAnnotationQueuesQueryStreamAnnotationQueuesQueryPostResponse attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -293,6 +333,8 @@ partial void ProcessAnnotationQueuesQueryStreamAnnotationQueuesQueryPostResponse attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -355,7 +397,11 @@ partial void ProcessAnnotationQueuesQueryStreamAnnotationQueuesQueryPostResponse { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -383,7 +429,11 @@ partial void ProcessAnnotationQueuesQueryStreamAnnotationQueuesQueryPostResponse #endif ).ConfigureAwait(false); - return __content; + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.AnnotationQueuesClient.AnnotationQueuesStatsAnnotationQueuesStatsPost.g.cs b/src/libs/Weave/Generated/Weave.AnnotationQueuesClient.AnnotationQueuesStatsAnnotationQueuesStatsPost.g.cs index 8f4bc02..5939844 100644 --- a/src/libs/Weave/Generated/Weave.AnnotationQueuesClient.AnnotationQueuesStatsAnnotationQueuesStatsPost.g.cs +++ b/src/libs/Weave/Generated/Weave.AnnotationQueuesClient.AnnotationQueuesStatsAnnotationQueuesStatsPost.g.cs @@ -51,6 +51,29 @@ partial void ProcessAnnotationQueuesStatsAnnotationQueuesStatsPostResponseConten /// public async global::System.Threading.Tasks.Task AnnotationQueuesStatsAnnotationQueuesStatsPostAsync( + global::Weave.AnnotationQueuesStatsReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await AnnotationQueuesStatsAnnotationQueuesStatsPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Annotation Queues Stats
+ /// Get stats for multiple annotation queues. + ///
+ /// + /// 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> AnnotationQueuesStatsAnnotationQueuesStatsPostAsResponseAsync( + global::Weave.AnnotationQueuesStatsReq request, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -85,6 +108,7 @@ partial void ProcessAnnotationQueuesStatsAnnotationQueuesStatsPostResponseConten global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: "/annotation_queues/stats", baseUri: HttpClient.BaseAddress); @@ -164,6 +188,8 @@ partial void ProcessAnnotationQueuesStatsAnnotationQueuesStatsPostResponseConten attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -174,6 +200,11 @@ partial void ProcessAnnotationQueuesStatsAnnotationQueuesStatsPostResponseConten } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -191,6 +222,8 @@ partial void ProcessAnnotationQueuesStatsAnnotationQueuesStatsPostResponseConten attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -200,8 +233,7 @@ partial void ProcessAnnotationQueuesStatsAnnotationQueuesStatsPostResponseConten __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -210,6 +242,11 @@ partial void ProcessAnnotationQueuesStatsAnnotationQueuesStatsPostResponseConten __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -226,14 +263,15 @@ partial void ProcessAnnotationQueuesStatsAnnotationQueuesStatsPostResponseConten 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -273,6 +311,8 @@ partial void ProcessAnnotationQueuesStatsAnnotationQueuesStatsPostResponseConten attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -293,6 +333,8 @@ partial void ProcessAnnotationQueuesStatsAnnotationQueuesStatsPostResponseConten attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -355,9 +397,13 @@ partial void ProcessAnnotationQueuesStatsAnnotationQueuesStatsPostResponseConten { __response.EnsureSuccessStatusCode(); - return - global::Weave.AnnotationQueuesStatsRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.AnnotationQueuesStatsRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -385,9 +431,13 @@ partial void ProcessAnnotationQueuesStatsAnnotationQueuesStatsPostResponseConten #endif ).ConfigureAwait(false); - return - await global::Weave.AnnotationQueuesStatsRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.AnnotationQueuesStatsRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.AnnotationQueuesClient.g.cs b/src/libs/Weave/Generated/Weave.AnnotationQueuesClient.g.cs index 89cdbe4..3318ed2 100644 --- a/src/libs/Weave/Generated/Weave.AnnotationQueuesClient.g.cs +++ b/src/libs/Weave/Generated/Weave.AnnotationQueuesClient.g.cs @@ -72,10 +72,10 @@ public AnnotationQueuesClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public AnnotationQueuesClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Weave.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Weave.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Weave/Generated/Weave.AutoSDKHttpResponse.g.cs b/src/libs/Weave/Generated/Weave.AutoSDKHttpResponse.g.cs new file mode 100644 index 0000000..2e26a40 --- /dev/null +++ b/src/libs/Weave/Generated/Weave.AutoSDKHttpResponse.g.cs @@ -0,0 +1,121 @@ + +#nullable enable + +namespace Weave +{ + /// + /// 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/Weave/Generated/Weave.CallsClient.CallEndCallEndPost.g.cs b/src/libs/Weave/Generated/Weave.CallsClient.CallEndCallEndPost.g.cs index 72f57ba..796d3e4 100644 --- a/src/libs/Weave/Generated/Weave.CallsClient.CallEndCallEndPost.g.cs +++ b/src/libs/Weave/Generated/Weave.CallsClient.CallEndCallEndPost.g.cs @@ -50,6 +50,28 @@ partial void ProcessCallEndCallEndPostResponseContent( /// public async global::System.Threading.Tasks.Task CallEndCallEndPostAsync( + global::Weave.CallEndReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CallEndCallEndPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Call End + /// + /// + /// 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> CallEndCallEndPostAsResponseAsync( + global::Weave.CallEndReq request, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessCallEndCallEndPostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: "/call/end", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessCallEndCallEndPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessCallEndCallEndPostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessCallEndCallEndPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessCallEndCallEndPostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessCallEndCallEndPostResponseContent( __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessCallEndCallEndPostResponseContent( 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessCallEndCallEndPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessCallEndCallEndPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -354,9 +395,13 @@ partial void ProcessCallEndCallEndPostResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Weave.CallEndRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.CallEndRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -384,9 +429,13 @@ partial void ProcessCallEndCallEndPostResponseContent( #endif ).ConfigureAwait(false); - return - await global::Weave.CallEndRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.CallEndRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.CallsClient.CallReadCallReadPost.g.cs b/src/libs/Weave/Generated/Weave.CallsClient.CallReadCallReadPost.g.cs index bb4aa40..a9fa9c0 100644 --- a/src/libs/Weave/Generated/Weave.CallsClient.CallReadCallReadPost.g.cs +++ b/src/libs/Weave/Generated/Weave.CallsClient.CallReadCallReadPost.g.cs @@ -50,6 +50,28 @@ partial void ProcessCallReadCallReadPostResponseContent( /// public async global::System.Threading.Tasks.Task CallReadCallReadPostAsync( + global::Weave.CallReadReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CallReadCallReadPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Call Read + /// + /// + /// 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> CallReadCallReadPostAsResponseAsync( + global::Weave.CallReadReq request, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessCallReadCallReadPostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: "/call/read", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessCallReadCallReadPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessCallReadCallReadPostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessCallReadCallReadPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessCallReadCallReadPostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessCallReadCallReadPostResponseContent( __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessCallReadCallReadPostResponseContent( 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessCallReadCallReadPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessCallReadCallReadPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -354,9 +395,13 @@ partial void ProcessCallReadCallReadPostResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Weave.CallReadRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.CallReadRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -384,9 +429,13 @@ partial void ProcessCallReadCallReadPostResponseContent( #endif ).ConfigureAwait(false); - return - await global::Weave.CallReadRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.CallReadRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.CallsClient.CallStartBatchCallUpsertBatchPost.g.cs b/src/libs/Weave/Generated/Weave.CallsClient.CallStartBatchCallUpsertBatchPost.g.cs index f442c02..c4f61f1 100644 --- a/src/libs/Weave/Generated/Weave.CallsClient.CallStartBatchCallUpsertBatchPost.g.cs +++ b/src/libs/Weave/Generated/Weave.CallsClient.CallStartBatchCallUpsertBatchPost.g.cs @@ -50,6 +50,28 @@ partial void ProcessCallStartBatchCallUpsertBatchPostResponseContent( /// public async global::System.Threading.Tasks.Task CallStartBatchCallUpsertBatchPostAsync( + global::Weave.CallCreateBatchReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CallStartBatchCallUpsertBatchPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Call Start Batch + /// + /// + /// 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> CallStartBatchCallUpsertBatchPostAsResponseAsync( + global::Weave.CallCreateBatchReq request, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessCallStartBatchCallUpsertBatchPostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: "/call/upsert_batch", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessCallStartBatchCallUpsertBatchPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessCallStartBatchCallUpsertBatchPostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessCallStartBatchCallUpsertBatchPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessCallStartBatchCallUpsertBatchPostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessCallStartBatchCallUpsertBatchPostResponseContent( __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessCallStartBatchCallUpsertBatchPostResponseContent( 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessCallStartBatchCallUpsertBatchPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessCallStartBatchCallUpsertBatchPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -354,9 +395,13 @@ partial void ProcessCallStartBatchCallUpsertBatchPostResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Weave.CallCreateBatchRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.CallCreateBatchRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -384,9 +429,13 @@ partial void ProcessCallStartBatchCallUpsertBatchPostResponseContent( #endif ).ConfigureAwait(false); - return - await global::Weave.CallCreateBatchRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.CallCreateBatchRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.CallsClient.CallStartCallStartPost.g.cs b/src/libs/Weave/Generated/Weave.CallsClient.CallStartCallStartPost.g.cs index 85e957a..e85dc2d 100644 --- a/src/libs/Weave/Generated/Weave.CallsClient.CallStartCallStartPost.g.cs +++ b/src/libs/Weave/Generated/Weave.CallsClient.CallStartCallStartPost.g.cs @@ -50,6 +50,28 @@ partial void ProcessCallStartCallStartPostResponseContent( /// public async global::System.Threading.Tasks.Task CallStartCallStartPostAsync( + global::Weave.CallStartReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CallStartCallStartPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Call Start + /// + /// + /// 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> CallStartCallStartPostAsResponseAsync( + global::Weave.CallStartReq request, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessCallStartCallStartPostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: "/call/start", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessCallStartCallStartPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessCallStartCallStartPostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessCallStartCallStartPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessCallStartCallStartPostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessCallStartCallStartPostResponseContent( __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessCallStartCallStartPostResponseContent( 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessCallStartCallStartPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessCallStartCallStartPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -354,9 +395,13 @@ partial void ProcessCallStartCallStartPostResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Weave.CallStartRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.CallStartRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -384,9 +429,13 @@ partial void ProcessCallStartCallStartPostResponseContent( #endif ).ConfigureAwait(false); - return - await global::Weave.CallStartRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.CallStartRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.CallsClient.CallStatsCallsStatsPost.g.cs b/src/libs/Weave/Generated/Weave.CallsClient.CallStatsCallsStatsPost.g.cs index 30993fb..4a2f385 100644 --- a/src/libs/Weave/Generated/Weave.CallsClient.CallStatsCallsStatsPost.g.cs +++ b/src/libs/Weave/Generated/Weave.CallsClient.CallStatsCallsStatsPost.g.cs @@ -50,6 +50,28 @@ partial void ProcessCallStatsCallsStatsPostResponseContent( /// public async global::System.Threading.Tasks.Task CallStatsCallsStatsPostAsync( + global::Weave.CallStatsReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CallStatsCallsStatsPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Call Stats + /// + /// + /// 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> CallStatsCallsStatsPostAsResponseAsync( + global::Weave.CallStatsReq request, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessCallStatsCallsStatsPostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: "/calls/stats", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessCallStatsCallsStatsPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessCallStatsCallsStatsPostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessCallStatsCallsStatsPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessCallStatsCallsStatsPostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessCallStatsCallsStatsPostResponseContent( __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessCallStatsCallsStatsPostResponseContent( 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessCallStatsCallsStatsPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessCallStatsCallsStatsPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -354,9 +395,13 @@ partial void ProcessCallStatsCallsStatsPostResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Weave.CallStatsRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.CallStatsRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -384,9 +429,13 @@ partial void ProcessCallStatsCallsStatsPostResponseContent( #endif ).ConfigureAwait(false); - return - await global::Weave.CallStatsRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.CallStatsRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.CallsClient.CallUpdateCallUpdatePost.g.cs b/src/libs/Weave/Generated/Weave.CallsClient.CallUpdateCallUpdatePost.g.cs index 60c510c..1c20d41 100644 --- a/src/libs/Weave/Generated/Weave.CallsClient.CallUpdateCallUpdatePost.g.cs +++ b/src/libs/Weave/Generated/Weave.CallsClient.CallUpdateCallUpdatePost.g.cs @@ -50,6 +50,28 @@ partial void ProcessCallUpdateCallUpdatePostResponseContent( /// public async global::System.Threading.Tasks.Task CallUpdateCallUpdatePostAsync( + global::Weave.CallUpdateReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CallUpdateCallUpdatePostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Call Update + /// + /// + /// 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> CallUpdateCallUpdatePostAsResponseAsync( + global::Weave.CallUpdateReq request, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessCallUpdateCallUpdatePostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: "/call/update", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessCallUpdateCallUpdatePostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessCallUpdateCallUpdatePostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessCallUpdateCallUpdatePostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessCallUpdateCallUpdatePostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessCallUpdateCallUpdatePostResponseContent( __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessCallUpdateCallUpdatePostResponseContent( 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessCallUpdateCallUpdatePostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessCallUpdateCallUpdatePostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -354,9 +395,13 @@ partial void ProcessCallUpdateCallUpdatePostResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Weave.CallUpdateRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.CallUpdateRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -384,9 +429,13 @@ partial void ProcessCallUpdateCallUpdatePostResponseContent( #endif ).ConfigureAwait(false); - return - await global::Weave.CallUpdateRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.CallUpdateRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.CallsClient.CallsDeleteCallsDeletePost.g.cs b/src/libs/Weave/Generated/Weave.CallsClient.CallsDeleteCallsDeletePost.g.cs index 61e94eb..7b101e4 100644 --- a/src/libs/Weave/Generated/Weave.CallsClient.CallsDeleteCallsDeletePost.g.cs +++ b/src/libs/Weave/Generated/Weave.CallsClient.CallsDeleteCallsDeletePost.g.cs @@ -50,6 +50,28 @@ partial void ProcessCallsDeleteCallsDeletePostResponseContent( /// public async global::System.Threading.Tasks.Task CallsDeleteCallsDeletePostAsync( + global::Weave.CallsDeleteReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CallsDeleteCallsDeletePostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Calls Delete + /// + /// + /// 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> CallsDeleteCallsDeletePostAsResponseAsync( + global::Weave.CallsDeleteReq request, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessCallsDeleteCallsDeletePostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: "/calls/delete", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessCallsDeleteCallsDeletePostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessCallsDeleteCallsDeletePostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessCallsDeleteCallsDeletePostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessCallsDeleteCallsDeletePostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessCallsDeleteCallsDeletePostResponseContent( __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessCallsDeleteCallsDeletePostResponseContent( 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessCallsDeleteCallsDeletePostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessCallsDeleteCallsDeletePostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -354,9 +395,13 @@ partial void ProcessCallsDeleteCallsDeletePostResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Weave.CallsDeleteRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.CallsDeleteRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -384,9 +429,13 @@ partial void ProcessCallsDeleteCallsDeletePostResponseContent( #endif ).ConfigureAwait(false); - return - await global::Weave.CallsDeleteRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.CallsDeleteRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.CallsClient.CallsQueryStatsCallsQueryStatsPost.g.cs b/src/libs/Weave/Generated/Weave.CallsClient.CallsQueryStatsCallsQueryStatsPost.g.cs index d48086c..f86ddd6 100644 --- a/src/libs/Weave/Generated/Weave.CallsClient.CallsQueryStatsCallsQueryStatsPost.g.cs +++ b/src/libs/Weave/Generated/Weave.CallsClient.CallsQueryStatsCallsQueryStatsPost.g.cs @@ -50,6 +50,28 @@ partial void ProcessCallsQueryStatsCallsQueryStatsPostResponseContent( /// public async global::System.Threading.Tasks.Task CallsQueryStatsCallsQueryStatsPostAsync( + global::Weave.CallsQueryStatsReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CallsQueryStatsCallsQueryStatsPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Calls Query Stats + /// + /// + /// 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> CallsQueryStatsCallsQueryStatsPostAsResponseAsync( + global::Weave.CallsQueryStatsReq request, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessCallsQueryStatsCallsQueryStatsPostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: "/calls/query_stats", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessCallsQueryStatsCallsQueryStatsPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessCallsQueryStatsCallsQueryStatsPostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessCallsQueryStatsCallsQueryStatsPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessCallsQueryStatsCallsQueryStatsPostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessCallsQueryStatsCallsQueryStatsPostResponseContent( __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessCallsQueryStatsCallsQueryStatsPostResponseContent( 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessCallsQueryStatsCallsQueryStatsPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessCallsQueryStatsCallsQueryStatsPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -354,9 +395,13 @@ partial void ProcessCallsQueryStatsCallsQueryStatsPostResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Weave.CallsQueryStatsRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.CallsQueryStatsRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -384,9 +429,13 @@ partial void ProcessCallsQueryStatsCallsQueryStatsPostResponseContent( #endif ).ConfigureAwait(false); - return - await global::Weave.CallsQueryStatsRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.CallsQueryStatsRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.CallsClient.CallsQueryStreamCallsStreamQueryPost.g.cs b/src/libs/Weave/Generated/Weave.CallsClient.CallsQueryStreamCallsStreamQueryPost.g.cs index 695414f..ef659a0 100644 --- a/src/libs/Weave/Generated/Weave.CallsClient.CallsQueryStreamCallsStreamQueryPost.g.cs +++ b/src/libs/Weave/Generated/Weave.CallsClient.CallsQueryStreamCallsStreamQueryPost.g.cs @@ -55,6 +55,33 @@ partial void ProcessCallsQueryStreamCallsStreamQueryPostResponseContent( /// public async global::System.Threading.Tasks.Task CallsQueryStreamCallsStreamQueryPostAsync( + global::Weave.CallsQueryReq request, + string? accept = default, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CallsQueryStreamCallsStreamQueryPostAsResponseAsync( + + request: request, + accept: accept, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Calls Query Stream + /// + /// + /// Default Value: application/jsonl + /// + /// + /// 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> CallsQueryStreamCallsStreamQueryPostAsResponseAsync( + global::Weave.CallsQueryReq request, string? accept = default, global::Weave.AutoSDKRequestOptions? requestOptions = default, @@ -91,6 +118,7 @@ partial void ProcessCallsQueryStreamCallsStreamQueryPostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: "/calls/stream_query", baseUri: HttpClient.BaseAddress); @@ -177,6 +205,8 @@ partial void ProcessCallsQueryStreamCallsStreamQueryPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -187,6 +217,11 @@ partial void ProcessCallsQueryStreamCallsStreamQueryPostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -204,6 +239,8 @@ partial void ProcessCallsQueryStreamCallsStreamQueryPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -213,8 +250,7 @@ partial void ProcessCallsQueryStreamCallsStreamQueryPostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -223,6 +259,11 @@ partial void ProcessCallsQueryStreamCallsStreamQueryPostResponseContent( __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -239,14 +280,15 @@ partial void ProcessCallsQueryStreamCallsStreamQueryPostResponseContent( 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -286,6 +328,8 @@ partial void ProcessCallsQueryStreamCallsStreamQueryPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -306,6 +350,8 @@ partial void ProcessCallsQueryStreamCallsStreamQueryPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -368,7 +414,11 @@ partial void ProcessCallsQueryStreamCallsStreamQueryPostResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -396,7 +446,11 @@ partial void ProcessCallsQueryStreamCallsStreamQueryPostResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.CallsClient.CallsUsageCallsUsagePost.g.cs b/src/libs/Weave/Generated/Weave.CallsClient.CallsUsageCallsUsagePost.g.cs index ebba782..f16d51c 100644 --- a/src/libs/Weave/Generated/Weave.CallsClient.CallsUsageCallsUsagePost.g.cs +++ b/src/libs/Weave/Generated/Weave.CallsClient.CallsUsageCallsUsagePost.g.cs @@ -51,6 +51,29 @@ partial void ProcessCallsUsageCallsUsagePostResponseContent( /// public async global::System.Threading.Tasks.Task CallsUsageCallsUsagePostAsync( + global::Weave.CallsUsageReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CallsUsageCallsUsagePostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Calls Usage
+ /// Compute aggregated usage for multiple root calls, with descendant rollup. + ///
+ /// + /// 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> CallsUsageCallsUsagePostAsResponseAsync( + global::Weave.CallsUsageReq request, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -85,6 +108,7 @@ partial void ProcessCallsUsageCallsUsagePostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: "/calls/usage", baseUri: HttpClient.BaseAddress); @@ -164,6 +188,8 @@ partial void ProcessCallsUsageCallsUsagePostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -174,6 +200,11 @@ partial void ProcessCallsUsageCallsUsagePostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -191,6 +222,8 @@ partial void ProcessCallsUsageCallsUsagePostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -200,8 +233,7 @@ partial void ProcessCallsUsageCallsUsagePostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -210,6 +242,11 @@ partial void ProcessCallsUsageCallsUsagePostResponseContent( __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -226,14 +263,15 @@ partial void ProcessCallsUsageCallsUsagePostResponseContent( 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -273,6 +311,8 @@ partial void ProcessCallsUsageCallsUsagePostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -293,6 +333,8 @@ partial void ProcessCallsUsageCallsUsagePostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -355,9 +397,13 @@ partial void ProcessCallsUsageCallsUsagePostResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Weave.CallsUsageRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.CallsUsageRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -385,9 +431,13 @@ partial void ProcessCallsUsageCallsUsagePostResponseContent( #endif ).ConfigureAwait(false); - return - await global::Weave.CallsUsageRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.CallsUsageRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.CallsClient.TraceUsageTraceUsagePost.g.cs b/src/libs/Weave/Generated/Weave.CallsClient.TraceUsageTraceUsagePost.g.cs index 1dd6e58..7a5005d 100644 --- a/src/libs/Weave/Generated/Weave.CallsClient.TraceUsageTraceUsagePost.g.cs +++ b/src/libs/Weave/Generated/Weave.CallsClient.TraceUsageTraceUsagePost.g.cs @@ -51,6 +51,29 @@ partial void ProcessTraceUsageTraceUsagePostResponseContent( /// public async global::System.Threading.Tasks.Task TraceUsageTraceUsagePostAsync( + global::Weave.TraceUsageReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await TraceUsageTraceUsagePostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Trace Usage
+ /// Compute per-call usage for a trace, with descendant rollup. + ///
+ /// + /// 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> TraceUsageTraceUsagePostAsResponseAsync( + global::Weave.TraceUsageReq request, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -85,6 +108,7 @@ partial void ProcessTraceUsageTraceUsagePostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: "/trace/usage", baseUri: HttpClient.BaseAddress); @@ -164,6 +188,8 @@ partial void ProcessTraceUsageTraceUsagePostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -174,6 +200,11 @@ partial void ProcessTraceUsageTraceUsagePostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -191,6 +222,8 @@ partial void ProcessTraceUsageTraceUsagePostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -200,8 +233,7 @@ partial void ProcessTraceUsageTraceUsagePostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -210,6 +242,11 @@ partial void ProcessTraceUsageTraceUsagePostResponseContent( __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -226,14 +263,15 @@ partial void ProcessTraceUsageTraceUsagePostResponseContent( 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -273,6 +311,8 @@ partial void ProcessTraceUsageTraceUsagePostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -293,6 +333,8 @@ partial void ProcessTraceUsageTraceUsagePostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -355,9 +397,13 @@ partial void ProcessTraceUsageTraceUsagePostResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Weave.TraceUsageRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.TraceUsageRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -385,9 +431,13 @@ partial void ProcessTraceUsageTraceUsagePostResponseContent( #endif ).ConfigureAwait(false); - return - await global::Weave.TraceUsageRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.TraceUsageRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.CallsClient.g.cs b/src/libs/Weave/Generated/Weave.CallsClient.g.cs index 3e638b5..4c26f42 100644 --- a/src/libs/Weave/Generated/Weave.CallsClient.g.cs +++ b/src/libs/Weave/Generated/Weave.CallsClient.g.cs @@ -72,10 +72,10 @@ public CallsClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public CallsClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Weave.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Weave.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Weave/Generated/Weave.CostsClient.CostCreateCostCreatePost.g.cs b/src/libs/Weave/Generated/Weave.CostsClient.CostCreateCostCreatePost.g.cs index 1d9eae9..aee76f9 100644 --- a/src/libs/Weave/Generated/Weave.CostsClient.CostCreateCostCreatePost.g.cs +++ b/src/libs/Weave/Generated/Weave.CostsClient.CostCreateCostCreatePost.g.cs @@ -50,6 +50,28 @@ partial void ProcessCostCreateCostCreatePostResponseContent( /// public async global::System.Threading.Tasks.Task CostCreateCostCreatePostAsync( + global::Weave.CostCreateReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CostCreateCostCreatePostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Cost Create + /// + /// + /// 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> CostCreateCostCreatePostAsResponseAsync( + global::Weave.CostCreateReq request, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessCostCreateCostCreatePostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: "/cost/create", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessCostCreateCostCreatePostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessCostCreateCostCreatePostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessCostCreateCostCreatePostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessCostCreateCostCreatePostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessCostCreateCostCreatePostResponseContent( __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessCostCreateCostCreatePostResponseContent( 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessCostCreateCostCreatePostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessCostCreateCostCreatePostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -354,9 +395,13 @@ partial void ProcessCostCreateCostCreatePostResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Weave.CostCreateRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.CostCreateRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -384,9 +429,13 @@ partial void ProcessCostCreateCostCreatePostResponseContent( #endif ).ConfigureAwait(false); - return - await global::Weave.CostCreateRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.CostCreateRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.CostsClient.CostPurgeCostPurgePost.g.cs b/src/libs/Weave/Generated/Weave.CostsClient.CostPurgeCostPurgePost.g.cs index bb92e1d..d05fb7f 100644 --- a/src/libs/Weave/Generated/Weave.CostsClient.CostPurgeCostPurgePost.g.cs +++ b/src/libs/Weave/Generated/Weave.CostsClient.CostPurgeCostPurgePost.g.cs @@ -50,6 +50,28 @@ partial void ProcessCostPurgeCostPurgePostResponseContent( /// public async global::System.Threading.Tasks.Task CostPurgeCostPurgePostAsync( + global::Weave.CostPurgeReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CostPurgeCostPurgePostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Cost Purge + /// + /// + /// 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> CostPurgeCostPurgePostAsResponseAsync( + global::Weave.CostPurgeReq request, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessCostPurgeCostPurgePostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: "/cost/purge", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessCostPurgeCostPurgePostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessCostPurgeCostPurgePostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessCostPurgeCostPurgePostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessCostPurgeCostPurgePostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessCostPurgeCostPurgePostResponseContent( __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessCostPurgeCostPurgePostResponseContent( 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessCostPurgeCostPurgePostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessCostPurgeCostPurgePostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -354,9 +395,13 @@ partial void ProcessCostPurgeCostPurgePostResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Weave.CostPurgeRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.CostPurgeRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -384,9 +429,13 @@ partial void ProcessCostPurgeCostPurgePostResponseContent( #endif ).ConfigureAwait(false); - return - await global::Weave.CostPurgeRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.CostPurgeRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.CostsClient.CostQueryCostQueryPost.g.cs b/src/libs/Weave/Generated/Weave.CostsClient.CostQueryCostQueryPost.g.cs index efd8fbf..d759063 100644 --- a/src/libs/Weave/Generated/Weave.CostsClient.CostQueryCostQueryPost.g.cs +++ b/src/libs/Weave/Generated/Weave.CostsClient.CostQueryCostQueryPost.g.cs @@ -50,6 +50,28 @@ partial void ProcessCostQueryCostQueryPostResponseContent( /// public async global::System.Threading.Tasks.Task CostQueryCostQueryPostAsync( + global::Weave.CostQueryReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CostQueryCostQueryPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Cost Query + /// + /// + /// 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> CostQueryCostQueryPostAsResponseAsync( + global::Weave.CostQueryReq request, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessCostQueryCostQueryPostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: "/cost/query", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessCostQueryCostQueryPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessCostQueryCostQueryPostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessCostQueryCostQueryPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessCostQueryCostQueryPostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessCostQueryCostQueryPostResponseContent( __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessCostQueryCostQueryPostResponseContent( 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessCostQueryCostQueryPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessCostQueryCostQueryPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -354,9 +395,13 @@ partial void ProcessCostQueryCostQueryPostResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Weave.CostQueryRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.CostQueryRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -384,9 +429,13 @@ partial void ProcessCostQueryCostQueryPostResponseContent( #endif ).ConfigureAwait(false); - return - await global::Weave.CostQueryRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.CostQueryRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.CostsClient.g.cs b/src/libs/Weave/Generated/Weave.CostsClient.g.cs index d98ffc8..82ddfcf 100644 --- a/src/libs/Weave/Generated/Weave.CostsClient.g.cs +++ b/src/libs/Weave/Generated/Weave.CostsClient.g.cs @@ -72,10 +72,10 @@ public CostsClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public CostsClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Weave.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Weave.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Weave/Generated/Weave.DatasetsClient.DatasetCreateV2EntityProjectDatasetsPost.g.cs b/src/libs/Weave/Generated/Weave.DatasetsClient.DatasetCreateV2EntityProjectDatasetsPost.g.cs index ce32303..97bd733 100644 --- a/src/libs/Weave/Generated/Weave.DatasetsClient.DatasetCreateV2EntityProjectDatasetsPost.g.cs +++ b/src/libs/Weave/Generated/Weave.DatasetsClient.DatasetCreateV2EntityProjectDatasetsPost.g.cs @@ -59,6 +59,35 @@ partial void ProcessDatasetCreateV2EntityProjectDatasetsPostResponseContent( string entity, string project, + global::Weave.DatasetCreateBody request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await DatasetCreateV2EntityProjectDatasetsPostAsResponseAsync( + entity: entity, + project: project, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Dataset Create
+ /// Create a dataset object. + ///
+ /// + /// + /// + /// 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> DatasetCreateV2EntityProjectDatasetsPostAsResponseAsync( + string entity, + string project, + global::Weave.DatasetCreateBody request, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -95,6 +124,7 @@ partial void ProcessDatasetCreateV2EntityProjectDatasetsPostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: $"/v2/{entity}/{project}/datasets", baseUri: HttpClient.BaseAddress); @@ -176,6 +206,8 @@ partial void ProcessDatasetCreateV2EntityProjectDatasetsPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -186,6 +218,11 @@ partial void ProcessDatasetCreateV2EntityProjectDatasetsPostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -203,6 +240,8 @@ partial void ProcessDatasetCreateV2EntityProjectDatasetsPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -212,8 +251,7 @@ partial void ProcessDatasetCreateV2EntityProjectDatasetsPostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -222,6 +260,11 @@ partial void ProcessDatasetCreateV2EntityProjectDatasetsPostResponseContent( __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -238,14 +281,15 @@ partial void ProcessDatasetCreateV2EntityProjectDatasetsPostResponseContent( 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -285,6 +329,8 @@ partial void ProcessDatasetCreateV2EntityProjectDatasetsPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -305,6 +351,8 @@ partial void ProcessDatasetCreateV2EntityProjectDatasetsPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -367,9 +415,13 @@ partial void ProcessDatasetCreateV2EntityProjectDatasetsPostResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Weave.DatasetCreateRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.DatasetCreateRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -397,9 +449,13 @@ partial void ProcessDatasetCreateV2EntityProjectDatasetsPostResponseContent( #endif ).ConfigureAwait(false); - return - await global::Weave.DatasetCreateRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.DatasetCreateRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.DatasetsClient.DatasetDeleteV2EntityProjectDatasetsObjectIdDelete.g.cs b/src/libs/Weave/Generated/Weave.DatasetsClient.DatasetDeleteV2EntityProjectDatasetsObjectIdDelete.g.cs index 1c02a3d..fb2e576 100644 --- a/src/libs/Weave/Generated/Weave.DatasetsClient.DatasetDeleteV2EntityProjectDatasetsObjectIdDelete.g.cs +++ b/src/libs/Weave/Generated/Weave.DatasetsClient.DatasetDeleteV2EntityProjectDatasetsObjectIdDelete.g.cs @@ -67,6 +67,38 @@ partial void ProcessDatasetDeleteV2EntityProjectDatasetsObjectIdDeleteResponseCo global::System.Collections.Generic.IList? digests = default, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await DatasetDeleteV2EntityProjectDatasetsObjectIdDeleteAsResponseAsync( + entity: entity, + project: project, + objectId: objectId, + digests: digests, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Dataset Delete
+ /// Delete a dataset object. If digests are provided, only those versions are deleted. Otherwise, all versions are deleted. + ///
+ /// + /// + /// + /// + /// List of digests to delete. If not provided, all digests for the dataset will be deleted. + /// + /// 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> DatasetDeleteV2EntityProjectDatasetsObjectIdDeleteAsResponseAsync( + string entity, + string project, + string objectId, + global::System.Collections.Generic.IList? digests = default, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -99,11 +131,12 @@ partial void ProcessDatasetDeleteV2EntityProjectDatasetsObjectIdDeleteResponseCo global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: $"/v2/{entity}/{project}/datasets/{objectId}", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder - .AddOptionalParameter("digests", digests?.ToString()) + .AddOptionalParameter("digests", digests?.ToString()) ; var __path = __pathBuilder.ToString(); __path = global::Weave.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -178,6 +211,8 @@ partial void ProcessDatasetDeleteV2EntityProjectDatasetsObjectIdDeleteResponseCo attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +223,11 @@ partial void ProcessDatasetDeleteV2EntityProjectDatasetsObjectIdDeleteResponseCo } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +245,8 @@ partial void ProcessDatasetDeleteV2EntityProjectDatasetsObjectIdDeleteResponseCo attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +256,7 @@ partial void ProcessDatasetDeleteV2EntityProjectDatasetsObjectIdDeleteResponseCo __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +265,11 @@ partial void ProcessDatasetDeleteV2EntityProjectDatasetsObjectIdDeleteResponseCo __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +286,15 @@ partial void ProcessDatasetDeleteV2EntityProjectDatasetsObjectIdDeleteResponseCo 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +334,8 @@ partial void ProcessDatasetDeleteV2EntityProjectDatasetsObjectIdDeleteResponseCo attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +356,8 @@ partial void ProcessDatasetDeleteV2EntityProjectDatasetsObjectIdDeleteResponseCo attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -369,9 +420,13 @@ partial void ProcessDatasetDeleteV2EntityProjectDatasetsObjectIdDeleteResponseCo { __response.EnsureSuccessStatusCode(); - return - global::Weave.DatasetDeleteRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.DatasetDeleteRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -399,9 +454,13 @@ partial void ProcessDatasetDeleteV2EntityProjectDatasetsObjectIdDeleteResponseCo #endif ).ConfigureAwait(false); - return - await global::Weave.DatasetDeleteRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.DatasetDeleteRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.DatasetsClient.DatasetListV2EntityProjectDatasetsGet.g.cs b/src/libs/Weave/Generated/Weave.DatasetsClient.DatasetListV2EntityProjectDatasetsGet.g.cs index 790f4fa..bf9067c 100644 --- a/src/libs/Weave/Generated/Weave.DatasetsClient.DatasetListV2EntityProjectDatasetsGet.g.cs +++ b/src/libs/Weave/Generated/Weave.DatasetsClient.DatasetListV2EntityProjectDatasetsGet.g.cs @@ -69,6 +69,40 @@ partial void ProcessDatasetListV2EntityProjectDatasetsGetResponseContent( int? offset = default, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await DatasetListV2EntityProjectDatasetsGetAsResponseAsync( + entity: entity, + project: project, + limit: limit, + offset: offset, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Dataset List
+ /// List dataset objects. + ///
+ /// + /// + /// + /// Maximum number of datasets to return + /// + /// + /// Number of datasets to skip + /// + /// 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> DatasetListV2EntityProjectDatasetsGetAsResponseAsync( + string entity, + string project, + int? limit = default, + int? offset = default, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -101,12 +135,13 @@ partial void ProcessDatasetListV2EntityProjectDatasetsGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: $"/v2/{entity}/{project}/datasets", - 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::Weave.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -181,6 +216,8 @@ partial void ProcessDatasetListV2EntityProjectDatasetsGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -191,6 +228,11 @@ partial void ProcessDatasetListV2EntityProjectDatasetsGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -208,6 +250,8 @@ partial void ProcessDatasetListV2EntityProjectDatasetsGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -217,8 +261,7 @@ partial void ProcessDatasetListV2EntityProjectDatasetsGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -227,6 +270,11 @@ partial void ProcessDatasetListV2EntityProjectDatasetsGetResponseContent( __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -243,14 +291,15 @@ partial void ProcessDatasetListV2EntityProjectDatasetsGetResponseContent( 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -290,6 +339,8 @@ partial void ProcessDatasetListV2EntityProjectDatasetsGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -310,6 +361,8 @@ partial void ProcessDatasetListV2EntityProjectDatasetsGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -372,7 +425,11 @@ partial void ProcessDatasetListV2EntityProjectDatasetsGetResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -400,7 +457,11 @@ partial void ProcessDatasetListV2EntityProjectDatasetsGetResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.DatasetsClient.DatasetReadV2EntityProjectDatasetsObjectIdVersionsDigestGet.g.cs b/src/libs/Weave/Generated/Weave.DatasetsClient.DatasetReadV2EntityProjectDatasetsObjectIdVersionsDigestGet.g.cs index 5bad15d..8092e21 100644 --- a/src/libs/Weave/Generated/Weave.DatasetsClient.DatasetReadV2EntityProjectDatasetsObjectIdVersionsDigestGet.g.cs +++ b/src/libs/Weave/Generated/Weave.DatasetsClient.DatasetReadV2EntityProjectDatasetsObjectIdVersionsDigestGet.g.cs @@ -65,6 +65,36 @@ partial void ProcessDatasetReadV2EntityProjectDatasetsObjectIdVersionsDigestGetR string digest, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await DatasetReadV2EntityProjectDatasetsObjectIdVersionsDigestGetAsResponseAsync( + entity: entity, + project: project, + objectId: objectId, + digest: digest, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Dataset Read
+ /// Get a dataset object. + ///
+ /// + /// + /// + /// + /// 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> DatasetReadV2EntityProjectDatasetsObjectIdVersionsDigestGetAsResponseAsync( + string entity, + string project, + string objectId, + string digest, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -97,6 +127,7 @@ partial void ProcessDatasetReadV2EntityProjectDatasetsObjectIdVersionsDigestGetR global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: $"/v2/{entity}/{project}/datasets/{objectId}/versions/{digest}", baseUri: HttpClient.BaseAddress); @@ -173,6 +204,8 @@ partial void ProcessDatasetReadV2EntityProjectDatasetsObjectIdVersionsDigestGetR attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -183,6 +216,11 @@ partial void ProcessDatasetReadV2EntityProjectDatasetsObjectIdVersionsDigestGetR } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -200,6 +238,8 @@ partial void ProcessDatasetReadV2EntityProjectDatasetsObjectIdVersionsDigestGetR attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -209,8 +249,7 @@ partial void ProcessDatasetReadV2EntityProjectDatasetsObjectIdVersionsDigestGetR __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -219,6 +258,11 @@ partial void ProcessDatasetReadV2EntityProjectDatasetsObjectIdVersionsDigestGetR __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -235,14 +279,15 @@ partial void ProcessDatasetReadV2EntityProjectDatasetsObjectIdVersionsDigestGetR 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -282,6 +327,8 @@ partial void ProcessDatasetReadV2EntityProjectDatasetsObjectIdVersionsDigestGetR attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -302,6 +349,8 @@ partial void ProcessDatasetReadV2EntityProjectDatasetsObjectIdVersionsDigestGetR attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -364,9 +413,13 @@ partial void ProcessDatasetReadV2EntityProjectDatasetsObjectIdVersionsDigestGetR { __response.EnsureSuccessStatusCode(); - return - global::Weave.DatasetReadRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.DatasetReadRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -394,9 +447,13 @@ partial void ProcessDatasetReadV2EntityProjectDatasetsObjectIdVersionsDigestGetR #endif ).ConfigureAwait(false); - return - await global::Weave.DatasetReadRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.DatasetReadRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.DatasetsClient.g.cs b/src/libs/Weave/Generated/Weave.DatasetsClient.g.cs index 9dcef13..a9baf24 100644 --- a/src/libs/Weave/Generated/Weave.DatasetsClient.g.cs +++ b/src/libs/Weave/Generated/Weave.DatasetsClient.g.cs @@ -72,10 +72,10 @@ public DatasetsClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public DatasetsClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Weave.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Weave.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Weave/Generated/Weave.EvalResultsClient.EvalResultsQueryV2EntityProjectEvalResultsQueryPost.g.cs b/src/libs/Weave/Generated/Weave.EvalResultsClient.EvalResultsQueryV2EntityProjectEvalResultsQueryPost.g.cs index 20ec047..d16d507 100644 --- a/src/libs/Weave/Generated/Weave.EvalResultsClient.EvalResultsQueryV2EntityProjectEvalResultsQueryPost.g.cs +++ b/src/libs/Weave/Generated/Weave.EvalResultsClient.EvalResultsQueryV2EntityProjectEvalResultsQueryPost.g.cs @@ -59,6 +59,35 @@ partial void ProcessEvalResultsQueryV2EntityProjectEvalResultsQueryPostResponseC string entity, string project, + global::Weave.EvalResultsQueryBody request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await EvalResultsQueryV2EntityProjectEvalResultsQueryPostAsResponseAsync( + entity: entity, + project: project, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Eval Results Query
+ /// Read grouped evaluation result rows for one or more evaluations. + ///
+ /// + /// + /// + /// 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> EvalResultsQueryV2EntityProjectEvalResultsQueryPostAsResponseAsync( + string entity, + string project, + global::Weave.EvalResultsQueryBody request, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -95,6 +124,7 @@ partial void ProcessEvalResultsQueryV2EntityProjectEvalResultsQueryPostResponseC global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: $"/v2/{entity}/{project}/eval_results/query", baseUri: HttpClient.BaseAddress); @@ -176,6 +206,8 @@ partial void ProcessEvalResultsQueryV2EntityProjectEvalResultsQueryPostResponseC attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -186,6 +218,11 @@ partial void ProcessEvalResultsQueryV2EntityProjectEvalResultsQueryPostResponseC } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -203,6 +240,8 @@ partial void ProcessEvalResultsQueryV2EntityProjectEvalResultsQueryPostResponseC attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -212,8 +251,7 @@ partial void ProcessEvalResultsQueryV2EntityProjectEvalResultsQueryPostResponseC __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -222,6 +260,11 @@ partial void ProcessEvalResultsQueryV2EntityProjectEvalResultsQueryPostResponseC __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -238,14 +281,15 @@ partial void ProcessEvalResultsQueryV2EntityProjectEvalResultsQueryPostResponseC 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -285,6 +329,8 @@ partial void ProcessEvalResultsQueryV2EntityProjectEvalResultsQueryPostResponseC attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -305,6 +351,8 @@ partial void ProcessEvalResultsQueryV2EntityProjectEvalResultsQueryPostResponseC attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -367,9 +415,13 @@ partial void ProcessEvalResultsQueryV2EntityProjectEvalResultsQueryPostResponseC { __response.EnsureSuccessStatusCode(); - return - global::Weave.EvalResultsQueryRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.EvalResultsQueryRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -397,9 +449,13 @@ partial void ProcessEvalResultsQueryV2EntityProjectEvalResultsQueryPostResponseC #endif ).ConfigureAwait(false); - return - await global::Weave.EvalResultsQueryRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.EvalResultsQueryRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.EvalResultsClient.g.cs b/src/libs/Weave/Generated/Weave.EvalResultsClient.g.cs index 01ef304..f75cf9e 100644 --- a/src/libs/Weave/Generated/Weave.EvalResultsClient.g.cs +++ b/src/libs/Weave/Generated/Weave.EvalResultsClient.g.cs @@ -72,10 +72,10 @@ public EvalResultsClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public EvalResultsClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Weave.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Weave.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Weave/Generated/Weave.EvaluationRunsClient.EvaluationRunCreateV2EntityProjectEvaluationRunsPost.g.cs b/src/libs/Weave/Generated/Weave.EvaluationRunsClient.EvaluationRunCreateV2EntityProjectEvaluationRunsPost.g.cs index 913f20c..6a510ae 100644 --- a/src/libs/Weave/Generated/Weave.EvaluationRunsClient.EvaluationRunCreateV2EntityProjectEvaluationRunsPost.g.cs +++ b/src/libs/Weave/Generated/Weave.EvaluationRunsClient.EvaluationRunCreateV2EntityProjectEvaluationRunsPost.g.cs @@ -59,6 +59,35 @@ partial void ProcessEvaluationRunCreateV2EntityProjectEvaluationRunsPostResponse string entity, string project, + global::Weave.EvaluationRunCreateBody request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await EvaluationRunCreateV2EntityProjectEvaluationRunsPostAsResponseAsync( + entity: entity, + project: project, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Evaluation Run Create
+ /// Create an evaluation run. + ///
+ /// + /// + /// + /// 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> EvaluationRunCreateV2EntityProjectEvaluationRunsPostAsResponseAsync( + string entity, + string project, + global::Weave.EvaluationRunCreateBody request, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -95,6 +124,7 @@ partial void ProcessEvaluationRunCreateV2EntityProjectEvaluationRunsPostResponse global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: $"/v2/{entity}/{project}/evaluation_runs", baseUri: HttpClient.BaseAddress); @@ -176,6 +206,8 @@ partial void ProcessEvaluationRunCreateV2EntityProjectEvaluationRunsPostResponse attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -186,6 +218,11 @@ partial void ProcessEvaluationRunCreateV2EntityProjectEvaluationRunsPostResponse } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -203,6 +240,8 @@ partial void ProcessEvaluationRunCreateV2EntityProjectEvaluationRunsPostResponse attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -212,8 +251,7 @@ partial void ProcessEvaluationRunCreateV2EntityProjectEvaluationRunsPostResponse __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -222,6 +260,11 @@ partial void ProcessEvaluationRunCreateV2EntityProjectEvaluationRunsPostResponse __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -238,14 +281,15 @@ partial void ProcessEvaluationRunCreateV2EntityProjectEvaluationRunsPostResponse 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -285,6 +329,8 @@ partial void ProcessEvaluationRunCreateV2EntityProjectEvaluationRunsPostResponse attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -305,6 +351,8 @@ partial void ProcessEvaluationRunCreateV2EntityProjectEvaluationRunsPostResponse attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -367,9 +415,13 @@ partial void ProcessEvaluationRunCreateV2EntityProjectEvaluationRunsPostResponse { __response.EnsureSuccessStatusCode(); - return - global::Weave.EvaluationRunCreateRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.EvaluationRunCreateRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -397,9 +449,13 @@ partial void ProcessEvaluationRunCreateV2EntityProjectEvaluationRunsPostResponse #endif ).ConfigureAwait(false); - return - await global::Weave.EvaluationRunCreateRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.EvaluationRunCreateRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.EvaluationRunsClient.EvaluationRunDeleteV2EntityProjectEvaluationRunsDelete.g.cs b/src/libs/Weave/Generated/Weave.EvaluationRunsClient.EvaluationRunDeleteV2EntityProjectEvaluationRunsDelete.g.cs index 5b15829..2912a6a 100644 --- a/src/libs/Weave/Generated/Weave.EvaluationRunsClient.EvaluationRunDeleteV2EntityProjectEvaluationRunsDelete.g.cs +++ b/src/libs/Weave/Generated/Weave.EvaluationRunsClient.EvaluationRunDeleteV2EntityProjectEvaluationRunsDelete.g.cs @@ -63,6 +63,35 @@ partial void ProcessEvaluationRunDeleteV2EntityProjectEvaluationRunsDeleteRespon global::System.Collections.Generic.IList evaluationRunIds, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await EvaluationRunDeleteV2EntityProjectEvaluationRunsDeleteAsResponseAsync( + entity: entity, + project: project, + evaluationRunIds: evaluationRunIds, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Evaluation Run Delete
+ /// Delete evaluation runs. + ///
+ /// + /// + /// + /// List of evaluation run IDs to delete + /// + /// 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> EvaluationRunDeleteV2EntityProjectEvaluationRunsDeleteAsResponseAsync( + string entity, + string project, + global::System.Collections.Generic.IList evaluationRunIds, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -94,11 +123,12 @@ partial void ProcessEvaluationRunDeleteV2EntityProjectEvaluationRunsDeleteRespon global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: $"/v2/{entity}/{project}/evaluation_runs", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder - .AddRequiredParameter("evaluation_run_ids", evaluationRunIds, delimiter: ",", explode: true) + .AddRequiredParameter("evaluation_run_ids", evaluationRunIds, delimiter: ",", explode: true) ; var __path = __pathBuilder.ToString(); __path = global::Weave.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -172,6 +202,8 @@ partial void ProcessEvaluationRunDeleteV2EntityProjectEvaluationRunsDeleteRespon attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -182,6 +214,11 @@ partial void ProcessEvaluationRunDeleteV2EntityProjectEvaluationRunsDeleteRespon } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -199,6 +236,8 @@ partial void ProcessEvaluationRunDeleteV2EntityProjectEvaluationRunsDeleteRespon attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -208,8 +247,7 @@ partial void ProcessEvaluationRunDeleteV2EntityProjectEvaluationRunsDeleteRespon __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -218,6 +256,11 @@ partial void ProcessEvaluationRunDeleteV2EntityProjectEvaluationRunsDeleteRespon __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -234,14 +277,15 @@ partial void ProcessEvaluationRunDeleteV2EntityProjectEvaluationRunsDeleteRespon 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -281,6 +325,8 @@ partial void ProcessEvaluationRunDeleteV2EntityProjectEvaluationRunsDeleteRespon attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -301,6 +347,8 @@ partial void ProcessEvaluationRunDeleteV2EntityProjectEvaluationRunsDeleteRespon attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -363,9 +411,13 @@ partial void ProcessEvaluationRunDeleteV2EntityProjectEvaluationRunsDeleteRespon { __response.EnsureSuccessStatusCode(); - return - global::Weave.EvaluationRunDeleteRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.EvaluationRunDeleteRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -393,9 +445,13 @@ partial void ProcessEvaluationRunDeleteV2EntityProjectEvaluationRunsDeleteRespon #endif ).ConfigureAwait(false); - return - await global::Weave.EvaluationRunDeleteRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.EvaluationRunDeleteRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.EvaluationRunsClient.EvaluationRunFinishV2EntityProjectEvaluationRunsEvaluationRunIdFinishPost.g.cs b/src/libs/Weave/Generated/Weave.EvaluationRunsClient.EvaluationRunFinishV2EntityProjectEvaluationRunsEvaluationRunIdFinishPost.g.cs index 1a5cf13..5a816c8 100644 --- a/src/libs/Weave/Generated/Weave.EvaluationRunsClient.EvaluationRunFinishV2EntityProjectEvaluationRunsEvaluationRunIdFinishPost.g.cs +++ b/src/libs/Weave/Generated/Weave.EvaluationRunsClient.EvaluationRunFinishV2EntityProjectEvaluationRunsEvaluationRunIdFinishPost.g.cs @@ -63,6 +63,38 @@ partial void ProcessEvaluationRunFinishV2EntityProjectEvaluationRunsEvaluationRu string project, string evaluationRunId, + global::Weave.EvaluationRunFinishBody request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await EvaluationRunFinishV2EntityProjectEvaluationRunsEvaluationRunIdFinishPostAsResponseAsync( + entity: entity, + project: project, + evaluationRunId: evaluationRunId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Evaluation Run Finish
+ /// Finish an evaluation run. + ///
+ /// + /// + /// + /// + /// 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> EvaluationRunFinishV2EntityProjectEvaluationRunsEvaluationRunIdFinishPostAsResponseAsync( + string entity, + string project, + string evaluationRunId, + global::Weave.EvaluationRunFinishBody request, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -100,6 +132,7 @@ partial void ProcessEvaluationRunFinishV2EntityProjectEvaluationRunsEvaluationRu global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: $"/v2/{entity}/{project}/evaluation_runs/{evaluationRunId}/finish", baseUri: HttpClient.BaseAddress); @@ -182,6 +215,8 @@ partial void ProcessEvaluationRunFinishV2EntityProjectEvaluationRunsEvaluationRu attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -192,6 +227,11 @@ partial void ProcessEvaluationRunFinishV2EntityProjectEvaluationRunsEvaluationRu } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -209,6 +249,8 @@ partial void ProcessEvaluationRunFinishV2EntityProjectEvaluationRunsEvaluationRu attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -218,8 +260,7 @@ partial void ProcessEvaluationRunFinishV2EntityProjectEvaluationRunsEvaluationRu __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -228,6 +269,11 @@ partial void ProcessEvaluationRunFinishV2EntityProjectEvaluationRunsEvaluationRu __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -244,14 +290,15 @@ partial void ProcessEvaluationRunFinishV2EntityProjectEvaluationRunsEvaluationRu 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -291,6 +338,8 @@ partial void ProcessEvaluationRunFinishV2EntityProjectEvaluationRunsEvaluationRu attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -311,6 +360,8 @@ partial void ProcessEvaluationRunFinishV2EntityProjectEvaluationRunsEvaluationRu attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -373,9 +424,13 @@ partial void ProcessEvaluationRunFinishV2EntityProjectEvaluationRunsEvaluationRu { __response.EnsureSuccessStatusCode(); - return - global::Weave.EvaluationRunFinishRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.EvaluationRunFinishRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -403,9 +458,13 @@ partial void ProcessEvaluationRunFinishV2EntityProjectEvaluationRunsEvaluationRu #endif ).ConfigureAwait(false); - return - await global::Weave.EvaluationRunFinishRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.EvaluationRunFinishRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.EvaluationRunsClient.EvaluationRunListV2EntityProjectEvaluationRunsGet.g.cs b/src/libs/Weave/Generated/Weave.EvaluationRunsClient.EvaluationRunListV2EntityProjectEvaluationRunsGet.g.cs index 32aa003..399ef9c 100644 --- a/src/libs/Weave/Generated/Weave.EvaluationRunsClient.EvaluationRunListV2EntityProjectEvaluationRunsGet.g.cs +++ b/src/libs/Weave/Generated/Weave.EvaluationRunsClient.EvaluationRunListV2EntityProjectEvaluationRunsGet.g.cs @@ -117,15 +117,16 @@ partial void ProcessEvaluationRunListV2EntityProjectEvaluationRunsGetResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: $"/v2/{entity}/{project}/evaluation_runs", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("evaluations", evaluations?.ToString()) .AddOptionalParameter("models", models?.ToString()) .AddOptionalParameter("evaluation_run_ids", evaluationRunIds?.ToString()) .AddOptionalParameter("limit", limit?.ToString()) - .AddOptionalParameter("offset", offset?.ToString()) + .AddOptionalParameter("offset", offset?.ToString()) ; var __path = __pathBuilder.ToString(); __path = global::Weave.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -203,6 +204,8 @@ partial void ProcessEvaluationRunListV2EntityProjectEvaluationRunsGetResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -213,6 +216,11 @@ partial void ProcessEvaluationRunListV2EntityProjectEvaluationRunsGetResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -230,6 +238,8 @@ partial void ProcessEvaluationRunListV2EntityProjectEvaluationRunsGetResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -239,8 +249,7 @@ partial void ProcessEvaluationRunListV2EntityProjectEvaluationRunsGetResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -249,6 +258,11 @@ partial void ProcessEvaluationRunListV2EntityProjectEvaluationRunsGetResponse( __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -265,14 +279,15 @@ partial void ProcessEvaluationRunListV2EntityProjectEvaluationRunsGetResponse( 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -312,6 +327,8 @@ partial void ProcessEvaluationRunListV2EntityProjectEvaluationRunsGetResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -332,6 +349,8 @@ partial void ProcessEvaluationRunListV2EntityProjectEvaluationRunsGetResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } diff --git a/src/libs/Weave/Generated/Weave.EvaluationRunsClient.EvaluationRunReadV2EntityProjectEvaluationRunsEvaluationRunIdGet.g.cs b/src/libs/Weave/Generated/Weave.EvaluationRunsClient.EvaluationRunReadV2EntityProjectEvaluationRunsEvaluationRunIdGet.g.cs index 8d710c1..a81f59e 100644 --- a/src/libs/Weave/Generated/Weave.EvaluationRunsClient.EvaluationRunReadV2EntityProjectEvaluationRunsEvaluationRunIdGet.g.cs +++ b/src/libs/Weave/Generated/Weave.EvaluationRunsClient.EvaluationRunReadV2EntityProjectEvaluationRunsEvaluationRunIdGet.g.cs @@ -61,6 +61,33 @@ partial void ProcessEvaluationRunReadV2EntityProjectEvaluationRunsEvaluationRunI string evaluationRunId, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await EvaluationRunReadV2EntityProjectEvaluationRunsEvaluationRunIdGetAsResponseAsync( + entity: entity, + project: project, + evaluationRunId: evaluationRunId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Evaluation Run Read
+ /// Read an evaluation run. + ///
+ /// + /// + /// + /// 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> EvaluationRunReadV2EntityProjectEvaluationRunsEvaluationRunIdGetAsResponseAsync( + string entity, + string project, + string evaluationRunId, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -92,6 +119,7 @@ partial void ProcessEvaluationRunReadV2EntityProjectEvaluationRunsEvaluationRunI global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: $"/v2/{entity}/{project}/evaluation_runs/{evaluationRunId}", baseUri: HttpClient.BaseAddress); @@ -167,6 +195,8 @@ partial void ProcessEvaluationRunReadV2EntityProjectEvaluationRunsEvaluationRunI attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -177,6 +207,11 @@ partial void ProcessEvaluationRunReadV2EntityProjectEvaluationRunsEvaluationRunI } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -194,6 +229,8 @@ partial void ProcessEvaluationRunReadV2EntityProjectEvaluationRunsEvaluationRunI attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -203,8 +240,7 @@ partial void ProcessEvaluationRunReadV2EntityProjectEvaluationRunsEvaluationRunI __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -213,6 +249,11 @@ partial void ProcessEvaluationRunReadV2EntityProjectEvaluationRunsEvaluationRunI __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -229,14 +270,15 @@ partial void ProcessEvaluationRunReadV2EntityProjectEvaluationRunsEvaluationRunI 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -276,6 +318,8 @@ partial void ProcessEvaluationRunReadV2EntityProjectEvaluationRunsEvaluationRunI attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -296,6 +340,8 @@ partial void ProcessEvaluationRunReadV2EntityProjectEvaluationRunsEvaluationRunI attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -358,9 +404,13 @@ partial void ProcessEvaluationRunReadV2EntityProjectEvaluationRunsEvaluationRunI { __response.EnsureSuccessStatusCode(); - return - global::Weave.EvaluationRunReadRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.EvaluationRunReadRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -388,9 +438,13 @@ partial void ProcessEvaluationRunReadV2EntityProjectEvaluationRunsEvaluationRunI #endif ).ConfigureAwait(false); - return - await global::Weave.EvaluationRunReadRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.EvaluationRunReadRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.EvaluationRunsClient.g.cs b/src/libs/Weave/Generated/Weave.EvaluationRunsClient.g.cs index 1f1c8ec..c1b2d4d 100644 --- a/src/libs/Weave/Generated/Weave.EvaluationRunsClient.g.cs +++ b/src/libs/Weave/Generated/Weave.EvaluationRunsClient.g.cs @@ -72,10 +72,10 @@ public EvaluationRunsClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public EvaluationRunsClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Weave.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Weave.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Weave/Generated/Weave.EvaluationsClient.EvaluateModelEvaluationsEvaluateModelPost.g.cs b/src/libs/Weave/Generated/Weave.EvaluationsClient.EvaluateModelEvaluationsEvaluateModelPost.g.cs index 5ed2978..899c30c 100644 --- a/src/libs/Weave/Generated/Weave.EvaluationsClient.EvaluateModelEvaluationsEvaluateModelPost.g.cs +++ b/src/libs/Weave/Generated/Weave.EvaluationsClient.EvaluateModelEvaluationsEvaluateModelPost.g.cs @@ -50,6 +50,28 @@ partial void ProcessEvaluateModelEvaluationsEvaluateModelPostResponseContent( /// public async global::System.Threading.Tasks.Task EvaluateModelEvaluationsEvaluateModelPostAsync( + global::Weave.EvaluateModelReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await EvaluateModelEvaluationsEvaluateModelPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Evaluate 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> EvaluateModelEvaluationsEvaluateModelPostAsResponseAsync( + global::Weave.EvaluateModelReq request, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessEvaluateModelEvaluationsEvaluateModelPostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: "/evaluations/evaluate_model", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessEvaluateModelEvaluationsEvaluateModelPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessEvaluateModelEvaluationsEvaluateModelPostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessEvaluateModelEvaluationsEvaluateModelPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessEvaluateModelEvaluationsEvaluateModelPostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessEvaluateModelEvaluationsEvaluateModelPostResponseContent( __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessEvaluateModelEvaluationsEvaluateModelPostResponseContent( 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessEvaluateModelEvaluationsEvaluateModelPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessEvaluateModelEvaluationsEvaluateModelPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -354,9 +395,13 @@ partial void ProcessEvaluateModelEvaluationsEvaluateModelPostResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Weave.EvaluateModelRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.EvaluateModelRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -384,9 +429,13 @@ partial void ProcessEvaluateModelEvaluationsEvaluateModelPostResponseContent( #endif ).ConfigureAwait(false); - return - await global::Weave.EvaluateModelRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.EvaluateModelRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.EvaluationsClient.EvaluationCreateV2EntityProjectEvaluationsPost.g.cs b/src/libs/Weave/Generated/Weave.EvaluationsClient.EvaluationCreateV2EntityProjectEvaluationsPost.g.cs index c04bef2..68acb24 100644 --- a/src/libs/Weave/Generated/Weave.EvaluationsClient.EvaluationCreateV2EntityProjectEvaluationsPost.g.cs +++ b/src/libs/Weave/Generated/Weave.EvaluationsClient.EvaluationCreateV2EntityProjectEvaluationsPost.g.cs @@ -59,6 +59,35 @@ partial void ProcessEvaluationCreateV2EntityProjectEvaluationsPostResponseConten string entity, string project, + global::Weave.EvaluationCreateBody request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await EvaluationCreateV2EntityProjectEvaluationsPostAsResponseAsync( + entity: entity, + project: project, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Evaluation Create
+ /// Create an evaluation object. + ///
+ /// + /// + /// + /// 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> EvaluationCreateV2EntityProjectEvaluationsPostAsResponseAsync( + string entity, + string project, + global::Weave.EvaluationCreateBody request, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -95,6 +124,7 @@ partial void ProcessEvaluationCreateV2EntityProjectEvaluationsPostResponseConten global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: $"/v2/{entity}/{project}/evaluations", baseUri: HttpClient.BaseAddress); @@ -176,6 +206,8 @@ partial void ProcessEvaluationCreateV2EntityProjectEvaluationsPostResponseConten attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -186,6 +218,11 @@ partial void ProcessEvaluationCreateV2EntityProjectEvaluationsPostResponseConten } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -203,6 +240,8 @@ partial void ProcessEvaluationCreateV2EntityProjectEvaluationsPostResponseConten attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -212,8 +251,7 @@ partial void ProcessEvaluationCreateV2EntityProjectEvaluationsPostResponseConten __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -222,6 +260,11 @@ partial void ProcessEvaluationCreateV2EntityProjectEvaluationsPostResponseConten __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -238,14 +281,15 @@ partial void ProcessEvaluationCreateV2EntityProjectEvaluationsPostResponseConten 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -285,6 +329,8 @@ partial void ProcessEvaluationCreateV2EntityProjectEvaluationsPostResponseConten attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -305,6 +351,8 @@ partial void ProcessEvaluationCreateV2EntityProjectEvaluationsPostResponseConten attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -367,9 +415,13 @@ partial void ProcessEvaluationCreateV2EntityProjectEvaluationsPostResponseConten { __response.EnsureSuccessStatusCode(); - return - global::Weave.EvaluationCreateRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.EvaluationCreateRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -397,9 +449,13 @@ partial void ProcessEvaluationCreateV2EntityProjectEvaluationsPostResponseConten #endif ).ConfigureAwait(false); - return - await global::Weave.EvaluationCreateRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.EvaluationCreateRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.EvaluationsClient.EvaluationDeleteV2EntityProjectEvaluationsObjectIdDelete.g.cs b/src/libs/Weave/Generated/Weave.EvaluationsClient.EvaluationDeleteV2EntityProjectEvaluationsObjectIdDelete.g.cs index 0023558..fac7c06 100644 --- a/src/libs/Weave/Generated/Weave.EvaluationsClient.EvaluationDeleteV2EntityProjectEvaluationsObjectIdDelete.g.cs +++ b/src/libs/Weave/Generated/Weave.EvaluationsClient.EvaluationDeleteV2EntityProjectEvaluationsObjectIdDelete.g.cs @@ -67,6 +67,38 @@ partial void ProcessEvaluationDeleteV2EntityProjectEvaluationsObjectIdDeleteResp global::System.Collections.Generic.IList? digests = default, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await EvaluationDeleteV2EntityProjectEvaluationsObjectIdDeleteAsResponseAsync( + entity: entity, + project: project, + objectId: objectId, + digests: digests, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Evaluation Delete
+ /// Delete an evaluation object. + ///
+ /// + /// + /// + /// + /// List of digests to delete. If not provided, all digests for the evaluation will be deleted. + /// + /// 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> EvaluationDeleteV2EntityProjectEvaluationsObjectIdDeleteAsResponseAsync( + string entity, + string project, + string objectId, + global::System.Collections.Generic.IList? digests = default, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -99,11 +131,12 @@ partial void ProcessEvaluationDeleteV2EntityProjectEvaluationsObjectIdDeleteResp global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: $"/v2/{entity}/{project}/evaluations/{objectId}", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder - .AddOptionalParameter("digests", digests?.ToString()) + .AddOptionalParameter("digests", digests?.ToString()) ; var __path = __pathBuilder.ToString(); __path = global::Weave.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -178,6 +211,8 @@ partial void ProcessEvaluationDeleteV2EntityProjectEvaluationsObjectIdDeleteResp attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +223,11 @@ partial void ProcessEvaluationDeleteV2EntityProjectEvaluationsObjectIdDeleteResp } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +245,8 @@ partial void ProcessEvaluationDeleteV2EntityProjectEvaluationsObjectIdDeleteResp attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +256,7 @@ partial void ProcessEvaluationDeleteV2EntityProjectEvaluationsObjectIdDeleteResp __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +265,11 @@ partial void ProcessEvaluationDeleteV2EntityProjectEvaluationsObjectIdDeleteResp __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +286,15 @@ partial void ProcessEvaluationDeleteV2EntityProjectEvaluationsObjectIdDeleteResp 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +334,8 @@ partial void ProcessEvaluationDeleteV2EntityProjectEvaluationsObjectIdDeleteResp attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +356,8 @@ partial void ProcessEvaluationDeleteV2EntityProjectEvaluationsObjectIdDeleteResp attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -369,9 +420,13 @@ partial void ProcessEvaluationDeleteV2EntityProjectEvaluationsObjectIdDeleteResp { __response.EnsureSuccessStatusCode(); - return - global::Weave.EvaluationDeleteRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.EvaluationDeleteRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -399,9 +454,13 @@ partial void ProcessEvaluationDeleteV2EntityProjectEvaluationsObjectIdDeleteResp #endif ).ConfigureAwait(false); - return - await global::Weave.EvaluationDeleteRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.EvaluationDeleteRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.EvaluationsClient.EvaluationListV2EntityProjectEvaluationsGet.g.cs b/src/libs/Weave/Generated/Weave.EvaluationsClient.EvaluationListV2EntityProjectEvaluationsGet.g.cs index e378b39..e7d159b 100644 --- a/src/libs/Weave/Generated/Weave.EvaluationsClient.EvaluationListV2EntityProjectEvaluationsGet.g.cs +++ b/src/libs/Weave/Generated/Weave.EvaluationsClient.EvaluationListV2EntityProjectEvaluationsGet.g.cs @@ -57,6 +57,30 @@ partial void ProcessEvaluationListV2EntityProjectEvaluationsGetResponseContent( string project, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await EvaluationListV2EntityProjectEvaluationsGetAsResponseAsync( + entity: entity, + project: project, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Evaluation List
+ /// List evaluation objects. + ///
+ /// + /// + /// 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> EvaluationListV2EntityProjectEvaluationsGetAsResponseAsync( + string entity, + string project, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -87,6 +111,7 @@ partial void ProcessEvaluationListV2EntityProjectEvaluationsGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: $"/v2/{entity}/{project}/evaluations", baseUri: HttpClient.BaseAddress); @@ -161,6 +186,8 @@ partial void ProcessEvaluationListV2EntityProjectEvaluationsGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -171,6 +198,11 @@ partial void ProcessEvaluationListV2EntityProjectEvaluationsGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -188,6 +220,8 @@ partial void ProcessEvaluationListV2EntityProjectEvaluationsGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -197,8 +231,7 @@ partial void ProcessEvaluationListV2EntityProjectEvaluationsGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -207,6 +240,11 @@ partial void ProcessEvaluationListV2EntityProjectEvaluationsGetResponseContent( __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -223,14 +261,15 @@ partial void ProcessEvaluationListV2EntityProjectEvaluationsGetResponseContent( 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -270,6 +309,8 @@ partial void ProcessEvaluationListV2EntityProjectEvaluationsGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -290,6 +331,8 @@ partial void ProcessEvaluationListV2EntityProjectEvaluationsGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -352,7 +395,11 @@ partial void ProcessEvaluationListV2EntityProjectEvaluationsGetResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -380,7 +427,11 @@ partial void ProcessEvaluationListV2EntityProjectEvaluationsGetResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.EvaluationsClient.EvaluationReadV2EntityProjectEvaluationsObjectIdVersionsDigestGet.g.cs b/src/libs/Weave/Generated/Weave.EvaluationsClient.EvaluationReadV2EntityProjectEvaluationsObjectIdVersionsDigestGet.g.cs index ee4ad48..610fd98 100644 --- a/src/libs/Weave/Generated/Weave.EvaluationsClient.EvaluationReadV2EntityProjectEvaluationsObjectIdVersionsDigestGet.g.cs +++ b/src/libs/Weave/Generated/Weave.EvaluationsClient.EvaluationReadV2EntityProjectEvaluationsObjectIdVersionsDigestGet.g.cs @@ -65,6 +65,36 @@ partial void ProcessEvaluationReadV2EntityProjectEvaluationsObjectIdVersionsDige string digest, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await EvaluationReadV2EntityProjectEvaluationsObjectIdVersionsDigestGetAsResponseAsync( + entity: entity, + project: project, + objectId: objectId, + digest: digest, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Evaluation Read
+ /// Get an evaluation object. + ///
+ /// + /// + /// + /// + /// 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> EvaluationReadV2EntityProjectEvaluationsObjectIdVersionsDigestGetAsResponseAsync( + string entity, + string project, + string objectId, + string digest, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -97,6 +127,7 @@ partial void ProcessEvaluationReadV2EntityProjectEvaluationsObjectIdVersionsDige global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: $"/v2/{entity}/{project}/evaluations/{objectId}/versions/{digest}", baseUri: HttpClient.BaseAddress); @@ -173,6 +204,8 @@ partial void ProcessEvaluationReadV2EntityProjectEvaluationsObjectIdVersionsDige attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -183,6 +216,11 @@ partial void ProcessEvaluationReadV2EntityProjectEvaluationsObjectIdVersionsDige } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -200,6 +238,8 @@ partial void ProcessEvaluationReadV2EntityProjectEvaluationsObjectIdVersionsDige attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -209,8 +249,7 @@ partial void ProcessEvaluationReadV2EntityProjectEvaluationsObjectIdVersionsDige __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -219,6 +258,11 @@ partial void ProcessEvaluationReadV2EntityProjectEvaluationsObjectIdVersionsDige __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -235,14 +279,15 @@ partial void ProcessEvaluationReadV2EntityProjectEvaluationsObjectIdVersionsDige 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -282,6 +327,8 @@ partial void ProcessEvaluationReadV2EntityProjectEvaluationsObjectIdVersionsDige attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -302,6 +349,8 @@ partial void ProcessEvaluationReadV2EntityProjectEvaluationsObjectIdVersionsDige attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -364,9 +413,13 @@ partial void ProcessEvaluationReadV2EntityProjectEvaluationsObjectIdVersionsDige { __response.EnsureSuccessStatusCode(); - return - global::Weave.EvaluationReadRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.EvaluationReadRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -394,9 +447,13 @@ partial void ProcessEvaluationReadV2EntityProjectEvaluationsObjectIdVersionsDige #endif ).ConfigureAwait(false); - return - await global::Weave.EvaluationReadRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.EvaluationReadRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.EvaluationsClient.EvaluationStatusEvaluationsStatusPost.g.cs b/src/libs/Weave/Generated/Weave.EvaluationsClient.EvaluationStatusEvaluationsStatusPost.g.cs index 019c27c..f7607ae 100644 --- a/src/libs/Weave/Generated/Weave.EvaluationsClient.EvaluationStatusEvaluationsStatusPost.g.cs +++ b/src/libs/Weave/Generated/Weave.EvaluationsClient.EvaluationStatusEvaluationsStatusPost.g.cs @@ -50,6 +50,28 @@ partial void ProcessEvaluationStatusEvaluationsStatusPostResponseContent( /// public async global::System.Threading.Tasks.Task EvaluationStatusEvaluationsStatusPostAsync( + global::Weave.EvaluationStatusReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await EvaluationStatusEvaluationsStatusPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Evaluation 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> EvaluationStatusEvaluationsStatusPostAsResponseAsync( + global::Weave.EvaluationStatusReq request, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessEvaluationStatusEvaluationsStatusPostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: "/evaluations/status", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessEvaluationStatusEvaluationsStatusPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessEvaluationStatusEvaluationsStatusPostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessEvaluationStatusEvaluationsStatusPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessEvaluationStatusEvaluationsStatusPostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessEvaluationStatusEvaluationsStatusPostResponseContent( __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessEvaluationStatusEvaluationsStatusPostResponseContent( 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessEvaluationStatusEvaluationsStatusPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessEvaluationStatusEvaluationsStatusPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -354,9 +395,13 @@ partial void ProcessEvaluationStatusEvaluationsStatusPostResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Weave.EvaluationStatusRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.EvaluationStatusRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -384,9 +429,13 @@ partial void ProcessEvaluationStatusEvaluationsStatusPostResponseContent( #endif ).ConfigureAwait(false); - return - await global::Weave.EvaluationStatusRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.EvaluationStatusRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.EvaluationsClient.g.cs b/src/libs/Weave/Generated/Weave.EvaluationsClient.g.cs index 987ad53..6b5f346 100644 --- a/src/libs/Weave/Generated/Weave.EvaluationsClient.g.cs +++ b/src/libs/Weave/Generated/Weave.EvaluationsClient.g.cs @@ -72,10 +72,10 @@ public EvaluationsClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public EvaluationsClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Weave.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Weave.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Weave/Generated/Weave.FeedbackClient.FeedbackCreateBatchFeedbackBatchCreatePost.g.cs b/src/libs/Weave/Generated/Weave.FeedbackClient.FeedbackCreateBatchFeedbackBatchCreatePost.g.cs index d760c83..528ac70 100644 --- a/src/libs/Weave/Generated/Weave.FeedbackClient.FeedbackCreateBatchFeedbackBatchCreatePost.g.cs +++ b/src/libs/Weave/Generated/Weave.FeedbackClient.FeedbackCreateBatchFeedbackBatchCreatePost.g.cs @@ -51,6 +51,29 @@ partial void ProcessFeedbackCreateBatchFeedbackBatchCreatePostResponseContent( /// public async global::System.Threading.Tasks.Task FeedbackCreateBatchFeedbackBatchCreatePostAsync( + global::Weave.FeedbackCreateBatchReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await FeedbackCreateBatchFeedbackBatchCreatePostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Feedback Create Batch
+ /// Add multiple feedback items to calls or objects. + ///
+ /// + /// 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> FeedbackCreateBatchFeedbackBatchCreatePostAsResponseAsync( + global::Weave.FeedbackCreateBatchReq request, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -85,6 +108,7 @@ partial void ProcessFeedbackCreateBatchFeedbackBatchCreatePostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: "/feedback/batch/create", baseUri: HttpClient.BaseAddress); @@ -164,6 +188,8 @@ partial void ProcessFeedbackCreateBatchFeedbackBatchCreatePostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -174,6 +200,11 @@ partial void ProcessFeedbackCreateBatchFeedbackBatchCreatePostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -191,6 +222,8 @@ partial void ProcessFeedbackCreateBatchFeedbackBatchCreatePostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -200,8 +233,7 @@ partial void ProcessFeedbackCreateBatchFeedbackBatchCreatePostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -210,6 +242,11 @@ partial void ProcessFeedbackCreateBatchFeedbackBatchCreatePostResponseContent( __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -226,14 +263,15 @@ partial void ProcessFeedbackCreateBatchFeedbackBatchCreatePostResponseContent( 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -273,6 +311,8 @@ partial void ProcessFeedbackCreateBatchFeedbackBatchCreatePostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -293,6 +333,8 @@ partial void ProcessFeedbackCreateBatchFeedbackBatchCreatePostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -355,9 +397,13 @@ partial void ProcessFeedbackCreateBatchFeedbackBatchCreatePostResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Weave.FeedbackCreateBatchRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.FeedbackCreateBatchRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -385,9 +431,13 @@ partial void ProcessFeedbackCreateBatchFeedbackBatchCreatePostResponseContent( #endif ).ConfigureAwait(false); - return - await global::Weave.FeedbackCreateBatchRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.FeedbackCreateBatchRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.FeedbackClient.FeedbackCreateFeedbackCreatePost.g.cs b/src/libs/Weave/Generated/Weave.FeedbackClient.FeedbackCreateFeedbackCreatePost.g.cs index 5e2dcc1..2f849d5 100644 --- a/src/libs/Weave/Generated/Weave.FeedbackClient.FeedbackCreateFeedbackCreatePost.g.cs +++ b/src/libs/Weave/Generated/Weave.FeedbackClient.FeedbackCreateFeedbackCreatePost.g.cs @@ -51,6 +51,29 @@ partial void ProcessFeedbackCreateFeedbackCreatePostResponseContent( /// public async global::System.Threading.Tasks.Task FeedbackCreateFeedbackCreatePostAsync( + global::Weave.FeedbackCreateReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await FeedbackCreateFeedbackCreatePostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Feedback Create
+ /// Add feedback to a call or object. + ///
+ /// + /// 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> FeedbackCreateFeedbackCreatePostAsResponseAsync( + global::Weave.FeedbackCreateReq request, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -85,6 +108,7 @@ partial void ProcessFeedbackCreateFeedbackCreatePostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: "/feedback/create", baseUri: HttpClient.BaseAddress); @@ -164,6 +188,8 @@ partial void ProcessFeedbackCreateFeedbackCreatePostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -174,6 +200,11 @@ partial void ProcessFeedbackCreateFeedbackCreatePostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -191,6 +222,8 @@ partial void ProcessFeedbackCreateFeedbackCreatePostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -200,8 +233,7 @@ partial void ProcessFeedbackCreateFeedbackCreatePostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -210,6 +242,11 @@ partial void ProcessFeedbackCreateFeedbackCreatePostResponseContent( __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -226,14 +263,15 @@ partial void ProcessFeedbackCreateFeedbackCreatePostResponseContent( 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -273,6 +311,8 @@ partial void ProcessFeedbackCreateFeedbackCreatePostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -293,6 +333,8 @@ partial void ProcessFeedbackCreateFeedbackCreatePostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -355,9 +397,13 @@ partial void ProcessFeedbackCreateFeedbackCreatePostResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Weave.FeedbackCreateRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.FeedbackCreateRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -385,9 +431,13 @@ partial void ProcessFeedbackCreateFeedbackCreatePostResponseContent( #endif ).ConfigureAwait(false); - return - await global::Weave.FeedbackCreateRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.FeedbackCreateRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.FeedbackClient.FeedbackPayloadSchemaFeedbackPayloadSchemaPost.g.cs b/src/libs/Weave/Generated/Weave.FeedbackClient.FeedbackPayloadSchemaFeedbackPayloadSchemaPost.g.cs index 1337e39..8a22f93 100644 --- a/src/libs/Weave/Generated/Weave.FeedbackClient.FeedbackPayloadSchemaFeedbackPayloadSchemaPost.g.cs +++ b/src/libs/Weave/Generated/Weave.FeedbackClient.FeedbackPayloadSchemaFeedbackPayloadSchemaPost.g.cs @@ -51,6 +51,29 @@ partial void ProcessFeedbackPayloadSchemaFeedbackPayloadSchemaPostResponseConten /// public async global::System.Threading.Tasks.Task FeedbackPayloadSchemaFeedbackPayloadSchemaPostAsync( + global::Weave.FeedbackPayloadSchemaReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await FeedbackPayloadSchemaFeedbackPayloadSchemaPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Feedback Payload Schema
+ /// Discover feedback payload schema (paths and types) from sample rows. + ///
+ /// + /// 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> FeedbackPayloadSchemaFeedbackPayloadSchemaPostAsResponseAsync( + global::Weave.FeedbackPayloadSchemaReq request, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -85,6 +108,7 @@ partial void ProcessFeedbackPayloadSchemaFeedbackPayloadSchemaPostResponseConten global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: "/feedback/payload_schema", baseUri: HttpClient.BaseAddress); @@ -164,6 +188,8 @@ partial void ProcessFeedbackPayloadSchemaFeedbackPayloadSchemaPostResponseConten attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -174,6 +200,11 @@ partial void ProcessFeedbackPayloadSchemaFeedbackPayloadSchemaPostResponseConten } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -191,6 +222,8 @@ partial void ProcessFeedbackPayloadSchemaFeedbackPayloadSchemaPostResponseConten attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -200,8 +233,7 @@ partial void ProcessFeedbackPayloadSchemaFeedbackPayloadSchemaPostResponseConten __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -210,6 +242,11 @@ partial void ProcessFeedbackPayloadSchemaFeedbackPayloadSchemaPostResponseConten __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -226,14 +263,15 @@ partial void ProcessFeedbackPayloadSchemaFeedbackPayloadSchemaPostResponseConten 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -273,6 +311,8 @@ partial void ProcessFeedbackPayloadSchemaFeedbackPayloadSchemaPostResponseConten attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -293,6 +333,8 @@ partial void ProcessFeedbackPayloadSchemaFeedbackPayloadSchemaPostResponseConten attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -355,9 +397,13 @@ partial void ProcessFeedbackPayloadSchemaFeedbackPayloadSchemaPostResponseConten { __response.EnsureSuccessStatusCode(); - return - global::Weave.FeedbackPayloadSchemaRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.FeedbackPayloadSchemaRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -385,9 +431,13 @@ partial void ProcessFeedbackPayloadSchemaFeedbackPayloadSchemaPostResponseConten #endif ).ConfigureAwait(false); - return - await global::Weave.FeedbackPayloadSchemaRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.FeedbackPayloadSchemaRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.FeedbackClient.FeedbackPurgeFeedbackPurgePost.g.cs b/src/libs/Weave/Generated/Weave.FeedbackClient.FeedbackPurgeFeedbackPurgePost.g.cs index abda78b..8923542 100644 --- a/src/libs/Weave/Generated/Weave.FeedbackClient.FeedbackPurgeFeedbackPurgePost.g.cs +++ b/src/libs/Weave/Generated/Weave.FeedbackClient.FeedbackPurgeFeedbackPurgePost.g.cs @@ -51,6 +51,29 @@ partial void ProcessFeedbackPurgeFeedbackPurgePostResponseContent( /// public async global::System.Threading.Tasks.Task FeedbackPurgeFeedbackPurgePostAsync( + global::Weave.FeedbackPurgeReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await FeedbackPurgeFeedbackPurgePostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Feedback Purge
+ /// Permanently delete feedback. + ///
+ /// + /// 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> FeedbackPurgeFeedbackPurgePostAsResponseAsync( + global::Weave.FeedbackPurgeReq request, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -85,6 +108,7 @@ partial void ProcessFeedbackPurgeFeedbackPurgePostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: "/feedback/purge", baseUri: HttpClient.BaseAddress); @@ -164,6 +188,8 @@ partial void ProcessFeedbackPurgeFeedbackPurgePostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -174,6 +200,11 @@ partial void ProcessFeedbackPurgeFeedbackPurgePostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -191,6 +222,8 @@ partial void ProcessFeedbackPurgeFeedbackPurgePostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -200,8 +233,7 @@ partial void ProcessFeedbackPurgeFeedbackPurgePostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -210,6 +242,11 @@ partial void ProcessFeedbackPurgeFeedbackPurgePostResponseContent( __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -226,14 +263,15 @@ partial void ProcessFeedbackPurgeFeedbackPurgePostResponseContent( 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -273,6 +311,8 @@ partial void ProcessFeedbackPurgeFeedbackPurgePostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -293,6 +333,8 @@ partial void ProcessFeedbackPurgeFeedbackPurgePostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -355,9 +397,13 @@ partial void ProcessFeedbackPurgeFeedbackPurgePostResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Weave.FeedbackPurgeRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.FeedbackPurgeRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -385,9 +431,13 @@ partial void ProcessFeedbackPurgeFeedbackPurgePostResponseContent( #endif ).ConfigureAwait(false); - return - await global::Weave.FeedbackPurgeRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.FeedbackPurgeRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.FeedbackClient.FeedbackQueryFeedbackQueryPost.g.cs b/src/libs/Weave/Generated/Weave.FeedbackClient.FeedbackQueryFeedbackQueryPost.g.cs index 66f7766..58233f4 100644 --- a/src/libs/Weave/Generated/Weave.FeedbackClient.FeedbackQueryFeedbackQueryPost.g.cs +++ b/src/libs/Weave/Generated/Weave.FeedbackClient.FeedbackQueryFeedbackQueryPost.g.cs @@ -51,6 +51,29 @@ partial void ProcessFeedbackQueryFeedbackQueryPostResponseContent( /// public async global::System.Threading.Tasks.Task FeedbackQueryFeedbackQueryPostAsync( + global::Weave.FeedbackQueryReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await FeedbackQueryFeedbackQueryPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Feedback Query
+ /// Query for feedback. + ///
+ /// + /// 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> FeedbackQueryFeedbackQueryPostAsResponseAsync( + global::Weave.FeedbackQueryReq request, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -85,6 +108,7 @@ partial void ProcessFeedbackQueryFeedbackQueryPostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: "/feedback/query", baseUri: HttpClient.BaseAddress); @@ -164,6 +188,8 @@ partial void ProcessFeedbackQueryFeedbackQueryPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -174,6 +200,11 @@ partial void ProcessFeedbackQueryFeedbackQueryPostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -191,6 +222,8 @@ partial void ProcessFeedbackQueryFeedbackQueryPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -200,8 +233,7 @@ partial void ProcessFeedbackQueryFeedbackQueryPostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -210,6 +242,11 @@ partial void ProcessFeedbackQueryFeedbackQueryPostResponseContent( __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -226,14 +263,15 @@ partial void ProcessFeedbackQueryFeedbackQueryPostResponseContent( 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -273,6 +311,8 @@ partial void ProcessFeedbackQueryFeedbackQueryPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -293,6 +333,8 @@ partial void ProcessFeedbackQueryFeedbackQueryPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -355,9 +397,13 @@ partial void ProcessFeedbackQueryFeedbackQueryPostResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Weave.FeedbackQueryRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.FeedbackQueryRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -385,9 +431,13 @@ partial void ProcessFeedbackQueryFeedbackQueryPostResponseContent( #endif ).ConfigureAwait(false); - return - await global::Weave.FeedbackQueryRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.FeedbackQueryRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.FeedbackClient.FeedbackReplaceFeedbackReplacePost.g.cs b/src/libs/Weave/Generated/Weave.FeedbackClient.FeedbackReplaceFeedbackReplacePost.g.cs index b2f53bb..c5c0073 100644 --- a/src/libs/Weave/Generated/Weave.FeedbackClient.FeedbackReplaceFeedbackReplacePost.g.cs +++ b/src/libs/Weave/Generated/Weave.FeedbackClient.FeedbackReplaceFeedbackReplacePost.g.cs @@ -50,6 +50,28 @@ partial void ProcessFeedbackReplaceFeedbackReplacePostResponseContent( /// public async global::System.Threading.Tasks.Task FeedbackReplaceFeedbackReplacePostAsync( + global::Weave.FeedbackReplaceReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await FeedbackReplaceFeedbackReplacePostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Feedback Replace + /// + /// + /// 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> FeedbackReplaceFeedbackReplacePostAsResponseAsync( + global::Weave.FeedbackReplaceReq request, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessFeedbackReplaceFeedbackReplacePostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: "/feedback/replace", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessFeedbackReplaceFeedbackReplacePostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessFeedbackReplaceFeedbackReplacePostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessFeedbackReplaceFeedbackReplacePostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessFeedbackReplaceFeedbackReplacePostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessFeedbackReplaceFeedbackReplacePostResponseContent( __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessFeedbackReplaceFeedbackReplacePostResponseContent( 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessFeedbackReplaceFeedbackReplacePostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessFeedbackReplaceFeedbackReplacePostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -354,9 +395,13 @@ partial void ProcessFeedbackReplaceFeedbackReplacePostResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Weave.FeedbackReplaceRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.FeedbackReplaceRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -384,9 +429,13 @@ partial void ProcessFeedbackReplaceFeedbackReplacePostResponseContent( #endif ).ConfigureAwait(false); - return - await global::Weave.FeedbackReplaceRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.FeedbackReplaceRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.FeedbackClient.FeedbackStatsFeedbackStatsPost.g.cs b/src/libs/Weave/Generated/Weave.FeedbackClient.FeedbackStatsFeedbackStatsPost.g.cs index eb69bed..d02dd8d 100644 --- a/src/libs/Weave/Generated/Weave.FeedbackClient.FeedbackStatsFeedbackStatsPost.g.cs +++ b/src/libs/Weave/Generated/Weave.FeedbackClient.FeedbackStatsFeedbackStatsPost.g.cs @@ -51,6 +51,29 @@ partial void ProcessFeedbackStatsFeedbackStatsPostResponseContent( /// public async global::System.Threading.Tasks.Task FeedbackStatsFeedbackStatsPostAsync( + global::Weave.FeedbackStatsReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await FeedbackStatsFeedbackStatsPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Feedback Stats
+ /// Return aggregated feedback statistics over time buckets. + ///
+ /// + /// 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> FeedbackStatsFeedbackStatsPostAsResponseAsync( + global::Weave.FeedbackStatsReq request, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -85,6 +108,7 @@ partial void ProcessFeedbackStatsFeedbackStatsPostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: "/feedback/stats", baseUri: HttpClient.BaseAddress); @@ -164,6 +188,8 @@ partial void ProcessFeedbackStatsFeedbackStatsPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -174,6 +200,11 @@ partial void ProcessFeedbackStatsFeedbackStatsPostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -191,6 +222,8 @@ partial void ProcessFeedbackStatsFeedbackStatsPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -200,8 +233,7 @@ partial void ProcessFeedbackStatsFeedbackStatsPostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -210,6 +242,11 @@ partial void ProcessFeedbackStatsFeedbackStatsPostResponseContent( __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -226,14 +263,15 @@ partial void ProcessFeedbackStatsFeedbackStatsPostResponseContent( 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -273,6 +311,8 @@ partial void ProcessFeedbackStatsFeedbackStatsPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -293,6 +333,8 @@ partial void ProcessFeedbackStatsFeedbackStatsPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -355,9 +397,13 @@ partial void ProcessFeedbackStatsFeedbackStatsPostResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Weave.FeedbackStatsRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.FeedbackStatsRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -385,9 +431,13 @@ partial void ProcessFeedbackStatsFeedbackStatsPostResponseContent( #endif ).ConfigureAwait(false); - return - await global::Weave.FeedbackStatsRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.FeedbackStatsRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.FeedbackClient.g.cs b/src/libs/Weave/Generated/Weave.FeedbackClient.g.cs index c54d67e..0b66003 100644 --- a/src/libs/Weave/Generated/Weave.FeedbackClient.g.cs +++ b/src/libs/Weave/Generated/Weave.FeedbackClient.g.cs @@ -72,10 +72,10 @@ public FeedbackClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public FeedbackClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Weave.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Weave.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Weave/Generated/Weave.FilesClient.FileContentFileContentPost.g.cs b/src/libs/Weave/Generated/Weave.FilesClient.FileContentFileContentPost.g.cs index 1d0572d..703f08b 100644 --- a/src/libs/Weave/Generated/Weave.FilesClient.FileContentFileContentPost.g.cs +++ b/src/libs/Weave/Generated/Weave.FilesClient.FileContentFileContentPost.g.cs @@ -50,6 +50,28 @@ partial void ProcessFileContentFileContentPostResponseContent( /// public async global::System.Threading.Tasks.Task FileContentFileContentPostAsync( + global::Weave.FileContentReadReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await FileContentFileContentPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// File Content + /// + /// + /// 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> FileContentFileContentPostAsResponseAsync( + global::Weave.FileContentReadReq request, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessFileContentFileContentPostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: "/file/content", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessFileContentFileContentPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessFileContentFileContentPostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessFileContentFileContentPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessFileContentFileContentPostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessFileContentFileContentPostResponseContent( __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessFileContentFileContentPostResponseContent( 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessFileContentFileContentPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessFileContentFileContentPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -354,7 +395,11 @@ partial void ProcessFileContentFileContentPostResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -382,7 +427,11 @@ partial void ProcessFileContentFileContentPostResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.FilesClient.FileCreateFileCreatePost.g.cs b/src/libs/Weave/Generated/Weave.FilesClient.FileCreateFileCreatePost.g.cs index d61988f..6d981b4 100644 --- a/src/libs/Weave/Generated/Weave.FilesClient.FileCreateFileCreatePost.g.cs +++ b/src/libs/Weave/Generated/Weave.FilesClient.FileCreateFileCreatePost.g.cs @@ -50,6 +50,28 @@ partial void ProcessFileCreateFileCreatePostResponseContent( /// public async global::System.Threading.Tasks.Task FileCreateFileCreatePostAsync( + global::Weave.BodyFileCreateFileCreatePost request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await FileCreateFileCreatePostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// File Create + /// + /// + /// 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> FileCreateFileCreatePostAsResponseAsync( + global::Weave.BodyFileCreateFileCreatePost request, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -80,10 +102,11 @@ partial void ProcessFileCreateFileCreatePostResponseContent( var __maxAttempts = global::Weave.AutoSDKRequestOptionsSupport.GetMaxAttempts( clientOptions: Options, requestOptions: requestOptions, - supportsRetry: true); + supportsRetry: false); global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: "/file/create", baseUri: HttpClient.BaseAddress); @@ -116,10 +139,12 @@ partial void ProcessFileCreateFileCreatePostResponseContent( __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); __httpRequestContent.Add( content: new global::System.Net.Http.StringContent(request.ProjectId ?? string.Empty), name: "\"project_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 @@ -157,7 +182,9 @@ request.Filename is null { __contentFile.Headers.ContentDisposition.FileNameStar = null; } + __httpRequest.Content = __httpRequestContent; + global::Weave.AutoSDKRequestOptionsSupport.ApplyHeaders( request: __httpRequest, clientHeaders: Options.Headers, @@ -199,6 +226,8 @@ request.Filename is null attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -209,6 +238,11 @@ request.Filename is null } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -226,6 +260,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) { @@ -235,8 +271,7 @@ request.Filename is null __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -245,6 +280,11 @@ request.Filename is null __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -261,14 +301,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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -308,6 +349,8 @@ request.Filename is null attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -328,6 +371,8 @@ request.Filename is null attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -390,9 +435,13 @@ request.Filename is null { __response.EnsureSuccessStatusCode(); - return - global::Weave.FileCreateRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.FileCreateRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -420,9 +469,13 @@ request.Filename is null #endif ).ConfigureAwait(false); - return - await global::Weave.FileCreateRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.FileCreateRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -488,5 +541,920 @@ request.Filename is null requestOptions: requestOptions, cancellationToken: cancellationToken).ConfigureAwait(false); } + + /// + /// File Create + /// + /// + /// + /// 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 FileCreateFileCreatePostAsync( + string projectId, + global::System.IO.Stream file, + string filename, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + + file = file ?? throw new global::System.ArgumentNullException(nameof(file)); + var request = new global::Weave.BodyFileCreateFileCreatePost + { + ProjectId = projectId, + File = global::System.Array.Empty(), + Filename = filename, + }; + PrepareArguments( + client: HttpClient); + PrepareFileCreateFileCreatePostArguments( + httpClient: HttpClient, + request: request); + + + var __authorizations = global::Weave.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_FileCreateFileCreatePostSecurityRequirements, + operationName: "FileCreateFileCreatePostAsync"); + + using var __timeoutCancellationTokenSource = global::Weave.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Weave.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Weave.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: false); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Weave.PathBuilder( + path: "/file/create", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Weave.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 + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.ProjectId ?? string.Empty), + name: "\"project_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::Weave.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareFileCreateFileCreatePostRequest( + 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::Weave.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "FileCreateFileCreatePost", + methodName: "FileCreateFileCreatePostAsync", + pathTemplate: "\"/file/create\"", + 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::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "FileCreateFileCreatePost", + methodName: "FileCreateFileCreatePostAsync", + pathTemplate: "\"/file/create\"", + 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "FileCreateFileCreatePost", + methodName: "FileCreateFileCreatePostAsync", + pathTemplate: "\"/file/create\"", + 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::Weave.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); + ProcessFileCreateFileCreatePostResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Weave.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "FileCreateFileCreatePost", + methodName: "FileCreateFileCreatePostAsync", + pathTemplate: "\"/file/create\"", + 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::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "FileCreateFileCreatePost", + methodName: "FileCreateFileCreatePostAsync", + pathTemplate: "\"/file/create\"", + 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::Weave.HTTPValidationError? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::Weave.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::Weave.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + throw new global::Weave.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); + ProcessFileCreateFileCreatePostResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::Weave.FileCreateRes.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::Weave.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::Weave.FileCreateRes.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::Weave.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(); + } + } + /// + /// File Create + /// + /// + /// + /// 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> FileCreateFileCreatePostAsResponseAsync( + string projectId, + global::System.IO.Stream file, + string filename, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + + file = file ?? throw new global::System.ArgumentNullException(nameof(file)); + var request = new global::Weave.BodyFileCreateFileCreatePost + { + ProjectId = projectId, + File = global::System.Array.Empty(), + Filename = filename, + }; + PrepareArguments( + client: HttpClient); + PrepareFileCreateFileCreatePostArguments( + httpClient: HttpClient, + request: request); + + + var __authorizations = global::Weave.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_FileCreateFileCreatePostSecurityRequirements, + operationName: "FileCreateFileCreatePostAsync"); + + using var __timeoutCancellationTokenSource = global::Weave.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Weave.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Weave.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: false); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Weave.PathBuilder( + path: "/file/create", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Weave.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 + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.ProjectId ?? string.Empty), + name: "\"project_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::Weave.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareFileCreateFileCreatePostRequest( + 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::Weave.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "FileCreateFileCreatePost", + methodName: "FileCreateFileCreatePostAsync", + pathTemplate: "\"/file/create\"", + 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::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "FileCreateFileCreatePost", + methodName: "FileCreateFileCreatePostAsync", + pathTemplate: "\"/file/create\"", + 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "FileCreateFileCreatePost", + methodName: "FileCreateFileCreatePostAsync", + pathTemplate: "\"/file/create\"", + 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::Weave.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); + ProcessFileCreateFileCreatePostResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Weave.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "FileCreateFileCreatePost", + methodName: "FileCreateFileCreatePostAsync", + pathTemplate: "\"/file/create\"", + 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::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "FileCreateFileCreatePost", + methodName: "FileCreateFileCreatePostAsync", + pathTemplate: "\"/file/create\"", + 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::Weave.HTTPValidationError? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::Weave.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::Weave.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + throw new global::Weave.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); + ProcessFileCreateFileCreatePostResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Weave.FileCreateRes.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw new global::Weave.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::Weave.FileCreateRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.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::Weave.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/Weave/Generated/Weave.FilesClient.FilesStatsFilesQueryStatsPost.g.cs b/src/libs/Weave/Generated/Weave.FilesClient.FilesStatsFilesQueryStatsPost.g.cs index a9cae24..d17fc31 100644 --- a/src/libs/Weave/Generated/Weave.FilesClient.FilesStatsFilesQueryStatsPost.g.cs +++ b/src/libs/Weave/Generated/Weave.FilesClient.FilesStatsFilesQueryStatsPost.g.cs @@ -50,6 +50,28 @@ partial void ProcessFilesStatsFilesQueryStatsPostResponseContent( /// public async global::System.Threading.Tasks.Task FilesStatsFilesQueryStatsPostAsync( + global::Weave.FilesStatsReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await FilesStatsFilesQueryStatsPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Files Stats + /// + /// + /// 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> FilesStatsFilesQueryStatsPostAsResponseAsync( + global::Weave.FilesStatsReq request, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessFilesStatsFilesQueryStatsPostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: "/files/query_stats", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessFilesStatsFilesQueryStatsPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessFilesStatsFilesQueryStatsPostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessFilesStatsFilesQueryStatsPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessFilesStatsFilesQueryStatsPostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessFilesStatsFilesQueryStatsPostResponseContent( __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessFilesStatsFilesQueryStatsPostResponseContent( 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessFilesStatsFilesQueryStatsPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessFilesStatsFilesQueryStatsPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -354,9 +395,13 @@ partial void ProcessFilesStatsFilesQueryStatsPostResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Weave.FilesStatsRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.FilesStatsRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -384,9 +429,13 @@ partial void ProcessFilesStatsFilesQueryStatsPostResponseContent( #endif ).ConfigureAwait(false); - return - await global::Weave.FilesStatsRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.FilesStatsRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.FilesClient.g.cs b/src/libs/Weave/Generated/Weave.FilesClient.g.cs index 314fb6a..53145c9 100644 --- a/src/libs/Weave/Generated/Weave.FilesClient.g.cs +++ b/src/libs/Weave/Generated/Weave.FilesClient.g.cs @@ -72,10 +72,10 @@ public FilesClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public FilesClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Weave.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Weave.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Weave/Generated/Weave.IAnnotationQueuesClient.AnnotationQueueAddCallsAnnotationQueuesQueueIdItemsPost.g.cs b/src/libs/Weave/Generated/Weave.IAnnotationQueuesClient.AnnotationQueueAddCallsAnnotationQueuesQueueIdItemsPost.g.cs index 7c6d0a2..7449322 100644 --- a/src/libs/Weave/Generated/Weave.IAnnotationQueuesClient.AnnotationQueueAddCallsAnnotationQueuesQueueIdItemsPost.g.cs +++ b/src/libs/Weave/Generated/Weave.IAnnotationQueuesClient.AnnotationQueueAddCallsAnnotationQueuesQueueIdItemsPost.g.cs @@ -24,6 +24,21 @@ public partial interface IAnnotationQueuesClient /// Add calls to an annotation queue. /// /// + /// + /// 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> AnnotationQueueAddCallsAnnotationQueuesQueueIdItemsPostAsResponseAsync( + string queueId, + + global::Weave.AnnotationQueueAddCallsBody request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Annotation Queue Add Calls
+ /// Add calls to an annotation queue. + ///
+ /// /// /// /// diff --git a/src/libs/Weave/Generated/Weave.IAnnotationQueuesClient.AnnotationQueueCreateAnnotationQueuesPost.g.cs b/src/libs/Weave/Generated/Weave.IAnnotationQueuesClient.AnnotationQueueCreateAnnotationQueuesPost.g.cs index 3145605..04c60d4 100644 --- a/src/libs/Weave/Generated/Weave.IAnnotationQueuesClient.AnnotationQueueCreateAnnotationQueuesPost.g.cs +++ b/src/libs/Weave/Generated/Weave.IAnnotationQueuesClient.AnnotationQueueCreateAnnotationQueuesPost.g.cs @@ -21,6 +21,19 @@ public partial interface IAnnotationQueuesClient /// Annotation Queue Create
/// Create a new annotation queue. /// + /// + /// 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> AnnotationQueueCreateAnnotationQueuesPostAsResponseAsync( + + global::Weave.AnnotationQueueCreateReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Annotation Queue Create
+ /// Create a new annotation queue. + ///
/// /// /// diff --git a/src/libs/Weave/Generated/Weave.IAnnotationQueuesClient.AnnotationQueueDeleteAnnotationQueuesQueueIdDelete.g.cs b/src/libs/Weave/Generated/Weave.IAnnotationQueuesClient.AnnotationQueueDeleteAnnotationQueuesQueueIdDelete.g.cs index 0fd95c0..d0732b8 100644 --- a/src/libs/Weave/Generated/Weave.IAnnotationQueuesClient.AnnotationQueueDeleteAnnotationQueuesQueueIdDelete.g.cs +++ b/src/libs/Weave/Generated/Weave.IAnnotationQueuesClient.AnnotationQueueDeleteAnnotationQueuesQueueIdDelete.g.cs @@ -18,5 +18,19 @@ public partial interface IAnnotationQueuesClient string projectId, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Annotation Queue Delete
+ /// Delete (soft-delete) an annotation queue. + ///
+ /// + /// + /// 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> AnnotationQueueDeleteAnnotationQueuesQueueIdDeleteAsResponseAsync( + string queueId, + string projectId, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Weave/Generated/Weave.IAnnotationQueuesClient.AnnotationQueueItemProgressUpdateAnnotationQueuesQueueIdItemsItemIdProgressPost.g.cs b/src/libs/Weave/Generated/Weave.IAnnotationQueuesClient.AnnotationQueueItemProgressUpdateAnnotationQueuesQueueIdItemsItemIdProgressPost.g.cs index f4bc395..16cd71d 100644 --- a/src/libs/Weave/Generated/Weave.IAnnotationQueuesClient.AnnotationQueueItemProgressUpdateAnnotationQueuesQueueIdItemsItemIdProgressPost.g.cs +++ b/src/libs/Weave/Generated/Weave.IAnnotationQueuesClient.AnnotationQueueItemProgressUpdateAnnotationQueuesQueueIdItemsItemIdProgressPost.g.cs @@ -27,6 +27,23 @@ public partial interface IAnnotationQueuesClient /// /// /// + /// + /// 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> AnnotationQueueItemProgressUpdateAnnotationQueuesQueueIdItemsItemIdProgressPostAsResponseAsync( + string queueId, + string itemId, + + global::Weave.AnnotationQueueItemProgressUpdateBody request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Annotation Queue Item Progress Update
+ /// Update the annotation state of a queue item for the current annotator. + ///
+ /// + /// /// /// /// New state: 'in_progress', 'completed', or 'skipped' diff --git a/src/libs/Weave/Generated/Weave.IAnnotationQueuesClient.AnnotationQueueItemsQueryAnnotationQueuesQueueIdItemsQueryPost.g.cs b/src/libs/Weave/Generated/Weave.IAnnotationQueuesClient.AnnotationQueueItemsQueryAnnotationQueuesQueueIdItemsQueryPost.g.cs index f11fd85..0be8d9f 100644 --- a/src/libs/Weave/Generated/Weave.IAnnotationQueuesClient.AnnotationQueueItemsQueryAnnotationQueuesQueueIdItemsQueryPost.g.cs +++ b/src/libs/Weave/Generated/Weave.IAnnotationQueuesClient.AnnotationQueueItemsQueryAnnotationQueuesQueueIdItemsQueryPost.g.cs @@ -24,6 +24,21 @@ public partial interface IAnnotationQueuesClient /// Query items in an annotation queue with pagination and sorting. /// /// + /// + /// 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> AnnotationQueueItemsQueryAnnotationQueuesQueueIdItemsQueryPostAsResponseAsync( + string queueId, + + global::Weave.AnnotationQueueItemsQueryBody request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Annotation Queue Items Query
+ /// Query items in an annotation queue with pagination and sorting. + ///
+ /// /// /// /// Filter queue items by call metadata and annotation state diff --git a/src/libs/Weave/Generated/Weave.IAnnotationQueuesClient.AnnotationQueueReadAnnotationQueuesQueueIdGet.g.cs b/src/libs/Weave/Generated/Weave.IAnnotationQueuesClient.AnnotationQueueReadAnnotationQueuesQueueIdGet.g.cs index f07c005..5b79d5f 100644 --- a/src/libs/Weave/Generated/Weave.IAnnotationQueuesClient.AnnotationQueueReadAnnotationQueuesQueueIdGet.g.cs +++ b/src/libs/Weave/Generated/Weave.IAnnotationQueuesClient.AnnotationQueueReadAnnotationQueuesQueueIdGet.g.cs @@ -18,5 +18,19 @@ public partial interface IAnnotationQueuesClient string projectId, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Annotation Queue Read
+ /// Read a specific annotation queue. + ///
+ /// + /// + /// 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> AnnotationQueueReadAnnotationQueuesQueueIdGetAsResponseAsync( + string queueId, + string projectId, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Weave/Generated/Weave.IAnnotationQueuesClient.AnnotationQueueUpdateAnnotationQueuesQueueIdPut.g.cs b/src/libs/Weave/Generated/Weave.IAnnotationQueuesClient.AnnotationQueueUpdateAnnotationQueuesQueueIdPut.g.cs index 3c97605..6ff12bf 100644 --- a/src/libs/Weave/Generated/Weave.IAnnotationQueuesClient.AnnotationQueueUpdateAnnotationQueuesQueueIdPut.g.cs +++ b/src/libs/Weave/Generated/Weave.IAnnotationQueuesClient.AnnotationQueueUpdateAnnotationQueuesQueueIdPut.g.cs @@ -24,6 +24,21 @@ public partial interface IAnnotationQueuesClient /// Update an annotation queue's metadata (name, description, scorer_refs). /// /// + /// + /// 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> AnnotationQueueUpdateAnnotationQueuesQueueIdPutAsResponseAsync( + string queueId, + + global::Weave.AnnotationQueueUpdateBody request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Annotation Queue Update
+ /// Update an annotation queue's metadata (name, description, scorer_refs). + ///
+ /// /// /// /// diff --git a/src/libs/Weave/Generated/Weave.IAnnotationQueuesClient.AnnotationQueuesQueryStreamAnnotationQueuesQueryPost.g.cs b/src/libs/Weave/Generated/Weave.IAnnotationQueuesClient.AnnotationQueuesQueryStreamAnnotationQueuesQueryPost.g.cs index 6cdb96f..439d3cc 100644 --- a/src/libs/Weave/Generated/Weave.IAnnotationQueuesClient.AnnotationQueuesQueryStreamAnnotationQueuesQueryPost.g.cs +++ b/src/libs/Weave/Generated/Weave.IAnnotationQueuesClient.AnnotationQueuesQueryStreamAnnotationQueuesQueryPost.g.cs @@ -21,6 +21,19 @@ public partial interface IAnnotationQueuesClient /// Annotation Queues Query Stream
/// Query annotation queues for a project (streaming NDJSON response). /// + /// + /// 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> AnnotationQueuesQueryStreamAnnotationQueuesQueryPostAsResponseAsync( + + global::Weave.AnnotationQueuesQueryReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Annotation Queues Query Stream
+ /// Query annotation queues for a project (streaming NDJSON response). + ///
/// /// /// Filter by queue name (case-insensitive partial match) diff --git a/src/libs/Weave/Generated/Weave.IAnnotationQueuesClient.AnnotationQueuesStatsAnnotationQueuesStatsPost.g.cs b/src/libs/Weave/Generated/Weave.IAnnotationQueuesClient.AnnotationQueuesStatsAnnotationQueuesStatsPost.g.cs index a40c205..0572c27 100644 --- a/src/libs/Weave/Generated/Weave.IAnnotationQueuesClient.AnnotationQueuesStatsAnnotationQueuesStatsPost.g.cs +++ b/src/libs/Weave/Generated/Weave.IAnnotationQueuesClient.AnnotationQueuesStatsAnnotationQueuesStatsPost.g.cs @@ -21,6 +21,19 @@ public partial interface IAnnotationQueuesClient /// Annotation Queues Stats
/// Get stats for multiple annotation queues. /// + /// + /// 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> AnnotationQueuesStatsAnnotationQueuesStatsPostAsResponseAsync( + + global::Weave.AnnotationQueuesStatsReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Annotation Queues Stats
+ /// Get stats for multiple annotation queues. + ///
/// /// /// List of queue IDs to get stats for diff --git a/src/libs/Weave/Generated/Weave.ICallsClient.CallEndCallEndPost.g.cs b/src/libs/Weave/Generated/Weave.ICallsClient.CallEndCallEndPost.g.cs index c71664b..f514a26 100644 --- a/src/libs/Weave/Generated/Weave.ICallsClient.CallEndCallEndPost.g.cs +++ b/src/libs/Weave/Generated/Weave.ICallsClient.CallEndCallEndPost.g.cs @@ -19,6 +19,18 @@ public partial interface ICallsClient /// /// Call End /// + /// + /// 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> CallEndCallEndPostAsResponseAsync( + + global::Weave.CallEndReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Call End + /// /// /// 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/Weave/Generated/Weave.ICallsClient.CallReadCallReadPost.g.cs b/src/libs/Weave/Generated/Weave.ICallsClient.CallReadCallReadPost.g.cs index 3cfd76b..3e11420 100644 --- a/src/libs/Weave/Generated/Weave.ICallsClient.CallReadCallReadPost.g.cs +++ b/src/libs/Weave/Generated/Weave.ICallsClient.CallReadCallReadPost.g.cs @@ -19,6 +19,18 @@ public partial interface ICallsClient /// /// Call Read /// + /// + /// 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> CallReadCallReadPostAsResponseAsync( + + global::Weave.CallReadReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Call Read + /// /// /// /// diff --git a/src/libs/Weave/Generated/Weave.ICallsClient.CallStartBatchCallUpsertBatchPost.g.cs b/src/libs/Weave/Generated/Weave.ICallsClient.CallStartBatchCallUpsertBatchPost.g.cs index bbc4573..79270bb 100644 --- a/src/libs/Weave/Generated/Weave.ICallsClient.CallStartBatchCallUpsertBatchPost.g.cs +++ b/src/libs/Weave/Generated/Weave.ICallsClient.CallStartBatchCallUpsertBatchPost.g.cs @@ -19,6 +19,18 @@ public partial interface ICallsClient /// /// Call Start Batch /// + /// + /// 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> CallStartBatchCallUpsertBatchPostAsResponseAsync( + + global::Weave.CallCreateBatchReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Call Start Batch + /// /// /// 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/Weave/Generated/Weave.ICallsClient.CallStartCallStartPost.g.cs b/src/libs/Weave/Generated/Weave.ICallsClient.CallStartCallStartPost.g.cs index 8a47ab1..7a4a606 100644 --- a/src/libs/Weave/Generated/Weave.ICallsClient.CallStartCallStartPost.g.cs +++ b/src/libs/Weave/Generated/Weave.ICallsClient.CallStartCallStartPost.g.cs @@ -19,6 +19,18 @@ public partial interface ICallsClient /// /// Call Start /// + /// + /// 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> CallStartCallStartPostAsResponseAsync( + + global::Weave.CallStartReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Call Start + /// /// /// 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/Weave/Generated/Weave.ICallsClient.CallStatsCallsStatsPost.g.cs b/src/libs/Weave/Generated/Weave.ICallsClient.CallStatsCallsStatsPost.g.cs index f60fd43..99c6b92 100644 --- a/src/libs/Weave/Generated/Weave.ICallsClient.CallStatsCallsStatsPost.g.cs +++ b/src/libs/Weave/Generated/Weave.ICallsClient.CallStatsCallsStatsPost.g.cs @@ -19,6 +19,18 @@ public partial interface ICallsClient /// /// Call Stats /// + /// + /// 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> CallStatsCallsStatsPostAsResponseAsync( + + global::Weave.CallStatsReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Call Stats + /// /// /// /// Inclusive start time (UTC, ISO 8601). diff --git a/src/libs/Weave/Generated/Weave.ICallsClient.CallUpdateCallUpdatePost.g.cs b/src/libs/Weave/Generated/Weave.ICallsClient.CallUpdateCallUpdatePost.g.cs index a8d599d..d08bea7 100644 --- a/src/libs/Weave/Generated/Weave.ICallsClient.CallUpdateCallUpdatePost.g.cs +++ b/src/libs/Weave/Generated/Weave.ICallsClient.CallUpdateCallUpdatePost.g.cs @@ -19,6 +19,18 @@ public partial interface ICallsClient /// /// Call Update /// + /// + /// 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> CallUpdateCallUpdatePostAsResponseAsync( + + global::Weave.CallUpdateReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Call Update + /// /// /// /// diff --git a/src/libs/Weave/Generated/Weave.ICallsClient.CallsDeleteCallsDeletePost.g.cs b/src/libs/Weave/Generated/Weave.ICallsClient.CallsDeleteCallsDeletePost.g.cs index 0ba5dd9..e07a584 100644 --- a/src/libs/Weave/Generated/Weave.ICallsClient.CallsDeleteCallsDeletePost.g.cs +++ b/src/libs/Weave/Generated/Weave.ICallsClient.CallsDeleteCallsDeletePost.g.cs @@ -19,6 +19,18 @@ public partial interface ICallsClient /// /// Calls Delete /// + /// + /// 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> CallsDeleteCallsDeletePostAsResponseAsync( + + global::Weave.CallsDeleteReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Calls Delete + /// /// /// /// diff --git a/src/libs/Weave/Generated/Weave.ICallsClient.CallsQueryStatsCallsQueryStatsPost.g.cs b/src/libs/Weave/Generated/Weave.ICallsClient.CallsQueryStatsCallsQueryStatsPost.g.cs index 4ca211b..c58ba2f 100644 --- a/src/libs/Weave/Generated/Weave.ICallsClient.CallsQueryStatsCallsQueryStatsPost.g.cs +++ b/src/libs/Weave/Generated/Weave.ICallsClient.CallsQueryStatsCallsQueryStatsPost.g.cs @@ -19,6 +19,18 @@ public partial interface ICallsClient /// /// Calls Query Stats /// + /// + /// 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> CallsQueryStatsCallsQueryStatsPostAsResponseAsync( + + global::Weave.CallsQueryStatsReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Calls Query Stats + /// /// /// /// diff --git a/src/libs/Weave/Generated/Weave.ICallsClient.CallsQueryStreamCallsStreamQueryPost.g.cs b/src/libs/Weave/Generated/Weave.ICallsClient.CallsQueryStreamCallsStreamQueryPost.g.cs index db9be8f..6799ff5 100644 --- a/src/libs/Weave/Generated/Weave.ICallsClient.CallsQueryStreamCallsStreamQueryPost.g.cs +++ b/src/libs/Weave/Generated/Weave.ICallsClient.CallsQueryStreamCallsStreamQueryPost.g.cs @@ -26,6 +26,22 @@ public partial interface ICallsClient /// /// Default Value: application/jsonl /// + /// + /// 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> CallsQueryStreamCallsStreamQueryPostAsResponseAsync( + + global::Weave.CallsQueryReq request, + string? accept = default, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Calls Query Stream + /// + /// + /// Default Value: application/jsonl + /// /// /// /// diff --git a/src/libs/Weave/Generated/Weave.ICallsClient.CallsUsageCallsUsagePost.g.cs b/src/libs/Weave/Generated/Weave.ICallsClient.CallsUsageCallsUsagePost.g.cs index d3a3c41..13d1441 100644 --- a/src/libs/Weave/Generated/Weave.ICallsClient.CallsUsageCallsUsagePost.g.cs +++ b/src/libs/Weave/Generated/Weave.ICallsClient.CallsUsageCallsUsagePost.g.cs @@ -21,6 +21,19 @@ public partial interface ICallsClient /// Calls Usage
/// Compute aggregated usage for multiple root calls, with descendant rollup. /// + /// + /// 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> CallsUsageCallsUsagePostAsResponseAsync( + + global::Weave.CallsUsageReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Calls Usage
+ /// Compute aggregated usage for multiple root calls, with descendant rollup. + ///
/// /// /// Root call IDs to aggregate. Each result key corresponds to one input call ID. diff --git a/src/libs/Weave/Generated/Weave.ICallsClient.TraceUsageTraceUsagePost.g.cs b/src/libs/Weave/Generated/Weave.ICallsClient.TraceUsageTraceUsagePost.g.cs index 2982f32..64c2ab2 100644 --- a/src/libs/Weave/Generated/Weave.ICallsClient.TraceUsageTraceUsagePost.g.cs +++ b/src/libs/Weave/Generated/Weave.ICallsClient.TraceUsageTraceUsagePost.g.cs @@ -21,6 +21,19 @@ public partial interface ICallsClient /// Trace Usage
/// Compute per-call usage for a trace, with descendant rollup. /// + /// + /// 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> TraceUsageTraceUsagePostAsResponseAsync( + + global::Weave.TraceUsageReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Trace Usage
+ /// Compute per-call usage for a trace, with descendant rollup. + ///
/// /// /// Filter to select calls. Typically use trace_ids to get all calls in a trace. diff --git a/src/libs/Weave/Generated/Weave.ICostsClient.CostCreateCostCreatePost.g.cs b/src/libs/Weave/Generated/Weave.ICostsClient.CostCreateCostCreatePost.g.cs index a522fb8..3c548ea 100644 --- a/src/libs/Weave/Generated/Weave.ICostsClient.CostCreateCostCreatePost.g.cs +++ b/src/libs/Weave/Generated/Weave.ICostsClient.CostCreateCostCreatePost.g.cs @@ -19,6 +19,18 @@ public partial interface ICostsClient /// /// Cost Create /// + /// + /// 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> CostCreateCostCreatePostAsResponseAsync( + + global::Weave.CostCreateReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Cost Create + /// /// /// /// diff --git a/src/libs/Weave/Generated/Weave.ICostsClient.CostPurgeCostPurgePost.g.cs b/src/libs/Weave/Generated/Weave.ICostsClient.CostPurgeCostPurgePost.g.cs index 016a637..001b0f7 100644 --- a/src/libs/Weave/Generated/Weave.ICostsClient.CostPurgeCostPurgePost.g.cs +++ b/src/libs/Weave/Generated/Weave.ICostsClient.CostPurgeCostPurgePost.g.cs @@ -19,6 +19,18 @@ public partial interface ICostsClient /// /// Cost Purge /// + /// + /// 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> CostPurgeCostPurgePostAsResponseAsync( + + global::Weave.CostPurgeReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Cost Purge + /// /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Weave/Generated/Weave.ICostsClient.CostQueryCostQueryPost.g.cs b/src/libs/Weave/Generated/Weave.ICostsClient.CostQueryCostQueryPost.g.cs index 9d22c37..bc82799 100644 --- a/src/libs/Weave/Generated/Weave.ICostsClient.CostQueryCostQueryPost.g.cs +++ b/src/libs/Weave/Generated/Weave.ICostsClient.CostQueryCostQueryPost.g.cs @@ -19,6 +19,18 @@ public partial interface ICostsClient /// /// Cost Query /// + /// + /// 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> CostQueryCostQueryPostAsResponseAsync( + + global::Weave.CostQueryReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Cost Query + /// /// /// /// diff --git a/src/libs/Weave/Generated/Weave.IDatasetsClient.DatasetCreateV2EntityProjectDatasetsPost.g.cs b/src/libs/Weave/Generated/Weave.IDatasetsClient.DatasetCreateV2EntityProjectDatasetsPost.g.cs index 0ec5e3f..67298d4 100644 --- a/src/libs/Weave/Generated/Weave.IDatasetsClient.DatasetCreateV2EntityProjectDatasetsPost.g.cs +++ b/src/libs/Weave/Generated/Weave.IDatasetsClient.DatasetCreateV2EntityProjectDatasetsPost.g.cs @@ -27,6 +27,23 @@ public partial interface IDatasetsClient /// /// /// + /// + /// 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> DatasetCreateV2EntityProjectDatasetsPostAsResponseAsync( + string entity, + string project, + + global::Weave.DatasetCreateBody request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Dataset Create
+ /// Create a dataset object. + ///
+ /// + /// /// /// The name of this dataset. Datasets with the same name will be versioned together. /// diff --git a/src/libs/Weave/Generated/Weave.IDatasetsClient.DatasetDeleteV2EntityProjectDatasetsObjectIdDelete.g.cs b/src/libs/Weave/Generated/Weave.IDatasetsClient.DatasetDeleteV2EntityProjectDatasetsObjectIdDelete.g.cs index 66562ab..f2123b2 100644 --- a/src/libs/Weave/Generated/Weave.IDatasetsClient.DatasetDeleteV2EntityProjectDatasetsObjectIdDelete.g.cs +++ b/src/libs/Weave/Generated/Weave.IDatasetsClient.DatasetDeleteV2EntityProjectDatasetsObjectIdDelete.g.cs @@ -24,5 +24,25 @@ public partial interface IDatasetsClient global::System.Collections.Generic.IList? digests = default, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Dataset Delete
+ /// Delete a dataset object. If digests are provided, only those versions are deleted. Otherwise, all versions are deleted. + ///
+ /// + /// + /// + /// + /// List of digests to delete. If not provided, all digests for the dataset will be deleted. + /// + /// 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> DatasetDeleteV2EntityProjectDatasetsObjectIdDeleteAsResponseAsync( + string entity, + string project, + string objectId, + global::System.Collections.Generic.IList? digests = default, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Weave/Generated/Weave.IDatasetsClient.DatasetListV2EntityProjectDatasetsGet.g.cs b/src/libs/Weave/Generated/Weave.IDatasetsClient.DatasetListV2EntityProjectDatasetsGet.g.cs index 129672b..7023ebc 100644 --- a/src/libs/Weave/Generated/Weave.IDatasetsClient.DatasetListV2EntityProjectDatasetsGet.g.cs +++ b/src/libs/Weave/Generated/Weave.IDatasetsClient.DatasetListV2EntityProjectDatasetsGet.g.cs @@ -26,5 +26,27 @@ public partial interface IDatasetsClient int? offset = default, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Dataset List
+ /// List dataset objects. + ///
+ /// + /// + /// + /// Maximum number of datasets to return + /// + /// + /// Number of datasets to skip + /// + /// 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> DatasetListV2EntityProjectDatasetsGetAsResponseAsync( + string entity, + string project, + int? limit = default, + int? offset = default, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Weave/Generated/Weave.IDatasetsClient.DatasetReadV2EntityProjectDatasetsObjectIdVersionsDigestGet.g.cs b/src/libs/Weave/Generated/Weave.IDatasetsClient.DatasetReadV2EntityProjectDatasetsObjectIdVersionsDigestGet.g.cs index 866c38a..cfe5e9f 100644 --- a/src/libs/Weave/Generated/Weave.IDatasetsClient.DatasetReadV2EntityProjectDatasetsObjectIdVersionsDigestGet.g.cs +++ b/src/libs/Weave/Generated/Weave.IDatasetsClient.DatasetReadV2EntityProjectDatasetsObjectIdVersionsDigestGet.g.cs @@ -22,5 +22,23 @@ public partial interface IDatasetsClient string digest, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Dataset Read
+ /// Get a dataset object. + ///
+ /// + /// + /// + /// + /// 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> DatasetReadV2EntityProjectDatasetsObjectIdVersionsDigestGetAsResponseAsync( + string entity, + string project, + string objectId, + string digest, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Weave/Generated/Weave.IEvalResultsClient.EvalResultsQueryV2EntityProjectEvalResultsQueryPost.g.cs b/src/libs/Weave/Generated/Weave.IEvalResultsClient.EvalResultsQueryV2EntityProjectEvalResultsQueryPost.g.cs index 3f59c51..0e1633c 100644 --- a/src/libs/Weave/Generated/Weave.IEvalResultsClient.EvalResultsQueryV2EntityProjectEvalResultsQueryPost.g.cs +++ b/src/libs/Weave/Generated/Weave.IEvalResultsClient.EvalResultsQueryV2EntityProjectEvalResultsQueryPost.g.cs @@ -27,6 +27,23 @@ public partial interface IEvalResultsClient /// /// /// + /// + /// 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> EvalResultsQueryV2EntityProjectEvalResultsQueryPostAsResponseAsync( + string entity, + string project, + + global::Weave.EvalResultsQueryBody request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Eval Results Query
+ /// Read grouped evaluation result rows for one or more evaluations. + ///
+ /// + /// /// /// Evaluation root call IDs to include. /// diff --git a/src/libs/Weave/Generated/Weave.IEvaluationRunsClient.EvaluationRunCreateV2EntityProjectEvaluationRunsPost.g.cs b/src/libs/Weave/Generated/Weave.IEvaluationRunsClient.EvaluationRunCreateV2EntityProjectEvaluationRunsPost.g.cs index 8bf7e06..ed22620 100644 --- a/src/libs/Weave/Generated/Weave.IEvaluationRunsClient.EvaluationRunCreateV2EntityProjectEvaluationRunsPost.g.cs +++ b/src/libs/Weave/Generated/Weave.IEvaluationRunsClient.EvaluationRunCreateV2EntityProjectEvaluationRunsPost.g.cs @@ -27,6 +27,23 @@ public partial interface IEvaluationRunsClient /// /// /// + /// + /// 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> EvaluationRunCreateV2EntityProjectEvaluationRunsPostAsResponseAsync( + string entity, + string project, + + global::Weave.EvaluationRunCreateBody request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Evaluation Run Create
+ /// Create an evaluation run. + ///
+ /// + /// /// /// Reference to the evaluation (weave:// URI) /// diff --git a/src/libs/Weave/Generated/Weave.IEvaluationRunsClient.EvaluationRunDeleteV2EntityProjectEvaluationRunsDelete.g.cs b/src/libs/Weave/Generated/Weave.IEvaluationRunsClient.EvaluationRunDeleteV2EntityProjectEvaluationRunsDelete.g.cs index c94ba60..fd4fb18 100644 --- a/src/libs/Weave/Generated/Weave.IEvaluationRunsClient.EvaluationRunDeleteV2EntityProjectEvaluationRunsDelete.g.cs +++ b/src/libs/Weave/Generated/Weave.IEvaluationRunsClient.EvaluationRunDeleteV2EntityProjectEvaluationRunsDelete.g.cs @@ -22,5 +22,23 @@ public partial interface IEvaluationRunsClient global::System.Collections.Generic.IList evaluationRunIds, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Evaluation Run Delete
+ /// Delete evaluation runs. + ///
+ /// + /// + /// + /// List of evaluation run IDs to delete + /// + /// 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> EvaluationRunDeleteV2EntityProjectEvaluationRunsDeleteAsResponseAsync( + string entity, + string project, + global::System.Collections.Generic.IList evaluationRunIds, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Weave/Generated/Weave.IEvaluationRunsClient.EvaluationRunFinishV2EntityProjectEvaluationRunsEvaluationRunIdFinishPost.g.cs b/src/libs/Weave/Generated/Weave.IEvaluationRunsClient.EvaluationRunFinishV2EntityProjectEvaluationRunsEvaluationRunIdFinishPost.g.cs index 87964f4..c824659 100644 --- a/src/libs/Weave/Generated/Weave.IEvaluationRunsClient.EvaluationRunFinishV2EntityProjectEvaluationRunsEvaluationRunIdFinishPost.g.cs +++ b/src/libs/Weave/Generated/Weave.IEvaluationRunsClient.EvaluationRunFinishV2EntityProjectEvaluationRunsEvaluationRunIdFinishPost.g.cs @@ -30,6 +30,25 @@ public partial interface IEvaluationRunsClient /// /// /// + /// + /// 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> EvaluationRunFinishV2EntityProjectEvaluationRunsEvaluationRunIdFinishPostAsResponseAsync( + string entity, + string project, + string evaluationRunId, + + global::Weave.EvaluationRunFinishBody request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Evaluation Run Finish
+ /// Finish an evaluation run. + ///
+ /// + /// + /// /// /// Optional summary dictionary for the evaluation run /// diff --git a/src/libs/Weave/Generated/Weave.IEvaluationRunsClient.EvaluationRunReadV2EntityProjectEvaluationRunsEvaluationRunIdGet.g.cs b/src/libs/Weave/Generated/Weave.IEvaluationRunsClient.EvaluationRunReadV2EntityProjectEvaluationRunsEvaluationRunIdGet.g.cs index 10a9336..f0e2d30 100644 --- a/src/libs/Weave/Generated/Weave.IEvaluationRunsClient.EvaluationRunReadV2EntityProjectEvaluationRunsEvaluationRunIdGet.g.cs +++ b/src/libs/Weave/Generated/Weave.IEvaluationRunsClient.EvaluationRunReadV2EntityProjectEvaluationRunsEvaluationRunIdGet.g.cs @@ -20,5 +20,21 @@ public partial interface IEvaluationRunsClient string evaluationRunId, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Evaluation Run Read
+ /// Read an evaluation run. + ///
+ /// + /// + /// + /// 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> EvaluationRunReadV2EntityProjectEvaluationRunsEvaluationRunIdGetAsResponseAsync( + string entity, + string project, + string evaluationRunId, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Weave/Generated/Weave.IEvaluationsClient.EvaluateModelEvaluationsEvaluateModelPost.g.cs b/src/libs/Weave/Generated/Weave.IEvaluationsClient.EvaluateModelEvaluationsEvaluateModelPost.g.cs index d5138eb..a7f0f88 100644 --- a/src/libs/Weave/Generated/Weave.IEvaluationsClient.EvaluateModelEvaluationsEvaluateModelPost.g.cs +++ b/src/libs/Weave/Generated/Weave.IEvaluationsClient.EvaluateModelEvaluationsEvaluateModelPost.g.cs @@ -19,6 +19,18 @@ public partial interface IEvaluationsClient /// /// Evaluate 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> EvaluateModelEvaluationsEvaluateModelPostAsResponseAsync( + + global::Weave.EvaluateModelReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Evaluate Model + /// /// /// /// diff --git a/src/libs/Weave/Generated/Weave.IEvaluationsClient.EvaluationCreateV2EntityProjectEvaluationsPost.g.cs b/src/libs/Weave/Generated/Weave.IEvaluationsClient.EvaluationCreateV2EntityProjectEvaluationsPost.g.cs index aa6b20f..53acbc1 100644 --- a/src/libs/Weave/Generated/Weave.IEvaluationsClient.EvaluationCreateV2EntityProjectEvaluationsPost.g.cs +++ b/src/libs/Weave/Generated/Weave.IEvaluationsClient.EvaluationCreateV2EntityProjectEvaluationsPost.g.cs @@ -27,6 +27,23 @@ public partial interface IEvaluationsClient /// /// /// + /// + /// 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> EvaluationCreateV2EntityProjectEvaluationsPostAsResponseAsync( + string entity, + string project, + + global::Weave.EvaluationCreateBody request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Evaluation Create
+ /// Create an evaluation object. + ///
+ /// + /// /// /// The name of this evaluation. Evaluations with the same name will be versioned together. /// diff --git a/src/libs/Weave/Generated/Weave.IEvaluationsClient.EvaluationDeleteV2EntityProjectEvaluationsObjectIdDelete.g.cs b/src/libs/Weave/Generated/Weave.IEvaluationsClient.EvaluationDeleteV2EntityProjectEvaluationsObjectIdDelete.g.cs index c9b576e..595b81c 100644 --- a/src/libs/Weave/Generated/Weave.IEvaluationsClient.EvaluationDeleteV2EntityProjectEvaluationsObjectIdDelete.g.cs +++ b/src/libs/Weave/Generated/Weave.IEvaluationsClient.EvaluationDeleteV2EntityProjectEvaluationsObjectIdDelete.g.cs @@ -24,5 +24,25 @@ public partial interface IEvaluationsClient global::System.Collections.Generic.IList? digests = default, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Evaluation Delete
+ /// Delete an evaluation object. + ///
+ /// + /// + /// + /// + /// List of digests to delete. If not provided, all digests for the evaluation will be deleted. + /// + /// 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> EvaluationDeleteV2EntityProjectEvaluationsObjectIdDeleteAsResponseAsync( + string entity, + string project, + string objectId, + global::System.Collections.Generic.IList? digests = default, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Weave/Generated/Weave.IEvaluationsClient.EvaluationListV2EntityProjectEvaluationsGet.g.cs b/src/libs/Weave/Generated/Weave.IEvaluationsClient.EvaluationListV2EntityProjectEvaluationsGet.g.cs index 49d671d..815a954 100644 --- a/src/libs/Weave/Generated/Weave.IEvaluationsClient.EvaluationListV2EntityProjectEvaluationsGet.g.cs +++ b/src/libs/Weave/Generated/Weave.IEvaluationsClient.EvaluationListV2EntityProjectEvaluationsGet.g.cs @@ -18,5 +18,19 @@ public partial interface IEvaluationsClient string project, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Evaluation List
+ /// List evaluation objects. + ///
+ /// + /// + /// 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> EvaluationListV2EntityProjectEvaluationsGetAsResponseAsync( + string entity, + string project, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Weave/Generated/Weave.IEvaluationsClient.EvaluationReadV2EntityProjectEvaluationsObjectIdVersionsDigestGet.g.cs b/src/libs/Weave/Generated/Weave.IEvaluationsClient.EvaluationReadV2EntityProjectEvaluationsObjectIdVersionsDigestGet.g.cs index 949cf58..9be42f2 100644 --- a/src/libs/Weave/Generated/Weave.IEvaluationsClient.EvaluationReadV2EntityProjectEvaluationsObjectIdVersionsDigestGet.g.cs +++ b/src/libs/Weave/Generated/Weave.IEvaluationsClient.EvaluationReadV2EntityProjectEvaluationsObjectIdVersionsDigestGet.g.cs @@ -22,5 +22,23 @@ public partial interface IEvaluationsClient string digest, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Evaluation Read
+ /// Get an evaluation object. + ///
+ /// + /// + /// + /// + /// 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> EvaluationReadV2EntityProjectEvaluationsObjectIdVersionsDigestGetAsResponseAsync( + string entity, + string project, + string objectId, + string digest, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Weave/Generated/Weave.IEvaluationsClient.EvaluationStatusEvaluationsStatusPost.g.cs b/src/libs/Weave/Generated/Weave.IEvaluationsClient.EvaluationStatusEvaluationsStatusPost.g.cs index e14ceea..9e9d79f 100644 --- a/src/libs/Weave/Generated/Weave.IEvaluationsClient.EvaluationStatusEvaluationsStatusPost.g.cs +++ b/src/libs/Weave/Generated/Weave.IEvaluationsClient.EvaluationStatusEvaluationsStatusPost.g.cs @@ -19,6 +19,18 @@ public partial interface IEvaluationsClient /// /// Evaluation 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> EvaluationStatusEvaluationsStatusPostAsResponseAsync( + + global::Weave.EvaluationStatusReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Evaluation Status + /// /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Weave/Generated/Weave.IFeedbackClient.FeedbackCreateBatchFeedbackBatchCreatePost.g.cs b/src/libs/Weave/Generated/Weave.IFeedbackClient.FeedbackCreateBatchFeedbackBatchCreatePost.g.cs index cb12928..a7fd63b 100644 --- a/src/libs/Weave/Generated/Weave.IFeedbackClient.FeedbackCreateBatchFeedbackBatchCreatePost.g.cs +++ b/src/libs/Weave/Generated/Weave.IFeedbackClient.FeedbackCreateBatchFeedbackBatchCreatePost.g.cs @@ -21,6 +21,19 @@ public partial interface IFeedbackClient /// Feedback Create Batch
/// Add multiple feedback items to calls or objects. /// + /// + /// 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> FeedbackCreateBatchFeedbackBatchCreatePostAsResponseAsync( + + global::Weave.FeedbackCreateBatchReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Feedback Create Batch
+ /// Add multiple feedback items to calls or objects. + ///
/// /// 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/Weave/Generated/Weave.IFeedbackClient.FeedbackCreateFeedbackCreatePost.g.cs b/src/libs/Weave/Generated/Weave.IFeedbackClient.FeedbackCreateFeedbackCreatePost.g.cs index 886dffe..27cb758 100644 --- a/src/libs/Weave/Generated/Weave.IFeedbackClient.FeedbackCreateFeedbackCreatePost.g.cs +++ b/src/libs/Weave/Generated/Weave.IFeedbackClient.FeedbackCreateFeedbackCreatePost.g.cs @@ -21,6 +21,19 @@ public partial interface IFeedbackClient /// Feedback Create
/// Add feedback to a call or object. /// + /// + /// 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> FeedbackCreateFeedbackCreatePostAsResponseAsync( + + global::Weave.FeedbackCreateReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Feedback Create
+ /// Add feedback to a call or object. + ///
/// /// If provided by the client, this ID will be used for the feedback row instead of a server-generated one. /// diff --git a/src/libs/Weave/Generated/Weave.IFeedbackClient.FeedbackPayloadSchemaFeedbackPayloadSchemaPost.g.cs b/src/libs/Weave/Generated/Weave.IFeedbackClient.FeedbackPayloadSchemaFeedbackPayloadSchemaPost.g.cs index 275043a..8c3d58e 100644 --- a/src/libs/Weave/Generated/Weave.IFeedbackClient.FeedbackPayloadSchemaFeedbackPayloadSchemaPost.g.cs +++ b/src/libs/Weave/Generated/Weave.IFeedbackClient.FeedbackPayloadSchemaFeedbackPayloadSchemaPost.g.cs @@ -21,6 +21,19 @@ public partial interface IFeedbackClient /// Feedback Payload Schema
/// Discover feedback payload schema (paths and types) from sample rows. /// + /// + /// 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> FeedbackPayloadSchemaFeedbackPayloadSchemaPostAsResponseAsync( + + global::Weave.FeedbackPayloadSchemaReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Feedback Payload Schema
+ /// Discover feedback payload schema (paths and types) from sample rows. + ///
/// /// /// Inclusive start time (UTC, ISO 8601). diff --git a/src/libs/Weave/Generated/Weave.IFeedbackClient.FeedbackPurgeFeedbackPurgePost.g.cs b/src/libs/Weave/Generated/Weave.IFeedbackClient.FeedbackPurgeFeedbackPurgePost.g.cs index 0e3eff7..882ec23 100644 --- a/src/libs/Weave/Generated/Weave.IFeedbackClient.FeedbackPurgeFeedbackPurgePost.g.cs +++ b/src/libs/Weave/Generated/Weave.IFeedbackClient.FeedbackPurgeFeedbackPurgePost.g.cs @@ -21,6 +21,19 @@ public partial interface IFeedbackClient /// Feedback Purge
/// Permanently delete feedback. /// + /// + /// 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> FeedbackPurgeFeedbackPurgePostAsResponseAsync( + + global::Weave.FeedbackPurgeReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Feedback Purge
+ /// Permanently delete feedback. + ///
/// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Weave/Generated/Weave.IFeedbackClient.FeedbackQueryFeedbackQueryPost.g.cs b/src/libs/Weave/Generated/Weave.IFeedbackClient.FeedbackQueryFeedbackQueryPost.g.cs index 747af25..5dedfe7 100644 --- a/src/libs/Weave/Generated/Weave.IFeedbackClient.FeedbackQueryFeedbackQueryPost.g.cs +++ b/src/libs/Weave/Generated/Weave.IFeedbackClient.FeedbackQueryFeedbackQueryPost.g.cs @@ -21,6 +21,19 @@ public partial interface IFeedbackClient /// Feedback Query
/// Query for feedback. /// + /// + /// 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> FeedbackQueryFeedbackQueryPostAsResponseAsync( + + global::Weave.FeedbackQueryReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Feedback Query
+ /// Query for feedback. + ///
/// /// /// diff --git a/src/libs/Weave/Generated/Weave.IFeedbackClient.FeedbackReplaceFeedbackReplacePost.g.cs b/src/libs/Weave/Generated/Weave.IFeedbackClient.FeedbackReplaceFeedbackReplacePost.g.cs index 01c2564..53e1d63 100644 --- a/src/libs/Weave/Generated/Weave.IFeedbackClient.FeedbackReplaceFeedbackReplacePost.g.cs +++ b/src/libs/Weave/Generated/Weave.IFeedbackClient.FeedbackReplaceFeedbackReplacePost.g.cs @@ -19,6 +19,18 @@ public partial interface IFeedbackClient /// /// Feedback Replace /// + /// + /// 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> FeedbackReplaceFeedbackReplacePostAsResponseAsync( + + global::Weave.FeedbackReplaceReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Feedback Replace + /// /// /// If provided by the client, this ID will be used for the feedback row instead of a server-generated one. /// diff --git a/src/libs/Weave/Generated/Weave.IFeedbackClient.FeedbackStatsFeedbackStatsPost.g.cs b/src/libs/Weave/Generated/Weave.IFeedbackClient.FeedbackStatsFeedbackStatsPost.g.cs index 37ff541..06074e2 100644 --- a/src/libs/Weave/Generated/Weave.IFeedbackClient.FeedbackStatsFeedbackStatsPost.g.cs +++ b/src/libs/Weave/Generated/Weave.IFeedbackClient.FeedbackStatsFeedbackStatsPost.g.cs @@ -21,6 +21,19 @@ public partial interface IFeedbackClient /// Feedback Stats
/// Return aggregated feedback statistics over time buckets. /// + /// + /// 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> FeedbackStatsFeedbackStatsPostAsResponseAsync( + + global::Weave.FeedbackStatsReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Feedback Stats
+ /// Return aggregated feedback statistics over time buckets. + ///
/// /// /// Inclusive start time (UTC, ISO 8601). diff --git a/src/libs/Weave/Generated/Weave.IFilesClient.FileContentFileContentPost.g.cs b/src/libs/Weave/Generated/Weave.IFilesClient.FileContentFileContentPost.g.cs index 284b55a..224efd0 100644 --- a/src/libs/Weave/Generated/Weave.IFilesClient.FileContentFileContentPost.g.cs +++ b/src/libs/Weave/Generated/Weave.IFilesClient.FileContentFileContentPost.g.cs @@ -19,6 +19,18 @@ public partial interface IFilesClient /// /// File Content /// + /// + /// 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> FileContentFileContentPostAsResponseAsync( + + global::Weave.FileContentReadReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// File Content + /// /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Weave/Generated/Weave.IFilesClient.FileCreateFileCreatePost.g.cs b/src/libs/Weave/Generated/Weave.IFilesClient.FileCreateFileCreatePost.g.cs index fdc5434..013f77c 100644 --- a/src/libs/Weave/Generated/Weave.IFilesClient.FileCreateFileCreatePost.g.cs +++ b/src/libs/Weave/Generated/Weave.IFilesClient.FileCreateFileCreatePost.g.cs @@ -19,6 +19,18 @@ public partial interface IFilesClient /// /// File Create /// + /// + /// 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> FileCreateFileCreatePostAsResponseAsync( + + global::Weave.BodyFileCreateFileCreatePost request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// File Create + /// /// /// /// @@ -31,5 +43,40 @@ public partial interface IFilesClient string filename, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// File Create + /// + /// + /// + /// 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 FileCreateFileCreatePostAsync( + string projectId, + global::System.IO.Stream file, + string filename, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// File Create + /// + /// + /// + /// 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> FileCreateFileCreatePostAsResponseAsync( + string projectId, + global::System.IO.Stream file, + string filename, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Weave/Generated/Weave.IFilesClient.FilesStatsFilesQueryStatsPost.g.cs b/src/libs/Weave/Generated/Weave.IFilesClient.FilesStatsFilesQueryStatsPost.g.cs index 9be8b3b..5dc84a1 100644 --- a/src/libs/Weave/Generated/Weave.IFilesClient.FilesStatsFilesQueryStatsPost.g.cs +++ b/src/libs/Weave/Generated/Weave.IFilesClient.FilesStatsFilesQueryStatsPost.g.cs @@ -19,6 +19,18 @@ public partial interface IFilesClient /// /// Files Stats /// + /// + /// 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> FilesStatsFilesQueryStatsPostAsResponseAsync( + + global::Weave.FilesStatsReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Files Stats + /// /// /// 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/Weave/Generated/Weave.IImagesClient.ImageCreateImageCreatePost.g.cs b/src/libs/Weave/Generated/Weave.IImagesClient.ImageCreateImageCreatePost.g.cs index 814ea9a..682b40f 100644 --- a/src/libs/Weave/Generated/Weave.IImagesClient.ImageCreateImageCreatePost.g.cs +++ b/src/libs/Weave/Generated/Weave.IImagesClient.ImageCreateImageCreatePost.g.cs @@ -19,6 +19,18 @@ public partial interface IImagesClient /// /// Image Create /// + /// + /// 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> ImageCreateImageCreatePostAsResponseAsync( + + global::Weave.ImageGenerationCreateReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Image Create + /// /// /// /// diff --git a/src/libs/Weave/Generated/Weave.IInferenceClient.InferenceAnalysisArtificialanalysisModelsInferenceAnalysisArtificialanalysisModelsGet.g.cs b/src/libs/Weave/Generated/Weave.IInferenceClient.InferenceAnalysisArtificialanalysisModelsInferenceAnalysisArtificialanalysisModelsGet.g.cs index 31e62ef..4177545 100644 --- a/src/libs/Weave/Generated/Weave.IInferenceClient.InferenceAnalysisArtificialanalysisModelsInferenceAnalysisArtificialanalysisModelsGet.g.cs +++ b/src/libs/Weave/Generated/Weave.IInferenceClient.InferenceAnalysisArtificialanalysisModelsInferenceAnalysisArtificialanalysisModelsGet.g.cs @@ -15,5 +15,16 @@ public partial interface IInferenceClient global::System.Threading.Tasks.Task InferenceAnalysisArtificialanalysisModelsInferenceAnalysisArtificialanalysisModelsGetAsync( global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Inference Analysis Artificialanalysis Models
+ /// Returns a list of available models for Artificial Analysis.
+ /// This API is available without authentication. + ///
+ /// 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> InferenceAnalysisArtificialanalysisModelsInferenceAnalysisArtificialanalysisModelsGetAsResponseAsync( + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Weave/Generated/Weave.IInferenceClient.InferenceRouterOpenrouterModelsInferenceRouterOpenrouterModelsGet.g.cs b/src/libs/Weave/Generated/Weave.IInferenceClient.InferenceRouterOpenrouterModelsInferenceRouterOpenrouterModelsGet.g.cs index 49b84c8..ada60a0 100644 --- a/src/libs/Weave/Generated/Weave.IInferenceClient.InferenceRouterOpenrouterModelsInferenceRouterOpenrouterModelsGet.g.cs +++ b/src/libs/Weave/Generated/Weave.IInferenceClient.InferenceRouterOpenrouterModelsInferenceRouterOpenrouterModelsGet.g.cs @@ -15,5 +15,16 @@ public partial interface IInferenceClient global::System.Threading.Tasks.Task InferenceRouterOpenrouterModelsInferenceRouterOpenrouterModelsGetAsync( global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Inference Router Openrouter Models
+ /// Returns a list of models that are available to be used with OpenRouter.
+ /// This API is available without authentication. + ///
+ /// 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> InferenceRouterOpenrouterModelsInferenceRouterOpenrouterModelsGetAsResponseAsync( + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Weave/Generated/Weave.IInferenceClient.NvidiaHardwareInferenceNvidiaV2HardwareGet.g.cs b/src/libs/Weave/Generated/Weave.IInferenceClient.NvidiaHardwareInferenceNvidiaV2HardwareGet.g.cs index f0ab26f..788cc54 100644 --- a/src/libs/Weave/Generated/Weave.IInferenceClient.NvidiaHardwareInferenceNvidiaV2HardwareGet.g.cs +++ b/src/libs/Weave/Generated/Weave.IInferenceClient.NvidiaHardwareInferenceNvidiaV2HardwareGet.g.cs @@ -20,5 +20,21 @@ public partial interface IInferenceClient string model, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Nvidia Hardware
+ /// Returns available hardware and pricing for a given model.
+ /// Called by NVIDIA to show users their options and redirect them
+ /// based on what we support. Only serverless options are returned. + ///
+ /// + /// Model name without the publisher prefix + /// + /// 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> NvidiaHardwareInferenceNvidiaV2HardwareGetAsResponseAsync( + string model, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Weave/Generated/Weave.IModelsClient.ModelCreateV2EntityProjectModelsPost.g.cs b/src/libs/Weave/Generated/Weave.IModelsClient.ModelCreateV2EntityProjectModelsPost.g.cs index fce984c..ad0a214 100644 --- a/src/libs/Weave/Generated/Weave.IModelsClient.ModelCreateV2EntityProjectModelsPost.g.cs +++ b/src/libs/Weave/Generated/Weave.IModelsClient.ModelCreateV2EntityProjectModelsPost.g.cs @@ -27,6 +27,23 @@ public partial interface IModelsClient /// /// /// + /// + /// 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> ModelCreateV2EntityProjectModelsPostAsResponseAsync( + string entity, + string project, + + global::Weave.ModelCreateBody request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Model Create
+ /// Create a model object. + ///
+ /// + /// /// /// The name of this model. Models with the same name will be versioned together. /// diff --git a/src/libs/Weave/Generated/Weave.IModelsClient.ModelDeleteV2EntityProjectModelsObjectIdDelete.g.cs b/src/libs/Weave/Generated/Weave.IModelsClient.ModelDeleteV2EntityProjectModelsObjectIdDelete.g.cs index 06b37d7..83b53f6 100644 --- a/src/libs/Weave/Generated/Weave.IModelsClient.ModelDeleteV2EntityProjectModelsObjectIdDelete.g.cs +++ b/src/libs/Weave/Generated/Weave.IModelsClient.ModelDeleteV2EntityProjectModelsObjectIdDelete.g.cs @@ -24,5 +24,25 @@ public partial interface IModelsClient global::System.Collections.Generic.IList? digests = default, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Model Delete
+ /// Delete a model object. If digests are provided, only those versions are deleted. Otherwise, all versions are deleted. + ///
+ /// + /// + /// + /// + /// List of digests to delete. If not provided, all digests for the model will be deleted. + /// + /// 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> ModelDeleteV2EntityProjectModelsObjectIdDeleteAsResponseAsync( + string entity, + string project, + string objectId, + global::System.Collections.Generic.IList? digests = default, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Weave/Generated/Weave.IModelsClient.ModelListV2EntityProjectModelsGet.g.cs b/src/libs/Weave/Generated/Weave.IModelsClient.ModelListV2EntityProjectModelsGet.g.cs index f6c5f4b..5e31485 100644 --- a/src/libs/Weave/Generated/Weave.IModelsClient.ModelListV2EntityProjectModelsGet.g.cs +++ b/src/libs/Weave/Generated/Weave.IModelsClient.ModelListV2EntityProjectModelsGet.g.cs @@ -26,5 +26,27 @@ public partial interface IModelsClient int? offset = default, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Model List
+ /// List model objects. + ///
+ /// + /// + /// + /// Maximum number of models to return + /// + /// + /// Number of models to skip + /// + /// 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> ModelListV2EntityProjectModelsGetAsResponseAsync( + string entity, + string project, + int? limit = default, + int? offset = default, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Weave/Generated/Weave.IModelsClient.ModelReadV2EntityProjectModelsObjectIdVersionsDigestGet.g.cs b/src/libs/Weave/Generated/Weave.IModelsClient.ModelReadV2EntityProjectModelsObjectIdVersionsDigestGet.g.cs index f066493..0fe38a6 100644 --- a/src/libs/Weave/Generated/Weave.IModelsClient.ModelReadV2EntityProjectModelsObjectIdVersionsDigestGet.g.cs +++ b/src/libs/Weave/Generated/Weave.IModelsClient.ModelReadV2EntityProjectModelsObjectIdVersionsDigestGet.g.cs @@ -22,5 +22,23 @@ public partial interface IModelsClient string digest, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Model Read
+ /// Get a model object. + ///
+ /// + /// + /// + /// + /// 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> ModelReadV2EntityProjectModelsObjectIdVersionsDigestGetAsResponseAsync( + string entity, + string project, + string objectId, + string digest, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Weave/Generated/Weave.IObjectsClient.AliasesListAliasesGet.g.cs b/src/libs/Weave/Generated/Weave.IObjectsClient.AliasesListAliasesGet.g.cs index 5639a7b..c88e8ba 100644 --- a/src/libs/Weave/Generated/Weave.IObjectsClient.AliasesListAliasesGet.g.cs +++ b/src/libs/Weave/Generated/Weave.IObjectsClient.AliasesListAliasesGet.g.cs @@ -16,5 +16,17 @@ public partial interface IObjectsClient string projectId, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Aliases List
+ /// List all aliases in a project. + ///
+ /// + /// 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> AliasesListAliasesGetAsResponseAsync( + string projectId, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Weave/Generated/Weave.IObjectsClient.ObjAddTagsObjsObjectIdVersionsDigestTagsPut.g.cs b/src/libs/Weave/Generated/Weave.IObjectsClient.ObjAddTagsObjsObjectIdVersionsDigestTagsPut.g.cs index b526e76..b98e644 100644 --- a/src/libs/Weave/Generated/Weave.IObjectsClient.ObjAddTagsObjsObjectIdVersionsDigestTagsPut.g.cs +++ b/src/libs/Weave/Generated/Weave.IObjectsClient.ObjAddTagsObjsObjectIdVersionsDigestTagsPut.g.cs @@ -27,6 +27,23 @@ public partial interface IObjectsClient /// /// /// + /// + /// 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> ObjAddTagsObjsObjectIdVersionsDigestTagsPutAsResponseAsync( + string objectId, + string digest, + + global::Weave.ObjTagsBody request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Obj Add Tags
+ /// Add tags to an object version. + ///
+ /// + /// /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Weave/Generated/Weave.IObjectsClient.ObjCreateObjCreatePost.g.cs b/src/libs/Weave/Generated/Weave.IObjectsClient.ObjCreateObjCreatePost.g.cs index 05d982b..c353786 100644 --- a/src/libs/Weave/Generated/Weave.IObjectsClient.ObjCreateObjCreatePost.g.cs +++ b/src/libs/Weave/Generated/Weave.IObjectsClient.ObjCreateObjCreatePost.g.cs @@ -19,6 +19,18 @@ public partial interface IObjectsClient /// /// Obj Create /// + /// + /// 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> ObjCreateObjCreatePostAsResponseAsync( + + global::Weave.ObjCreateReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Obj Create + /// /// /// 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/Weave/Generated/Weave.IObjectsClient.ObjDeleteObjDeletePost.g.cs b/src/libs/Weave/Generated/Weave.IObjectsClient.ObjDeleteObjDeletePost.g.cs index 906b17c..e52c70c 100644 --- a/src/libs/Weave/Generated/Weave.IObjectsClient.ObjDeleteObjDeletePost.g.cs +++ b/src/libs/Weave/Generated/Weave.IObjectsClient.ObjDeleteObjDeletePost.g.cs @@ -19,6 +19,18 @@ public partial interface IObjectsClient /// /// Obj Delete /// + /// + /// 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> ObjDeleteObjDeletePostAsResponseAsync( + + global::Weave.ObjDeleteReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Obj Delete + /// /// /// /// diff --git a/src/libs/Weave/Generated/Weave.IObjectsClient.ObjReadObjReadPost.g.cs b/src/libs/Weave/Generated/Weave.IObjectsClient.ObjReadObjReadPost.g.cs index f262ac7..8729426 100644 --- a/src/libs/Weave/Generated/Weave.IObjectsClient.ObjReadObjReadPost.g.cs +++ b/src/libs/Weave/Generated/Weave.IObjectsClient.ObjReadObjReadPost.g.cs @@ -19,6 +19,18 @@ public partial interface IObjectsClient /// /// Obj Read /// + /// + /// 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> ObjReadObjReadPostAsResponseAsync( + + global::Weave.ObjReadReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Obj Read + /// /// /// /// diff --git a/src/libs/Weave/Generated/Weave.IObjectsClient.ObjRemoveAliasesObjsObjectIdAliasesRemovePost.g.cs b/src/libs/Weave/Generated/Weave.IObjectsClient.ObjRemoveAliasesObjsObjectIdAliasesRemovePost.g.cs index 544b653..e6a2ab5 100644 --- a/src/libs/Weave/Generated/Weave.IObjectsClient.ObjRemoveAliasesObjsObjectIdAliasesRemovePost.g.cs +++ b/src/libs/Weave/Generated/Weave.IObjectsClient.ObjRemoveAliasesObjsObjectIdAliasesRemovePost.g.cs @@ -24,6 +24,21 @@ public partial interface IObjectsClient /// Remove aliases from an object. /// /// + /// + /// 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> ObjRemoveAliasesObjsObjectIdAliasesRemovePostAsResponseAsync( + string objectId, + + global::Weave.ObjRemoveAliasesBody request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Obj Remove Aliases
+ /// Remove aliases from an object. + ///
+ /// /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Weave/Generated/Weave.IObjectsClient.ObjRemoveTagsObjsObjectIdVersionsDigestTagsRemovePost.g.cs b/src/libs/Weave/Generated/Weave.IObjectsClient.ObjRemoveTagsObjsObjectIdVersionsDigestTagsRemovePost.g.cs index 5abeab5..a07d17c 100644 --- a/src/libs/Weave/Generated/Weave.IObjectsClient.ObjRemoveTagsObjsObjectIdVersionsDigestTagsRemovePost.g.cs +++ b/src/libs/Weave/Generated/Weave.IObjectsClient.ObjRemoveTagsObjsObjectIdVersionsDigestTagsRemovePost.g.cs @@ -27,6 +27,23 @@ public partial interface IObjectsClient /// /// /// + /// + /// 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> ObjRemoveTagsObjsObjectIdVersionsDigestTagsRemovePostAsResponseAsync( + string objectId, + string digest, + + global::Weave.ObjTagsBody request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Obj Remove Tags
+ /// Remove tags from an object version. + ///
+ /// + /// /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Weave/Generated/Weave.IObjectsClient.ObjSetAliasesObjsObjectIdAliasesPut.g.cs b/src/libs/Weave/Generated/Weave.IObjectsClient.ObjSetAliasesObjsObjectIdAliasesPut.g.cs index 16b54c1..afea0c8 100644 --- a/src/libs/Weave/Generated/Weave.IObjectsClient.ObjSetAliasesObjsObjectIdAliasesPut.g.cs +++ b/src/libs/Weave/Generated/Weave.IObjectsClient.ObjSetAliasesObjsObjectIdAliasesPut.g.cs @@ -24,6 +24,21 @@ public partial interface IObjectsClient /// Set aliases for an object 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> ObjSetAliasesObjsObjectIdAliasesPutAsResponseAsync( + string objectId, + + global::Weave.ObjSetAliasesBody request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Obj Set Aliases
+ /// Set aliases for an object version. + ///
+ /// /// /// /// diff --git a/src/libs/Weave/Generated/Weave.IObjectsClient.ObjsQueryObjsQueryPost.g.cs b/src/libs/Weave/Generated/Weave.IObjectsClient.ObjsQueryObjsQueryPost.g.cs index 8187c3d..48ac95d 100644 --- a/src/libs/Weave/Generated/Weave.IObjectsClient.ObjsQueryObjsQueryPost.g.cs +++ b/src/libs/Weave/Generated/Weave.IObjectsClient.ObjsQueryObjsQueryPost.g.cs @@ -19,6 +19,18 @@ public partial interface IObjectsClient /// /// Objs Query /// + /// + /// 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> ObjsQueryObjsQueryPostAsResponseAsync( + + global::Weave.ObjQueryReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Objs Query + /// /// /// The ID of the project to query /// diff --git a/src/libs/Weave/Generated/Weave.IObjectsClient.TagsListTagsGet.g.cs b/src/libs/Weave/Generated/Weave.IObjectsClient.TagsListTagsGet.g.cs index b85bb0f..2b95fa3 100644 --- a/src/libs/Weave/Generated/Weave.IObjectsClient.TagsListTagsGet.g.cs +++ b/src/libs/Weave/Generated/Weave.IObjectsClient.TagsListTagsGet.g.cs @@ -16,5 +16,17 @@ public partial interface IObjectsClient string projectId, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Tags List
+ /// List all tags in a project. + ///
+ /// + /// 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> TagsListTagsGetAsResponseAsync( + string projectId, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Weave/Generated/Weave.IOpenTelemetryClient.ExportTraceOtelV1TracesPost.g.cs b/src/libs/Weave/Generated/Weave.IOpenTelemetryClient.ExportTraceOtelV1TracesPost.g.cs index 358cca1..31fa796 100644 --- a/src/libs/Weave/Generated/Weave.IOpenTelemetryClient.ExportTraceOtelV1TracesPost.g.cs +++ b/src/libs/Weave/Generated/Weave.IOpenTelemetryClient.ExportTraceOtelV1TracesPost.g.cs @@ -13,5 +13,14 @@ public partial interface IOpenTelemetryClient global::System.Threading.Tasks.Task ExportTraceOtelV1TracesPostAsync( global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Export Trace + /// + /// 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> ExportTraceOtelV1TracesPostAsResponseAsync( + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Weave/Generated/Weave.IOpsClient.OpCreateV2EntityProjectOpsPost.g.cs b/src/libs/Weave/Generated/Weave.IOpsClient.OpCreateV2EntityProjectOpsPost.g.cs index 2bdd223..6e832b9 100644 --- a/src/libs/Weave/Generated/Weave.IOpsClient.OpCreateV2EntityProjectOpsPost.g.cs +++ b/src/libs/Weave/Generated/Weave.IOpsClient.OpCreateV2EntityProjectOpsPost.g.cs @@ -27,6 +27,23 @@ public partial interface IOpsClient /// /// /// + /// + /// 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> OpCreateV2EntityProjectOpsPostAsResponseAsync( + string entity, + string project, + + global::Weave.OpCreateBody request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Op Create
+ /// Create an op object. + ///
+ /// + /// /// /// The name of this op. Ops with the same name will be versioned together. /// diff --git a/src/libs/Weave/Generated/Weave.IOpsClient.OpDeleteV2EntityProjectOpsObjectIdDelete.g.cs b/src/libs/Weave/Generated/Weave.IOpsClient.OpDeleteV2EntityProjectOpsObjectIdDelete.g.cs index 3817722..97882aa 100644 --- a/src/libs/Weave/Generated/Weave.IOpsClient.OpDeleteV2EntityProjectOpsObjectIdDelete.g.cs +++ b/src/libs/Weave/Generated/Weave.IOpsClient.OpDeleteV2EntityProjectOpsObjectIdDelete.g.cs @@ -24,5 +24,25 @@ public partial interface IOpsClient global::System.Collections.Generic.IList? digests = default, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Op Delete
+ /// Delete an op object. If digests are provided, only those versions are deleted. Otherwise, all versions are deleted. + ///
+ /// + /// + /// + /// + /// List of digests to delete. If not provided, all digests for the op will be deleted. + /// + /// 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> OpDeleteV2EntityProjectOpsObjectIdDeleteAsResponseAsync( + string entity, + string project, + string objectId, + global::System.Collections.Generic.IList? digests = default, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Weave/Generated/Weave.IOpsClient.OpListV2EntityProjectOpsGet.g.cs b/src/libs/Weave/Generated/Weave.IOpsClient.OpListV2EntityProjectOpsGet.g.cs index 5b6d820..f25c0cd 100644 --- a/src/libs/Weave/Generated/Weave.IOpsClient.OpListV2EntityProjectOpsGet.g.cs +++ b/src/libs/Weave/Generated/Weave.IOpsClient.OpListV2EntityProjectOpsGet.g.cs @@ -26,5 +26,27 @@ public partial interface IOpsClient int? offset = default, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Op List
+ /// List op objects. + ///
+ /// + /// + /// + /// Maximum number of ops to return + /// + /// + /// Number of ops to skip + /// + /// 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> OpListV2EntityProjectOpsGetAsResponseAsync( + string entity, + string project, + int? limit = default, + int? offset = default, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Weave/Generated/Weave.IOpsClient.OpReadV2EntityProjectOpsObjectIdVersionsDigestGet.g.cs b/src/libs/Weave/Generated/Weave.IOpsClient.OpReadV2EntityProjectOpsObjectIdVersionsDigestGet.g.cs index 500527b..5e8d888 100644 --- a/src/libs/Weave/Generated/Weave.IOpsClient.OpReadV2EntityProjectOpsObjectIdVersionsDigestGet.g.cs +++ b/src/libs/Weave/Generated/Weave.IOpsClient.OpReadV2EntityProjectOpsObjectIdVersionsDigestGet.g.cs @@ -27,5 +27,28 @@ public partial interface IOpsClient bool? eager = default, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Op Read
+ /// Get an op object. + ///
+ /// + /// + /// + /// + /// + /// Whether to eagerly load the op code
+ /// Default Value: false + /// + /// 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> OpReadV2EntityProjectOpsObjectIdVersionsDigestGetAsResponseAsync( + string entity, + string project, + string objectId, + string digest, + bool? eager = default, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Weave/Generated/Weave.IPredictionsClient.PredictionCreateV2EntityProjectPredictionsPost.g.cs b/src/libs/Weave/Generated/Weave.IPredictionsClient.PredictionCreateV2EntityProjectPredictionsPost.g.cs index cb4e19e..cd081fb 100644 --- a/src/libs/Weave/Generated/Weave.IPredictionsClient.PredictionCreateV2EntityProjectPredictionsPost.g.cs +++ b/src/libs/Weave/Generated/Weave.IPredictionsClient.PredictionCreateV2EntityProjectPredictionsPost.g.cs @@ -27,6 +27,23 @@ public partial interface IPredictionsClient /// /// /// + /// + /// 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> PredictionCreateV2EntityProjectPredictionsPostAsResponseAsync( + string entity, + string project, + + global::Weave.PredictionCreateBody request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Prediction Create
+ /// Create a prediction. + ///
+ /// + /// /// /// The model reference (weave:// URI) /// diff --git a/src/libs/Weave/Generated/Weave.IPredictionsClient.PredictionDeleteV2EntityProjectPredictionsDelete.g.cs b/src/libs/Weave/Generated/Weave.IPredictionsClient.PredictionDeleteV2EntityProjectPredictionsDelete.g.cs index 80b5acb..97e5adf 100644 --- a/src/libs/Weave/Generated/Weave.IPredictionsClient.PredictionDeleteV2EntityProjectPredictionsDelete.g.cs +++ b/src/libs/Weave/Generated/Weave.IPredictionsClient.PredictionDeleteV2EntityProjectPredictionsDelete.g.cs @@ -22,5 +22,23 @@ public partial interface IPredictionsClient global::System.Collections.Generic.IList predictionIds, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Prediction Delete
+ /// Delete predictions. + ///
+ /// + /// + /// + /// List of prediction IDs to delete + /// + /// 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> PredictionDeleteV2EntityProjectPredictionsDeleteAsResponseAsync( + string entity, + string project, + global::System.Collections.Generic.IList predictionIds, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Weave/Generated/Weave.IPredictionsClient.PredictionFinishV2EntityProjectPredictionsPredictionIdFinishPost.g.cs b/src/libs/Weave/Generated/Weave.IPredictionsClient.PredictionFinishV2EntityProjectPredictionsPredictionIdFinishPost.g.cs index 6767a1f..d3ba39f 100644 --- a/src/libs/Weave/Generated/Weave.IPredictionsClient.PredictionFinishV2EntityProjectPredictionsPredictionIdFinishPost.g.cs +++ b/src/libs/Weave/Generated/Weave.IPredictionsClient.PredictionFinishV2EntityProjectPredictionsPredictionIdFinishPost.g.cs @@ -20,5 +20,21 @@ public partial interface IPredictionsClient string predictionId, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Prediction Finish
+ /// Finish a prediction. + ///
+ /// + /// + /// + /// 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> PredictionFinishV2EntityProjectPredictionsPredictionIdFinishPostAsResponseAsync( + string entity, + string project, + string predictionId, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Weave/Generated/Weave.IPredictionsClient.PredictionReadV2EntityProjectPredictionsPredictionIdGet.g.cs b/src/libs/Weave/Generated/Weave.IPredictionsClient.PredictionReadV2EntityProjectPredictionsPredictionIdGet.g.cs index f6edeeb..2be0c49 100644 --- a/src/libs/Weave/Generated/Weave.IPredictionsClient.PredictionReadV2EntityProjectPredictionsPredictionIdGet.g.cs +++ b/src/libs/Weave/Generated/Weave.IPredictionsClient.PredictionReadV2EntityProjectPredictionsPredictionIdGet.g.cs @@ -20,5 +20,21 @@ public partial interface IPredictionsClient string predictionId, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Prediction Read
+ /// Read a prediction. + ///
+ /// + /// + /// + /// 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> PredictionReadV2EntityProjectPredictionsPredictionIdGetAsResponseAsync( + string entity, + string project, + string predictionId, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Weave/Generated/Weave.IRefsClient.RefsReadBatchRefsReadBatchPost.g.cs b/src/libs/Weave/Generated/Weave.IRefsClient.RefsReadBatchRefsReadBatchPost.g.cs index ff040ae..211bebf 100644 --- a/src/libs/Weave/Generated/Weave.IRefsClient.RefsReadBatchRefsReadBatchPost.g.cs +++ b/src/libs/Weave/Generated/Weave.IRefsClient.RefsReadBatchRefsReadBatchPost.g.cs @@ -19,6 +19,18 @@ public partial interface IRefsClient /// /// Refs Read Batch /// + /// + /// 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> RefsReadBatchRefsReadBatchPostAsResponseAsync( + + global::Weave.RefsReadBatchReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Refs Read Batch + /// /// /// 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/Weave/Generated/Weave.IRegistryClient.LinkToRegistryLinkToRegistryPost.g.cs b/src/libs/Weave/Generated/Weave.IRegistryClient.LinkToRegistryLinkToRegistryPost.g.cs index 5bbfda8..2f985e6 100644 --- a/src/libs/Weave/Generated/Weave.IRegistryClient.LinkToRegistryLinkToRegistryPost.g.cs +++ b/src/libs/Weave/Generated/Weave.IRegistryClient.LinkToRegistryLinkToRegistryPost.g.cs @@ -19,6 +19,18 @@ public partial interface IRegistryClient /// /// Link To Registry /// + /// + /// 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> LinkToRegistryLinkToRegistryPostAsResponseAsync( + + global::Weave.CreateAndLinkPayload request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Link To Registry + /// /// /// /// diff --git a/src/libs/Weave/Generated/Weave.IScorersClient.ScorerCreateV2EntityProjectScorersPost.g.cs b/src/libs/Weave/Generated/Weave.IScorersClient.ScorerCreateV2EntityProjectScorersPost.g.cs index 73d24d4..005fbfd 100644 --- a/src/libs/Weave/Generated/Weave.IScorersClient.ScorerCreateV2EntityProjectScorersPost.g.cs +++ b/src/libs/Weave/Generated/Weave.IScorersClient.ScorerCreateV2EntityProjectScorersPost.g.cs @@ -27,6 +27,23 @@ public partial interface IScorersClient /// /// /// + /// + /// 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> ScorerCreateV2EntityProjectScorersPostAsResponseAsync( + string entity, + string project, + + global::Weave.ScorerCreateBody request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Scorer Create
+ /// Create a scorer object. + ///
+ /// + /// /// /// The name of this scorer. Scorers with the same name will be versioned together. /// diff --git a/src/libs/Weave/Generated/Weave.IScorersClient.ScorerDeleteV2EntityProjectScorersObjectIdDelete.g.cs b/src/libs/Weave/Generated/Weave.IScorersClient.ScorerDeleteV2EntityProjectScorersObjectIdDelete.g.cs index e699893..521c137 100644 --- a/src/libs/Weave/Generated/Weave.IScorersClient.ScorerDeleteV2EntityProjectScorersObjectIdDelete.g.cs +++ b/src/libs/Weave/Generated/Weave.IScorersClient.ScorerDeleteV2EntityProjectScorersObjectIdDelete.g.cs @@ -24,5 +24,25 @@ public partial interface IScorersClient global::System.Collections.Generic.IList? digests = default, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Scorer Delete
+ /// Delete a scorer object. + ///
+ /// + /// + /// + /// + /// List of digests to delete. If not provided, all digests for the scorer will be deleted. + /// + /// 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> ScorerDeleteV2EntityProjectScorersObjectIdDeleteAsResponseAsync( + string entity, + string project, + string objectId, + global::System.Collections.Generic.IList? digests = default, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Weave/Generated/Weave.IScorersClient.ScorerListV2EntityProjectScorersGet.g.cs b/src/libs/Weave/Generated/Weave.IScorersClient.ScorerListV2EntityProjectScorersGet.g.cs index b2d4eff..21e8d24 100644 --- a/src/libs/Weave/Generated/Weave.IScorersClient.ScorerListV2EntityProjectScorersGet.g.cs +++ b/src/libs/Weave/Generated/Weave.IScorersClient.ScorerListV2EntityProjectScorersGet.g.cs @@ -18,5 +18,19 @@ public partial interface IScorersClient string project, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Scorer List
+ /// List scorer objects. + ///
+ /// + /// + /// 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> ScorerListV2EntityProjectScorersGetAsResponseAsync( + string entity, + string project, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Weave/Generated/Weave.IScorersClient.ScorerReadV2EntityProjectScorersObjectIdVersionsDigestGet.g.cs b/src/libs/Weave/Generated/Weave.IScorersClient.ScorerReadV2EntityProjectScorersObjectIdVersionsDigestGet.g.cs index db1ba98..dae1296 100644 --- a/src/libs/Weave/Generated/Weave.IScorersClient.ScorerReadV2EntityProjectScorersObjectIdVersionsDigestGet.g.cs +++ b/src/libs/Weave/Generated/Weave.IScorersClient.ScorerReadV2EntityProjectScorersObjectIdVersionsDigestGet.g.cs @@ -22,5 +22,23 @@ public partial interface IScorersClient string digest, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Scorer Read
+ /// Get a scorer object. + ///
+ /// + /// + /// + /// + /// 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> ScorerReadV2EntityProjectScorersObjectIdVersionsDigestGetAsResponseAsync( + string entity, + string project, + string objectId, + string digest, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Weave/Generated/Weave.IScoresClient.CallsScoreCallsScorePost.g.cs b/src/libs/Weave/Generated/Weave.IScoresClient.CallsScoreCallsScorePost.g.cs index 5b03734..3b53b89 100644 --- a/src/libs/Weave/Generated/Weave.IScoresClient.CallsScoreCallsScorePost.g.cs +++ b/src/libs/Weave/Generated/Weave.IScoresClient.CallsScoreCallsScorePost.g.cs @@ -19,6 +19,18 @@ public partial interface IScoresClient /// /// Calls Score /// + /// + /// 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> CallsScoreCallsScorePostAsResponseAsync( + + global::Weave.CallsScoreReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Calls Score + /// /// /// /// List of call IDs to score diff --git a/src/libs/Weave/Generated/Weave.IScoresClient.ScoreCreateV2EntityProjectScoresPost.g.cs b/src/libs/Weave/Generated/Weave.IScoresClient.ScoreCreateV2EntityProjectScoresPost.g.cs index 55bd695..f0281ac 100644 --- a/src/libs/Weave/Generated/Weave.IScoresClient.ScoreCreateV2EntityProjectScoresPost.g.cs +++ b/src/libs/Weave/Generated/Weave.IScoresClient.ScoreCreateV2EntityProjectScoresPost.g.cs @@ -27,6 +27,23 @@ public partial interface IScoresClient /// /// /// + /// + /// 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> ScoreCreateV2EntityProjectScoresPostAsResponseAsync( + string entity, + string project, + + global::Weave.ScoreCreateBody request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Score Create
+ /// Create a score. + ///
+ /// + /// /// /// The prediction ID /// diff --git a/src/libs/Weave/Generated/Weave.IScoresClient.ScoreDeleteV2EntityProjectScoresDelete.g.cs b/src/libs/Weave/Generated/Weave.IScoresClient.ScoreDeleteV2EntityProjectScoresDelete.g.cs index 3868559..9115a2c 100644 --- a/src/libs/Weave/Generated/Weave.IScoresClient.ScoreDeleteV2EntityProjectScoresDelete.g.cs +++ b/src/libs/Weave/Generated/Weave.IScoresClient.ScoreDeleteV2EntityProjectScoresDelete.g.cs @@ -22,5 +22,23 @@ public partial interface IScoresClient global::System.Collections.Generic.IList scoreIds, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Score Delete
+ /// Delete scores. + ///
+ /// + /// + /// + /// List of score IDs to delete + /// + /// 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> ScoreDeleteV2EntityProjectScoresDeleteAsResponseAsync( + string entity, + string project, + global::System.Collections.Generic.IList scoreIds, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Weave/Generated/Weave.IScoresClient.ScoreReadV2EntityProjectScoresScoreIdGet.g.cs b/src/libs/Weave/Generated/Weave.IScoresClient.ScoreReadV2EntityProjectScoresScoreIdGet.g.cs index 0d2086b..63c1f16 100644 --- a/src/libs/Weave/Generated/Weave.IScoresClient.ScoreReadV2EntityProjectScoresScoreIdGet.g.cs +++ b/src/libs/Weave/Generated/Weave.IScoresClient.ScoreReadV2EntityProjectScoresScoreIdGet.g.cs @@ -20,5 +20,21 @@ public partial interface IScoresClient string scoreId, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Score Read
+ /// Read a score. + ///
+ /// + /// + /// + /// 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> ScoreReadV2EntityProjectScoresScoreIdGetAsResponseAsync( + string entity, + string project, + string scoreId, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Weave/Generated/Weave.IServiceClient.GetCallerLocationGeolocateGet.g.cs b/src/libs/Weave/Generated/Weave.IServiceClient.GetCallerLocationGeolocateGet.g.cs index 5accece..4fe042b 100644 --- a/src/libs/Weave/Generated/Weave.IServiceClient.GetCallerLocationGeolocateGet.g.cs +++ b/src/libs/Weave/Generated/Weave.IServiceClient.GetCallerLocationGeolocateGet.g.cs @@ -19,5 +19,20 @@ public partial interface IServiceClient string? ip = default, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Caller Location
+ /// Lookup the geographic location of a user based on their IP address.
+ /// This API exists for debugging purposes and may not be available in the future. + ///
+ /// + /// IP address to geolocate, defaults to client IP address + /// + /// 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> GetCallerLocationGeolocateGetAsResponseAsync( + string? ip = default, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Weave/Generated/Weave.IServiceClient.ProjectsInfoServiceProjectsInfoPost.g.cs b/src/libs/Weave/Generated/Weave.IServiceClient.ProjectsInfoServiceProjectsInfoPost.g.cs index 5c0ca44..c814af9 100644 --- a/src/libs/Weave/Generated/Weave.IServiceClient.ProjectsInfoServiceProjectsInfoPost.g.cs +++ b/src/libs/Weave/Generated/Weave.IServiceClient.ProjectsInfoServiceProjectsInfoPost.g.cs @@ -19,6 +19,18 @@ public partial interface IServiceClient /// /// Projects Info /// + /// + /// 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>> ProjectsInfoServiceProjectsInfoPostAsResponseAsync( + + global::Weave.ProjectsInfoReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Projects Info + /// /// /// External project IDs in 'entity/project' format. /// diff --git a/src/libs/Weave/Generated/Weave.IServiceClient.ReadRootHealthGet.g.cs b/src/libs/Weave/Generated/Weave.IServiceClient.ReadRootHealthGet.g.cs index 6184978..1541ac3 100644 --- a/src/libs/Weave/Generated/Weave.IServiceClient.ReadRootHealthGet.g.cs +++ b/src/libs/Weave/Generated/Weave.IServiceClient.ReadRootHealthGet.g.cs @@ -13,5 +13,14 @@ public partial interface IServiceClient global::System.Threading.Tasks.Task ReadRootHealthGetAsync( global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Read Root + /// + /// 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> ReadRootHealthGetAsResponseAsync( + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Weave/Generated/Weave.IServiceClient.ReadVersionVersionGet.g.cs b/src/libs/Weave/Generated/Weave.IServiceClient.ReadVersionVersionGet.g.cs index b18ac8a..a6cee10 100644 --- a/src/libs/Weave/Generated/Weave.IServiceClient.ReadVersionVersionGet.g.cs +++ b/src/libs/Weave/Generated/Weave.IServiceClient.ReadVersionVersionGet.g.cs @@ -13,5 +13,14 @@ public partial interface IServiceClient global::System.Threading.Tasks.Task ReadVersionVersionGetAsync( global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Read 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> ReadVersionVersionGetAsResponseAsync( + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Weave/Generated/Weave.IServiceClient.ServerInfoServerInfoGet.g.cs b/src/libs/Weave/Generated/Weave.IServiceClient.ServerInfoServerInfoGet.g.cs index 0c668cd..7d700f3 100644 --- a/src/libs/Weave/Generated/Weave.IServiceClient.ServerInfoServerInfoGet.g.cs +++ b/src/libs/Weave/Generated/Weave.IServiceClient.ServerInfoServerInfoGet.g.cs @@ -13,5 +13,14 @@ public partial interface IServiceClient global::System.Threading.Tasks.Task ServerInfoServerInfoGetAsync( global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Server Info + /// + /// 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> ServerInfoServerInfoGetAsResponseAsync( + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Weave/Generated/Weave.ITablesClient.TableCreateFromDigestsTableCreateFromDigestsPost.g.cs b/src/libs/Weave/Generated/Weave.ITablesClient.TableCreateFromDigestsTableCreateFromDigestsPost.g.cs index 7fd5643..0a8e82d 100644 --- a/src/libs/Weave/Generated/Weave.ITablesClient.TableCreateFromDigestsTableCreateFromDigestsPost.g.cs +++ b/src/libs/Weave/Generated/Weave.ITablesClient.TableCreateFromDigestsTableCreateFromDigestsPost.g.cs @@ -19,6 +19,18 @@ public partial interface ITablesClient /// /// Table Create From Digests /// + /// + /// 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> TableCreateFromDigestsTableCreateFromDigestsPostAsResponseAsync( + + global::Weave.TableCreateFromDigestsReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Table Create From Digests + /// /// /// /// diff --git a/src/libs/Weave/Generated/Weave.ITablesClient.TableCreateTableCreatePost.g.cs b/src/libs/Weave/Generated/Weave.ITablesClient.TableCreateTableCreatePost.g.cs index da52836..4c99c47 100644 --- a/src/libs/Weave/Generated/Weave.ITablesClient.TableCreateTableCreatePost.g.cs +++ b/src/libs/Weave/Generated/Weave.ITablesClient.TableCreateTableCreatePost.g.cs @@ -19,6 +19,18 @@ public partial interface ITablesClient /// /// Table Create /// + /// + /// 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> TableCreateTableCreatePostAsResponseAsync( + + global::Weave.TableCreateReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Table Create + /// /// /// 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/Weave/Generated/Weave.ITablesClient.TableQueryStatsBatchTableQueryStatsBatchPost.g.cs b/src/libs/Weave/Generated/Weave.ITablesClient.TableQueryStatsBatchTableQueryStatsBatchPost.g.cs index 07676fd..dc4b0f4 100644 --- a/src/libs/Weave/Generated/Weave.ITablesClient.TableQueryStatsBatchTableQueryStatsBatchPost.g.cs +++ b/src/libs/Weave/Generated/Weave.ITablesClient.TableQueryStatsBatchTableQueryStatsBatchPost.g.cs @@ -19,6 +19,18 @@ public partial interface ITablesClient /// /// Table Query Stats Batch /// + /// + /// 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> TableQueryStatsBatchTableQueryStatsBatchPostAsResponseAsync( + + global::Weave.TableQueryStatsBatchReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Table Query Stats Batch + /// /// /// The ID of the project /// diff --git a/src/libs/Weave/Generated/Weave.ITablesClient.TableQueryStatsTableQueryStatsPost.g.cs b/src/libs/Weave/Generated/Weave.ITablesClient.TableQueryStatsTableQueryStatsPost.g.cs index 16b7d20..811e7f7 100644 --- a/src/libs/Weave/Generated/Weave.ITablesClient.TableQueryStatsTableQueryStatsPost.g.cs +++ b/src/libs/Weave/Generated/Weave.ITablesClient.TableQueryStatsTableQueryStatsPost.g.cs @@ -19,6 +19,18 @@ public partial interface ITablesClient /// /// Table Query Stats /// + /// + /// 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> TableQueryStatsTableQueryStatsPostAsResponseAsync( + + global::Weave.TableQueryStatsReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Table Query Stats + /// /// /// The ID of the project /// diff --git a/src/libs/Weave/Generated/Weave.ITablesClient.TableQueryTableQueryPost.g.cs b/src/libs/Weave/Generated/Weave.ITablesClient.TableQueryTableQueryPost.g.cs index 862d4a4..6b215d9 100644 --- a/src/libs/Weave/Generated/Weave.ITablesClient.TableQueryTableQueryPost.g.cs +++ b/src/libs/Weave/Generated/Weave.ITablesClient.TableQueryTableQueryPost.g.cs @@ -19,6 +19,18 @@ public partial interface ITablesClient /// /// Table Query /// + /// + /// 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> TableQueryTableQueryPostAsResponseAsync( + + global::Weave.TableQueryReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Table Query + /// /// /// The ID of the project /// diff --git a/src/libs/Weave/Generated/Weave.ITablesClient.TableUpdateTableUpdatePost.g.cs b/src/libs/Weave/Generated/Weave.ITablesClient.TableUpdateTableUpdatePost.g.cs index 2116958..b2c24a2 100644 --- a/src/libs/Weave/Generated/Weave.ITablesClient.TableUpdateTableUpdatePost.g.cs +++ b/src/libs/Weave/Generated/Weave.ITablesClient.TableUpdateTableUpdatePost.g.cs @@ -19,6 +19,18 @@ public partial interface ITablesClient /// /// Table Update /// + /// + /// 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> TableUpdateTableUpdatePostAsResponseAsync( + + global::Weave.TableUpdateReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Table Update + /// /// /// /// diff --git a/src/libs/Weave/Generated/Weave.IThreadsClient.ThreadsQueryStreamThreadsStreamQueryPost.g.cs b/src/libs/Weave/Generated/Weave.IThreadsClient.ThreadsQueryStreamThreadsStreamQueryPost.g.cs index 7a9b048..63b4c83 100644 --- a/src/libs/Weave/Generated/Weave.IThreadsClient.ThreadsQueryStreamThreadsStreamQueryPost.g.cs +++ b/src/libs/Weave/Generated/Weave.IThreadsClient.ThreadsQueryStreamThreadsStreamQueryPost.g.cs @@ -19,6 +19,18 @@ public partial interface IThreadsClient /// /// Threads Query Stream /// + /// + /// 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> ThreadsQueryStreamThreadsStreamQueryPostAsResponseAsync( + + global::Weave.ThreadsQueryReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Threads Query Stream + /// /// /// The ID of the project /// diff --git a/src/libs/Weave/Generated/Weave.ImagesClient.ImageCreateImageCreatePost.g.cs b/src/libs/Weave/Generated/Weave.ImagesClient.ImageCreateImageCreatePost.g.cs index 8ce1b85..8a6acb3 100644 --- a/src/libs/Weave/Generated/Weave.ImagesClient.ImageCreateImageCreatePost.g.cs +++ b/src/libs/Weave/Generated/Weave.ImagesClient.ImageCreateImageCreatePost.g.cs @@ -50,6 +50,28 @@ partial void ProcessImageCreateImageCreatePostResponseContent( /// public async global::System.Threading.Tasks.Task ImageCreateImageCreatePostAsync( + global::Weave.ImageGenerationCreateReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ImageCreateImageCreatePostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Image Create + /// + /// + /// 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> ImageCreateImageCreatePostAsResponseAsync( + global::Weave.ImageGenerationCreateReq request, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessImageCreateImageCreatePostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: "/image/create", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessImageCreateImageCreatePostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessImageCreateImageCreatePostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessImageCreateImageCreatePostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessImageCreateImageCreatePostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessImageCreateImageCreatePostResponseContent( __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessImageCreateImageCreatePostResponseContent( 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessImageCreateImageCreatePostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessImageCreateImageCreatePostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -354,9 +395,13 @@ partial void ProcessImageCreateImageCreatePostResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Weave.ImageGenerationCreateRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.ImageGenerationCreateRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -384,9 +429,13 @@ partial void ProcessImageCreateImageCreatePostResponseContent( #endif ).ConfigureAwait(false); - return - await global::Weave.ImageGenerationCreateRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.ImageGenerationCreateRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.ImagesClient.g.cs b/src/libs/Weave/Generated/Weave.ImagesClient.g.cs index 728d8b8..65668d4 100644 --- a/src/libs/Weave/Generated/Weave.ImagesClient.g.cs +++ b/src/libs/Weave/Generated/Weave.ImagesClient.g.cs @@ -72,10 +72,10 @@ public ImagesClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public ImagesClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Weave.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Weave.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Weave/Generated/Weave.InferenceClient.InferenceAnalysisArtificialanalysisModelsInferenceAnalysisArtificialanalysisModelsGet.g.cs b/src/libs/Weave/Generated/Weave.InferenceClient.InferenceAnalysisArtificialanalysisModelsInferenceAnalysisArtificialanalysisModelsGet.g.cs index 77af5aa..b91db88 100644 --- a/src/libs/Weave/Generated/Weave.InferenceClient.InferenceAnalysisArtificialanalysisModelsInferenceAnalysisArtificialanalysisModelsGet.g.cs +++ b/src/libs/Weave/Generated/Weave.InferenceClient.InferenceAnalysisArtificialanalysisModelsInferenceAnalysisArtificialanalysisModelsGet.g.cs @@ -50,6 +50,25 @@ partial void ProcessInferenceAnalysisArtificialanalysisModelsInferenceAnalysisAr public async global::System.Threading.Tasks.Task InferenceAnalysisArtificialanalysisModelsInferenceAnalysisArtificialanalysisModelsGetAsync( global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await InferenceAnalysisArtificialanalysisModelsInferenceAnalysisArtificialanalysisModelsGetAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Inference Analysis Artificialanalysis Models
+ /// Returns a list of available models for Artificial Analysis.
+ /// This API is available without authentication. + ///
+ /// 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> InferenceAnalysisArtificialanalysisModelsInferenceAnalysisArtificialanalysisModelsGetAsResponseAsync( + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -78,6 +97,7 @@ partial void ProcessInferenceAnalysisArtificialanalysisModelsInferenceAnalysisAr global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: "/inference/analysis/artificialanalysis/models", baseUri: HttpClient.BaseAddress); @@ -150,6 +170,8 @@ partial void ProcessInferenceAnalysisArtificialanalysisModelsInferenceAnalysisAr attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -160,6 +182,11 @@ partial void ProcessInferenceAnalysisArtificialanalysisModelsInferenceAnalysisAr } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -177,6 +204,8 @@ partial void ProcessInferenceAnalysisArtificialanalysisModelsInferenceAnalysisAr attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -186,8 +215,7 @@ partial void ProcessInferenceAnalysisArtificialanalysisModelsInferenceAnalysisAr __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -196,6 +224,11 @@ partial void ProcessInferenceAnalysisArtificialanalysisModelsInferenceAnalysisAr __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -212,14 +245,15 @@ partial void ProcessInferenceAnalysisArtificialanalysisModelsInferenceAnalysisAr 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -259,6 +293,8 @@ partial void ProcessInferenceAnalysisArtificialanalysisModelsInferenceAnalysisAr attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -279,6 +315,8 @@ partial void ProcessInferenceAnalysisArtificialanalysisModelsInferenceAnalysisAr attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -303,9 +341,13 @@ partial void ProcessInferenceAnalysisArtificialanalysisModelsInferenceAnalysisAr { __response.EnsureSuccessStatusCode(); - return - global::Weave.RouterOpenRouterModelsRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.RouterOpenRouterModelsRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -333,9 +375,13 @@ partial void ProcessInferenceAnalysisArtificialanalysisModelsInferenceAnalysisAr #endif ).ConfigureAwait(false); - return - await global::Weave.RouterOpenRouterModelsRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.RouterOpenRouterModelsRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.InferenceClient.InferenceRouterOpenrouterModelsInferenceRouterOpenrouterModelsGet.g.cs b/src/libs/Weave/Generated/Weave.InferenceClient.InferenceRouterOpenrouterModelsInferenceRouterOpenrouterModelsGet.g.cs index e3b9555..e2a83be 100644 --- a/src/libs/Weave/Generated/Weave.InferenceClient.InferenceRouterOpenrouterModelsInferenceRouterOpenrouterModelsGet.g.cs +++ b/src/libs/Weave/Generated/Weave.InferenceClient.InferenceRouterOpenrouterModelsInferenceRouterOpenrouterModelsGet.g.cs @@ -50,6 +50,25 @@ partial void ProcessInferenceRouterOpenrouterModelsInferenceRouterOpenrouterMode public async global::System.Threading.Tasks.Task InferenceRouterOpenrouterModelsInferenceRouterOpenrouterModelsGetAsync( global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await InferenceRouterOpenrouterModelsInferenceRouterOpenrouterModelsGetAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Inference Router Openrouter Models
+ /// Returns a list of models that are available to be used with OpenRouter.
+ /// This API is available without authentication. + ///
+ /// 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> InferenceRouterOpenrouterModelsInferenceRouterOpenrouterModelsGetAsResponseAsync( + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -78,6 +97,7 @@ partial void ProcessInferenceRouterOpenrouterModelsInferenceRouterOpenrouterMode global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: "/inference/router/openrouter/models", baseUri: HttpClient.BaseAddress); @@ -150,6 +170,8 @@ partial void ProcessInferenceRouterOpenrouterModelsInferenceRouterOpenrouterMode attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -160,6 +182,11 @@ partial void ProcessInferenceRouterOpenrouterModelsInferenceRouterOpenrouterMode } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -177,6 +204,8 @@ partial void ProcessInferenceRouterOpenrouterModelsInferenceRouterOpenrouterMode attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -186,8 +215,7 @@ partial void ProcessInferenceRouterOpenrouterModelsInferenceRouterOpenrouterMode __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -196,6 +224,11 @@ partial void ProcessInferenceRouterOpenrouterModelsInferenceRouterOpenrouterMode __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -212,14 +245,15 @@ partial void ProcessInferenceRouterOpenrouterModelsInferenceRouterOpenrouterMode 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -259,6 +293,8 @@ partial void ProcessInferenceRouterOpenrouterModelsInferenceRouterOpenrouterMode attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -279,6 +315,8 @@ partial void ProcessInferenceRouterOpenrouterModelsInferenceRouterOpenrouterMode attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -303,9 +341,13 @@ partial void ProcessInferenceRouterOpenrouterModelsInferenceRouterOpenrouterMode { __response.EnsureSuccessStatusCode(); - return - global::Weave.RouterOpenRouterModelsRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.RouterOpenRouterModelsRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -333,9 +375,13 @@ partial void ProcessInferenceRouterOpenrouterModelsInferenceRouterOpenrouterMode #endif ).ConfigureAwait(false); - return - await global::Weave.RouterOpenRouterModelsRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.RouterOpenRouterModelsRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.InferenceClient.NvidiaHardwareInferenceNvidiaV2HardwareGet.g.cs b/src/libs/Weave/Generated/Weave.InferenceClient.NvidiaHardwareInferenceNvidiaV2HardwareGet.g.cs index 1cc7d33..f410560 100644 --- a/src/libs/Weave/Generated/Weave.InferenceClient.NvidiaHardwareInferenceNvidiaV2HardwareGet.g.cs +++ b/src/libs/Weave/Generated/Weave.InferenceClient.NvidiaHardwareInferenceNvidiaV2HardwareGet.g.cs @@ -57,6 +57,31 @@ partial void ProcessNvidiaHardwareInferenceNvidiaV2HardwareGetResponseContent( string model, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await NvidiaHardwareInferenceNvidiaV2HardwareGetAsResponseAsync( + model: model, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Nvidia Hardware
+ /// Returns available hardware and pricing for a given model.
+ /// Called by NVIDIA to show users their options and redirect them
+ /// based on what we support. Only serverless options are returned. + ///
+ /// + /// Model name without the publisher prefix + /// + /// 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> NvidiaHardwareInferenceNvidiaV2HardwareGetAsResponseAsync( + string model, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -86,11 +111,12 @@ partial void ProcessNvidiaHardwareInferenceNvidiaV2HardwareGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: "/inference/nvidia/v2/hardware", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder - .AddRequiredParameter("model", model) + .AddRequiredParameter("model", model) ; var __path = __pathBuilder.ToString(); __path = global::Weave.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -162,6 +188,8 @@ partial void ProcessNvidiaHardwareInferenceNvidiaV2HardwareGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -172,6 +200,11 @@ partial void ProcessNvidiaHardwareInferenceNvidiaV2HardwareGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -189,6 +222,8 @@ partial void ProcessNvidiaHardwareInferenceNvidiaV2HardwareGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -198,8 +233,7 @@ partial void ProcessNvidiaHardwareInferenceNvidiaV2HardwareGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -208,6 +242,11 @@ partial void ProcessNvidiaHardwareInferenceNvidiaV2HardwareGetResponseContent( __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -224,14 +263,15 @@ partial void ProcessNvidiaHardwareInferenceNvidiaV2HardwareGetResponseContent( 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -271,6 +311,8 @@ partial void ProcessNvidiaHardwareInferenceNvidiaV2HardwareGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -291,6 +333,8 @@ partial void ProcessNvidiaHardwareInferenceNvidiaV2HardwareGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -353,9 +397,13 @@ partial void ProcessNvidiaHardwareInferenceNvidiaV2HardwareGetResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Weave.NvidiaHardwareRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.NvidiaHardwareRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -383,9 +431,13 @@ partial void ProcessNvidiaHardwareInferenceNvidiaV2HardwareGetResponseContent( #endif ).ConfigureAwait(false); - return - await global::Weave.NvidiaHardwareRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.NvidiaHardwareRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.InferenceClient.g.cs b/src/libs/Weave/Generated/Weave.InferenceClient.g.cs index 3088b10..e49e5d3 100644 --- a/src/libs/Weave/Generated/Weave.InferenceClient.g.cs +++ b/src/libs/Weave/Generated/Weave.InferenceClient.g.cs @@ -72,10 +72,10 @@ public InferenceClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public InferenceClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Weave.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Weave.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Weave/Generated/Weave.ModelsClient.ModelCreateV2EntityProjectModelsPost.g.cs b/src/libs/Weave/Generated/Weave.ModelsClient.ModelCreateV2EntityProjectModelsPost.g.cs index cb2c48d..1375cf6 100644 --- a/src/libs/Weave/Generated/Weave.ModelsClient.ModelCreateV2EntityProjectModelsPost.g.cs +++ b/src/libs/Weave/Generated/Weave.ModelsClient.ModelCreateV2EntityProjectModelsPost.g.cs @@ -59,6 +59,35 @@ partial void ProcessModelCreateV2EntityProjectModelsPostResponseContent( string entity, string project, + global::Weave.ModelCreateBody request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ModelCreateV2EntityProjectModelsPostAsResponseAsync( + entity: entity, + project: project, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Model Create
+ /// Create a model object. + ///
+ /// + /// + /// + /// 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> ModelCreateV2EntityProjectModelsPostAsResponseAsync( + string entity, + string project, + global::Weave.ModelCreateBody request, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -95,6 +124,7 @@ partial void ProcessModelCreateV2EntityProjectModelsPostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: $"/v2/{entity}/{project}/models", baseUri: HttpClient.BaseAddress); @@ -176,6 +206,8 @@ partial void ProcessModelCreateV2EntityProjectModelsPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -186,6 +218,11 @@ partial void ProcessModelCreateV2EntityProjectModelsPostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -203,6 +240,8 @@ partial void ProcessModelCreateV2EntityProjectModelsPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -212,8 +251,7 @@ partial void ProcessModelCreateV2EntityProjectModelsPostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -222,6 +260,11 @@ partial void ProcessModelCreateV2EntityProjectModelsPostResponseContent( __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -238,14 +281,15 @@ partial void ProcessModelCreateV2EntityProjectModelsPostResponseContent( 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -285,6 +329,8 @@ partial void ProcessModelCreateV2EntityProjectModelsPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -305,6 +351,8 @@ partial void ProcessModelCreateV2EntityProjectModelsPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -367,9 +415,13 @@ partial void ProcessModelCreateV2EntityProjectModelsPostResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Weave.ModelCreateRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.ModelCreateRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -397,9 +449,13 @@ partial void ProcessModelCreateV2EntityProjectModelsPostResponseContent( #endif ).ConfigureAwait(false); - return - await global::Weave.ModelCreateRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.ModelCreateRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.ModelsClient.ModelDeleteV2EntityProjectModelsObjectIdDelete.g.cs b/src/libs/Weave/Generated/Weave.ModelsClient.ModelDeleteV2EntityProjectModelsObjectIdDelete.g.cs index bdb6ef7..0b9a764 100644 --- a/src/libs/Weave/Generated/Weave.ModelsClient.ModelDeleteV2EntityProjectModelsObjectIdDelete.g.cs +++ b/src/libs/Weave/Generated/Weave.ModelsClient.ModelDeleteV2EntityProjectModelsObjectIdDelete.g.cs @@ -67,6 +67,38 @@ partial void ProcessModelDeleteV2EntityProjectModelsObjectIdDeleteResponseConten global::System.Collections.Generic.IList? digests = default, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ModelDeleteV2EntityProjectModelsObjectIdDeleteAsResponseAsync( + entity: entity, + project: project, + objectId: objectId, + digests: digests, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Model Delete
+ /// Delete a model object. If digests are provided, only those versions are deleted. Otherwise, all versions are deleted. + ///
+ /// + /// + /// + /// + /// List of digests to delete. If not provided, all digests for the model will be deleted. + /// + /// 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> ModelDeleteV2EntityProjectModelsObjectIdDeleteAsResponseAsync( + string entity, + string project, + string objectId, + global::System.Collections.Generic.IList? digests = default, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -99,11 +131,12 @@ partial void ProcessModelDeleteV2EntityProjectModelsObjectIdDeleteResponseConten global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: $"/v2/{entity}/{project}/models/{objectId}", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder - .AddOptionalParameter("digests", digests?.ToString()) + .AddOptionalParameter("digests", digests?.ToString()) ; var __path = __pathBuilder.ToString(); __path = global::Weave.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -178,6 +211,8 @@ partial void ProcessModelDeleteV2EntityProjectModelsObjectIdDeleteResponseConten attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +223,11 @@ partial void ProcessModelDeleteV2EntityProjectModelsObjectIdDeleteResponseConten } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +245,8 @@ partial void ProcessModelDeleteV2EntityProjectModelsObjectIdDeleteResponseConten attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +256,7 @@ partial void ProcessModelDeleteV2EntityProjectModelsObjectIdDeleteResponseConten __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +265,11 @@ partial void ProcessModelDeleteV2EntityProjectModelsObjectIdDeleteResponseConten __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +286,15 @@ partial void ProcessModelDeleteV2EntityProjectModelsObjectIdDeleteResponseConten 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +334,8 @@ partial void ProcessModelDeleteV2EntityProjectModelsObjectIdDeleteResponseConten attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +356,8 @@ partial void ProcessModelDeleteV2EntityProjectModelsObjectIdDeleteResponseConten attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -369,9 +420,13 @@ partial void ProcessModelDeleteV2EntityProjectModelsObjectIdDeleteResponseConten { __response.EnsureSuccessStatusCode(); - return - global::Weave.ModelDeleteRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.ModelDeleteRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -399,9 +454,13 @@ partial void ProcessModelDeleteV2EntityProjectModelsObjectIdDeleteResponseConten #endif ).ConfigureAwait(false); - return - await global::Weave.ModelDeleteRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.ModelDeleteRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.ModelsClient.ModelListV2EntityProjectModelsGet.g.cs b/src/libs/Weave/Generated/Weave.ModelsClient.ModelListV2EntityProjectModelsGet.g.cs index f08fbb6..32326a1 100644 --- a/src/libs/Weave/Generated/Weave.ModelsClient.ModelListV2EntityProjectModelsGet.g.cs +++ b/src/libs/Weave/Generated/Weave.ModelsClient.ModelListV2EntityProjectModelsGet.g.cs @@ -69,6 +69,40 @@ partial void ProcessModelListV2EntityProjectModelsGetResponseContent( int? offset = default, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ModelListV2EntityProjectModelsGetAsResponseAsync( + entity: entity, + project: project, + limit: limit, + offset: offset, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Model List
+ /// List model objects. + ///
+ /// + /// + /// + /// Maximum number of models to return + /// + /// + /// Number of models to skip + /// + /// 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> ModelListV2EntityProjectModelsGetAsResponseAsync( + string entity, + string project, + int? limit = default, + int? offset = default, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -101,12 +135,13 @@ partial void ProcessModelListV2EntityProjectModelsGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: $"/v2/{entity}/{project}/models", - 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::Weave.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -181,6 +216,8 @@ partial void ProcessModelListV2EntityProjectModelsGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -191,6 +228,11 @@ partial void ProcessModelListV2EntityProjectModelsGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -208,6 +250,8 @@ partial void ProcessModelListV2EntityProjectModelsGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -217,8 +261,7 @@ partial void ProcessModelListV2EntityProjectModelsGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -227,6 +270,11 @@ partial void ProcessModelListV2EntityProjectModelsGetResponseContent( __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -243,14 +291,15 @@ partial void ProcessModelListV2EntityProjectModelsGetResponseContent( 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -290,6 +339,8 @@ partial void ProcessModelListV2EntityProjectModelsGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -310,6 +361,8 @@ partial void ProcessModelListV2EntityProjectModelsGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -372,7 +425,11 @@ partial void ProcessModelListV2EntityProjectModelsGetResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -400,7 +457,11 @@ partial void ProcessModelListV2EntityProjectModelsGetResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.ModelsClient.ModelReadV2EntityProjectModelsObjectIdVersionsDigestGet.g.cs b/src/libs/Weave/Generated/Weave.ModelsClient.ModelReadV2EntityProjectModelsObjectIdVersionsDigestGet.g.cs index 9158f60..d5bbf6c 100644 --- a/src/libs/Weave/Generated/Weave.ModelsClient.ModelReadV2EntityProjectModelsObjectIdVersionsDigestGet.g.cs +++ b/src/libs/Weave/Generated/Weave.ModelsClient.ModelReadV2EntityProjectModelsObjectIdVersionsDigestGet.g.cs @@ -65,6 +65,36 @@ partial void ProcessModelReadV2EntityProjectModelsObjectIdVersionsDigestGetRespo string digest, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ModelReadV2EntityProjectModelsObjectIdVersionsDigestGetAsResponseAsync( + entity: entity, + project: project, + objectId: objectId, + digest: digest, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Model Read
+ /// Get a model object. + ///
+ /// + /// + /// + /// + /// 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> ModelReadV2EntityProjectModelsObjectIdVersionsDigestGetAsResponseAsync( + string entity, + string project, + string objectId, + string digest, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -97,6 +127,7 @@ partial void ProcessModelReadV2EntityProjectModelsObjectIdVersionsDigestGetRespo global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: $"/v2/{entity}/{project}/models/{objectId}/versions/{digest}", baseUri: HttpClient.BaseAddress); @@ -173,6 +204,8 @@ partial void ProcessModelReadV2EntityProjectModelsObjectIdVersionsDigestGetRespo attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -183,6 +216,11 @@ partial void ProcessModelReadV2EntityProjectModelsObjectIdVersionsDigestGetRespo } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -200,6 +238,8 @@ partial void ProcessModelReadV2EntityProjectModelsObjectIdVersionsDigestGetRespo attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -209,8 +249,7 @@ partial void ProcessModelReadV2EntityProjectModelsObjectIdVersionsDigestGetRespo __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -219,6 +258,11 @@ partial void ProcessModelReadV2EntityProjectModelsObjectIdVersionsDigestGetRespo __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -235,14 +279,15 @@ partial void ProcessModelReadV2EntityProjectModelsObjectIdVersionsDigestGetRespo 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -282,6 +327,8 @@ partial void ProcessModelReadV2EntityProjectModelsObjectIdVersionsDigestGetRespo attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -302,6 +349,8 @@ partial void ProcessModelReadV2EntityProjectModelsObjectIdVersionsDigestGetRespo attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -364,9 +413,13 @@ partial void ProcessModelReadV2EntityProjectModelsObjectIdVersionsDigestGetRespo { __response.EnsureSuccessStatusCode(); - return - global::Weave.ModelReadRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.ModelReadRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -394,9 +447,13 @@ partial void ProcessModelReadV2EntityProjectModelsObjectIdVersionsDigestGetRespo #endif ).ConfigureAwait(false); - return - await global::Weave.ModelReadRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.ModelReadRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.ModelsClient.g.cs b/src/libs/Weave/Generated/Weave.ModelsClient.g.cs index b8ed482..9d747f8 100644 --- a/src/libs/Weave/Generated/Weave.ModelsClient.g.cs +++ b/src/libs/Weave/Generated/Weave.ModelsClient.g.cs @@ -72,10 +72,10 @@ public ModelsClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public ModelsClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Weave.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Weave.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Weave/Generated/Weave.ObjectsClient.AliasesListAliasesGet.g.cs b/src/libs/Weave/Generated/Weave.ObjectsClient.AliasesListAliasesGet.g.cs index 4965159..163f120 100644 --- a/src/libs/Weave/Generated/Weave.ObjectsClient.AliasesListAliasesGet.g.cs +++ b/src/libs/Weave/Generated/Weave.ObjectsClient.AliasesListAliasesGet.g.cs @@ -53,6 +53,27 @@ partial void ProcessAliasesListAliasesGetResponseContent( string projectId, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await AliasesListAliasesGetAsResponseAsync( + projectId: projectId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Aliases List
+ /// List all aliases in a project. + ///
+ /// + /// 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> AliasesListAliasesGetAsResponseAsync( + string projectId, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -82,11 +103,12 @@ partial void ProcessAliasesListAliasesGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: "/aliases", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder - .AddRequiredParameter("project_id", projectId) + .AddRequiredParameter("project_id", projectId) ; var __path = __pathBuilder.ToString(); __path = global::Weave.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -158,6 +180,8 @@ partial void ProcessAliasesListAliasesGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -168,6 +192,11 @@ partial void ProcessAliasesListAliasesGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -185,6 +214,8 @@ partial void ProcessAliasesListAliasesGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -194,8 +225,7 @@ partial void ProcessAliasesListAliasesGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -204,6 +234,11 @@ partial void ProcessAliasesListAliasesGetResponseContent( __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -220,14 +255,15 @@ partial void ProcessAliasesListAliasesGetResponseContent( 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -267,6 +303,8 @@ partial void ProcessAliasesListAliasesGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -287,6 +325,8 @@ partial void ProcessAliasesListAliasesGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -349,9 +389,13 @@ partial void ProcessAliasesListAliasesGetResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Weave.AliasesListRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.AliasesListRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -379,9 +423,13 @@ partial void ProcessAliasesListAliasesGetResponseContent( #endif ).ConfigureAwait(false); - return - await global::Weave.AliasesListRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.AliasesListRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.ObjectsClient.ObjAddTagsObjsObjectIdVersionsDigestTagsPut.g.cs b/src/libs/Weave/Generated/Weave.ObjectsClient.ObjAddTagsObjsObjectIdVersionsDigestTagsPut.g.cs index 2a13d11..2d9f441 100644 --- a/src/libs/Weave/Generated/Weave.ObjectsClient.ObjAddTagsObjsObjectIdVersionsDigestTagsPut.g.cs +++ b/src/libs/Weave/Generated/Weave.ObjectsClient.ObjAddTagsObjsObjectIdVersionsDigestTagsPut.g.cs @@ -59,6 +59,35 @@ partial void ProcessObjAddTagsObjsObjectIdVersionsDigestTagsPutResponseContent( string objectId, string digest, + global::Weave.ObjTagsBody request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ObjAddTagsObjsObjectIdVersionsDigestTagsPutAsResponseAsync( + objectId: objectId, + digest: digest, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Obj Add Tags
+ /// Add tags to an object 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> ObjAddTagsObjsObjectIdVersionsDigestTagsPutAsResponseAsync( + string objectId, + string digest, + global::Weave.ObjTagsBody request, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -95,6 +124,7 @@ partial void ProcessObjAddTagsObjsObjectIdVersionsDigestTagsPutResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: $"/objs/{objectId}/versions/{digest}/tags", baseUri: HttpClient.BaseAddress); @@ -176,6 +206,8 @@ partial void ProcessObjAddTagsObjsObjectIdVersionsDigestTagsPutResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -186,6 +218,11 @@ partial void ProcessObjAddTagsObjsObjectIdVersionsDigestTagsPutResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -203,6 +240,8 @@ partial void ProcessObjAddTagsObjsObjectIdVersionsDigestTagsPutResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -212,8 +251,7 @@ partial void ProcessObjAddTagsObjsObjectIdVersionsDigestTagsPutResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -222,6 +260,11 @@ partial void ProcessObjAddTagsObjsObjectIdVersionsDigestTagsPutResponseContent( __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -238,14 +281,15 @@ partial void ProcessObjAddTagsObjsObjectIdVersionsDigestTagsPutResponseContent( 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -285,6 +329,8 @@ partial void ProcessObjAddTagsObjsObjectIdVersionsDigestTagsPutResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -305,6 +351,8 @@ partial void ProcessObjAddTagsObjsObjectIdVersionsDigestTagsPutResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -367,9 +415,13 @@ partial void ProcessObjAddTagsObjsObjectIdVersionsDigestTagsPutResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Weave.ObjAddTagsRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.ObjAddTagsRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -397,9 +449,13 @@ partial void ProcessObjAddTagsObjsObjectIdVersionsDigestTagsPutResponseContent( #endif ).ConfigureAwait(false); - return - await global::Weave.ObjAddTagsRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.ObjAddTagsRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.ObjectsClient.ObjCreateObjCreatePost.g.cs b/src/libs/Weave/Generated/Weave.ObjectsClient.ObjCreateObjCreatePost.g.cs index 0bfcc05..3c8da9a 100644 --- a/src/libs/Weave/Generated/Weave.ObjectsClient.ObjCreateObjCreatePost.g.cs +++ b/src/libs/Weave/Generated/Weave.ObjectsClient.ObjCreateObjCreatePost.g.cs @@ -50,6 +50,28 @@ partial void ProcessObjCreateObjCreatePostResponseContent( /// public async global::System.Threading.Tasks.Task ObjCreateObjCreatePostAsync( + global::Weave.ObjCreateReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ObjCreateObjCreatePostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Obj Create + /// + /// + /// 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> ObjCreateObjCreatePostAsResponseAsync( + global::Weave.ObjCreateReq request, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessObjCreateObjCreatePostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: "/obj/create", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessObjCreateObjCreatePostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessObjCreateObjCreatePostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessObjCreateObjCreatePostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessObjCreateObjCreatePostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessObjCreateObjCreatePostResponseContent( __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessObjCreateObjCreatePostResponseContent( 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessObjCreateObjCreatePostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessObjCreateObjCreatePostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -354,9 +395,13 @@ partial void ProcessObjCreateObjCreatePostResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Weave.ObjCreateRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.ObjCreateRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -384,9 +429,13 @@ partial void ProcessObjCreateObjCreatePostResponseContent( #endif ).ConfigureAwait(false); - return - await global::Weave.ObjCreateRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.ObjCreateRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.ObjectsClient.ObjDeleteObjDeletePost.g.cs b/src/libs/Weave/Generated/Weave.ObjectsClient.ObjDeleteObjDeletePost.g.cs index 00b7902..565a7d9 100644 --- a/src/libs/Weave/Generated/Weave.ObjectsClient.ObjDeleteObjDeletePost.g.cs +++ b/src/libs/Weave/Generated/Weave.ObjectsClient.ObjDeleteObjDeletePost.g.cs @@ -50,6 +50,28 @@ partial void ProcessObjDeleteObjDeletePostResponseContent( /// public async global::System.Threading.Tasks.Task ObjDeleteObjDeletePostAsync( + global::Weave.ObjDeleteReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ObjDeleteObjDeletePostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Obj Delete + /// + /// + /// 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> ObjDeleteObjDeletePostAsResponseAsync( + global::Weave.ObjDeleteReq request, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessObjDeleteObjDeletePostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: "/obj/delete", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessObjDeleteObjDeletePostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessObjDeleteObjDeletePostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessObjDeleteObjDeletePostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessObjDeleteObjDeletePostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessObjDeleteObjDeletePostResponseContent( __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessObjDeleteObjDeletePostResponseContent( 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessObjDeleteObjDeletePostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessObjDeleteObjDeletePostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -354,9 +395,13 @@ partial void ProcessObjDeleteObjDeletePostResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Weave.ObjDeleteRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.ObjDeleteRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -384,9 +429,13 @@ partial void ProcessObjDeleteObjDeletePostResponseContent( #endif ).ConfigureAwait(false); - return - await global::Weave.ObjDeleteRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.ObjDeleteRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.ObjectsClient.ObjReadObjReadPost.g.cs b/src/libs/Weave/Generated/Weave.ObjectsClient.ObjReadObjReadPost.g.cs index e2db603..0ed3eed 100644 --- a/src/libs/Weave/Generated/Weave.ObjectsClient.ObjReadObjReadPost.g.cs +++ b/src/libs/Weave/Generated/Weave.ObjectsClient.ObjReadObjReadPost.g.cs @@ -50,6 +50,28 @@ partial void ProcessObjReadObjReadPostResponseContent( /// public async global::System.Threading.Tasks.Task ObjReadObjReadPostAsync( + global::Weave.ObjReadReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ObjReadObjReadPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Obj Read + /// + /// + /// 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> ObjReadObjReadPostAsResponseAsync( + global::Weave.ObjReadReq request, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessObjReadObjReadPostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: "/obj/read", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessObjReadObjReadPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessObjReadObjReadPostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessObjReadObjReadPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessObjReadObjReadPostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessObjReadObjReadPostResponseContent( __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessObjReadObjReadPostResponseContent( 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessObjReadObjReadPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessObjReadObjReadPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -354,9 +395,13 @@ partial void ProcessObjReadObjReadPostResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Weave.ObjReadRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.ObjReadRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -384,9 +429,13 @@ partial void ProcessObjReadObjReadPostResponseContent( #endif ).ConfigureAwait(false); - return - await global::Weave.ObjReadRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.ObjReadRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.ObjectsClient.ObjRemoveAliasesObjsObjectIdAliasesRemovePost.g.cs b/src/libs/Weave/Generated/Weave.ObjectsClient.ObjRemoveAliasesObjsObjectIdAliasesRemovePost.g.cs index 4f79630..374aede 100644 --- a/src/libs/Weave/Generated/Weave.ObjectsClient.ObjRemoveAliasesObjsObjectIdAliasesRemovePost.g.cs +++ b/src/libs/Weave/Generated/Weave.ObjectsClient.ObjRemoveAliasesObjsObjectIdAliasesRemovePost.g.cs @@ -55,6 +55,32 @@ partial void ProcessObjRemoveAliasesObjsObjectIdAliasesRemovePostResponseContent public async global::System.Threading.Tasks.Task ObjRemoveAliasesObjsObjectIdAliasesRemovePostAsync( string objectId, + global::Weave.ObjRemoveAliasesBody request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ObjRemoveAliasesObjsObjectIdAliasesRemovePostAsResponseAsync( + objectId: objectId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Obj Remove Aliases
+ /// Remove aliases from an object. + ///
+ /// + /// + /// 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> ObjRemoveAliasesObjsObjectIdAliasesRemovePostAsResponseAsync( + string objectId, + global::Weave.ObjRemoveAliasesBody request, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -90,6 +116,7 @@ partial void ProcessObjRemoveAliasesObjsObjectIdAliasesRemovePostResponseContent global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: $"/objs/{objectId}/aliases/remove", baseUri: HttpClient.BaseAddress); @@ -170,6 +197,8 @@ partial void ProcessObjRemoveAliasesObjsObjectIdAliasesRemovePostResponseContent attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -180,6 +209,11 @@ partial void ProcessObjRemoveAliasesObjsObjectIdAliasesRemovePostResponseContent } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -197,6 +231,8 @@ partial void ProcessObjRemoveAliasesObjsObjectIdAliasesRemovePostResponseContent attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -206,8 +242,7 @@ partial void ProcessObjRemoveAliasesObjsObjectIdAliasesRemovePostResponseContent __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -216,6 +251,11 @@ partial void ProcessObjRemoveAliasesObjsObjectIdAliasesRemovePostResponseContent __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -232,14 +272,15 @@ partial void ProcessObjRemoveAliasesObjsObjectIdAliasesRemovePostResponseContent 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -279,6 +320,8 @@ partial void ProcessObjRemoveAliasesObjsObjectIdAliasesRemovePostResponseContent attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -299,6 +342,8 @@ partial void ProcessObjRemoveAliasesObjsObjectIdAliasesRemovePostResponseContent attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -361,9 +406,13 @@ partial void ProcessObjRemoveAliasesObjsObjectIdAliasesRemovePostResponseContent { __response.EnsureSuccessStatusCode(); - return - global::Weave.ObjRemoveAliasesRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.ObjRemoveAliasesRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -391,9 +440,13 @@ partial void ProcessObjRemoveAliasesObjsObjectIdAliasesRemovePostResponseContent #endif ).ConfigureAwait(false); - return - await global::Weave.ObjRemoveAliasesRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.ObjRemoveAliasesRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.ObjectsClient.ObjRemoveTagsObjsObjectIdVersionsDigestTagsRemovePost.g.cs b/src/libs/Weave/Generated/Weave.ObjectsClient.ObjRemoveTagsObjsObjectIdVersionsDigestTagsRemovePost.g.cs index e28f4dd..31e3e71 100644 --- a/src/libs/Weave/Generated/Weave.ObjectsClient.ObjRemoveTagsObjsObjectIdVersionsDigestTagsRemovePost.g.cs +++ b/src/libs/Weave/Generated/Weave.ObjectsClient.ObjRemoveTagsObjsObjectIdVersionsDigestTagsRemovePost.g.cs @@ -59,6 +59,35 @@ partial void ProcessObjRemoveTagsObjsObjectIdVersionsDigestTagsRemovePostRespons string objectId, string digest, + global::Weave.ObjTagsBody request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ObjRemoveTagsObjsObjectIdVersionsDigestTagsRemovePostAsResponseAsync( + objectId: objectId, + digest: digest, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Obj Remove Tags
+ /// Remove tags from an object 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> ObjRemoveTagsObjsObjectIdVersionsDigestTagsRemovePostAsResponseAsync( + string objectId, + string digest, + global::Weave.ObjTagsBody request, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -95,6 +124,7 @@ partial void ProcessObjRemoveTagsObjsObjectIdVersionsDigestTagsRemovePostRespons global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: $"/objs/{objectId}/versions/{digest}/tags/remove", baseUri: HttpClient.BaseAddress); @@ -176,6 +206,8 @@ partial void ProcessObjRemoveTagsObjsObjectIdVersionsDigestTagsRemovePostRespons attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -186,6 +218,11 @@ partial void ProcessObjRemoveTagsObjsObjectIdVersionsDigestTagsRemovePostRespons } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -203,6 +240,8 @@ partial void ProcessObjRemoveTagsObjsObjectIdVersionsDigestTagsRemovePostRespons attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -212,8 +251,7 @@ partial void ProcessObjRemoveTagsObjsObjectIdVersionsDigestTagsRemovePostRespons __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -222,6 +260,11 @@ partial void ProcessObjRemoveTagsObjsObjectIdVersionsDigestTagsRemovePostRespons __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -238,14 +281,15 @@ partial void ProcessObjRemoveTagsObjsObjectIdVersionsDigestTagsRemovePostRespons 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -285,6 +329,8 @@ partial void ProcessObjRemoveTagsObjsObjectIdVersionsDigestTagsRemovePostRespons attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -305,6 +351,8 @@ partial void ProcessObjRemoveTagsObjsObjectIdVersionsDigestTagsRemovePostRespons attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -367,9 +415,13 @@ partial void ProcessObjRemoveTagsObjsObjectIdVersionsDigestTagsRemovePostRespons { __response.EnsureSuccessStatusCode(); - return - global::Weave.ObjRemoveTagsRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.ObjRemoveTagsRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -397,9 +449,13 @@ partial void ProcessObjRemoveTagsObjsObjectIdVersionsDigestTagsRemovePostRespons #endif ).ConfigureAwait(false); - return - await global::Weave.ObjRemoveTagsRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.ObjRemoveTagsRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.ObjectsClient.ObjSetAliasesObjsObjectIdAliasesPut.g.cs b/src/libs/Weave/Generated/Weave.ObjectsClient.ObjSetAliasesObjsObjectIdAliasesPut.g.cs index fcb721a..f367332 100644 --- a/src/libs/Weave/Generated/Weave.ObjectsClient.ObjSetAliasesObjsObjectIdAliasesPut.g.cs +++ b/src/libs/Weave/Generated/Weave.ObjectsClient.ObjSetAliasesObjsObjectIdAliasesPut.g.cs @@ -55,6 +55,32 @@ partial void ProcessObjSetAliasesObjsObjectIdAliasesPutResponseContent( public async global::System.Threading.Tasks.Task ObjSetAliasesObjsObjectIdAliasesPutAsync( string objectId, + global::Weave.ObjSetAliasesBody request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ObjSetAliasesObjsObjectIdAliasesPutAsResponseAsync( + objectId: objectId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Obj Set Aliases
+ /// Set aliases for an object 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> ObjSetAliasesObjsObjectIdAliasesPutAsResponseAsync( + string objectId, + global::Weave.ObjSetAliasesBody request, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -90,6 +116,7 @@ partial void ProcessObjSetAliasesObjsObjectIdAliasesPutResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: $"/objs/{objectId}/aliases", baseUri: HttpClient.BaseAddress); @@ -170,6 +197,8 @@ partial void ProcessObjSetAliasesObjsObjectIdAliasesPutResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -180,6 +209,11 @@ partial void ProcessObjSetAliasesObjsObjectIdAliasesPutResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -197,6 +231,8 @@ partial void ProcessObjSetAliasesObjsObjectIdAliasesPutResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -206,8 +242,7 @@ partial void ProcessObjSetAliasesObjsObjectIdAliasesPutResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -216,6 +251,11 @@ partial void ProcessObjSetAliasesObjsObjectIdAliasesPutResponseContent( __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -232,14 +272,15 @@ partial void ProcessObjSetAliasesObjsObjectIdAliasesPutResponseContent( 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -279,6 +320,8 @@ partial void ProcessObjSetAliasesObjsObjectIdAliasesPutResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -299,6 +342,8 @@ partial void ProcessObjSetAliasesObjsObjectIdAliasesPutResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -361,9 +406,13 @@ partial void ProcessObjSetAliasesObjsObjectIdAliasesPutResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Weave.ObjSetAliasesRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.ObjSetAliasesRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -391,9 +440,13 @@ partial void ProcessObjSetAliasesObjsObjectIdAliasesPutResponseContent( #endif ).ConfigureAwait(false); - return - await global::Weave.ObjSetAliasesRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.ObjSetAliasesRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.ObjectsClient.ObjsQueryObjsQueryPost.g.cs b/src/libs/Weave/Generated/Weave.ObjectsClient.ObjsQueryObjsQueryPost.g.cs index 8293590..167c5b9 100644 --- a/src/libs/Weave/Generated/Weave.ObjectsClient.ObjsQueryObjsQueryPost.g.cs +++ b/src/libs/Weave/Generated/Weave.ObjectsClient.ObjsQueryObjsQueryPost.g.cs @@ -50,6 +50,28 @@ partial void ProcessObjsQueryObjsQueryPostResponseContent( /// public async global::System.Threading.Tasks.Task ObjsQueryObjsQueryPostAsync( + global::Weave.ObjQueryReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ObjsQueryObjsQueryPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Objs Query + /// + /// + /// 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> ObjsQueryObjsQueryPostAsResponseAsync( + global::Weave.ObjQueryReq request, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessObjsQueryObjsQueryPostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: "/objs/query", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessObjsQueryObjsQueryPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessObjsQueryObjsQueryPostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessObjsQueryObjsQueryPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessObjsQueryObjsQueryPostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessObjsQueryObjsQueryPostResponseContent( __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessObjsQueryObjsQueryPostResponseContent( 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessObjsQueryObjsQueryPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessObjsQueryObjsQueryPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -354,9 +395,13 @@ partial void ProcessObjsQueryObjsQueryPostResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Weave.ObjQueryRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.ObjQueryRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -384,9 +429,13 @@ partial void ProcessObjsQueryObjsQueryPostResponseContent( #endif ).ConfigureAwait(false); - return - await global::Weave.ObjQueryRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.ObjQueryRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.ObjectsClient.TagsListTagsGet.g.cs b/src/libs/Weave/Generated/Weave.ObjectsClient.TagsListTagsGet.g.cs index 6dc15a4..85ca4a0 100644 --- a/src/libs/Weave/Generated/Weave.ObjectsClient.TagsListTagsGet.g.cs +++ b/src/libs/Weave/Generated/Weave.ObjectsClient.TagsListTagsGet.g.cs @@ -53,6 +53,27 @@ partial void ProcessTagsListTagsGetResponseContent( string projectId, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await TagsListTagsGetAsResponseAsync( + projectId: projectId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Tags List
+ /// List all tags in a project. + ///
+ /// + /// 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> TagsListTagsGetAsResponseAsync( + string projectId, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -82,11 +103,12 @@ partial void ProcessTagsListTagsGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: "/tags", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder - .AddRequiredParameter("project_id", projectId) + .AddRequiredParameter("project_id", projectId) ; var __path = __pathBuilder.ToString(); __path = global::Weave.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -158,6 +180,8 @@ partial void ProcessTagsListTagsGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -168,6 +192,11 @@ partial void ProcessTagsListTagsGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -185,6 +214,8 @@ partial void ProcessTagsListTagsGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -194,8 +225,7 @@ partial void ProcessTagsListTagsGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -204,6 +234,11 @@ partial void ProcessTagsListTagsGetResponseContent( __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -220,14 +255,15 @@ partial void ProcessTagsListTagsGetResponseContent( 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -267,6 +303,8 @@ partial void ProcessTagsListTagsGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -287,6 +325,8 @@ partial void ProcessTagsListTagsGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -349,9 +389,13 @@ partial void ProcessTagsListTagsGetResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Weave.TagsListRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.TagsListRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -379,9 +423,13 @@ partial void ProcessTagsListTagsGetResponseContent( #endif ).ConfigureAwait(false); - return - await global::Weave.TagsListRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.TagsListRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.ObjectsClient.g.cs b/src/libs/Weave/Generated/Weave.ObjectsClient.g.cs index 5d8aed3..1153cf9 100644 --- a/src/libs/Weave/Generated/Weave.ObjectsClient.g.cs +++ b/src/libs/Weave/Generated/Weave.ObjectsClient.g.cs @@ -72,10 +72,10 @@ public ObjectsClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public ObjectsClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Weave.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Weave.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Weave/Generated/Weave.OpenTelemetryClient.ExportTraceOtelV1TracesPost.g.cs b/src/libs/Weave/Generated/Weave.OpenTelemetryClient.ExportTraceOtelV1TracesPost.g.cs index f9bb992..bbaba1b 100644 --- a/src/libs/Weave/Generated/Weave.OpenTelemetryClient.ExportTraceOtelV1TracesPost.g.cs +++ b/src/libs/Weave/Generated/Weave.OpenTelemetryClient.ExportTraceOtelV1TracesPost.g.cs @@ -48,6 +48,23 @@ partial void ProcessExportTraceOtelV1TracesPostResponseContent( public async global::System.Threading.Tasks.Task ExportTraceOtelV1TracesPostAsync( global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ExportTraceOtelV1TracesPostAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Export Trace + /// + /// 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> ExportTraceOtelV1TracesPostAsResponseAsync( + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -76,6 +93,7 @@ partial void ProcessExportTraceOtelV1TracesPostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: "/otel/v1/traces", baseUri: HttpClient.BaseAddress); @@ -148,6 +166,8 @@ partial void ProcessExportTraceOtelV1TracesPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -158,6 +178,11 @@ partial void ProcessExportTraceOtelV1TracesPostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -175,6 +200,8 @@ partial void ProcessExportTraceOtelV1TracesPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -184,8 +211,7 @@ partial void ProcessExportTraceOtelV1TracesPostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -194,6 +220,11 @@ partial void ProcessExportTraceOtelV1TracesPostResponseContent( __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -210,14 +241,15 @@ partial void ProcessExportTraceOtelV1TracesPostResponseContent( 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -257,6 +289,8 @@ partial void ProcessExportTraceOtelV1TracesPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -277,6 +311,8 @@ partial void ProcessExportTraceOtelV1TracesPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -301,7 +337,11 @@ partial void ProcessExportTraceOtelV1TracesPostResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -329,7 +369,11 @@ partial void ProcessExportTraceOtelV1TracesPostResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.OpenTelemetryClient.g.cs b/src/libs/Weave/Generated/Weave.OpenTelemetryClient.g.cs index d481fd7..29a3a92 100644 --- a/src/libs/Weave/Generated/Weave.OpenTelemetryClient.g.cs +++ b/src/libs/Weave/Generated/Weave.OpenTelemetryClient.g.cs @@ -72,10 +72,10 @@ public OpenTelemetryClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public OpenTelemetryClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Weave.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Weave.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Weave/Generated/Weave.OpsClient.OpCreateV2EntityProjectOpsPost.g.cs b/src/libs/Weave/Generated/Weave.OpsClient.OpCreateV2EntityProjectOpsPost.g.cs index 25d76ee..6bdd8d4 100644 --- a/src/libs/Weave/Generated/Weave.OpsClient.OpCreateV2EntityProjectOpsPost.g.cs +++ b/src/libs/Weave/Generated/Weave.OpsClient.OpCreateV2EntityProjectOpsPost.g.cs @@ -59,6 +59,35 @@ partial void ProcessOpCreateV2EntityProjectOpsPostResponseContent( string entity, string project, + global::Weave.OpCreateBody request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await OpCreateV2EntityProjectOpsPostAsResponseAsync( + entity: entity, + project: project, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Op Create
+ /// Create an op object. + ///
+ /// + /// + /// + /// 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> OpCreateV2EntityProjectOpsPostAsResponseAsync( + string entity, + string project, + global::Weave.OpCreateBody request, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -95,6 +124,7 @@ partial void ProcessOpCreateV2EntityProjectOpsPostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: $"/v2/{entity}/{project}/ops", baseUri: HttpClient.BaseAddress); @@ -176,6 +206,8 @@ partial void ProcessOpCreateV2EntityProjectOpsPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -186,6 +218,11 @@ partial void ProcessOpCreateV2EntityProjectOpsPostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -203,6 +240,8 @@ partial void ProcessOpCreateV2EntityProjectOpsPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -212,8 +251,7 @@ partial void ProcessOpCreateV2EntityProjectOpsPostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -222,6 +260,11 @@ partial void ProcessOpCreateV2EntityProjectOpsPostResponseContent( __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -238,14 +281,15 @@ partial void ProcessOpCreateV2EntityProjectOpsPostResponseContent( 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -285,6 +329,8 @@ partial void ProcessOpCreateV2EntityProjectOpsPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -305,6 +351,8 @@ partial void ProcessOpCreateV2EntityProjectOpsPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -367,9 +415,13 @@ partial void ProcessOpCreateV2EntityProjectOpsPostResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Weave.OpCreateRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.OpCreateRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -397,9 +449,13 @@ partial void ProcessOpCreateV2EntityProjectOpsPostResponseContent( #endif ).ConfigureAwait(false); - return - await global::Weave.OpCreateRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.OpCreateRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.OpsClient.OpDeleteV2EntityProjectOpsObjectIdDelete.g.cs b/src/libs/Weave/Generated/Weave.OpsClient.OpDeleteV2EntityProjectOpsObjectIdDelete.g.cs index ede437b..18ba3e0 100644 --- a/src/libs/Weave/Generated/Weave.OpsClient.OpDeleteV2EntityProjectOpsObjectIdDelete.g.cs +++ b/src/libs/Weave/Generated/Weave.OpsClient.OpDeleteV2EntityProjectOpsObjectIdDelete.g.cs @@ -67,6 +67,38 @@ partial void ProcessOpDeleteV2EntityProjectOpsObjectIdDeleteResponseContent( global::System.Collections.Generic.IList? digests = default, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await OpDeleteV2EntityProjectOpsObjectIdDeleteAsResponseAsync( + entity: entity, + project: project, + objectId: objectId, + digests: digests, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Op Delete
+ /// Delete an op object. If digests are provided, only those versions are deleted. Otherwise, all versions are deleted. + ///
+ /// + /// + /// + /// + /// List of digests to delete. If not provided, all digests for the op will be deleted. + /// + /// 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> OpDeleteV2EntityProjectOpsObjectIdDeleteAsResponseAsync( + string entity, + string project, + string objectId, + global::System.Collections.Generic.IList? digests = default, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -99,11 +131,12 @@ partial void ProcessOpDeleteV2EntityProjectOpsObjectIdDeleteResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: $"/v2/{entity}/{project}/ops/{objectId}", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder - .AddOptionalParameter("digests", digests?.ToString()) + .AddOptionalParameter("digests", digests?.ToString()) ; var __path = __pathBuilder.ToString(); __path = global::Weave.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -178,6 +211,8 @@ partial void ProcessOpDeleteV2EntityProjectOpsObjectIdDeleteResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +223,11 @@ partial void ProcessOpDeleteV2EntityProjectOpsObjectIdDeleteResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +245,8 @@ partial void ProcessOpDeleteV2EntityProjectOpsObjectIdDeleteResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +256,7 @@ partial void ProcessOpDeleteV2EntityProjectOpsObjectIdDeleteResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +265,11 @@ partial void ProcessOpDeleteV2EntityProjectOpsObjectIdDeleteResponseContent( __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +286,15 @@ partial void ProcessOpDeleteV2EntityProjectOpsObjectIdDeleteResponseContent( 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +334,8 @@ partial void ProcessOpDeleteV2EntityProjectOpsObjectIdDeleteResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +356,8 @@ partial void ProcessOpDeleteV2EntityProjectOpsObjectIdDeleteResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -369,9 +420,13 @@ partial void ProcessOpDeleteV2EntityProjectOpsObjectIdDeleteResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Weave.OpDeleteRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.OpDeleteRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -399,9 +454,13 @@ partial void ProcessOpDeleteV2EntityProjectOpsObjectIdDeleteResponseContent( #endif ).ConfigureAwait(false); - return - await global::Weave.OpDeleteRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.OpDeleteRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.OpsClient.OpListV2EntityProjectOpsGet.g.cs b/src/libs/Weave/Generated/Weave.OpsClient.OpListV2EntityProjectOpsGet.g.cs index 7f4bffa..69ef7c7 100644 --- a/src/libs/Weave/Generated/Weave.OpsClient.OpListV2EntityProjectOpsGet.g.cs +++ b/src/libs/Weave/Generated/Weave.OpsClient.OpListV2EntityProjectOpsGet.g.cs @@ -69,6 +69,40 @@ partial void ProcessOpListV2EntityProjectOpsGetResponseContent( int? offset = default, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await OpListV2EntityProjectOpsGetAsResponseAsync( + entity: entity, + project: project, + limit: limit, + offset: offset, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Op List
+ /// List op objects. + ///
+ /// + /// + /// + /// Maximum number of ops to return + /// + /// + /// Number of ops to skip + /// + /// 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> OpListV2EntityProjectOpsGetAsResponseAsync( + string entity, + string project, + int? limit = default, + int? offset = default, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -101,12 +135,13 @@ partial void ProcessOpListV2EntityProjectOpsGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: $"/v2/{entity}/{project}/ops", - 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::Weave.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -181,6 +216,8 @@ partial void ProcessOpListV2EntityProjectOpsGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -191,6 +228,11 @@ partial void ProcessOpListV2EntityProjectOpsGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -208,6 +250,8 @@ partial void ProcessOpListV2EntityProjectOpsGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -217,8 +261,7 @@ partial void ProcessOpListV2EntityProjectOpsGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -227,6 +270,11 @@ partial void ProcessOpListV2EntityProjectOpsGetResponseContent( __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -243,14 +291,15 @@ partial void ProcessOpListV2EntityProjectOpsGetResponseContent( 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -290,6 +339,8 @@ partial void ProcessOpListV2EntityProjectOpsGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -310,6 +361,8 @@ partial void ProcessOpListV2EntityProjectOpsGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -372,7 +425,11 @@ partial void ProcessOpListV2EntityProjectOpsGetResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -400,7 +457,11 @@ partial void ProcessOpListV2EntityProjectOpsGetResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.OpsClient.OpReadV2EntityProjectOpsObjectIdVersionsDigestGet.g.cs b/src/libs/Weave/Generated/Weave.OpsClient.OpReadV2EntityProjectOpsObjectIdVersionsDigestGet.g.cs index 7423c41..e24b135 100644 --- a/src/libs/Weave/Generated/Weave.OpsClient.OpReadV2EntityProjectOpsObjectIdVersionsDigestGet.g.cs +++ b/src/libs/Weave/Generated/Weave.OpsClient.OpReadV2EntityProjectOpsObjectIdVersionsDigestGet.g.cs @@ -72,6 +72,42 @@ partial void ProcessOpReadV2EntityProjectOpsObjectIdVersionsDigestGetResponseCon bool? eager = default, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await OpReadV2EntityProjectOpsObjectIdVersionsDigestGetAsResponseAsync( + entity: entity, + project: project, + objectId: objectId, + digest: digest, + eager: eager, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Op Read
+ /// Get an op object. + ///
+ /// + /// + /// + /// + /// + /// Whether to eagerly load the op code
+ /// Default Value: false + /// + /// 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> OpReadV2EntityProjectOpsObjectIdVersionsDigestGetAsResponseAsync( + string entity, + string project, + string objectId, + string digest, + bool? eager = default, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -105,11 +141,12 @@ partial void ProcessOpReadV2EntityProjectOpsObjectIdVersionsDigestGetResponseCon global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: $"/v2/{entity}/{project}/ops/{objectId}/versions/{digest}", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder - .AddOptionalParameter("eager", eager?.ToString().ToLowerInvariant()) + .AddOptionalParameter("eager", eager?.ToString().ToLowerInvariant()) ; var __path = __pathBuilder.ToString(); __path = global::Weave.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -185,6 +222,8 @@ partial void ProcessOpReadV2EntityProjectOpsObjectIdVersionsDigestGetResponseCon attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -195,6 +234,11 @@ partial void ProcessOpReadV2EntityProjectOpsObjectIdVersionsDigestGetResponseCon } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -212,6 +256,8 @@ partial void ProcessOpReadV2EntityProjectOpsObjectIdVersionsDigestGetResponseCon attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -221,8 +267,7 @@ partial void ProcessOpReadV2EntityProjectOpsObjectIdVersionsDigestGetResponseCon __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -231,6 +276,11 @@ partial void ProcessOpReadV2EntityProjectOpsObjectIdVersionsDigestGetResponseCon __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -247,14 +297,15 @@ partial void ProcessOpReadV2EntityProjectOpsObjectIdVersionsDigestGetResponseCon 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -294,6 +345,8 @@ partial void ProcessOpReadV2EntityProjectOpsObjectIdVersionsDigestGetResponseCon attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -314,6 +367,8 @@ partial void ProcessOpReadV2EntityProjectOpsObjectIdVersionsDigestGetResponseCon attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -376,9 +431,13 @@ partial void ProcessOpReadV2EntityProjectOpsObjectIdVersionsDigestGetResponseCon { __response.EnsureSuccessStatusCode(); - return - global::Weave.OpReadRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.OpReadRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -406,9 +465,13 @@ partial void ProcessOpReadV2EntityProjectOpsObjectIdVersionsDigestGetResponseCon #endif ).ConfigureAwait(false); - return - await global::Weave.OpReadRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.OpReadRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.OpsClient.g.cs b/src/libs/Weave/Generated/Weave.OpsClient.g.cs index 8f195ca..a970fdd 100644 --- a/src/libs/Weave/Generated/Weave.OpsClient.g.cs +++ b/src/libs/Weave/Generated/Weave.OpsClient.g.cs @@ -72,10 +72,10 @@ public OpsClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public OpsClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Weave.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Weave.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Weave/Generated/Weave.OptionsSupport.g.cs b/src/libs/Weave/Generated/Weave.OptionsSupport.g.cs index 6e2276f..e885055 100644 --- a/src/libs/Weave/Generated/Weave.OptionsSupport.g.cs +++ b/src/libs/Weave/Generated/Weave.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::Weave.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::Weave.AutoSDKClientOptions clientOptions, global::Weave.AutoSDKRequestOptions? requestOptions, + global::System.Net.Http.HttpResponseMessage? response, + int attempt) + { + var retryOptions = requestOptions?.Retry ?? clientOptions.Retry ?? new global::Weave.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::Weave.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/Weave/Generated/Weave.PredictionsClient.PredictionCreateV2EntityProjectPredictionsPost.g.cs b/src/libs/Weave/Generated/Weave.PredictionsClient.PredictionCreateV2EntityProjectPredictionsPost.g.cs index 65344a5..eb2e352 100644 --- a/src/libs/Weave/Generated/Weave.PredictionsClient.PredictionCreateV2EntityProjectPredictionsPost.g.cs +++ b/src/libs/Weave/Generated/Weave.PredictionsClient.PredictionCreateV2EntityProjectPredictionsPost.g.cs @@ -59,6 +59,35 @@ partial void ProcessPredictionCreateV2EntityProjectPredictionsPostResponseConten string entity, string project, + global::Weave.PredictionCreateBody request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await PredictionCreateV2EntityProjectPredictionsPostAsResponseAsync( + entity: entity, + project: project, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Prediction Create
+ /// Create a prediction. + ///
+ /// + /// + /// + /// 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> PredictionCreateV2EntityProjectPredictionsPostAsResponseAsync( + string entity, + string project, + global::Weave.PredictionCreateBody request, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -95,6 +124,7 @@ partial void ProcessPredictionCreateV2EntityProjectPredictionsPostResponseConten global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: $"/v2/{entity}/{project}/predictions", baseUri: HttpClient.BaseAddress); @@ -176,6 +206,8 @@ partial void ProcessPredictionCreateV2EntityProjectPredictionsPostResponseConten attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -186,6 +218,11 @@ partial void ProcessPredictionCreateV2EntityProjectPredictionsPostResponseConten } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -203,6 +240,8 @@ partial void ProcessPredictionCreateV2EntityProjectPredictionsPostResponseConten attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -212,8 +251,7 @@ partial void ProcessPredictionCreateV2EntityProjectPredictionsPostResponseConten __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -222,6 +260,11 @@ partial void ProcessPredictionCreateV2EntityProjectPredictionsPostResponseConten __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -238,14 +281,15 @@ partial void ProcessPredictionCreateV2EntityProjectPredictionsPostResponseConten 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -285,6 +329,8 @@ partial void ProcessPredictionCreateV2EntityProjectPredictionsPostResponseConten attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -305,6 +351,8 @@ partial void ProcessPredictionCreateV2EntityProjectPredictionsPostResponseConten attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -367,9 +415,13 @@ partial void ProcessPredictionCreateV2EntityProjectPredictionsPostResponseConten { __response.EnsureSuccessStatusCode(); - return - global::Weave.PredictionCreateRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.PredictionCreateRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -397,9 +449,13 @@ partial void ProcessPredictionCreateV2EntityProjectPredictionsPostResponseConten #endif ).ConfigureAwait(false); - return - await global::Weave.PredictionCreateRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.PredictionCreateRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.PredictionsClient.PredictionDeleteV2EntityProjectPredictionsDelete.g.cs b/src/libs/Weave/Generated/Weave.PredictionsClient.PredictionDeleteV2EntityProjectPredictionsDelete.g.cs index 8ee027e..872cfe3 100644 --- a/src/libs/Weave/Generated/Weave.PredictionsClient.PredictionDeleteV2EntityProjectPredictionsDelete.g.cs +++ b/src/libs/Weave/Generated/Weave.PredictionsClient.PredictionDeleteV2EntityProjectPredictionsDelete.g.cs @@ -63,6 +63,35 @@ partial void ProcessPredictionDeleteV2EntityProjectPredictionsDeleteResponseCont global::System.Collections.Generic.IList predictionIds, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await PredictionDeleteV2EntityProjectPredictionsDeleteAsResponseAsync( + entity: entity, + project: project, + predictionIds: predictionIds, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Prediction Delete
+ /// Delete predictions. + ///
+ /// + /// + /// + /// List of prediction IDs to delete + /// + /// 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> PredictionDeleteV2EntityProjectPredictionsDeleteAsResponseAsync( + string entity, + string project, + global::System.Collections.Generic.IList predictionIds, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -94,11 +123,12 @@ partial void ProcessPredictionDeleteV2EntityProjectPredictionsDeleteResponseCont global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: $"/v2/{entity}/{project}/predictions", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder - .AddRequiredParameter("prediction_ids", predictionIds, delimiter: ",", explode: true) + .AddRequiredParameter("prediction_ids", predictionIds, delimiter: ",", explode: true) ; var __path = __pathBuilder.ToString(); __path = global::Weave.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -172,6 +202,8 @@ partial void ProcessPredictionDeleteV2EntityProjectPredictionsDeleteResponseCont attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -182,6 +214,11 @@ partial void ProcessPredictionDeleteV2EntityProjectPredictionsDeleteResponseCont } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -199,6 +236,8 @@ partial void ProcessPredictionDeleteV2EntityProjectPredictionsDeleteResponseCont attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -208,8 +247,7 @@ partial void ProcessPredictionDeleteV2EntityProjectPredictionsDeleteResponseCont __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -218,6 +256,11 @@ partial void ProcessPredictionDeleteV2EntityProjectPredictionsDeleteResponseCont __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -234,14 +277,15 @@ partial void ProcessPredictionDeleteV2EntityProjectPredictionsDeleteResponseCont 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -281,6 +325,8 @@ partial void ProcessPredictionDeleteV2EntityProjectPredictionsDeleteResponseCont attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -301,6 +347,8 @@ partial void ProcessPredictionDeleteV2EntityProjectPredictionsDeleteResponseCont attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -363,9 +411,13 @@ partial void ProcessPredictionDeleteV2EntityProjectPredictionsDeleteResponseCont { __response.EnsureSuccessStatusCode(); - return - global::Weave.PredictionDeleteRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.PredictionDeleteRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -393,9 +445,13 @@ partial void ProcessPredictionDeleteV2EntityProjectPredictionsDeleteResponseCont #endif ).ConfigureAwait(false); - return - await global::Weave.PredictionDeleteRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.PredictionDeleteRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.PredictionsClient.PredictionFinishV2EntityProjectPredictionsPredictionIdFinishPost.g.cs b/src/libs/Weave/Generated/Weave.PredictionsClient.PredictionFinishV2EntityProjectPredictionsPredictionIdFinishPost.g.cs index 4d02afe..f3503d0 100644 --- a/src/libs/Weave/Generated/Weave.PredictionsClient.PredictionFinishV2EntityProjectPredictionsPredictionIdFinishPost.g.cs +++ b/src/libs/Weave/Generated/Weave.PredictionsClient.PredictionFinishV2EntityProjectPredictionsPredictionIdFinishPost.g.cs @@ -61,6 +61,33 @@ partial void ProcessPredictionFinishV2EntityProjectPredictionsPredictionIdFinish string predictionId, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await PredictionFinishV2EntityProjectPredictionsPredictionIdFinishPostAsResponseAsync( + entity: entity, + project: project, + predictionId: predictionId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Prediction Finish
+ /// Finish a prediction. + ///
+ /// + /// + /// + /// 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> PredictionFinishV2EntityProjectPredictionsPredictionIdFinishPostAsResponseAsync( + string entity, + string project, + string predictionId, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -92,6 +119,7 @@ partial void ProcessPredictionFinishV2EntityProjectPredictionsPredictionIdFinish global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: $"/v2/{entity}/{project}/predictions/{predictionId}/finish", baseUri: HttpClient.BaseAddress); @@ -167,6 +195,8 @@ partial void ProcessPredictionFinishV2EntityProjectPredictionsPredictionIdFinish attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -177,6 +207,11 @@ partial void ProcessPredictionFinishV2EntityProjectPredictionsPredictionIdFinish } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -194,6 +229,8 @@ partial void ProcessPredictionFinishV2EntityProjectPredictionsPredictionIdFinish attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -203,8 +240,7 @@ partial void ProcessPredictionFinishV2EntityProjectPredictionsPredictionIdFinish __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -213,6 +249,11 @@ partial void ProcessPredictionFinishV2EntityProjectPredictionsPredictionIdFinish __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -229,14 +270,15 @@ partial void ProcessPredictionFinishV2EntityProjectPredictionsPredictionIdFinish 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -276,6 +318,8 @@ partial void ProcessPredictionFinishV2EntityProjectPredictionsPredictionIdFinish attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -296,6 +340,8 @@ partial void ProcessPredictionFinishV2EntityProjectPredictionsPredictionIdFinish attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -358,9 +404,13 @@ partial void ProcessPredictionFinishV2EntityProjectPredictionsPredictionIdFinish { __response.EnsureSuccessStatusCode(); - return - global::Weave.PredictionFinishRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.PredictionFinishRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -388,9 +438,13 @@ partial void ProcessPredictionFinishV2EntityProjectPredictionsPredictionIdFinish #endif ).ConfigureAwait(false); - return - await global::Weave.PredictionFinishRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.PredictionFinishRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.PredictionsClient.PredictionListV2EntityProjectPredictionsGet.g.cs b/src/libs/Weave/Generated/Weave.PredictionsClient.PredictionListV2EntityProjectPredictionsGet.g.cs index 96b54b4..99cb5c2 100644 --- a/src/libs/Weave/Generated/Weave.PredictionsClient.PredictionListV2EntityProjectPredictionsGet.g.cs +++ b/src/libs/Weave/Generated/Weave.PredictionsClient.PredictionListV2EntityProjectPredictionsGet.g.cs @@ -103,13 +103,14 @@ partial void ProcessPredictionListV2EntityProjectPredictionsGetResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: $"/v2/{entity}/{project}/predictions", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("evaluation_run_id", evaluationRunId) .AddOptionalParameter("limit", limit?.ToString()) - .AddOptionalParameter("offset", offset?.ToString()) + .AddOptionalParameter("offset", offset?.ToString()) ; var __path = __pathBuilder.ToString(); __path = global::Weave.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -185,6 +186,8 @@ partial void ProcessPredictionListV2EntityProjectPredictionsGetResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -195,6 +198,11 @@ partial void ProcessPredictionListV2EntityProjectPredictionsGetResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -212,6 +220,8 @@ partial void ProcessPredictionListV2EntityProjectPredictionsGetResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -221,8 +231,7 @@ partial void ProcessPredictionListV2EntityProjectPredictionsGetResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -231,6 +240,11 @@ partial void ProcessPredictionListV2EntityProjectPredictionsGetResponse( __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -247,14 +261,15 @@ partial void ProcessPredictionListV2EntityProjectPredictionsGetResponse( 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -294,6 +309,8 @@ partial void ProcessPredictionListV2EntityProjectPredictionsGetResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -314,6 +331,8 @@ partial void ProcessPredictionListV2EntityProjectPredictionsGetResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } diff --git a/src/libs/Weave/Generated/Weave.PredictionsClient.PredictionReadV2EntityProjectPredictionsPredictionIdGet.g.cs b/src/libs/Weave/Generated/Weave.PredictionsClient.PredictionReadV2EntityProjectPredictionsPredictionIdGet.g.cs index 4e33157..3388dc3 100644 --- a/src/libs/Weave/Generated/Weave.PredictionsClient.PredictionReadV2EntityProjectPredictionsPredictionIdGet.g.cs +++ b/src/libs/Weave/Generated/Weave.PredictionsClient.PredictionReadV2EntityProjectPredictionsPredictionIdGet.g.cs @@ -61,6 +61,33 @@ partial void ProcessPredictionReadV2EntityProjectPredictionsPredictionIdGetRespo string predictionId, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await PredictionReadV2EntityProjectPredictionsPredictionIdGetAsResponseAsync( + entity: entity, + project: project, + predictionId: predictionId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Prediction Read
+ /// Read a prediction. + ///
+ /// + /// + /// + /// 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> PredictionReadV2EntityProjectPredictionsPredictionIdGetAsResponseAsync( + string entity, + string project, + string predictionId, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -92,6 +119,7 @@ partial void ProcessPredictionReadV2EntityProjectPredictionsPredictionIdGetRespo global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: $"/v2/{entity}/{project}/predictions/{predictionId}", baseUri: HttpClient.BaseAddress); @@ -167,6 +195,8 @@ partial void ProcessPredictionReadV2EntityProjectPredictionsPredictionIdGetRespo attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -177,6 +207,11 @@ partial void ProcessPredictionReadV2EntityProjectPredictionsPredictionIdGetRespo } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -194,6 +229,8 @@ partial void ProcessPredictionReadV2EntityProjectPredictionsPredictionIdGetRespo attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -203,8 +240,7 @@ partial void ProcessPredictionReadV2EntityProjectPredictionsPredictionIdGetRespo __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -213,6 +249,11 @@ partial void ProcessPredictionReadV2EntityProjectPredictionsPredictionIdGetRespo __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -229,14 +270,15 @@ partial void ProcessPredictionReadV2EntityProjectPredictionsPredictionIdGetRespo 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -276,6 +318,8 @@ partial void ProcessPredictionReadV2EntityProjectPredictionsPredictionIdGetRespo attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -296,6 +340,8 @@ partial void ProcessPredictionReadV2EntityProjectPredictionsPredictionIdGetRespo attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -358,9 +404,13 @@ partial void ProcessPredictionReadV2EntityProjectPredictionsPredictionIdGetRespo { __response.EnsureSuccessStatusCode(); - return - global::Weave.PredictionReadRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.PredictionReadRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -388,9 +438,13 @@ partial void ProcessPredictionReadV2EntityProjectPredictionsPredictionIdGetRespo #endif ).ConfigureAwait(false); - return - await global::Weave.PredictionReadRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.PredictionReadRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.PredictionsClient.g.cs b/src/libs/Weave/Generated/Weave.PredictionsClient.g.cs index a586239..fdfb9f3 100644 --- a/src/libs/Weave/Generated/Weave.PredictionsClient.g.cs +++ b/src/libs/Weave/Generated/Weave.PredictionsClient.g.cs @@ -72,10 +72,10 @@ public PredictionsClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public PredictionsClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Weave.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Weave.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Weave/Generated/Weave.RefsClient.RefsReadBatchRefsReadBatchPost.g.cs b/src/libs/Weave/Generated/Weave.RefsClient.RefsReadBatchRefsReadBatchPost.g.cs index 15e344f..b091c73 100644 --- a/src/libs/Weave/Generated/Weave.RefsClient.RefsReadBatchRefsReadBatchPost.g.cs +++ b/src/libs/Weave/Generated/Weave.RefsClient.RefsReadBatchRefsReadBatchPost.g.cs @@ -50,6 +50,28 @@ partial void ProcessRefsReadBatchRefsReadBatchPostResponseContent( /// public async global::System.Threading.Tasks.Task RefsReadBatchRefsReadBatchPostAsync( + global::Weave.RefsReadBatchReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await RefsReadBatchRefsReadBatchPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Refs Read Batch + /// + /// + /// 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> RefsReadBatchRefsReadBatchPostAsResponseAsync( + global::Weave.RefsReadBatchReq request, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessRefsReadBatchRefsReadBatchPostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: "/refs/read_batch", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessRefsReadBatchRefsReadBatchPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessRefsReadBatchRefsReadBatchPostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessRefsReadBatchRefsReadBatchPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessRefsReadBatchRefsReadBatchPostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessRefsReadBatchRefsReadBatchPostResponseContent( __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessRefsReadBatchRefsReadBatchPostResponseContent( 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessRefsReadBatchRefsReadBatchPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessRefsReadBatchRefsReadBatchPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -354,9 +395,13 @@ partial void ProcessRefsReadBatchRefsReadBatchPostResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Weave.RefsReadBatchRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.RefsReadBatchRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -384,9 +429,13 @@ partial void ProcessRefsReadBatchRefsReadBatchPostResponseContent( #endif ).ConfigureAwait(false); - return - await global::Weave.RefsReadBatchRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.RefsReadBatchRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.RefsClient.g.cs b/src/libs/Weave/Generated/Weave.RefsClient.g.cs index bf0414e..979cefa 100644 --- a/src/libs/Weave/Generated/Weave.RefsClient.g.cs +++ b/src/libs/Weave/Generated/Weave.RefsClient.g.cs @@ -72,10 +72,10 @@ public RefsClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public RefsClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Weave.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Weave.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Weave/Generated/Weave.RegistryClient.LinkToRegistryLinkToRegistryPost.g.cs b/src/libs/Weave/Generated/Weave.RegistryClient.LinkToRegistryLinkToRegistryPost.g.cs index d974266..ceb5631 100644 --- a/src/libs/Weave/Generated/Weave.RegistryClient.LinkToRegistryLinkToRegistryPost.g.cs +++ b/src/libs/Weave/Generated/Weave.RegistryClient.LinkToRegistryLinkToRegistryPost.g.cs @@ -50,6 +50,28 @@ partial void ProcessLinkToRegistryLinkToRegistryPostResponseContent( /// public async global::System.Threading.Tasks.Task LinkToRegistryLinkToRegistryPostAsync( + global::Weave.CreateAndLinkPayload request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await LinkToRegistryLinkToRegistryPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Link To Registry + /// + /// + /// 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> LinkToRegistryLinkToRegistryPostAsResponseAsync( + global::Weave.CreateAndLinkPayload request, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessLinkToRegistryLinkToRegistryPostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: "/link_to_registry", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessLinkToRegistryLinkToRegistryPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessLinkToRegistryLinkToRegistryPostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessLinkToRegistryLinkToRegistryPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessLinkToRegistryLinkToRegistryPostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessLinkToRegistryLinkToRegistryPostResponseContent( __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessLinkToRegistryLinkToRegistryPostResponseContent( 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessLinkToRegistryLinkToRegistryPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessLinkToRegistryLinkToRegistryPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -354,9 +395,13 @@ partial void ProcessLinkToRegistryLinkToRegistryPostResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Weave.CreateAndLinkWeaveAssetRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.CreateAndLinkWeaveAssetRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -384,9 +429,13 @@ partial void ProcessLinkToRegistryLinkToRegistryPostResponseContent( #endif ).ConfigureAwait(false); - return - await global::Weave.CreateAndLinkWeaveAssetRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.CreateAndLinkWeaveAssetRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.RegistryClient.g.cs b/src/libs/Weave/Generated/Weave.RegistryClient.g.cs index 6002a66..d780d1c 100644 --- a/src/libs/Weave/Generated/Weave.RegistryClient.g.cs +++ b/src/libs/Weave/Generated/Weave.RegistryClient.g.cs @@ -72,10 +72,10 @@ public RegistryClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public RegistryClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Weave.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Weave.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Weave/Generated/Weave.ScorersClient.ScorerCreateV2EntityProjectScorersPost.g.cs b/src/libs/Weave/Generated/Weave.ScorersClient.ScorerCreateV2EntityProjectScorersPost.g.cs index 24f63c7..abc0c4d 100644 --- a/src/libs/Weave/Generated/Weave.ScorersClient.ScorerCreateV2EntityProjectScorersPost.g.cs +++ b/src/libs/Weave/Generated/Weave.ScorersClient.ScorerCreateV2EntityProjectScorersPost.g.cs @@ -59,6 +59,35 @@ partial void ProcessScorerCreateV2EntityProjectScorersPostResponseContent( string entity, string project, + global::Weave.ScorerCreateBody request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ScorerCreateV2EntityProjectScorersPostAsResponseAsync( + entity: entity, + project: project, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Scorer Create
+ /// Create a scorer object. + ///
+ /// + /// + /// + /// 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> ScorerCreateV2EntityProjectScorersPostAsResponseAsync( + string entity, + string project, + global::Weave.ScorerCreateBody request, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -95,6 +124,7 @@ partial void ProcessScorerCreateV2EntityProjectScorersPostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: $"/v2/{entity}/{project}/scorers", baseUri: HttpClient.BaseAddress); @@ -176,6 +206,8 @@ partial void ProcessScorerCreateV2EntityProjectScorersPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -186,6 +218,11 @@ partial void ProcessScorerCreateV2EntityProjectScorersPostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -203,6 +240,8 @@ partial void ProcessScorerCreateV2EntityProjectScorersPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -212,8 +251,7 @@ partial void ProcessScorerCreateV2EntityProjectScorersPostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -222,6 +260,11 @@ partial void ProcessScorerCreateV2EntityProjectScorersPostResponseContent( __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -238,14 +281,15 @@ partial void ProcessScorerCreateV2EntityProjectScorersPostResponseContent( 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -285,6 +329,8 @@ partial void ProcessScorerCreateV2EntityProjectScorersPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -305,6 +351,8 @@ partial void ProcessScorerCreateV2EntityProjectScorersPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -367,9 +415,13 @@ partial void ProcessScorerCreateV2EntityProjectScorersPostResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Weave.ScorerCreateRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.ScorerCreateRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -397,9 +449,13 @@ partial void ProcessScorerCreateV2EntityProjectScorersPostResponseContent( #endif ).ConfigureAwait(false); - return - await global::Weave.ScorerCreateRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.ScorerCreateRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.ScorersClient.ScorerDeleteV2EntityProjectScorersObjectIdDelete.g.cs b/src/libs/Weave/Generated/Weave.ScorersClient.ScorerDeleteV2EntityProjectScorersObjectIdDelete.g.cs index 4445c86..add4dbb 100644 --- a/src/libs/Weave/Generated/Weave.ScorersClient.ScorerDeleteV2EntityProjectScorersObjectIdDelete.g.cs +++ b/src/libs/Weave/Generated/Weave.ScorersClient.ScorerDeleteV2EntityProjectScorersObjectIdDelete.g.cs @@ -67,6 +67,38 @@ partial void ProcessScorerDeleteV2EntityProjectScorersObjectIdDeleteResponseCont global::System.Collections.Generic.IList? digests = default, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ScorerDeleteV2EntityProjectScorersObjectIdDeleteAsResponseAsync( + entity: entity, + project: project, + objectId: objectId, + digests: digests, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Scorer Delete
+ /// Delete a scorer object. + ///
+ /// + /// + /// + /// + /// List of digests to delete. If not provided, all digests for the scorer will be deleted. + /// + /// 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> ScorerDeleteV2EntityProjectScorersObjectIdDeleteAsResponseAsync( + string entity, + string project, + string objectId, + global::System.Collections.Generic.IList? digests = default, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -99,11 +131,12 @@ partial void ProcessScorerDeleteV2EntityProjectScorersObjectIdDeleteResponseCont global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: $"/v2/{entity}/{project}/scorers/{objectId}", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder - .AddOptionalParameter("digests", digests?.ToString()) + .AddOptionalParameter("digests", digests?.ToString()) ; var __path = __pathBuilder.ToString(); __path = global::Weave.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -178,6 +211,8 @@ partial void ProcessScorerDeleteV2EntityProjectScorersObjectIdDeleteResponseCont attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +223,11 @@ partial void ProcessScorerDeleteV2EntityProjectScorersObjectIdDeleteResponseCont } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +245,8 @@ partial void ProcessScorerDeleteV2EntityProjectScorersObjectIdDeleteResponseCont attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +256,7 @@ partial void ProcessScorerDeleteV2EntityProjectScorersObjectIdDeleteResponseCont __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +265,11 @@ partial void ProcessScorerDeleteV2EntityProjectScorersObjectIdDeleteResponseCont __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +286,15 @@ partial void ProcessScorerDeleteV2EntityProjectScorersObjectIdDeleteResponseCont 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +334,8 @@ partial void ProcessScorerDeleteV2EntityProjectScorersObjectIdDeleteResponseCont attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +356,8 @@ partial void ProcessScorerDeleteV2EntityProjectScorersObjectIdDeleteResponseCont attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -369,9 +420,13 @@ partial void ProcessScorerDeleteV2EntityProjectScorersObjectIdDeleteResponseCont { __response.EnsureSuccessStatusCode(); - return - global::Weave.ScorerDeleteRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.ScorerDeleteRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -399,9 +454,13 @@ partial void ProcessScorerDeleteV2EntityProjectScorersObjectIdDeleteResponseCont #endif ).ConfigureAwait(false); - return - await global::Weave.ScorerDeleteRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.ScorerDeleteRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.ScorersClient.ScorerListV2EntityProjectScorersGet.g.cs b/src/libs/Weave/Generated/Weave.ScorersClient.ScorerListV2EntityProjectScorersGet.g.cs index ec0c618..ffac2c9 100644 --- a/src/libs/Weave/Generated/Weave.ScorersClient.ScorerListV2EntityProjectScorersGet.g.cs +++ b/src/libs/Weave/Generated/Weave.ScorersClient.ScorerListV2EntityProjectScorersGet.g.cs @@ -57,6 +57,30 @@ partial void ProcessScorerListV2EntityProjectScorersGetResponseContent( string project, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ScorerListV2EntityProjectScorersGetAsResponseAsync( + entity: entity, + project: project, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Scorer List
+ /// List scorer objects. + ///
+ /// + /// + /// 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> ScorerListV2EntityProjectScorersGetAsResponseAsync( + string entity, + string project, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -87,6 +111,7 @@ partial void ProcessScorerListV2EntityProjectScorersGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: $"/v2/{entity}/{project}/scorers", baseUri: HttpClient.BaseAddress); @@ -161,6 +186,8 @@ partial void ProcessScorerListV2EntityProjectScorersGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -171,6 +198,11 @@ partial void ProcessScorerListV2EntityProjectScorersGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -188,6 +220,8 @@ partial void ProcessScorerListV2EntityProjectScorersGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -197,8 +231,7 @@ partial void ProcessScorerListV2EntityProjectScorersGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -207,6 +240,11 @@ partial void ProcessScorerListV2EntityProjectScorersGetResponseContent( __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -223,14 +261,15 @@ partial void ProcessScorerListV2EntityProjectScorersGetResponseContent( 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -270,6 +309,8 @@ partial void ProcessScorerListV2EntityProjectScorersGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -290,6 +331,8 @@ partial void ProcessScorerListV2EntityProjectScorersGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -352,7 +395,11 @@ partial void ProcessScorerListV2EntityProjectScorersGetResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -380,7 +427,11 @@ partial void ProcessScorerListV2EntityProjectScorersGetResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.ScorersClient.ScorerReadV2EntityProjectScorersObjectIdVersionsDigestGet.g.cs b/src/libs/Weave/Generated/Weave.ScorersClient.ScorerReadV2EntityProjectScorersObjectIdVersionsDigestGet.g.cs index b6c78c0..4ae0fa3 100644 --- a/src/libs/Weave/Generated/Weave.ScorersClient.ScorerReadV2EntityProjectScorersObjectIdVersionsDigestGet.g.cs +++ b/src/libs/Weave/Generated/Weave.ScorersClient.ScorerReadV2EntityProjectScorersObjectIdVersionsDigestGet.g.cs @@ -65,6 +65,36 @@ partial void ProcessScorerReadV2EntityProjectScorersObjectIdVersionsDigestGetRes string digest, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ScorerReadV2EntityProjectScorersObjectIdVersionsDigestGetAsResponseAsync( + entity: entity, + project: project, + objectId: objectId, + digest: digest, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Scorer Read
+ /// Get a scorer object. + ///
+ /// + /// + /// + /// + /// 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> ScorerReadV2EntityProjectScorersObjectIdVersionsDigestGetAsResponseAsync( + string entity, + string project, + string objectId, + string digest, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -97,6 +127,7 @@ partial void ProcessScorerReadV2EntityProjectScorersObjectIdVersionsDigestGetRes global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: $"/v2/{entity}/{project}/scorers/{objectId}/versions/{digest}", baseUri: HttpClient.BaseAddress); @@ -173,6 +204,8 @@ partial void ProcessScorerReadV2EntityProjectScorersObjectIdVersionsDigestGetRes attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -183,6 +216,11 @@ partial void ProcessScorerReadV2EntityProjectScorersObjectIdVersionsDigestGetRes } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -200,6 +238,8 @@ partial void ProcessScorerReadV2EntityProjectScorersObjectIdVersionsDigestGetRes attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -209,8 +249,7 @@ partial void ProcessScorerReadV2EntityProjectScorersObjectIdVersionsDigestGetRes __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -219,6 +258,11 @@ partial void ProcessScorerReadV2EntityProjectScorersObjectIdVersionsDigestGetRes __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -235,14 +279,15 @@ partial void ProcessScorerReadV2EntityProjectScorersObjectIdVersionsDigestGetRes 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -282,6 +327,8 @@ partial void ProcessScorerReadV2EntityProjectScorersObjectIdVersionsDigestGetRes attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -302,6 +349,8 @@ partial void ProcessScorerReadV2EntityProjectScorersObjectIdVersionsDigestGetRes attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -364,9 +413,13 @@ partial void ProcessScorerReadV2EntityProjectScorersObjectIdVersionsDigestGetRes { __response.EnsureSuccessStatusCode(); - return - global::Weave.ScorerReadRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.ScorerReadRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -394,9 +447,13 @@ partial void ProcessScorerReadV2EntityProjectScorersObjectIdVersionsDigestGetRes #endif ).ConfigureAwait(false); - return - await global::Weave.ScorerReadRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.ScorerReadRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.ScorersClient.g.cs b/src/libs/Weave/Generated/Weave.ScorersClient.g.cs index 7a03105..bbb2b2d 100644 --- a/src/libs/Weave/Generated/Weave.ScorersClient.g.cs +++ b/src/libs/Weave/Generated/Weave.ScorersClient.g.cs @@ -72,10 +72,10 @@ public ScorersClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public ScorersClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Weave.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Weave.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Weave/Generated/Weave.ScoresClient.CallsScoreCallsScorePost.g.cs b/src/libs/Weave/Generated/Weave.ScoresClient.CallsScoreCallsScorePost.g.cs index 45282c2..d00a1cc 100644 --- a/src/libs/Weave/Generated/Weave.ScoresClient.CallsScoreCallsScorePost.g.cs +++ b/src/libs/Weave/Generated/Weave.ScoresClient.CallsScoreCallsScorePost.g.cs @@ -50,6 +50,28 @@ partial void ProcessCallsScoreCallsScorePostResponseContent( /// public async global::System.Threading.Tasks.Task CallsScoreCallsScorePostAsync( + global::Weave.CallsScoreReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CallsScoreCallsScorePostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Calls Score + /// + /// + /// 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> CallsScoreCallsScorePostAsResponseAsync( + global::Weave.CallsScoreReq request, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessCallsScoreCallsScorePostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: "/calls/score", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessCallsScoreCallsScorePostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessCallsScoreCallsScorePostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessCallsScoreCallsScorePostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessCallsScoreCallsScorePostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessCallsScoreCallsScorePostResponseContent( __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessCallsScoreCallsScorePostResponseContent( 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessCallsScoreCallsScorePostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessCallsScoreCallsScorePostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -354,9 +395,13 @@ partial void ProcessCallsScoreCallsScorePostResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Weave.CallsScoreRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.CallsScoreRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -384,9 +429,13 @@ partial void ProcessCallsScoreCallsScorePostResponseContent( #endif ).ConfigureAwait(false); - return - await global::Weave.CallsScoreRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.CallsScoreRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.ScoresClient.ScoreCreateV2EntityProjectScoresPost.g.cs b/src/libs/Weave/Generated/Weave.ScoresClient.ScoreCreateV2EntityProjectScoresPost.g.cs index 5b19443..40f7200 100644 --- a/src/libs/Weave/Generated/Weave.ScoresClient.ScoreCreateV2EntityProjectScoresPost.g.cs +++ b/src/libs/Weave/Generated/Weave.ScoresClient.ScoreCreateV2EntityProjectScoresPost.g.cs @@ -59,6 +59,35 @@ partial void ProcessScoreCreateV2EntityProjectScoresPostResponseContent( string entity, string project, + global::Weave.ScoreCreateBody request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ScoreCreateV2EntityProjectScoresPostAsResponseAsync( + entity: entity, + project: project, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Score Create
+ /// Create a score. + ///
+ /// + /// + /// + /// 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> ScoreCreateV2EntityProjectScoresPostAsResponseAsync( + string entity, + string project, + global::Weave.ScoreCreateBody request, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -95,6 +124,7 @@ partial void ProcessScoreCreateV2EntityProjectScoresPostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: $"/v2/{entity}/{project}/scores", baseUri: HttpClient.BaseAddress); @@ -176,6 +206,8 @@ partial void ProcessScoreCreateV2EntityProjectScoresPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -186,6 +218,11 @@ partial void ProcessScoreCreateV2EntityProjectScoresPostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -203,6 +240,8 @@ partial void ProcessScoreCreateV2EntityProjectScoresPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -212,8 +251,7 @@ partial void ProcessScoreCreateV2EntityProjectScoresPostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -222,6 +260,11 @@ partial void ProcessScoreCreateV2EntityProjectScoresPostResponseContent( __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -238,14 +281,15 @@ partial void ProcessScoreCreateV2EntityProjectScoresPostResponseContent( 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -285,6 +329,8 @@ partial void ProcessScoreCreateV2EntityProjectScoresPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -305,6 +351,8 @@ partial void ProcessScoreCreateV2EntityProjectScoresPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -367,9 +415,13 @@ partial void ProcessScoreCreateV2EntityProjectScoresPostResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Weave.ScoreCreateRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.ScoreCreateRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -397,9 +449,13 @@ partial void ProcessScoreCreateV2EntityProjectScoresPostResponseContent( #endif ).ConfigureAwait(false); - return - await global::Weave.ScoreCreateRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.ScoreCreateRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.ScoresClient.ScoreDeleteV2EntityProjectScoresDelete.g.cs b/src/libs/Weave/Generated/Weave.ScoresClient.ScoreDeleteV2EntityProjectScoresDelete.g.cs index 3edda7c..49a6179 100644 --- a/src/libs/Weave/Generated/Weave.ScoresClient.ScoreDeleteV2EntityProjectScoresDelete.g.cs +++ b/src/libs/Weave/Generated/Weave.ScoresClient.ScoreDeleteV2EntityProjectScoresDelete.g.cs @@ -63,6 +63,35 @@ partial void ProcessScoreDeleteV2EntityProjectScoresDeleteResponseContent( global::System.Collections.Generic.IList scoreIds, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ScoreDeleteV2EntityProjectScoresDeleteAsResponseAsync( + entity: entity, + project: project, + scoreIds: scoreIds, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Score Delete
+ /// Delete scores. + ///
+ /// + /// + /// + /// List of score IDs to delete + /// + /// 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> ScoreDeleteV2EntityProjectScoresDeleteAsResponseAsync( + string entity, + string project, + global::System.Collections.Generic.IList scoreIds, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -94,11 +123,12 @@ partial void ProcessScoreDeleteV2EntityProjectScoresDeleteResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: $"/v2/{entity}/{project}/scores", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder - .AddRequiredParameter("score_ids", scoreIds, delimiter: ",", explode: true) + .AddRequiredParameter("score_ids", scoreIds, delimiter: ",", explode: true) ; var __path = __pathBuilder.ToString(); __path = global::Weave.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -172,6 +202,8 @@ partial void ProcessScoreDeleteV2EntityProjectScoresDeleteResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -182,6 +214,11 @@ partial void ProcessScoreDeleteV2EntityProjectScoresDeleteResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -199,6 +236,8 @@ partial void ProcessScoreDeleteV2EntityProjectScoresDeleteResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -208,8 +247,7 @@ partial void ProcessScoreDeleteV2EntityProjectScoresDeleteResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -218,6 +256,11 @@ partial void ProcessScoreDeleteV2EntityProjectScoresDeleteResponseContent( __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -234,14 +277,15 @@ partial void ProcessScoreDeleteV2EntityProjectScoresDeleteResponseContent( 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -281,6 +325,8 @@ partial void ProcessScoreDeleteV2EntityProjectScoresDeleteResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -301,6 +347,8 @@ partial void ProcessScoreDeleteV2EntityProjectScoresDeleteResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -363,9 +411,13 @@ partial void ProcessScoreDeleteV2EntityProjectScoresDeleteResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Weave.ScoreDeleteRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.ScoreDeleteRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -393,9 +445,13 @@ partial void ProcessScoreDeleteV2EntityProjectScoresDeleteResponseContent( #endif ).ConfigureAwait(false); - return - await global::Weave.ScoreDeleteRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.ScoreDeleteRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.ScoresClient.ScoreListV2EntityProjectScoresGet.g.cs b/src/libs/Weave/Generated/Weave.ScoresClient.ScoreListV2EntityProjectScoresGet.g.cs index 0b4b6f6..16e5f93 100644 --- a/src/libs/Weave/Generated/Weave.ScoresClient.ScoreListV2EntityProjectScoresGet.g.cs +++ b/src/libs/Weave/Generated/Weave.ScoresClient.ScoreListV2EntityProjectScoresGet.g.cs @@ -103,13 +103,14 @@ partial void ProcessScoreListV2EntityProjectScoresGetResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: $"/v2/{entity}/{project}/scores", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("evaluation_run_id", evaluationRunId) .AddOptionalParameter("limit", limit?.ToString()) - .AddOptionalParameter("offset", offset?.ToString()) + .AddOptionalParameter("offset", offset?.ToString()) ; var __path = __pathBuilder.ToString(); __path = global::Weave.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -185,6 +186,8 @@ partial void ProcessScoreListV2EntityProjectScoresGetResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -195,6 +198,11 @@ partial void ProcessScoreListV2EntityProjectScoresGetResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -212,6 +220,8 @@ partial void ProcessScoreListV2EntityProjectScoresGetResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -221,8 +231,7 @@ partial void ProcessScoreListV2EntityProjectScoresGetResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -231,6 +240,11 @@ partial void ProcessScoreListV2EntityProjectScoresGetResponse( __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -247,14 +261,15 @@ partial void ProcessScoreListV2EntityProjectScoresGetResponse( 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -294,6 +309,8 @@ partial void ProcessScoreListV2EntityProjectScoresGetResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -314,6 +331,8 @@ partial void ProcessScoreListV2EntityProjectScoresGetResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } diff --git a/src/libs/Weave/Generated/Weave.ScoresClient.ScoreReadV2EntityProjectScoresScoreIdGet.g.cs b/src/libs/Weave/Generated/Weave.ScoresClient.ScoreReadV2EntityProjectScoresScoreIdGet.g.cs index 1144aa7..2a5da70 100644 --- a/src/libs/Weave/Generated/Weave.ScoresClient.ScoreReadV2EntityProjectScoresScoreIdGet.g.cs +++ b/src/libs/Weave/Generated/Weave.ScoresClient.ScoreReadV2EntityProjectScoresScoreIdGet.g.cs @@ -61,6 +61,33 @@ partial void ProcessScoreReadV2EntityProjectScoresScoreIdGetResponseContent( string scoreId, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ScoreReadV2EntityProjectScoresScoreIdGetAsResponseAsync( + entity: entity, + project: project, + scoreId: scoreId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Score Read
+ /// Read a score. + ///
+ /// + /// + /// + /// 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> ScoreReadV2EntityProjectScoresScoreIdGetAsResponseAsync( + string entity, + string project, + string scoreId, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -92,6 +119,7 @@ partial void ProcessScoreReadV2EntityProjectScoresScoreIdGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: $"/v2/{entity}/{project}/scores/{scoreId}", baseUri: HttpClient.BaseAddress); @@ -167,6 +195,8 @@ partial void ProcessScoreReadV2EntityProjectScoresScoreIdGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -177,6 +207,11 @@ partial void ProcessScoreReadV2EntityProjectScoresScoreIdGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -194,6 +229,8 @@ partial void ProcessScoreReadV2EntityProjectScoresScoreIdGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -203,8 +240,7 @@ partial void ProcessScoreReadV2EntityProjectScoresScoreIdGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -213,6 +249,11 @@ partial void ProcessScoreReadV2EntityProjectScoresScoreIdGetResponseContent( __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -229,14 +270,15 @@ partial void ProcessScoreReadV2EntityProjectScoresScoreIdGetResponseContent( 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -276,6 +318,8 @@ partial void ProcessScoreReadV2EntityProjectScoresScoreIdGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -296,6 +340,8 @@ partial void ProcessScoreReadV2EntityProjectScoresScoreIdGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -358,9 +404,13 @@ partial void ProcessScoreReadV2EntityProjectScoresScoreIdGetResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Weave.ScoreReadRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.ScoreReadRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -388,9 +438,13 @@ partial void ProcessScoreReadV2EntityProjectScoresScoreIdGetResponseContent( #endif ).ConfigureAwait(false); - return - await global::Weave.ScoreReadRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.ScoreReadRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.ScoresClient.g.cs b/src/libs/Weave/Generated/Weave.ScoresClient.g.cs index 7e85283..bf1c530 100644 --- a/src/libs/Weave/Generated/Weave.ScoresClient.g.cs +++ b/src/libs/Weave/Generated/Weave.ScoresClient.g.cs @@ -72,10 +72,10 @@ public ScoresClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public ScoresClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Weave.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Weave.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Weave/Generated/Weave.ServiceClient.GetCallerLocationGeolocateGet.g.cs b/src/libs/Weave/Generated/Weave.ServiceClient.GetCallerLocationGeolocateGet.g.cs index a2f3bb0..2256e5b 100644 --- a/src/libs/Weave/Generated/Weave.ServiceClient.GetCallerLocationGeolocateGet.g.cs +++ b/src/libs/Weave/Generated/Weave.ServiceClient.GetCallerLocationGeolocateGet.g.cs @@ -56,6 +56,30 @@ partial void ProcessGetCallerLocationGeolocateGetResponseContent( string? ip = default, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetCallerLocationGeolocateGetAsResponseAsync( + ip: ip, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Caller Location
+ /// Lookup the geographic location of a user based on their IP address.
+ /// This API exists for debugging purposes and may not be available in the future. + ///
+ /// + /// IP address to geolocate, defaults to client IP address + /// + /// 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> GetCallerLocationGeolocateGetAsResponseAsync( + string? ip = default, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -85,11 +109,12 @@ partial void ProcessGetCallerLocationGeolocateGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: "/geolocate", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder - .AddOptionalParameter("ip", ip) + .AddOptionalParameter("ip", ip) ; var __path = __pathBuilder.ToString(); __path = global::Weave.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -161,6 +186,8 @@ partial void ProcessGetCallerLocationGeolocateGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -171,6 +198,11 @@ partial void ProcessGetCallerLocationGeolocateGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -188,6 +220,8 @@ partial void ProcessGetCallerLocationGeolocateGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -197,8 +231,7 @@ partial void ProcessGetCallerLocationGeolocateGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -207,6 +240,11 @@ partial void ProcessGetCallerLocationGeolocateGetResponseContent( __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -223,14 +261,15 @@ partial void ProcessGetCallerLocationGeolocateGetResponseContent( 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -270,6 +309,8 @@ partial void ProcessGetCallerLocationGeolocateGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -290,6 +331,8 @@ partial void ProcessGetCallerLocationGeolocateGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -352,9 +395,13 @@ partial void ProcessGetCallerLocationGeolocateGetResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Weave.GeolocationRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.GeolocationRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -382,9 +429,13 @@ partial void ProcessGetCallerLocationGeolocateGetResponseContent( #endif ).ConfigureAwait(false); - return - await global::Weave.GeolocationRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.GeolocationRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.ServiceClient.ProjectsInfoServiceProjectsInfoPost.g.cs b/src/libs/Weave/Generated/Weave.ServiceClient.ProjectsInfoServiceProjectsInfoPost.g.cs index eb2ad94..c8e80c2 100644 --- a/src/libs/Weave/Generated/Weave.ServiceClient.ProjectsInfoServiceProjectsInfoPost.g.cs +++ b/src/libs/Weave/Generated/Weave.ServiceClient.ProjectsInfoServiceProjectsInfoPost.g.cs @@ -50,6 +50,28 @@ partial void ProcessProjectsInfoServiceProjectsInfoPostResponseContent( /// public async global::System.Threading.Tasks.Task> ProjectsInfoServiceProjectsInfoPostAsync( + global::Weave.ProjectsInfoReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ProjectsInfoServiceProjectsInfoPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Projects Info + /// + /// + /// 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>> ProjectsInfoServiceProjectsInfoPostAsResponseAsync( + global::Weave.ProjectsInfoReq request, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessProjectsInfoServiceProjectsInfoPostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: "/service/projects_info", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessProjectsInfoServiceProjectsInfoPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessProjectsInfoServiceProjectsInfoPostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessProjectsInfoServiceProjectsInfoPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessProjectsInfoServiceProjectsInfoPostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessProjectsInfoServiceProjectsInfoPostResponseContent( __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessProjectsInfoServiceProjectsInfoPostResponseContent( 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessProjectsInfoServiceProjectsInfoPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessProjectsInfoServiceProjectsInfoPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -354,9 +395,13 @@ partial void ProcessProjectsInfoServiceProjectsInfoPostResponseContent( { __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::Weave.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -384,9 +429,13 @@ partial void ProcessProjectsInfoServiceProjectsInfoPostResponseContent( #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::Weave.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.ServiceClient.ReadRootHealthGet.g.cs b/src/libs/Weave/Generated/Weave.ServiceClient.ReadRootHealthGet.g.cs index 19c7ba1..61882f9 100644 --- a/src/libs/Weave/Generated/Weave.ServiceClient.ReadRootHealthGet.g.cs +++ b/src/libs/Weave/Generated/Weave.ServiceClient.ReadRootHealthGet.g.cs @@ -48,6 +48,23 @@ partial void ProcessReadRootHealthGetResponseContent( public async global::System.Threading.Tasks.Task ReadRootHealthGetAsync( global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ReadRootHealthGetAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Read Root + /// + /// 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> ReadRootHealthGetAsResponseAsync( + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -76,6 +93,7 @@ partial void ProcessReadRootHealthGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: "/health", baseUri: HttpClient.BaseAddress); @@ -148,6 +166,8 @@ partial void ProcessReadRootHealthGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -158,6 +178,11 @@ partial void ProcessReadRootHealthGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -175,6 +200,8 @@ partial void ProcessReadRootHealthGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -184,8 +211,7 @@ partial void ProcessReadRootHealthGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -194,6 +220,11 @@ partial void ProcessReadRootHealthGetResponseContent( __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -210,14 +241,15 @@ partial void ProcessReadRootHealthGetResponseContent( 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -257,6 +289,8 @@ partial void ProcessReadRootHealthGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -277,6 +311,8 @@ partial void ProcessReadRootHealthGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -301,7 +337,11 @@ partial void ProcessReadRootHealthGetResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -329,7 +369,11 @@ partial void ProcessReadRootHealthGetResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.ServiceClient.ReadVersionVersionGet.g.cs b/src/libs/Weave/Generated/Weave.ServiceClient.ReadVersionVersionGet.g.cs index 0d84820..f263854 100644 --- a/src/libs/Weave/Generated/Weave.ServiceClient.ReadVersionVersionGet.g.cs +++ b/src/libs/Weave/Generated/Weave.ServiceClient.ReadVersionVersionGet.g.cs @@ -48,6 +48,23 @@ partial void ProcessReadVersionVersionGetResponseContent( public async global::System.Threading.Tasks.Task ReadVersionVersionGetAsync( global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ReadVersionVersionGetAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Read 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> ReadVersionVersionGetAsResponseAsync( + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -76,6 +93,7 @@ partial void ProcessReadVersionVersionGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: "/version", baseUri: HttpClient.BaseAddress); @@ -148,6 +166,8 @@ partial void ProcessReadVersionVersionGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -158,6 +178,11 @@ partial void ProcessReadVersionVersionGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -175,6 +200,8 @@ partial void ProcessReadVersionVersionGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -184,8 +211,7 @@ partial void ProcessReadVersionVersionGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -194,6 +220,11 @@ partial void ProcessReadVersionVersionGetResponseContent( __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -210,14 +241,15 @@ partial void ProcessReadVersionVersionGetResponseContent( 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -257,6 +289,8 @@ partial void ProcessReadVersionVersionGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -277,6 +311,8 @@ partial void ProcessReadVersionVersionGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -301,7 +337,11 @@ partial void ProcessReadVersionVersionGetResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -329,7 +369,11 @@ partial void ProcessReadVersionVersionGetResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.ServiceClient.ServerInfoServerInfoGet.g.cs b/src/libs/Weave/Generated/Weave.ServiceClient.ServerInfoServerInfoGet.g.cs index b3d8188..1283483 100644 --- a/src/libs/Weave/Generated/Weave.ServiceClient.ServerInfoServerInfoGet.g.cs +++ b/src/libs/Weave/Generated/Weave.ServiceClient.ServerInfoServerInfoGet.g.cs @@ -48,6 +48,23 @@ partial void ProcessServerInfoServerInfoGetResponseContent( public async global::System.Threading.Tasks.Task ServerInfoServerInfoGetAsync( global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ServerInfoServerInfoGetAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Server Info + /// + /// 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> ServerInfoServerInfoGetAsResponseAsync( + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -76,6 +93,7 @@ partial void ProcessServerInfoServerInfoGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: "/server_info", baseUri: HttpClient.BaseAddress); @@ -148,6 +166,8 @@ partial void ProcessServerInfoServerInfoGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -158,6 +178,11 @@ partial void ProcessServerInfoServerInfoGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -175,6 +200,8 @@ partial void ProcessServerInfoServerInfoGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -184,8 +211,7 @@ partial void ProcessServerInfoServerInfoGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -194,6 +220,11 @@ partial void ProcessServerInfoServerInfoGetResponseContent( __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -210,14 +241,15 @@ partial void ProcessServerInfoServerInfoGetResponseContent( 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -257,6 +289,8 @@ partial void ProcessServerInfoServerInfoGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -277,6 +311,8 @@ partial void ProcessServerInfoServerInfoGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -301,9 +337,13 @@ partial void ProcessServerInfoServerInfoGetResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Weave.ServerInfoRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.ServerInfoRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -331,9 +371,13 @@ partial void ProcessServerInfoServerInfoGetResponseContent( #endif ).ConfigureAwait(false); - return - await global::Weave.ServerInfoRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.ServerInfoRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.ServiceClient.g.cs b/src/libs/Weave/Generated/Weave.ServiceClient.g.cs index 2aaa38d..8f399e7 100644 --- a/src/libs/Weave/Generated/Weave.ServiceClient.g.cs +++ b/src/libs/Weave/Generated/Weave.ServiceClient.g.cs @@ -72,10 +72,10 @@ public ServiceClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public ServiceClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Weave.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Weave.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Weave/Generated/Weave.TablesClient.TableCreateFromDigestsTableCreateFromDigestsPost.g.cs b/src/libs/Weave/Generated/Weave.TablesClient.TableCreateFromDigestsTableCreateFromDigestsPost.g.cs index e5b6762..5e9a3f6 100644 --- a/src/libs/Weave/Generated/Weave.TablesClient.TableCreateFromDigestsTableCreateFromDigestsPost.g.cs +++ b/src/libs/Weave/Generated/Weave.TablesClient.TableCreateFromDigestsTableCreateFromDigestsPost.g.cs @@ -50,6 +50,28 @@ partial void ProcessTableCreateFromDigestsTableCreateFromDigestsPostResponseCont /// public async global::System.Threading.Tasks.Task TableCreateFromDigestsTableCreateFromDigestsPostAsync( + global::Weave.TableCreateFromDigestsReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await TableCreateFromDigestsTableCreateFromDigestsPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Table Create From Digests + /// + /// + /// 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> TableCreateFromDigestsTableCreateFromDigestsPostAsResponseAsync( + global::Weave.TableCreateFromDigestsReq request, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessTableCreateFromDigestsTableCreateFromDigestsPostResponseCont global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: "/table/create_from_digests", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessTableCreateFromDigestsTableCreateFromDigestsPostResponseCont attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessTableCreateFromDigestsTableCreateFromDigestsPostResponseCont } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessTableCreateFromDigestsTableCreateFromDigestsPostResponseCont attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessTableCreateFromDigestsTableCreateFromDigestsPostResponseCont __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessTableCreateFromDigestsTableCreateFromDigestsPostResponseCont __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessTableCreateFromDigestsTableCreateFromDigestsPostResponseCont 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessTableCreateFromDigestsTableCreateFromDigestsPostResponseCont attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessTableCreateFromDigestsTableCreateFromDigestsPostResponseCont attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -354,9 +395,13 @@ partial void ProcessTableCreateFromDigestsTableCreateFromDigestsPostResponseCont { __response.EnsureSuccessStatusCode(); - return - global::Weave.TableCreateFromDigestsRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.TableCreateFromDigestsRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -384,9 +429,13 @@ partial void ProcessTableCreateFromDigestsTableCreateFromDigestsPostResponseCont #endif ).ConfigureAwait(false); - return - await global::Weave.TableCreateFromDigestsRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.TableCreateFromDigestsRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.TablesClient.TableCreateTableCreatePost.g.cs b/src/libs/Weave/Generated/Weave.TablesClient.TableCreateTableCreatePost.g.cs index 8987bb8..2b0f7c9 100644 --- a/src/libs/Weave/Generated/Weave.TablesClient.TableCreateTableCreatePost.g.cs +++ b/src/libs/Weave/Generated/Weave.TablesClient.TableCreateTableCreatePost.g.cs @@ -50,6 +50,28 @@ partial void ProcessTableCreateTableCreatePostResponseContent( /// public async global::System.Threading.Tasks.Task TableCreateTableCreatePostAsync( + global::Weave.TableCreateReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await TableCreateTableCreatePostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Table Create + /// + /// + /// 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> TableCreateTableCreatePostAsResponseAsync( + global::Weave.TableCreateReq request, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessTableCreateTableCreatePostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: "/table/create", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessTableCreateTableCreatePostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessTableCreateTableCreatePostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessTableCreateTableCreatePostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessTableCreateTableCreatePostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessTableCreateTableCreatePostResponseContent( __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessTableCreateTableCreatePostResponseContent( 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessTableCreateTableCreatePostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessTableCreateTableCreatePostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -354,9 +395,13 @@ partial void ProcessTableCreateTableCreatePostResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Weave.TableCreateRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.TableCreateRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -384,9 +429,13 @@ partial void ProcessTableCreateTableCreatePostResponseContent( #endif ).ConfigureAwait(false); - return - await global::Weave.TableCreateRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.TableCreateRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.TablesClient.TableQueryStatsBatchTableQueryStatsBatchPost.g.cs b/src/libs/Weave/Generated/Weave.TablesClient.TableQueryStatsBatchTableQueryStatsBatchPost.g.cs index 6ab36c0..1d934a4 100644 --- a/src/libs/Weave/Generated/Weave.TablesClient.TableQueryStatsBatchTableQueryStatsBatchPost.g.cs +++ b/src/libs/Weave/Generated/Weave.TablesClient.TableQueryStatsBatchTableQueryStatsBatchPost.g.cs @@ -50,6 +50,28 @@ partial void ProcessTableQueryStatsBatchTableQueryStatsBatchPostResponseContent( /// public async global::System.Threading.Tasks.Task TableQueryStatsBatchTableQueryStatsBatchPostAsync( + global::Weave.TableQueryStatsBatchReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await TableQueryStatsBatchTableQueryStatsBatchPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Table Query Stats Batch + /// + /// + /// 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> TableQueryStatsBatchTableQueryStatsBatchPostAsResponseAsync( + global::Weave.TableQueryStatsBatchReq request, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessTableQueryStatsBatchTableQueryStatsBatchPostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: "/table/query_stats_batch", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessTableQueryStatsBatchTableQueryStatsBatchPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessTableQueryStatsBatchTableQueryStatsBatchPostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessTableQueryStatsBatchTableQueryStatsBatchPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessTableQueryStatsBatchTableQueryStatsBatchPostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessTableQueryStatsBatchTableQueryStatsBatchPostResponseContent( __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessTableQueryStatsBatchTableQueryStatsBatchPostResponseContent( 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessTableQueryStatsBatchTableQueryStatsBatchPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessTableQueryStatsBatchTableQueryStatsBatchPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -354,9 +395,13 @@ partial void ProcessTableQueryStatsBatchTableQueryStatsBatchPostResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Weave.TableQueryStatsBatchRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.TableQueryStatsBatchRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -384,9 +429,13 @@ partial void ProcessTableQueryStatsBatchTableQueryStatsBatchPostResponseContent( #endif ).ConfigureAwait(false); - return - await global::Weave.TableQueryStatsBatchRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.TableQueryStatsBatchRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.TablesClient.TableQueryStatsTableQueryStatsPost.g.cs b/src/libs/Weave/Generated/Weave.TablesClient.TableQueryStatsTableQueryStatsPost.g.cs index 2977d4a..8b08096 100644 --- a/src/libs/Weave/Generated/Weave.TablesClient.TableQueryStatsTableQueryStatsPost.g.cs +++ b/src/libs/Weave/Generated/Weave.TablesClient.TableQueryStatsTableQueryStatsPost.g.cs @@ -50,6 +50,28 @@ partial void ProcessTableQueryStatsTableQueryStatsPostResponseContent( /// public async global::System.Threading.Tasks.Task TableQueryStatsTableQueryStatsPostAsync( + global::Weave.TableQueryStatsReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await TableQueryStatsTableQueryStatsPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Table Query Stats + /// + /// + /// 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> TableQueryStatsTableQueryStatsPostAsResponseAsync( + global::Weave.TableQueryStatsReq request, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessTableQueryStatsTableQueryStatsPostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: "/table/query_stats", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessTableQueryStatsTableQueryStatsPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessTableQueryStatsTableQueryStatsPostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessTableQueryStatsTableQueryStatsPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessTableQueryStatsTableQueryStatsPostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessTableQueryStatsTableQueryStatsPostResponseContent( __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessTableQueryStatsTableQueryStatsPostResponseContent( 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessTableQueryStatsTableQueryStatsPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessTableQueryStatsTableQueryStatsPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -354,9 +395,13 @@ partial void ProcessTableQueryStatsTableQueryStatsPostResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Weave.TableQueryStatsRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.TableQueryStatsRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -384,9 +429,13 @@ partial void ProcessTableQueryStatsTableQueryStatsPostResponseContent( #endif ).ConfigureAwait(false); - return - await global::Weave.TableQueryStatsRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.TableQueryStatsRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.TablesClient.TableQueryTableQueryPost.g.cs b/src/libs/Weave/Generated/Weave.TablesClient.TableQueryTableQueryPost.g.cs index 73847d0..211828d 100644 --- a/src/libs/Weave/Generated/Weave.TablesClient.TableQueryTableQueryPost.g.cs +++ b/src/libs/Weave/Generated/Weave.TablesClient.TableQueryTableQueryPost.g.cs @@ -50,6 +50,28 @@ partial void ProcessTableQueryTableQueryPostResponseContent( /// public async global::System.Threading.Tasks.Task TableQueryTableQueryPostAsync( + global::Weave.TableQueryReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await TableQueryTableQueryPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Table Query + /// + /// + /// 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> TableQueryTableQueryPostAsResponseAsync( + global::Weave.TableQueryReq request, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessTableQueryTableQueryPostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: "/table/query", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessTableQueryTableQueryPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessTableQueryTableQueryPostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessTableQueryTableQueryPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessTableQueryTableQueryPostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessTableQueryTableQueryPostResponseContent( __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessTableQueryTableQueryPostResponseContent( 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessTableQueryTableQueryPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessTableQueryTableQueryPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -354,9 +395,13 @@ partial void ProcessTableQueryTableQueryPostResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Weave.TableQueryRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.TableQueryRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -384,9 +429,13 @@ partial void ProcessTableQueryTableQueryPostResponseContent( #endif ).ConfigureAwait(false); - return - await global::Weave.TableQueryRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.TableQueryRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.TablesClient.TableUpdateTableUpdatePost.g.cs b/src/libs/Weave/Generated/Weave.TablesClient.TableUpdateTableUpdatePost.g.cs index e127126..0e8ce43 100644 --- a/src/libs/Weave/Generated/Weave.TablesClient.TableUpdateTableUpdatePost.g.cs +++ b/src/libs/Weave/Generated/Weave.TablesClient.TableUpdateTableUpdatePost.g.cs @@ -50,6 +50,28 @@ partial void ProcessTableUpdateTableUpdatePostResponseContent( /// public async global::System.Threading.Tasks.Task TableUpdateTableUpdatePostAsync( + global::Weave.TableUpdateReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await TableUpdateTableUpdatePostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Table Update + /// + /// + /// 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> TableUpdateTableUpdatePostAsResponseAsync( + global::Weave.TableUpdateReq request, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessTableUpdateTableUpdatePostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: "/table/update", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessTableUpdateTableUpdatePostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessTableUpdateTableUpdatePostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessTableUpdateTableUpdatePostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessTableUpdateTableUpdatePostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessTableUpdateTableUpdatePostResponseContent( __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessTableUpdateTableUpdatePostResponseContent( 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessTableUpdateTableUpdatePostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessTableUpdateTableUpdatePostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -354,9 +395,13 @@ partial void ProcessTableUpdateTableUpdatePostResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Weave.TableUpdateRes.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Weave.TableUpdateRes.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -384,9 +429,13 @@ partial void ProcessTableUpdateTableUpdatePostResponseContent( #endif ).ConfigureAwait(false); - return - await global::Weave.TableUpdateRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Weave.TableUpdateRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.TablesClient.g.cs b/src/libs/Weave/Generated/Weave.TablesClient.g.cs index a14cb56..c52bf04 100644 --- a/src/libs/Weave/Generated/Weave.TablesClient.g.cs +++ b/src/libs/Weave/Generated/Weave.TablesClient.g.cs @@ -72,10 +72,10 @@ public TablesClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public TablesClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Weave.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Weave.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Weave/Generated/Weave.ThreadsClient.ThreadsQueryStreamThreadsStreamQueryPost.g.cs b/src/libs/Weave/Generated/Weave.ThreadsClient.ThreadsQueryStreamThreadsStreamQueryPost.g.cs index c4131db..ce325b5 100644 --- a/src/libs/Weave/Generated/Weave.ThreadsClient.ThreadsQueryStreamThreadsStreamQueryPost.g.cs +++ b/src/libs/Weave/Generated/Weave.ThreadsClient.ThreadsQueryStreamThreadsStreamQueryPost.g.cs @@ -50,6 +50,28 @@ partial void ProcessThreadsQueryStreamThreadsStreamQueryPostResponseContent( /// public async global::System.Threading.Tasks.Task ThreadsQueryStreamThreadsStreamQueryPostAsync( + global::Weave.ThreadsQueryReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ThreadsQueryStreamThreadsStreamQueryPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Threads Query Stream + /// + /// + /// 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> ThreadsQueryStreamThreadsStreamQueryPostAsResponseAsync( + global::Weave.ThreadsQueryReq request, global::Weave.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessThreadsQueryStreamThreadsStreamQueryPostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Weave.PathBuilder( path: "/threads/stream_query", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessThreadsQueryStreamThreadsStreamQueryPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessThreadsQueryStreamThreadsStreamQueryPostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessThreadsQueryStreamThreadsStreamQueryPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessThreadsQueryStreamThreadsStreamQueryPostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessThreadsQueryStreamThreadsStreamQueryPostResponseContent( __attempt < __maxAttempts && global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessThreadsQueryStreamThreadsStreamQueryPostResponseContent( 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::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessThreadsQueryStreamThreadsStreamQueryPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessThreadsQueryStreamThreadsStreamQueryPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -354,7 +395,11 @@ partial void ProcessThreadsQueryStreamThreadsStreamQueryPostResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -382,7 +427,11 @@ partial void ProcessThreadsQueryStreamThreadsStreamQueryPostResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Weave/Generated/Weave.ThreadsClient.g.cs b/src/libs/Weave/Generated/Weave.ThreadsClient.g.cs index a430a81..d06edc9 100644 --- a/src/libs/Weave/Generated/Weave.ThreadsClient.g.cs +++ b/src/libs/Weave/Generated/Weave.ThreadsClient.g.cs @@ -72,10 +72,10 @@ public ThreadsClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public ThreadsClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Weave.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Weave.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Weave/Generated/Weave.WeaveClient.g.cs b/src/libs/Weave/Generated/Weave.WeaveClient.g.cs index dbadbb2..274f8fd 100644 --- a/src/libs/Weave/Generated/Weave.WeaveClient.g.cs +++ b/src/libs/Weave/Generated/Weave.WeaveClient.g.cs @@ -43,7 +43,7 @@ public sealed partial class WeaveClient : global::Weave.IWeaveClient, global::Sy /// /// /// - public AnnotationQueuesClient AnnotationQueues => new AnnotationQueuesClient(HttpClient, authorizations: Authorizations, options: Options) + public AnnotationQueuesClient AnnotationQueues => new AnnotationQueuesClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -52,7 +52,7 @@ public sealed partial class WeaveClient : global::Weave.IWeaveClient, global::Sy /// /// /// - public CallsClient Calls => new CallsClient(HttpClient, authorizations: Authorizations, options: Options) + public CallsClient Calls => new CallsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -61,7 +61,7 @@ public sealed partial class WeaveClient : global::Weave.IWeaveClient, global::Sy /// /// /// - public CostsClient Costs => new CostsClient(HttpClient, authorizations: Authorizations, options: Options) + public CostsClient Costs => new CostsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -70,7 +70,7 @@ public sealed partial class WeaveClient : global::Weave.IWeaveClient, global::Sy /// /// /// - public DatasetsClient Datasets => new DatasetsClient(HttpClient, authorizations: Authorizations, options: Options) + public DatasetsClient Datasets => new DatasetsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -79,7 +79,7 @@ public sealed partial class WeaveClient : global::Weave.IWeaveClient, global::Sy /// /// /// - public EvalResultsClient EvalResults => new EvalResultsClient(HttpClient, authorizations: Authorizations, options: Options) + public EvalResultsClient EvalResults => new EvalResultsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -88,7 +88,7 @@ public sealed partial class WeaveClient : global::Weave.IWeaveClient, global::Sy /// /// /// - public EvaluationRunsClient EvaluationRuns => new EvaluationRunsClient(HttpClient, authorizations: Authorizations, options: Options) + public EvaluationRunsClient EvaluationRuns => new EvaluationRunsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -97,7 +97,7 @@ public sealed partial class WeaveClient : global::Weave.IWeaveClient, global::Sy /// /// /// - public EvaluationsClient Evaluations => new EvaluationsClient(HttpClient, authorizations: Authorizations, options: Options) + public EvaluationsClient Evaluations => new EvaluationsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -106,7 +106,7 @@ public sealed partial class WeaveClient : global::Weave.IWeaveClient, global::Sy /// /// /// - public FeedbackClient Feedback => new FeedbackClient(HttpClient, authorizations: Authorizations, options: Options) + public FeedbackClient Feedback => new FeedbackClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -115,7 +115,7 @@ public sealed partial class WeaveClient : global::Weave.IWeaveClient, global::Sy /// /// /// - public FilesClient Files => new FilesClient(HttpClient, authorizations: Authorizations, options: Options) + public FilesClient Files => new FilesClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -124,7 +124,7 @@ public sealed partial class WeaveClient : global::Weave.IWeaveClient, global::Sy /// /// /// - public ImagesClient Images => new ImagesClient(HttpClient, authorizations: Authorizations, options: Options) + public ImagesClient Images => new ImagesClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -133,7 +133,7 @@ public sealed partial class WeaveClient : global::Weave.IWeaveClient, global::Sy /// /// /// - public InferenceClient Inference => new InferenceClient(HttpClient, authorizations: Authorizations, options: Options) + public InferenceClient Inference => new InferenceClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -142,7 +142,7 @@ public sealed partial class WeaveClient : global::Weave.IWeaveClient, global::Sy /// /// /// - public ModelsClient Models => new ModelsClient(HttpClient, authorizations: Authorizations, options: Options) + public ModelsClient Models => new ModelsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -151,7 +151,7 @@ public sealed partial class WeaveClient : global::Weave.IWeaveClient, global::Sy /// /// /// - public ObjectsClient Objects => new ObjectsClient(HttpClient, authorizations: Authorizations, options: Options) + public ObjectsClient Objects => new ObjectsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -160,7 +160,7 @@ public sealed partial class WeaveClient : global::Weave.IWeaveClient, global::Sy /// /// /// - public OpenTelemetryClient OpenTelemetry => new OpenTelemetryClient(HttpClient, authorizations: Authorizations, options: Options) + public OpenTelemetryClient OpenTelemetry => new OpenTelemetryClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -169,7 +169,7 @@ public sealed partial class WeaveClient : global::Weave.IWeaveClient, global::Sy /// /// /// - public OpsClient Ops => new OpsClient(HttpClient, authorizations: Authorizations, options: Options) + public OpsClient Ops => new OpsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -178,7 +178,7 @@ public sealed partial class WeaveClient : global::Weave.IWeaveClient, global::Sy /// /// /// - public PredictionsClient Predictions => new PredictionsClient(HttpClient, authorizations: Authorizations, options: Options) + public PredictionsClient Predictions => new PredictionsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -187,7 +187,7 @@ public sealed partial class WeaveClient : global::Weave.IWeaveClient, global::Sy /// /// /// - public RefsClient Refs => new RefsClient(HttpClient, authorizations: Authorizations, options: Options) + public RefsClient Refs => new RefsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -196,7 +196,7 @@ public sealed partial class WeaveClient : global::Weave.IWeaveClient, global::Sy /// /// /// - public RegistryClient Registry => new RegistryClient(HttpClient, authorizations: Authorizations, options: Options) + public RegistryClient Registry => new RegistryClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -205,7 +205,7 @@ public sealed partial class WeaveClient : global::Weave.IWeaveClient, global::Sy /// /// /// - public ScorersClient Scorers => new ScorersClient(HttpClient, authorizations: Authorizations, options: Options) + public ScorersClient Scorers => new ScorersClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -214,7 +214,7 @@ public sealed partial class WeaveClient : global::Weave.IWeaveClient, global::Sy /// /// /// - public ScoresClient Scores => new ScoresClient(HttpClient, authorizations: Authorizations, options: Options) + public ScoresClient Scores => new ScoresClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -223,7 +223,7 @@ public sealed partial class WeaveClient : global::Weave.IWeaveClient, global::Sy /// /// /// - public ServiceClient Service => new ServiceClient(HttpClient, authorizations: Authorizations, options: Options) + public ServiceClient Service => new ServiceClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -232,7 +232,7 @@ public sealed partial class WeaveClient : global::Weave.IWeaveClient, global::Sy /// /// /// - public TablesClient Tables => new TablesClient(HttpClient, authorizations: Authorizations, options: Options) + public TablesClient Tables => new TablesClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -241,7 +241,7 @@ public sealed partial class WeaveClient : global::Weave.IWeaveClient, global::Sy /// /// /// - public ThreadsClient Threads => new ThreadsClient(HttpClient, authorizations: Authorizations, options: Options) + public ThreadsClient Threads => new ThreadsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -280,10 +280,10 @@ public WeaveClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public WeaveClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Weave.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Weave.AutoSDKClientOptions? options, bool disposeHttpClient = true) {