From de7f3766ddb6401ffcd34d52a760c5ff16ca6bf3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 15 May 2026 19:47:01 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- ...Client.CreateLoopsCheckpointsValidate.g.cs | 482 ++++++++++++++++++ ...Client.CreateLoopsCheckpointsValidate.g.cs | 64 +++ .../Baseten.JsonSerializerContext.g.cs | 2 + .../Baseten.JsonSerializerContextTypes.g.cs | 190 +++---- ...ValidateLoopsCheckpointRequestV1.Json.g.cs | 92 ++++ ...dels.ValidateLoopsCheckpointRequestV1.g.cs | 47 ++ ...alidateLoopsCheckpointResponseV1.Json.g.cs | 92 ++++ ...els.ValidateLoopsCheckpointResponseV1.g.cs | 20 + src/libs/Baseten/openapi.yaml | 62 +++ 9 files changed, 960 insertions(+), 91 deletions(-) create mode 100644 src/libs/Baseten/Generated/Baseten.BasetenClient.CreateLoopsCheckpointsValidate.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.IBasetenClient.CreateLoopsCheckpointsValidate.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.ValidateLoopsCheckpointRequestV1.Json.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.ValidateLoopsCheckpointRequestV1.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.ValidateLoopsCheckpointResponseV1.Json.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.ValidateLoopsCheckpointResponseV1.g.cs diff --git a/src/libs/Baseten/Generated/Baseten.BasetenClient.CreateLoopsCheckpointsValidate.g.cs b/src/libs/Baseten/Generated/Baseten.BasetenClient.CreateLoopsCheckpointsValidate.g.cs new file mode 100644 index 0000000..46029d8 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.BasetenClient.CreateLoopsCheckpointsValidate.g.cs @@ -0,0 +1,482 @@ + +#nullable enable + +namespace Baseten +{ + public partial class BasetenClient + { + + + private static readonly global::Baseten.EndPointSecurityRequirement s_CreateLoopsCheckpointsValidateSecurityRequirement0 = + new global::Baseten.EndPointSecurityRequirement + { + Authorizations = new global::Baseten.EndPointAuthorizationRequirement[] + { new global::Baseten.EndPointAuthorizationRequirement + { + Type = "Http", + SchemeId = "HttpBearer", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Baseten.EndPointSecurityRequirement[] s_CreateLoopsCheckpointsValidateSecurityRequirements = + new global::Baseten.EndPointSecurityRequirement[] + { s_CreateLoopsCheckpointsValidateSecurityRequirement0, + }; + partial void PrepareCreateLoopsCheckpointsValidateArguments( + global::System.Net.Http.HttpClient httpClient, + global::Baseten.ValidateLoopsCheckpointRequestV1 request); + partial void PrepareCreateLoopsCheckpointsValidateRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::Baseten.ValidateLoopsCheckpointRequestV1 request); + partial void ProcessCreateLoopsCheckpointsValidateResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCreateLoopsCheckpointsValidateResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Validate a Loops checkpoint bt:// URI.
+ /// Whether the caller can manage and use this checkpoint. + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + /// + /// curl --request POST \
+ /// --url https://api.baseten.co/v1/loops/checkpoints/validate \
+ /// --header "Authorization: Api-Key $BASETEN_API_KEY" \
+ /// --data '{
+ /// "checkpoint_path": "bt://loops:k4q95w5/sampler_weights/step-100"
+ /// }' + ///
+ public async global::System.Threading.Tasks.Task CreateLoopsCheckpointsValidateAsync( + + global::Baseten.ValidateLoopsCheckpointRequestV1 request, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateLoopsCheckpointsValidateAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Validate a Loops checkpoint bt:// URI.
+ /// Whether the caller can manage and use this checkpoint. + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + /// + /// curl --request POST \
+ /// --url https://api.baseten.co/v1/loops/checkpoints/validate \
+ /// --header "Authorization: Api-Key $BASETEN_API_KEY" \
+ /// --data '{
+ /// "checkpoint_path": "bt://loops:k4q95w5/sampler_weights/step-100"
+ /// }' + ///
+ public async global::System.Threading.Tasks.Task> CreateLoopsCheckpointsValidateAsResponseAsync( + + global::Baseten.ValidateLoopsCheckpointRequestV1 request, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareCreateLoopsCheckpointsValidateArguments( + httpClient: HttpClient, + request: request); + + + var __authorizations = global::Baseten.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_CreateLoopsCheckpointsValidateSecurityRequirements, + operationName: "CreateLoopsCheckpointsValidateAsync"); + + using var __timeoutCancellationTokenSource = global::Baseten.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Baseten.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Baseten.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Baseten.PathBuilder( + path: "/v1/loops/checkpoints/validate", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Baseten.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 __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + global::Baseten.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareCreateLoopsCheckpointsValidateRequest( + 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::Baseten.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Baseten.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "createLoopsCheckpointsValidate", + methodName: "CreateLoopsCheckpointsValidateAsync", + pathTemplate: "\"/v1/loops/checkpoints/validate\"", + 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::Baseten.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Baseten.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Baseten.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "createLoopsCheckpointsValidate", + methodName: "CreateLoopsCheckpointsValidateAsync", + pathTemplate: "\"/v1/loops/checkpoints/validate\"", + 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::Baseten.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Baseten.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Baseten.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Baseten.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Baseten.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "createLoopsCheckpointsValidate", + methodName: "CreateLoopsCheckpointsValidateAsync", + pathTemplate: "\"/v1/loops/checkpoints/validate\"", + 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::Baseten.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); + ProcessCreateLoopsCheckpointsValidateResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Baseten.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Baseten.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "createLoopsCheckpointsValidate", + methodName: "CreateLoopsCheckpointsValidateAsync", + pathTemplate: "\"/v1/loops/checkpoints/validate\"", + 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::Baseten.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Baseten.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "createLoopsCheckpointsValidate", + methodName: "CreateLoopsCheckpointsValidateAsync", + pathTemplate: "\"/v1/loops/checkpoints/validate\"", + 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); + } + + 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); + ProcessCreateLoopsCheckpointsValidateResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Baseten.ValidateLoopsCheckpointResponseV1.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Baseten.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Baseten.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw new global::Baseten.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::Baseten.ValidateLoopsCheckpointResponseV1.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Baseten.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Baseten.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::Baseten.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(); + } + } + /// + /// Validate a Loops checkpoint bt:// URI.
+ /// Whether the caller can manage and use this checkpoint. + ///
+ /// + /// bt:// URI of a sampler checkpoint. Form: bt://loops:<run_id>/sampler_weights/<checkpoint_name>. + /// + /// 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 CreateLoopsCheckpointsValidateAsync( + string checkpointPath, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::Baseten.ValidateLoopsCheckpointRequestV1 + { + CheckpointPath = checkpointPath, + }; + + return await CreateLoopsCheckpointsValidateAsync( + request: __request, + requestOptions: requestOptions, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.IBasetenClient.CreateLoopsCheckpointsValidate.g.cs b/src/libs/Baseten/Generated/Baseten.IBasetenClient.CreateLoopsCheckpointsValidate.g.cs new file mode 100644 index 0000000..ac66776 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.IBasetenClient.CreateLoopsCheckpointsValidate.g.cs @@ -0,0 +1,64 @@ +#nullable enable + +namespace Baseten +{ + public partial interface IBasetenClient + { + /// + /// Validate a Loops checkpoint bt:// URI.
+ /// Whether the caller can manage and use this checkpoint. + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + /// + /// curl --request POST \
+ /// --url https://api.baseten.co/v1/loops/checkpoints/validate \
+ /// --header "Authorization: Api-Key $BASETEN_API_KEY" \
+ /// --data '{
+ /// "checkpoint_path": "bt://loops:k4q95w5/sampler_weights/step-100"
+ /// }' + ///
+ global::System.Threading.Tasks.Task CreateLoopsCheckpointsValidateAsync( + + global::Baseten.ValidateLoopsCheckpointRequestV1 request, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Validate a Loops checkpoint bt:// URI.
+ /// Whether the caller can manage and use this checkpoint. + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + /// + /// curl --request POST \
+ /// --url https://api.baseten.co/v1/loops/checkpoints/validate \
+ /// --header "Authorization: Api-Key $BASETEN_API_KEY" \
+ /// --data '{
+ /// "checkpoint_path": "bt://loops:k4q95w5/sampler_weights/step-100"
+ /// }' + ///
+ global::System.Threading.Tasks.Task> CreateLoopsCheckpointsValidateAsResponseAsync( + + global::Baseten.ValidateLoopsCheckpointRequestV1 request, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Validate a Loops checkpoint bt:// URI.
+ /// Whether the caller can manage and use this checkpoint. + ///
+ /// + /// bt:// URI of a sampler checkpoint. Form: bt://loops:<run_id>/sampler_weights/<checkpoint_name>. + /// + /// 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 CreateLoopsCheckpointsValidateAsync( + string checkpointPath, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.JsonSerializerContext.g.cs b/src/libs/Baseten/Generated/Baseten.JsonSerializerContext.g.cs index 618daa7..744083f 100644 --- a/src/libs/Baseten/Generated/Baseten.JsonSerializerContext.g.cs +++ b/src/libs/Baseten/Generated/Baseten.JsonSerializerContext.g.cs @@ -351,6 +351,8 @@ namespace Baseten [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.LoopsCheckpointV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.ListLoopsCheckpointsResponseV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.ValidateLoopsCheckpointRequestV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.ValidateLoopsCheckpointResponseV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.LoopsCheckpointFilesResponseV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.LoopsDeploymentStatusV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.Name), TypeInfoPropertyName = "Name2")] diff --git a/src/libs/Baseten/Generated/Baseten.JsonSerializerContextTypes.g.cs b/src/libs/Baseten/Generated/Baseten.JsonSerializerContextTypes.g.cs index 16eb77c..72ef060 100644 --- a/src/libs/Baseten/Generated/Baseten.JsonSerializerContextTypes.g.cs +++ b/src/libs/Baseten/Generated/Baseten.JsonSerializerContextTypes.g.cs @@ -896,367 +896,375 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::Baseten.LoopsCheckpointFilesResponseV1? Type217 { get; set; } + public global::Baseten.ValidateLoopsCheckpointRequestV1? Type217 { get; set; } /// /// /// - public global::Baseten.LoopsDeploymentStatusV1? Type218 { get; set; } + public global::Baseten.ValidateLoopsCheckpointResponseV1? Type218 { get; set; } /// /// /// - public global::Baseten.Name? Type219 { get; set; } + public global::Baseten.LoopsCheckpointFilesResponseV1? Type219 { get; set; } /// /// /// - public global::Baseten.LoopsDeploymentV1? Type220 { get; set; } + public global::Baseten.LoopsDeploymentStatusV1? Type220 { get; set; } /// /// /// - public global::Baseten.ListLoopsDeploymentsResponseV1? Type221 { get; set; } + public global::Baseten.Name? Type221 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type222 { get; set; } + public global::Baseten.LoopsDeploymentV1? Type222 { get; set; } /// /// /// - public global::Baseten.DeactivateLoopsDeploymentResponseV1? Type223 { get; set; } + public global::Baseten.ListLoopsDeploymentsResponseV1? Type223 { get; set; } /// /// /// - public global::Baseten.GetLoopsDeploymentResponseV1? Type224 { get; set; } + public global::System.Collections.Generic.IList? Type224 { get; set; } /// /// /// - public global::Baseten.TrainingGpuCapacityItemV1? Type225 { get; set; } + public global::Baseten.DeactivateLoopsDeploymentResponseV1? Type225 { get; set; } /// /// /// - public global::Baseten.GetTrainingGpuCapacityResponseV1? Type226 { get; set; } + public global::Baseten.GetLoopsDeploymentResponseV1? Type226 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type227 { get; set; } + public global::Baseten.TrainingGpuCapacityItemV1? Type227 { get; set; } /// /// /// - public global::Baseten.AWSCredentialsV1? Type228 { get; set; } + public global::Baseten.GetTrainingGpuCapacityResponseV1? Type228 { get; set; } /// /// /// - public global::Baseten.GetBlobCredentialsResponseV1? Type229 { get; set; } + public global::System.Collections.Generic.IList? Type229 { get; set; } /// /// /// - public global::Baseten.APIKeyCategory? Type230 { get; set; } + public global::Baseten.AWSCredentialsV1? Type230 { get; set; } /// /// /// - public global::Baseten.CreateAPIKeyRequestV1? Type231 { get; set; } + public global::Baseten.GetBlobCredentialsResponseV1? Type231 { get; set; } /// /// /// - public global::Baseten.APIKeyV1? Type232 { get; set; } + public global::Baseten.APIKeyCategory? Type232 { get; set; } /// /// /// - public global::Baseten.APIKeyInfoV1? Type233 { get; set; } + public global::Baseten.CreateAPIKeyRequestV1? Type233 { get; set; } /// /// /// - public global::Baseten.APIKeysV1? Type234 { get; set; } + public global::Baseten.APIKeyV1? Type234 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type235 { get; set; } + public global::Baseten.APIKeyInfoV1? Type235 { get; set; } /// /// /// - public global::Baseten.APIKeyTombstoneV1? Type236 { get; set; } + public global::Baseten.APIKeysV1? Type236 { get; set; } /// /// /// - public global::Baseten.ModelWeightSnapshotV1? Type237 { get; set; } + public global::System.Collections.Generic.IList? Type237 { get; set; } /// /// /// - public global::Baseten.CreateModelWeightSnapshotRequestV1? Type238 { get; set; } + public global::Baseten.APIKeyTombstoneV1? Type238 { get; set; } /// /// /// - public global::Baseten.CreateLLMModelRequestV1? Type239 { get; set; } + public global::Baseten.ModelWeightSnapshotV1? Type239 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type240 { get; set; } + public global::Baseten.CreateModelWeightSnapshotRequestV1? Type240 { get; set; } /// /// /// - public global::Baseten.LLMModelHandleV1? Type241 { get; set; } + public global::Baseten.CreateLLMModelRequestV1? Type241 { get; set; } /// /// /// - public global::Baseten.CreateLLMModelVersionRequestV1? Type242 { get; set; } + public global::System.Collections.Generic.IList? Type242 { get; set; } /// /// /// - public global::Baseten.LibraryListingV1? Type243 { get; set; } + public global::Baseten.LLMModelHandleV1? Type243 { get; set; } /// /// /// - public global::Baseten.LibraryListingsV1? Type244 { get; set; } + public global::Baseten.CreateLLMModelVersionRequestV1? Type244 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type245 { get; set; } + public global::Baseten.LibraryListingV1? Type245 { get; set; } /// /// /// - public global::Baseten.CreateLibraryListingRequestV1? Type246 { get; set; } + public global::Baseten.LibraryListingsV1? Type246 { get; set; } /// /// /// - public global::Baseten.LibraryListingTombstoneV1? Type247 { get; set; } + public global::System.Collections.Generic.IList? Type247 { get; set; } /// /// /// - public global::Baseten.UpdateLibraryListingRequestV1? Type248 { get; set; } + public global::Baseten.CreateLibraryListingRequestV1? Type248 { get; set; } /// /// /// - public global::Baseten.LibraryListingVersionV1? Type249 { get; set; } + public global::Baseten.LibraryListingTombstoneV1? Type249 { get; set; } /// /// /// - public global::Baseten.LibraryListingVersionsV1? Type250 { get; set; } + public global::Baseten.UpdateLibraryListingRequestV1? Type250 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type251 { get; set; } + public global::Baseten.LibraryListingVersionV1? Type251 { get; set; } /// /// /// - public global::Baseten.CreateLibraryListingVersionRequestV1? Type252 { get; set; } + public global::Baseten.LibraryListingVersionsV1? Type252 { get; set; } /// /// /// - public global::Baseten.LibraryListingVersionTombstoneV1? Type253 { get; set; } + public global::System.Collections.Generic.IList? Type253 { get; set; } /// /// /// - public global::Baseten.UpdateLibraryListingVersionRequestV1? Type254 { get; set; } + public global::Baseten.CreateLibraryListingVersionRequestV1? Type254 { get; set; } /// /// /// - public global::Baseten.BillableResourceV1? Type255 { get; set; } + public global::Baseten.LibraryListingVersionTombstoneV1? Type255 { get; set; } /// /// /// - public global::Baseten.ResourceKind? Type256 { get; set; } + public global::Baseten.UpdateLibraryListingVersionRequestV1? Type256 { get; set; } /// /// /// - public global::Baseten.ChainMetadataV1? Type257 { get; set; } + public global::Baseten.BillableResourceV1? Type257 { get; set; } /// /// /// - public global::Baseten.DailyDedicatedUsageV1? Type258 { get; set; } + public global::Baseten.ResourceKind? Type258 { get; set; } /// /// /// - public global::Baseten.AnyOf? Type259 { get; set; } + public global::Baseten.ChainMetadataV1? Type259 { get; set; } /// /// /// - public global::Baseten.DailyModelApiUsageV1? Type260 { get; set; } + public global::Baseten.DailyDedicatedUsageV1? Type260 { get; set; } /// /// /// - public global::Baseten.DailyTrainingUsageV1? Type261 { get; set; } + public global::Baseten.AnyOf? Type261 { get; set; } /// /// /// - public global::Baseten.DedicatedItemV1? Type262 { get; set; } + public global::Baseten.DailyModelApiUsageV1? Type262 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type263 { get; set; } + public global::Baseten.DailyTrainingUsageV1? Type263 { get; set; } /// /// /// - public global::Baseten.DedicatedUsageV1? Type264 { get; set; } + public global::Baseten.DedicatedItemV1? Type264 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type265 { get; set; } + public global::System.Collections.Generic.IList? Type265 { get; set; } /// /// /// - public global::Baseten.ModelApiItemV1? Type266 { get; set; } + public global::Baseten.DedicatedUsageV1? Type266 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type267 { get; set; } + public global::System.Collections.Generic.IList? Type267 { get; set; } /// /// /// - public global::Baseten.ModelApisUsageV1? Type268 { get; set; } + public global::Baseten.ModelApiItemV1? Type268 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type269 { get; set; } + public global::System.Collections.Generic.IList? Type269 { get; set; } /// /// /// - public global::Baseten.TrainingItemV1? Type270 { get; set; } + public global::Baseten.ModelApisUsageV1? Type270 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type271 { get; set; } + public global::System.Collections.Generic.IList? Type271 { get; set; } /// /// /// - public global::Baseten.TrainingUsageV1? Type272 { get; set; } + public global::Baseten.TrainingItemV1? Type272 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type273 { get; set; } + public global::System.Collections.Generic.IList? Type273 { get; set; } /// /// /// - public global::Baseten.UsageSummaryV1? Type274 { get; set; } + public global::Baseten.TrainingUsageV1? Type274 { get; set; } /// /// /// - public global::Baseten.UserInfoV1? Type275 { get; set; } + public global::System.Collections.Generic.IList? Type275 { get; set; } /// /// /// - public global::Baseten.EffectiveModelConfigV1? Type276 { get; set; } + public global::Baseten.UsageSummaryV1? Type276 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type277 { get; set; } + public global::Baseten.UserInfoV1? Type277 { get; set; } /// /// /// - public global::Baseten.EffectiveRateLimitV1? Type278 { get; set; } + public global::Baseten.EffectiveModelConfigV1? Type278 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type279 { get; set; } + public global::System.Collections.Generic.IList? Type279 { get; set; } /// /// /// - public global::Baseten.EffectiveUsageLimitV1? Type280 { get; set; } + public global::Baseten.EffectiveRateLimitV1? Type280 { get; set; } /// /// /// - public global::Baseten.LimitTypeV1? Type281 { get; set; } + public global::System.Collections.Generic.IList? Type281 { get; set; } /// /// /// - public global::Baseten.RateLimitUnitV1? Type282 { get; set; } + public global::Baseten.EffectiveUsageLimitV1? Type282 { get; set; } /// /// /// - public global::Baseten.UsageLimitUnitV1? Type283 { get; set; } + public global::Baseten.LimitTypeV1? Type283 { get; set; } /// /// /// - public global::Baseten.GroupHierarchyV1? Type284 { get; set; } + public global::Baseten.RateLimitUnitV1? Type284 { get; set; } /// /// /// - public global::Baseten.LimitEnforcementV1? Type285 { get; set; } + public global::Baseten.UsageLimitUnitV1? Type285 { get; set; } /// /// /// - public global::Baseten.GroupMetadataV1? Type286 { get; set; } + public global::Baseten.GroupHierarchyV1? Type286 { get; set; } /// /// /// - public global::Baseten.GroupV1? Type287 { get; set; } + public global::Baseten.LimitEnforcementV1? Type287 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type288 { get; set; } + public global::Baseten.GroupMetadataV1? Type288 { get; set; } /// /// /// - public global::Baseten.ModelConfigV1? Type289 { get; set; } + public global::Baseten.GroupV1? Type289 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type290 { get; set; } + public global::System.Collections.Generic.IList? Type290 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type291 { get; set; } + public global::Baseten.ModelConfigV1? Type291 { get; set; } /// /// /// - public global::Baseten.RateLimitV1? Type292 { get; set; } + public global::System.Collections.Generic.IList? Type292 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type293 { get; set; } + public global::System.Collections.Generic.IList? Type293 { get; set; } /// /// /// - public global::Baseten.UsageLimitV1? Type294 { get; set; } + public global::Baseten.RateLimitV1? Type294 { get; set; } /// /// /// - public global::Baseten.PaginationResponseV1? Type295 { get; set; } + public global::System.Collections.Generic.IList? Type295 { get; set; } /// /// /// - public global::Baseten.GroupsResponseV1? Type296 { get; set; } + public global::Baseten.UsageLimitV1? Type296 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type297 { get; set; } + public global::Baseten.PaginationResponseV1? Type297 { get; set; } /// /// /// - public global::Baseten.CreateGroupRequestV1? Type298 { get; set; } + public global::Baseten.GroupsResponseV1? Type298 { get; set; } /// /// /// - public global::Baseten.UpdateGroupMetadataV1? Type299 { get; set; } + public global::System.Collections.Generic.IList? Type299 { get; set; } /// /// /// - public global::Baseten.UpdateGroupRequestV1? Type300 { get; set; } + public global::Baseten.CreateGroupRequestV1? Type300 { get; set; } /// /// /// - public global::Baseten.GatewayKeyInfoV1? Type301 { get; set; } + public global::Baseten.UpdateGroupMetadataV1? Type301 { get; set; } /// /// /// - public global::Baseten.KeysForGroupResponseV1? Type302 { get; set; } + public global::Baseten.UpdateGroupRequestV1? Type302 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type303 { get; set; } + public global::Baseten.GatewayKeyInfoV1? Type303 { get; set; } /// /// /// - public global::Baseten.CreateApiKeyForGroupRequestV1? Type304 { get; set; } + public global::Baseten.KeysForGroupResponseV1? Type304 { get; set; } /// /// /// - public global::Baseten.CreateApiKeyForGroupResponseV1? Type305 { get; set; } + public global::System.Collections.Generic.IList? Type305 { get; set; } /// /// /// - public global::Baseten.RegisterAPIKeyRequestV1? Type306 { get; set; } + public global::Baseten.CreateApiKeyForGroupRequestV1? Type306 { get; set; } /// /// /// - public global::Baseten.RegisterAPIKeyResponseV1? Type307 { get; set; } + public global::Baseten.CreateApiKeyForGroupResponseV1? Type307 { get; set; } + /// + /// + /// + public global::Baseten.RegisterAPIKeyRequestV1? Type308 { get; set; } + /// + /// + /// + public global::Baseten.RegisterAPIKeyResponseV1? Type309 { get; set; } /// /// diff --git a/src/libs/Baseten/Generated/Baseten.Models.ValidateLoopsCheckpointRequestV1.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.ValidateLoopsCheckpointRequestV1.Json.g.cs new file mode 100644 index 0000000..c68811e --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.ValidateLoopsCheckpointRequestV1.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class ValidateLoopsCheckpointRequestV1 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Baseten.ValidateLoopsCheckpointRequestV1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.ValidateLoopsCheckpointRequestV1), + jsonSerializerContext) as global::Baseten.ValidateLoopsCheckpointRequestV1; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Baseten.ValidateLoopsCheckpointRequestV1? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Baseten.ValidateLoopsCheckpointRequestV1), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.ValidateLoopsCheckpointRequestV1; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.Models.ValidateLoopsCheckpointRequestV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.ValidateLoopsCheckpointRequestV1.g.cs new file mode 100644 index 0000000..85d4c0c --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.ValidateLoopsCheckpointRequestV1.g.cs @@ -0,0 +1,47 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// Request body for ``POST /v1/loops/checkpoints/validate``. + /// + public sealed partial class ValidateLoopsCheckpointRequestV1 + { + /// + /// bt:// URI of a sampler checkpoint. Form: bt://loops:<run_id>/sampler_weights/<checkpoint_name>. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("checkpoint_path")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string CheckpointPath { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// bt:// URI of a sampler checkpoint. Form: bt://loops:<run_id>/sampler_weights/<checkpoint_name>. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ValidateLoopsCheckpointRequestV1( + string checkpointPath) + { + this.CheckpointPath = checkpointPath ?? throw new global::System.ArgumentNullException(nameof(checkpointPath)); + } + + /// + /// Initializes a new instance of the class. + /// + public ValidateLoopsCheckpointRequestV1() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.ValidateLoopsCheckpointResponseV1.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.ValidateLoopsCheckpointResponseV1.Json.g.cs new file mode 100644 index 0000000..17a1aae --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.ValidateLoopsCheckpointResponseV1.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class ValidateLoopsCheckpointResponseV1 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Baseten.ValidateLoopsCheckpointResponseV1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.ValidateLoopsCheckpointResponseV1), + jsonSerializerContext) as global::Baseten.ValidateLoopsCheckpointResponseV1; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Baseten.ValidateLoopsCheckpointResponseV1? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Baseten.ValidateLoopsCheckpointResponseV1), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.ValidateLoopsCheckpointResponseV1; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.Models.ValidateLoopsCheckpointResponseV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.ValidateLoopsCheckpointResponseV1.g.cs new file mode 100644 index 0000000..ea0ab2e --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.ValidateLoopsCheckpointResponseV1.g.cs @@ -0,0 +1,20 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// Response for ``POST /v1/loops/checkpoints/validate``. Empty on success;
+ /// inaccessible or malformed paths raise 400. + ///
+ public sealed partial class ValidateLoopsCheckpointResponseV1 + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/openapi.yaml b/src/libs/Baseten/openapi.yaml index 057f7fa..bc624b0 100644 --- a/src/libs/Baseten/openapi.yaml +++ b/src/libs/Baseten/openapi.yaml @@ -3699,6 +3699,44 @@ } } }, + "/v1/loops/checkpoints/validate": { + "post": { + "summary": "Validate a Loops checkpoint bt:// URI.", + "x-codeSamples": [ + { + "lang": "bash", + "source": "curl --request POST \\\n--url https://api.baseten.co/v1/loops/checkpoints/validate \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\" \\\n--data '{\n \"checkpoint_path\": \"bt://loops:k4q95w5/sampler_weights/step-100\"\n}'" + }, + { + "lang": "python", + "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"\")\nurl = \"https://api.baseten.co/v1/loops/checkpoints/validate\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n \"POST\",\n url,\n headers=headers,\n json={'checkpoint_path': 'bt://loops:k4q95w5/sampler_weights/step-100'}\n)\n\nprint(response.text)" + } + ], + "description": "Whether the caller can manage and use this checkpoint.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidateLoopsCheckpointRequestV1" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidateLoopsCheckpointResponseV1" + } + } + } + } + } + } + }, "/v1/loops/checkpoints/{checkpoint_id}/files": { "get": { "summary": "Get Loops checkpoint files.", @@ -11003,6 +11041,30 @@ "title": "ListLoopsCheckpointsResponseV1", "type": "object" }, + "ValidateLoopsCheckpointRequestV1": { + "description": "Request body for ``POST /v1/loops/checkpoints/validate``.", + "properties": { + "checkpoint_path": { + "description": "bt:// URI of a sampler checkpoint. Form: bt://loops:/sampler_weights/.", + "examples": [ + "bt://loops:k4q95w5/sampler_weights/step-100" + ], + "title": "Checkpoint Path", + "type": "string" + } + }, + "required": [ + "checkpoint_path" + ], + "title": "ValidateLoopsCheckpointRequestV1", + "type": "object" + }, + "ValidateLoopsCheckpointResponseV1": { + "description": "Response for ``POST /v1/loops/checkpoints/validate``. Empty on success;\ninaccessible or malformed paths raise 400.", + "properties": {}, + "title": "ValidateLoopsCheckpointResponseV1", + "type": "object" + }, "LoopsCheckpointFilesResponseV1": { "description": "Response with presigned URLs for files under a Loops checkpoint.", "properties": {