diff --git a/src/libs/Baseten/Generated/Baseten.BasetenClient.CreateModels.g.cs b/src/libs/Baseten/Generated/Baseten.BasetenClient.CreateModels.g.cs new file mode 100644 index 0000000..511c97d --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.BasetenClient.CreateModels.g.cs @@ -0,0 +1,482 @@ + +#nullable enable + +namespace Baseten +{ + public partial class BasetenClient + { + + + private static readonly global::Baseten.EndPointSecurityRequirement s_CreateModelsSecurityRequirement0 = + 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_CreateModelsSecurityRequirements = + new global::Baseten.EndPointSecurityRequirement[] + { s_CreateModelsSecurityRequirement0, + }; + partial void PrepareCreateModelsArguments( + global::System.Net.Http.HttpClient httpClient, + global::Baseten.CreateModelRequestV1 request); + partial void PrepareCreateModelsRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::Baseten.CreateModelRequestV1 request); + partial void ProcessCreateModelsResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCreateModelsResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Creates a new model from a source
+ /// Creates a new model in the caller's organization. The `source` field selects how the model is constructed (currently: `library_listing` — fork an accessible listing from `GET /v1/library_models`). The deployment isn't instantly ready — poll GET endpoint until status is ACTIVE. + ///
+ /// + /// 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/models \
+ /// --header "Authorization: Api-Key $BASETEN_API_KEY" \
+ /// --data '{
+ /// "source": null
+ /// }' + ///
+ public async global::System.Threading.Tasks.Task CreateModelsAsync( + + global::Baseten.CreateModelRequestV1 request, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateModelsAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Creates a new model from a source
+ /// Creates a new model in the caller's organization. The `source` field selects how the model is constructed (currently: `library_listing` — fork an accessible listing from `GET /v1/library_models`). The deployment isn't instantly ready — poll GET endpoint until status is ACTIVE. + ///
+ /// + /// 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/models \
+ /// --header "Authorization: Api-Key $BASETEN_API_KEY" \
+ /// --data '{
+ /// "source": null
+ /// }' + ///
+ public async global::System.Threading.Tasks.Task> CreateModelsAsResponseAsync( + + global::Baseten.CreateModelRequestV1 request, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareCreateModelsArguments( + httpClient: HttpClient, + request: request); + + + var __authorizations = global::Baseten.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_CreateModelsSecurityRequirements, + operationName: "CreateModelsAsync"); + + 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/models", + 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); + PrepareCreateModelsRequest( + 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: "createModels", + methodName: "CreateModelsAsync", + pathTemplate: "\"/v1/models\"", + 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: "createModels", + methodName: "CreateModelsAsync", + pathTemplate: "\"/v1/models\"", + 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: "createModels", + methodName: "CreateModelsAsync", + pathTemplate: "\"/v1/models\"", + 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); + ProcessCreateModelsResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Baseten.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Baseten.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "createModels", + methodName: "CreateModelsAsync", + pathTemplate: "\"/v1/models\"", + 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: "createModels", + methodName: "CreateModelsAsync", + pathTemplate: "\"/v1/models\"", + 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); + ProcessCreateModelsResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Baseten.CreatedModelDeploymentV1.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.CreatedModelDeploymentV1.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(); + } + } + /// + /// Creates a new model from a source
+ /// Creates a new model in the caller's organization. The `source` field selects how the model is constructed (currently: `library_listing` — fork an accessible listing from `GET /v1/library_models`). The deployment isn't instantly ready — poll GET endpoint until status is ACTIVE. + ///
+ /// + /// Where the new model is created from. + /// + /// 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 CreateModelsAsync( + global::Baseten.Source source, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::Baseten.CreateModelRequestV1 + { + Source = source, + }; + + return await CreateModelsAsync( + request: __request, + requestOptions: requestOptions, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.BasetenClient.CreateModelsByModelIdDeployments.g.cs b/src/libs/Baseten/Generated/Baseten.BasetenClient.CreateModelsByModelIdDeployments.g.cs new file mode 100644 index 0000000..9d6a622 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.BasetenClient.CreateModelsByModelIdDeployments.g.cs @@ -0,0 +1,491 @@ + +#nullable enable + +namespace Baseten +{ + public partial class BasetenClient + { + + + private static readonly global::Baseten.EndPointSecurityRequirement s_CreateModelsByModelIdDeploymentsSecurityRequirement0 = + 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_CreateModelsByModelIdDeploymentsSecurityRequirements = + new global::Baseten.EndPointSecurityRequirement[] + { s_CreateModelsByModelIdDeploymentsSecurityRequirement0, + }; + partial void PrepareCreateModelsByModelIdDeploymentsArguments( + global::System.Net.Http.HttpClient httpClient, + ref string modelId, + global::Baseten.CreateModelDeploymentRequestV1 request); + partial void PrepareCreateModelsByModelIdDeploymentsRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string modelId, + global::Baseten.CreateModelDeploymentRequestV1 request); + partial void ProcessCreateModelsByModelIdDeploymentsResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCreateModelsByModelIdDeploymentsResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Adds a new deployment to a model + /// + /// + /// + /// 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/models/{model_id}/deployments \
+ /// --header "Authorization: Api-Key $BASETEN_API_KEY" \
+ /// --data '{
+ /// "source": null
+ /// }' + ///
+ public async global::System.Threading.Tasks.Task CreateModelsByModelIdDeploymentsAsync( + string modelId, + + global::Baseten.CreateModelDeploymentRequestV1 request, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateModelsByModelIdDeploymentsAsResponseAsync( + modelId: modelId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Adds a new deployment to a model + /// + /// + /// + /// 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/models/{model_id}/deployments \
+ /// --header "Authorization: Api-Key $BASETEN_API_KEY" \
+ /// --data '{
+ /// "source": null
+ /// }' + ///
+ public async global::System.Threading.Tasks.Task> CreateModelsByModelIdDeploymentsAsResponseAsync( + string modelId, + + global::Baseten.CreateModelDeploymentRequestV1 request, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareCreateModelsByModelIdDeploymentsArguments( + httpClient: HttpClient, + modelId: ref modelId, + request: request); + + + var __authorizations = global::Baseten.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_CreateModelsByModelIdDeploymentsSecurityRequirements, + operationName: "CreateModelsByModelIdDeploymentsAsync"); + + 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/models/{modelId}/deployments", + 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); + PrepareCreateModelsByModelIdDeploymentsRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + modelId: modelId!, + 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: "createModelsByModelIdDeployments", + methodName: "CreateModelsByModelIdDeploymentsAsync", + pathTemplate: "$\"/v1/models/{modelId}/deployments\"", + 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: "createModelsByModelIdDeployments", + methodName: "CreateModelsByModelIdDeploymentsAsync", + pathTemplate: "$\"/v1/models/{modelId}/deployments\"", + 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: "createModelsByModelIdDeployments", + methodName: "CreateModelsByModelIdDeploymentsAsync", + pathTemplate: "$\"/v1/models/{modelId}/deployments\"", + 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); + ProcessCreateModelsByModelIdDeploymentsResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Baseten.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Baseten.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "createModelsByModelIdDeployments", + methodName: "CreateModelsByModelIdDeploymentsAsync", + pathTemplate: "$\"/v1/models/{modelId}/deployments\"", + 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: "createModelsByModelIdDeployments", + methodName: "CreateModelsByModelIdDeploymentsAsync", + pathTemplate: "$\"/v1/models/{modelId}/deployments\"", + 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); + ProcessCreateModelsByModelIdDeploymentsResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Baseten.CreatedModelDeploymentV1.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.CreatedModelDeploymentV1.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(); + } + } + /// + /// Adds a new deployment to a model + /// + /// + /// + /// Where the new deployment is created from. + /// + /// 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 CreateModelsByModelIdDeploymentsAsync( + string modelId, + global::Baseten.DeploymentArchiveSourceV1 source, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::Baseten.CreateModelDeploymentRequestV1 + { + Source = source, + }; + + return await CreateModelsByModelIdDeploymentsAsync( + modelId: modelId, + request: __request, + requestOptions: requestOptions, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.BasetenClient.CreatePrepareModelUpload.g.cs b/src/libs/Baseten/Generated/Baseten.BasetenClient.CreatePrepareModelUpload.g.cs new file mode 100644 index 0000000..254d07e --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.BasetenClient.CreatePrepareModelUpload.g.cs @@ -0,0 +1,537 @@ + +#nullable enable + +namespace Baseten +{ + public partial class BasetenClient + { + + + private static readonly global::Baseten.EndPointSecurityRequirement s_CreatePrepareModelUploadSecurityRequirement0 = + 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_CreatePrepareModelUploadSecurityRequirements = + new global::Baseten.EndPointSecurityRequirement[] + { s_CreatePrepareModelUploadSecurityRequirement0, + }; + partial void PrepareCreatePrepareModelUploadArguments( + global::System.Net.Http.HttpClient httpClient, + global::Baseten.PrepareModelUploadRequestV1 request); + partial void PrepareCreatePrepareModelUploadRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::Baseten.PrepareModelUploadRequestV1 request); + partial void ProcessCreatePrepareModelUploadResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCreatePrepareModelUploadResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Validates a model push payload and issues upload credentials + /// + /// + /// 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/prepare_model_upload \
+ /// --header "Authorization: Api-Key $BASETEN_API_KEY" \
+ /// --data '{
+ /// "deployment": {
+ /// "config": null,
+ /// "raw_config": null,
+ /// "user_env": null,
+ /// "environment_name": null,
+ /// "preserve_env_instance_type": null,
+ /// "deploy_timeout_minutes": null,
+ /// "deployment_name": null,
+ /// "labels": null
+ /// },
+ /// "name": null,
+ /// "team_id": null,
+ /// "model_id": null,
+ /// "dry_run": null,
+ /// "is_development": null
+ /// }' + ///
+ public async global::System.Threading.Tasks.Task CreatePrepareModelUploadAsync( + + global::Baseten.PrepareModelUploadRequestV1 request, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreatePrepareModelUploadAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Validates a model push payload and issues upload credentials + /// + /// + /// 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/prepare_model_upload \
+ /// --header "Authorization: Api-Key $BASETEN_API_KEY" \
+ /// --data '{
+ /// "deployment": {
+ /// "config": null,
+ /// "raw_config": null,
+ /// "user_env": null,
+ /// "environment_name": null,
+ /// "preserve_env_instance_type": null,
+ /// "deploy_timeout_minutes": null,
+ /// "deployment_name": null,
+ /// "labels": null
+ /// },
+ /// "name": null,
+ /// "team_id": null,
+ /// "model_id": null,
+ /// "dry_run": null,
+ /// "is_development": null
+ /// }' + ///
+ public async global::System.Threading.Tasks.Task> CreatePrepareModelUploadAsResponseAsync( + + global::Baseten.PrepareModelUploadRequestV1 request, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareCreatePrepareModelUploadArguments( + httpClient: HttpClient, + request: request); + + + var __authorizations = global::Baseten.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_CreatePrepareModelUploadSecurityRequirements, + operationName: "CreatePrepareModelUploadAsync"); + + 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/prepare_model_upload", + 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); + PrepareCreatePrepareModelUploadRequest( + 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: "createPrepareModelUpload", + methodName: "CreatePrepareModelUploadAsync", + pathTemplate: "\"/v1/prepare_model_upload\"", + 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: "createPrepareModelUpload", + methodName: "CreatePrepareModelUploadAsync", + pathTemplate: "\"/v1/prepare_model_upload\"", + 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: "createPrepareModelUpload", + methodName: "CreatePrepareModelUploadAsync", + pathTemplate: "\"/v1/prepare_model_upload\"", + 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); + ProcessCreatePrepareModelUploadResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Baseten.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Baseten.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "createPrepareModelUpload", + methodName: "CreatePrepareModelUploadAsync", + pathTemplate: "\"/v1/prepare_model_upload\"", + 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: "createPrepareModelUpload", + methodName: "CreatePrepareModelUploadAsync", + pathTemplate: "\"/v1/prepare_model_upload\"", + 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); + ProcessCreatePrepareModelUploadResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Baseten.PrepareModelUploadResponseV1.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.PrepareModelUploadResponseV1.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(); + } + } + /// + /// Validates a model push payload and issues upload credentials + /// + /// + /// Deployment-level payload, identical to the payload sent at commit. + /// + /// + /// Set to validate a new-model push. Exactly one of `name` or `model_id` is required.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// + /// + /// Team the new model will belong to. Only valid when `name` is set; defaults to the organization's default team when omitted. Must not be set when `model_id` is set (the existing model already has a team).
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// + /// + /// Set to validate an add-deployment push to an existing model. Exactly one of `name` or `model_id` is required.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// + /// + /// If true, validate the payload only and do not issue upload credentials. The response sets `creds`, `s3_bucket`, and `s3_key` to `null`.
+ /// Default Value: false + /// + /// + /// If true, validate a development-deployment push. Only valid when `name` is set. The following `deployment` fields must be left at their defaults: `environment_name`, `preserve_env_instance_type`, `deployment_name`.
+ /// 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 CreatePrepareModelUploadAsync( + global::Baseten.DeploymentArchivePayloadV1 deployment, + string? name = default, + string? teamId = default, + string? modelId = default, + bool? dryRun = default, + bool? isDevelopment = default, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::Baseten.PrepareModelUploadRequestV1 + { + Deployment = deployment, + Name = name, + TeamId = teamId, + ModelId = modelId, + DryRun = dryRun, + IsDevelopment = isDevelopment, + }; + + return await CreatePrepareModelUploadAsync( + request: __request, + requestOptions: requestOptions, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.BasetenClient.CreateTeamsByTeamIdModels.g.cs b/src/libs/Baseten/Generated/Baseten.BasetenClient.CreateTeamsByTeamIdModels.g.cs new file mode 100644 index 0000000..529f937 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.BasetenClient.CreateTeamsByTeamIdModels.g.cs @@ -0,0 +1,494 @@ + +#nullable enable + +namespace Baseten +{ + public partial class BasetenClient + { + + + private static readonly global::Baseten.EndPointSecurityRequirement s_CreateTeamsByTeamIdModelsSecurityRequirement0 = + 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_CreateTeamsByTeamIdModelsSecurityRequirements = + new global::Baseten.EndPointSecurityRequirement[] + { s_CreateTeamsByTeamIdModelsSecurityRequirement0, + }; + partial void PrepareCreateTeamsByTeamIdModelsArguments( + global::System.Net.Http.HttpClient httpClient, + ref string teamId, + global::Baseten.CreateModelRequestV1 request); + partial void PrepareCreateTeamsByTeamIdModelsRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string teamId, + global::Baseten.CreateModelRequestV1 request); + partial void ProcessCreateTeamsByTeamIdModelsResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCreateTeamsByTeamIdModelsResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Creates a new model from a source
+ /// Creates a new model in the caller's organization. The `source` field selects how the model is constructed (currently: `library_listing` — fork an accessible listing from `GET /v1/library_models`). The deployment isn't instantly ready — poll GET endpoint until status is ACTIVE. + ///
+ /// + /// + /// 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/teams/{team_id}/models \
+ /// --header "Authorization: Api-Key $BASETEN_API_KEY" \
+ /// --data '{
+ /// "source": null
+ /// }' + ///
+ public async global::System.Threading.Tasks.Task CreateTeamsByTeamIdModelsAsync( + string teamId, + + global::Baseten.CreateModelRequestV1 request, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateTeamsByTeamIdModelsAsResponseAsync( + teamId: teamId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Creates a new model from a source
+ /// Creates a new model in the caller's organization. The `source` field selects how the model is constructed (currently: `library_listing` — fork an accessible listing from `GET /v1/library_models`). The deployment isn't instantly ready — poll GET endpoint until status is ACTIVE. + ///
+ /// + /// + /// 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/teams/{team_id}/models \
+ /// --header "Authorization: Api-Key $BASETEN_API_KEY" \
+ /// --data '{
+ /// "source": null
+ /// }' + ///
+ public async global::System.Threading.Tasks.Task> CreateTeamsByTeamIdModelsAsResponseAsync( + string teamId, + + global::Baseten.CreateModelRequestV1 request, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareCreateTeamsByTeamIdModelsArguments( + httpClient: HttpClient, + teamId: ref teamId, + request: request); + + + var __authorizations = global::Baseten.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_CreateTeamsByTeamIdModelsSecurityRequirements, + operationName: "CreateTeamsByTeamIdModelsAsync"); + + 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/teams/{teamId}/models", + 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); + PrepareCreateTeamsByTeamIdModelsRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + teamId: teamId!, + 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: "createTeamsByTeamIdModels", + methodName: "CreateTeamsByTeamIdModelsAsync", + pathTemplate: "$\"/v1/teams/{teamId}/models\"", + 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: "createTeamsByTeamIdModels", + methodName: "CreateTeamsByTeamIdModelsAsync", + pathTemplate: "$\"/v1/teams/{teamId}/models\"", + 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: "createTeamsByTeamIdModels", + methodName: "CreateTeamsByTeamIdModelsAsync", + pathTemplate: "$\"/v1/teams/{teamId}/models\"", + 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); + ProcessCreateTeamsByTeamIdModelsResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Baseten.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Baseten.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "createTeamsByTeamIdModels", + methodName: "CreateTeamsByTeamIdModelsAsync", + pathTemplate: "$\"/v1/teams/{teamId}/models\"", + 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: "createTeamsByTeamIdModels", + methodName: "CreateTeamsByTeamIdModelsAsync", + pathTemplate: "$\"/v1/teams/{teamId}/models\"", + 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); + ProcessCreateTeamsByTeamIdModelsResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Baseten.CreatedModelDeploymentV1.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.CreatedModelDeploymentV1.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(); + } + } + /// + /// Creates a new model from a source
+ /// Creates a new model in the caller's organization. The `source` field selects how the model is constructed (currently: `library_listing` — fork an accessible listing from `GET /v1/library_models`). The deployment isn't instantly ready — poll GET endpoint until status is ACTIVE. + ///
+ /// + /// + /// Where the new model is created from. + /// + /// 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 CreateTeamsByTeamIdModelsAsync( + string teamId, + global::Baseten.Source source, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::Baseten.CreateModelRequestV1 + { + Source = source, + }; + + return await CreateTeamsByTeamIdModelsAsync( + teamId: teamId, + request: __request, + requestOptions: requestOptions, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.BasetenClient.DeleteSecretsBySecretName.g.cs b/src/libs/Baseten/Generated/Baseten.BasetenClient.DeleteSecretsBySecretName.g.cs new file mode 100644 index 0000000..da95839 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.BasetenClient.DeleteSecretsBySecretName.g.cs @@ -0,0 +1,440 @@ + +#nullable enable + +namespace Baseten +{ + public partial class BasetenClient + { + + + private static readonly global::Baseten.EndPointSecurityRequirement s_DeleteSecretsBySecretNameSecurityRequirement0 = + 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_DeleteSecretsBySecretNameSecurityRequirements = + new global::Baseten.EndPointSecurityRequirement[] + { s_DeleteSecretsBySecretNameSecurityRequirement0, + }; + partial void PrepareDeleteSecretsBySecretNameArguments( + global::System.Net.Http.HttpClient httpClient, + ref string secretName); + partial void PrepareDeleteSecretsBySecretNameRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string secretName); + partial void ProcessDeleteSecretsBySecretNameResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessDeleteSecretsBySecretNameResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Deletes a secret by name
+ /// Deletes a secret by name in the specified team, or in the caller's organization default team when no team is specified. + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + /// + /// curl --request DELETE \
+ /// --url https://api.baseten.co/v1/secrets/{secret_name} \
+ /// --header "Authorization: Api-Key $BASETEN_API_KEY" + ///
+ public async global::System.Threading.Tasks.Task DeleteSecretsBySecretNameAsync( + string secretName, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await DeleteSecretsBySecretNameAsResponseAsync( + secretName: secretName, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Deletes a secret by name
+ /// Deletes a secret by name in the specified team, or in the caller's organization default team when no team is specified. + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + /// + /// curl --request DELETE \
+ /// --url https://api.baseten.co/v1/secrets/{secret_name} \
+ /// --header "Authorization: Api-Key $BASETEN_API_KEY" + ///
+ public async global::System.Threading.Tasks.Task> DeleteSecretsBySecretNameAsResponseAsync( + string secretName, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareDeleteSecretsBySecretNameArguments( + httpClient: HttpClient, + secretName: ref secretName); + + + var __authorizations = global::Baseten.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_DeleteSecretsBySecretNameSecurityRequirements, + operationName: "DeleteSecretsBySecretNameAsync"); + + 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/secrets/{secretName}", + 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.Delete, + 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); + } + } + global::Baseten.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareDeleteSecretsBySecretNameRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + secretName: secretName!); + + 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: "deleteSecretsBySecretName", + methodName: "DeleteSecretsBySecretNameAsync", + pathTemplate: "$\"/v1/secrets/{secretName}\"", + httpMethod: "DELETE", + 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: "deleteSecretsBySecretName", + methodName: "DeleteSecretsBySecretNameAsync", + pathTemplate: "$\"/v1/secrets/{secretName}\"", + httpMethod: "DELETE", + 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: "deleteSecretsBySecretName", + methodName: "DeleteSecretsBySecretNameAsync", + pathTemplate: "$\"/v1/secrets/{secretName}\"", + httpMethod: "DELETE", + 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); + ProcessDeleteSecretsBySecretNameResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Baseten.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Baseten.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "deleteSecretsBySecretName", + methodName: "DeleteSecretsBySecretNameAsync", + pathTemplate: "$\"/v1/secrets/{secretName}\"", + httpMethod: "DELETE", + 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: "deleteSecretsBySecretName", + methodName: "DeleteSecretsBySecretNameAsync", + pathTemplate: "$\"/v1/secrets/{secretName}\"", + httpMethod: "DELETE", + 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); + ProcessDeleteSecretsBySecretNameResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Baseten.SecretTombstoneV1.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.SecretTombstoneV1.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(); + } + } + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.BasetenClient.DeleteTeamsByTeamIdSecretsBySecretName.g.cs b/src/libs/Baseten/Generated/Baseten.BasetenClient.DeleteTeamsByTeamIdSecretsBySecretName.g.cs new file mode 100644 index 0000000..d094b31 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.BasetenClient.DeleteTeamsByTeamIdSecretsBySecretName.g.cs @@ -0,0 +1,449 @@ + +#nullable enable + +namespace Baseten +{ + public partial class BasetenClient + { + + + private static readonly global::Baseten.EndPointSecurityRequirement s_DeleteTeamsByTeamIdSecretsBySecretNameSecurityRequirement0 = + 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_DeleteTeamsByTeamIdSecretsBySecretNameSecurityRequirements = + new global::Baseten.EndPointSecurityRequirement[] + { s_DeleteTeamsByTeamIdSecretsBySecretNameSecurityRequirement0, + }; + partial void PrepareDeleteTeamsByTeamIdSecretsBySecretNameArguments( + global::System.Net.Http.HttpClient httpClient, + ref string teamId, + ref string secretName); + partial void PrepareDeleteTeamsByTeamIdSecretsBySecretNameRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string teamId, + string secretName); + partial void ProcessDeleteTeamsByTeamIdSecretsBySecretNameResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessDeleteTeamsByTeamIdSecretsBySecretNameResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Deletes a secret by name
+ /// Deletes a secret by name in the specified team, or in the caller's organization default team when no team is specified. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + /// + /// curl --request DELETE \
+ /// --url https://api.baseten.co/v1/teams/{team_id}/secrets/{secret_name} \
+ /// --header "Authorization: Api-Key $BASETEN_API_KEY" + ///
+ public async global::System.Threading.Tasks.Task DeleteTeamsByTeamIdSecretsBySecretNameAsync( + string teamId, + string secretName, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await DeleteTeamsByTeamIdSecretsBySecretNameAsResponseAsync( + teamId: teamId, + secretName: secretName, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Deletes a secret by name
+ /// Deletes a secret by name in the specified team, or in the caller's organization default team when no team is specified. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + /// + /// curl --request DELETE \
+ /// --url https://api.baseten.co/v1/teams/{team_id}/secrets/{secret_name} \
+ /// --header "Authorization: Api-Key $BASETEN_API_KEY" + ///
+ public async global::System.Threading.Tasks.Task> DeleteTeamsByTeamIdSecretsBySecretNameAsResponseAsync( + string teamId, + string secretName, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareDeleteTeamsByTeamIdSecretsBySecretNameArguments( + httpClient: HttpClient, + teamId: ref teamId, + secretName: ref secretName); + + + var __authorizations = global::Baseten.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_DeleteTeamsByTeamIdSecretsBySecretNameSecurityRequirements, + operationName: "DeleteTeamsByTeamIdSecretsBySecretNameAsync"); + + 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/teams/{teamId}/secrets/{secretName}", + 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.Delete, + 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); + } + } + global::Baseten.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareDeleteTeamsByTeamIdSecretsBySecretNameRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + teamId: teamId!, + secretName: secretName!); + + 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: "deleteTeamsByTeamIdSecretsBySecretName", + methodName: "DeleteTeamsByTeamIdSecretsBySecretNameAsync", + pathTemplate: "$\"/v1/teams/{teamId}/secrets/{secretName}\"", + httpMethod: "DELETE", + 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: "deleteTeamsByTeamIdSecretsBySecretName", + methodName: "DeleteTeamsByTeamIdSecretsBySecretNameAsync", + pathTemplate: "$\"/v1/teams/{teamId}/secrets/{secretName}\"", + httpMethod: "DELETE", + 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: "deleteTeamsByTeamIdSecretsBySecretName", + methodName: "DeleteTeamsByTeamIdSecretsBySecretNameAsync", + pathTemplate: "$\"/v1/teams/{teamId}/secrets/{secretName}\"", + httpMethod: "DELETE", + 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); + ProcessDeleteTeamsByTeamIdSecretsBySecretNameResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Baseten.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Baseten.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "deleteTeamsByTeamIdSecretsBySecretName", + methodName: "DeleteTeamsByTeamIdSecretsBySecretNameAsync", + pathTemplate: "$\"/v1/teams/{teamId}/secrets/{secretName}\"", + httpMethod: "DELETE", + 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: "deleteTeamsByTeamIdSecretsBySecretName", + methodName: "DeleteTeamsByTeamIdSecretsBySecretNameAsync", + pathTemplate: "$\"/v1/teams/{teamId}/secrets/{secretName}\"", + httpMethod: "DELETE", + 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); + ProcessDeleteTeamsByTeamIdSecretsBySecretNameResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Baseten.SecretTombstoneV1.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.SecretTombstoneV1.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(); + } + } + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.IBasetenClient.CreateModels.g.cs b/src/libs/Baseten/Generated/Baseten.IBasetenClient.CreateModels.g.cs new file mode 100644 index 0000000..c655bde --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.IBasetenClient.CreateModels.g.cs @@ -0,0 +1,64 @@ +#nullable enable + +namespace Baseten +{ + public partial interface IBasetenClient + { + /// + /// Creates a new model from a source
+ /// Creates a new model in the caller's organization. The `source` field selects how the model is constructed (currently: `library_listing` — fork an accessible listing from `GET /v1/library_models`). The deployment isn't instantly ready — poll GET endpoint until status is ACTIVE. + ///
+ /// + /// 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/models \
+ /// --header "Authorization: Api-Key $BASETEN_API_KEY" \
+ /// --data '{
+ /// "source": null
+ /// }' + ///
+ global::System.Threading.Tasks.Task CreateModelsAsync( + + global::Baseten.CreateModelRequestV1 request, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Creates a new model from a source
+ /// Creates a new model in the caller's organization. The `source` field selects how the model is constructed (currently: `library_listing` — fork an accessible listing from `GET /v1/library_models`). The deployment isn't instantly ready — poll GET endpoint until status is ACTIVE. + ///
+ /// + /// 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/models \
+ /// --header "Authorization: Api-Key $BASETEN_API_KEY" \
+ /// --data '{
+ /// "source": null
+ /// }' + ///
+ global::System.Threading.Tasks.Task> CreateModelsAsResponseAsync( + + global::Baseten.CreateModelRequestV1 request, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Creates a new model from a source
+ /// Creates a new model in the caller's organization. The `source` field selects how the model is constructed (currently: `library_listing` — fork an accessible listing from `GET /v1/library_models`). The deployment isn't instantly ready — poll GET endpoint until status is ACTIVE. + ///
+ /// + /// Where the new model is created from. + /// + /// 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 CreateModelsAsync( + global::Baseten.Source source, + 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.IBasetenClient.CreateModelsByModelIdDeployments.g.cs b/src/libs/Baseten/Generated/Baseten.IBasetenClient.CreateModelsByModelIdDeployments.g.cs new file mode 100644 index 0000000..58d92a3 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.IBasetenClient.CreateModelsByModelIdDeployments.g.cs @@ -0,0 +1,67 @@ +#nullable enable + +namespace Baseten +{ + public partial interface IBasetenClient + { + /// + /// Adds a new deployment to a model + /// + /// + /// + /// 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/models/{model_id}/deployments \
+ /// --header "Authorization: Api-Key $BASETEN_API_KEY" \
+ /// --data '{
+ /// "source": null
+ /// }' + ///
+ global::System.Threading.Tasks.Task CreateModelsByModelIdDeploymentsAsync( + string modelId, + + global::Baseten.CreateModelDeploymentRequestV1 request, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Adds a new deployment to a model + /// + /// + /// + /// 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/models/{model_id}/deployments \
+ /// --header "Authorization: Api-Key $BASETEN_API_KEY" \
+ /// --data '{
+ /// "source": null
+ /// }' + ///
+ global::System.Threading.Tasks.Task> CreateModelsByModelIdDeploymentsAsResponseAsync( + string modelId, + + global::Baseten.CreateModelDeploymentRequestV1 request, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Adds a new deployment to a model + /// + /// + /// + /// Where the new deployment is created from. + /// + /// 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 CreateModelsByModelIdDeploymentsAsync( + string modelId, + global::Baseten.DeploymentArchiveSourceV1 source, + 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.IBasetenClient.CreatePrepareModelUpload.g.cs b/src/libs/Baseten/Generated/Baseten.IBasetenClient.CreatePrepareModelUpload.g.cs new file mode 100644 index 0000000..7f8f372 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.IBasetenClient.CreatePrepareModelUpload.g.cs @@ -0,0 +1,114 @@ +#nullable enable + +namespace Baseten +{ + public partial interface IBasetenClient + { + /// + /// Validates a model push payload and issues upload credentials + /// + /// + /// 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/prepare_model_upload \
+ /// --header "Authorization: Api-Key $BASETEN_API_KEY" \
+ /// --data '{
+ /// "deployment": {
+ /// "config": null,
+ /// "raw_config": null,
+ /// "user_env": null,
+ /// "environment_name": null,
+ /// "preserve_env_instance_type": null,
+ /// "deploy_timeout_minutes": null,
+ /// "deployment_name": null,
+ /// "labels": null
+ /// },
+ /// "name": null,
+ /// "team_id": null,
+ /// "model_id": null,
+ /// "dry_run": null,
+ /// "is_development": null
+ /// }' + ///
+ global::System.Threading.Tasks.Task CreatePrepareModelUploadAsync( + + global::Baseten.PrepareModelUploadRequestV1 request, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Validates a model push payload and issues upload credentials + /// + /// + /// 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/prepare_model_upload \
+ /// --header "Authorization: Api-Key $BASETEN_API_KEY" \
+ /// --data '{
+ /// "deployment": {
+ /// "config": null,
+ /// "raw_config": null,
+ /// "user_env": null,
+ /// "environment_name": null,
+ /// "preserve_env_instance_type": null,
+ /// "deploy_timeout_minutes": null,
+ /// "deployment_name": null,
+ /// "labels": null
+ /// },
+ /// "name": null,
+ /// "team_id": null,
+ /// "model_id": null,
+ /// "dry_run": null,
+ /// "is_development": null
+ /// }' + ///
+ global::System.Threading.Tasks.Task> CreatePrepareModelUploadAsResponseAsync( + + global::Baseten.PrepareModelUploadRequestV1 request, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Validates a model push payload and issues upload credentials + /// + /// + /// Deployment-level payload, identical to the payload sent at commit. + /// + /// + /// Set to validate a new-model push. Exactly one of `name` or `model_id` is required.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// + /// + /// Team the new model will belong to. Only valid when `name` is set; defaults to the organization's default team when omitted. Must not be set when `model_id` is set (the existing model already has a team).
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// + /// + /// Set to validate an add-deployment push to an existing model. Exactly one of `name` or `model_id` is required.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// + /// + /// If true, validate the payload only and do not issue upload credentials. The response sets `creds`, `s3_bucket`, and `s3_key` to `null`.
+ /// Default Value: false + /// + /// + /// If true, validate a development-deployment push. Only valid when `name` is set. The following `deployment` fields must be left at their defaults: `environment_name`, `preserve_env_instance_type`, `deployment_name`.
+ /// 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 CreatePrepareModelUploadAsync( + global::Baseten.DeploymentArchivePayloadV1 deployment, + string? name = default, + string? teamId = default, + string? modelId = default, + bool? dryRun = default, + bool? isDevelopment = default, + 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.IBasetenClient.CreateTeamsByTeamIdModels.g.cs b/src/libs/Baseten/Generated/Baseten.IBasetenClient.CreateTeamsByTeamIdModels.g.cs new file mode 100644 index 0000000..8bf409f --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.IBasetenClient.CreateTeamsByTeamIdModels.g.cs @@ -0,0 +1,70 @@ +#nullable enable + +namespace Baseten +{ + public partial interface IBasetenClient + { + /// + /// Creates a new model from a source
+ /// Creates a new model in the caller's organization. The `source` field selects how the model is constructed (currently: `library_listing` — fork an accessible listing from `GET /v1/library_models`). The deployment isn't instantly ready — poll GET endpoint until status is ACTIVE. + ///
+ /// + /// + /// 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/teams/{team_id}/models \
+ /// --header "Authorization: Api-Key $BASETEN_API_KEY" \
+ /// --data '{
+ /// "source": null
+ /// }' + ///
+ global::System.Threading.Tasks.Task CreateTeamsByTeamIdModelsAsync( + string teamId, + + global::Baseten.CreateModelRequestV1 request, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Creates a new model from a source
+ /// Creates a new model in the caller's organization. The `source` field selects how the model is constructed (currently: `library_listing` — fork an accessible listing from `GET /v1/library_models`). The deployment isn't instantly ready — poll GET endpoint until status is ACTIVE. + ///
+ /// + /// + /// 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/teams/{team_id}/models \
+ /// --header "Authorization: Api-Key $BASETEN_API_KEY" \
+ /// --data '{
+ /// "source": null
+ /// }' + ///
+ global::System.Threading.Tasks.Task> CreateTeamsByTeamIdModelsAsResponseAsync( + string teamId, + + global::Baseten.CreateModelRequestV1 request, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Creates a new model from a source
+ /// Creates a new model in the caller's organization. The `source` field selects how the model is constructed (currently: `library_listing` — fork an accessible listing from `GET /v1/library_models`). The deployment isn't instantly ready — poll GET endpoint until status is ACTIVE. + ///
+ /// + /// + /// Where the new model is created from. + /// + /// 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 CreateTeamsByTeamIdModelsAsync( + string teamId, + global::Baseten.Source source, + 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.IBasetenClient.DeleteSecretsBySecretName.g.cs b/src/libs/Baseten/Generated/Baseten.IBasetenClient.DeleteSecretsBySecretName.g.cs new file mode 100644 index 0000000..520a029 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.IBasetenClient.DeleteSecretsBySecretName.g.cs @@ -0,0 +1,42 @@ +#nullable enable + +namespace Baseten +{ + public partial interface IBasetenClient + { + /// + /// Deletes a secret by name
+ /// Deletes a secret by name in the specified team, or in the caller's organization default team when no team is specified. + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + /// + /// curl --request DELETE \
+ /// --url https://api.baseten.co/v1/secrets/{secret_name} \
+ /// --header "Authorization: Api-Key $BASETEN_API_KEY" + ///
+ global::System.Threading.Tasks.Task DeleteSecretsBySecretNameAsync( + string secretName, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Deletes a secret by name
+ /// Deletes a secret by name in the specified team, or in the caller's organization default team when no team is specified. + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + /// + /// curl --request DELETE \
+ /// --url https://api.baseten.co/v1/secrets/{secret_name} \
+ /// --header "Authorization: Api-Key $BASETEN_API_KEY" + ///
+ global::System.Threading.Tasks.Task> DeleteSecretsBySecretNameAsResponseAsync( + string secretName, + 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.IBasetenClient.DeleteTeamsByTeamIdSecretsBySecretName.g.cs b/src/libs/Baseten/Generated/Baseten.IBasetenClient.DeleteTeamsByTeamIdSecretsBySecretName.g.cs new file mode 100644 index 0000000..f5da701 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.IBasetenClient.DeleteTeamsByTeamIdSecretsBySecretName.g.cs @@ -0,0 +1,46 @@ +#nullable enable + +namespace Baseten +{ + public partial interface IBasetenClient + { + /// + /// Deletes a secret by name
+ /// Deletes a secret by name in the specified team, or in the caller's organization default team when no team is specified. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + /// + /// curl --request DELETE \
+ /// --url https://api.baseten.co/v1/teams/{team_id}/secrets/{secret_name} \
+ /// --header "Authorization: Api-Key $BASETEN_API_KEY" + ///
+ global::System.Threading.Tasks.Task DeleteTeamsByTeamIdSecretsBySecretNameAsync( + string teamId, + string secretName, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Deletes a secret by name
+ /// Deletes a secret by name in the specified team, or in the caller's organization default team when no team is specified. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + /// + /// curl --request DELETE \
+ /// --url https://api.baseten.co/v1/teams/{team_id}/secrets/{secret_name} \
+ /// --header "Authorization: Api-Key $BASETEN_API_KEY" + ///
+ global::System.Threading.Tasks.Task> DeleteTeamsByTeamIdSecretsBySecretNameAsResponseAsync( + string teamId, + string secretName, + 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.JsonConverters.CreateModelDeploymentRequestV1SourceDiscriminatorKind.g.cs b/src/libs/Baseten/Generated/Baseten.JsonConverters.CreateModelDeploymentRequestV1SourceDiscriminatorKind.g.cs new file mode 100644 index 0000000..a692a56 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.JsonConverters.CreateModelDeploymentRequestV1SourceDiscriminatorKind.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Baseten.JsonConverters +{ + /// + public sealed class CreateModelDeploymentRequestV1SourceDiscriminatorKindJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Baseten.CreateModelDeploymentRequestV1SourceDiscriminatorKind Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::Baseten.CreateModelDeploymentRequestV1SourceDiscriminatorKindExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Baseten.CreateModelDeploymentRequestV1SourceDiscriminatorKind)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Baseten.CreateModelDeploymentRequestV1SourceDiscriminatorKind); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Baseten.CreateModelDeploymentRequestV1SourceDiscriminatorKind value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Baseten.CreateModelDeploymentRequestV1SourceDiscriminatorKindExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.JsonConverters.CreateModelDeploymentRequestV1SourceDiscriminatorKindNullable.g.cs b/src/libs/Baseten/Generated/Baseten.JsonConverters.CreateModelDeploymentRequestV1SourceDiscriminatorKindNullable.g.cs new file mode 100644 index 0000000..e476af5 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.JsonConverters.CreateModelDeploymentRequestV1SourceDiscriminatorKindNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Baseten.JsonConverters +{ + /// + public sealed class CreateModelDeploymentRequestV1SourceDiscriminatorKindNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Baseten.CreateModelDeploymentRequestV1SourceDiscriminatorKind? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::Baseten.CreateModelDeploymentRequestV1SourceDiscriminatorKindExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Baseten.CreateModelDeploymentRequestV1SourceDiscriminatorKind)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Baseten.CreateModelDeploymentRequestV1SourceDiscriminatorKind?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Baseten.CreateModelDeploymentRequestV1SourceDiscriminatorKind? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::Baseten.CreateModelDeploymentRequestV1SourceDiscriminatorKindExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.JsonConverters.CreateModelRequestV1SourceDiscriminatorKind.g.cs b/src/libs/Baseten/Generated/Baseten.JsonConverters.CreateModelRequestV1SourceDiscriminatorKind.g.cs new file mode 100644 index 0000000..ef31aa5 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.JsonConverters.CreateModelRequestV1SourceDiscriminatorKind.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Baseten.JsonConverters +{ + /// + public sealed class CreateModelRequestV1SourceDiscriminatorKindJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Baseten.CreateModelRequestV1SourceDiscriminatorKind Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::Baseten.CreateModelRequestV1SourceDiscriminatorKindExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Baseten.CreateModelRequestV1SourceDiscriminatorKind)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Baseten.CreateModelRequestV1SourceDiscriminatorKind); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Baseten.CreateModelRequestV1SourceDiscriminatorKind value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Baseten.CreateModelRequestV1SourceDiscriminatorKindExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.JsonConverters.CreateModelRequestV1SourceDiscriminatorKindNullable.g.cs b/src/libs/Baseten/Generated/Baseten.JsonConverters.CreateModelRequestV1SourceDiscriminatorKindNullable.g.cs new file mode 100644 index 0000000..f3efcc7 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.JsonConverters.CreateModelRequestV1SourceDiscriminatorKindNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Baseten.JsonConverters +{ + /// + public sealed class CreateModelRequestV1SourceDiscriminatorKindNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Baseten.CreateModelRequestV1SourceDiscriminatorKind? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::Baseten.CreateModelRequestV1SourceDiscriminatorKindExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Baseten.CreateModelRequestV1SourceDiscriminatorKind)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Baseten.CreateModelRequestV1SourceDiscriminatorKind?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Baseten.CreateModelRequestV1SourceDiscriminatorKind? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::Baseten.CreateModelRequestV1SourceDiscriminatorKindExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.JsonConverters.Source.g.cs b/src/libs/Baseten/Generated/Baseten.JsonConverters.Source.g.cs new file mode 100644 index 0000000..3c0073a --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.JsonConverters.Source.g.cs @@ -0,0 +1,72 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace Baseten.JsonConverters +{ + /// + public class SourceJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Baseten.Source Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + + var readerCopy = reader; + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Baseten.CreateModelRequestV1SourceDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Baseten.CreateModelRequestV1SourceDiscriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); + + global::Baseten.LibraryListingSourceV1? libraryListing = default; + if (discriminator?.Kind == global::Baseten.CreateModelRequestV1SourceDiscriminatorKind.LibraryListing) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Baseten.LibraryListingSourceV1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Baseten.LibraryListingSourceV1)}"); + libraryListing = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::Baseten.ModelArchiveSourceV1? modelArchive = default; + if (discriminator?.Kind == global::Baseten.CreateModelRequestV1SourceDiscriminatorKind.ModelArchive) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Baseten.ModelArchiveSourceV1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Baseten.ModelArchiveSourceV1)}"); + modelArchive = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + var __value = new global::Baseten.Source( + discriminator?.Kind, + libraryListing, + + modelArchive + ); + + return __value; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Baseten.Source value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + if (value.IsLibraryListing) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Baseten.LibraryListingSourceV1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Baseten.LibraryListingSourceV1).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.LibraryListing!, typeInfo); + } + else if (value.IsModelArchive) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Baseten.ModelArchiveSourceV1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Baseten.ModelArchiveSourceV1).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ModelArchive!, typeInfo); + } + } + } +} \ 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 744083f..b391343 100644 --- a/src/libs/Baseten/Generated/Baseten.JsonSerializerContext.g.cs +++ b/src/libs/Baseten/Generated/Baseten.JsonSerializerContext.g.cs @@ -13,10 +13,18 @@ namespace Baseten DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, Converters = new global::System.Type[] { + typeof(global::Baseten.JsonConverters.CreateModelRequestV1SourceDiscriminatorKindJsonConverter), + + typeof(global::Baseten.JsonConverters.CreateModelRequestV1SourceDiscriminatorKindNullableJsonConverter), + typeof(global::Baseten.JsonConverters.DeploymentStatusV1JsonConverter), typeof(global::Baseten.JsonConverters.DeploymentStatusV1NullableJsonConverter), + typeof(global::Baseten.JsonConverters.CreateModelDeploymentRequestV1SourceDiscriminatorKindJsonConverter), + + typeof(global::Baseten.JsonConverters.CreateModelDeploymentRequestV1SourceDiscriminatorKindNullableJsonConverter), + typeof(global::Baseten.JsonConverters.UpdateAutoscalingSettingsStatusV1JsonConverter), typeof(global::Baseten.JsonConverters.UpdateAutoscalingSettingsStatusV1NullableJsonConverter), @@ -97,6 +105,8 @@ namespace Baseten typeof(global::Baseten.JsonConverters.UsageLimitUnitV1NullableJsonConverter), + typeof(global::Baseten.JsonConverters.SourceJsonConverter), + typeof(global::Baseten.JsonConverters.CheckpointsItemJsonConverter), typeof(global::Baseten.JsonConverters.AnyOfJsonConverter), @@ -140,6 +150,7 @@ namespace Baseten [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SecretsV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.UpsertSecretRequestV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SecretTombstoneV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.TeamV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.TeamsV1))] @@ -154,15 +165,30 @@ namespace Baseten [global::System.Text.Json.Serialization.JsonSerializable(typeof(double))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.InstanceTypePricesV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.DeploymentArchivePayloadV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.PrepareModelUploadRequestV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.AWSCredentialsV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.PrepareModelUploadResponseV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.ModelV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.ModelsV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.ModelTombstoneV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.LibraryListingSourceV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.ModelArchiveSourceV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.CreateModelRequestV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.Source), TypeInfoPropertyName = "Source2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.CreateModelRequestV1SourceDiscriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.CreateModelRequestV1SourceDiscriminatorKind), TypeInfoPropertyName = "CreateModelRequestV1SourceDiscriminatorKind2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.AutoscalingSettingsV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.DeploymentStatusV1), TypeInfoPropertyName = "DeploymentStatusV12")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.DeploymentV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.CreatedModelDeploymentV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.ModelTombstoneV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.DeploymentsV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.DeploymentArchiveSourceV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.CreateModelDeploymentRequestV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.CreateModelDeploymentRequestV1SourceDiscriminator))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.CreateModelDeploymentRequestV1SourceDiscriminatorKind), TypeInfoPropertyName = "CreateModelDeploymentRequestV1SourceDiscriminatorKind2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.DeploymentTombstoneV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.UpdateAutoscalingSettingsV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.UpdateAutoscalingSettingsStatusV1), TypeInfoPropertyName = "UpdateAutoscalingSettingsStatusV12")] @@ -364,7 +390,6 @@ namespace Baseten [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.TrainingGpuCapacityItemV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.GetTrainingGpuCapacityResponseV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.AWSCredentialsV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.GetBlobCredentialsResponseV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.APIKeyCategory), TypeInfoPropertyName = "APIKeyCategory2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.CreateAPIKeyRequestV1))] diff --git a/src/libs/Baseten/Generated/Baseten.JsonSerializerContextTypes.g.cs b/src/libs/Baseten/Generated/Baseten.JsonSerializerContextTypes.g.cs index 72ef060..9ccc910 100644 --- a/src/libs/Baseten/Generated/Baseten.JsonSerializerContextTypes.g.cs +++ b/src/libs/Baseten/Generated/Baseten.JsonSerializerContextTypes.g.cs @@ -52,1219 +52,1279 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::Baseten.TeamV1? Type6 { get; set; } + public global::Baseten.SecretTombstoneV1? Type6 { get; set; } /// /// /// - public bool? Type7 { get; set; } + public global::Baseten.TeamV1? Type7 { get; set; } /// /// /// - public global::Baseten.TeamsV1? Type8 { get; set; } + public bool? Type8 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type9 { get; set; } + public global::Baseten.TeamsV1? Type9 { get; set; } /// /// /// - public global::Baseten.InstanceTypeV1? Type10 { get; set; } + public global::System.Collections.Generic.IList? Type10 { get; set; } /// /// /// - public long? Type11 { get; set; } + public global::Baseten.InstanceTypeV1? Type11 { get; set; } /// /// /// - public int? Type12 { get; set; } + public long? Type12 { get; set; } /// /// /// - public object? Type13 { get; set; } + public int? Type13 { get; set; } /// /// /// - public global::Baseten.InstanceTypesV1? Type14 { get; set; } + public object? Type14 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type15 { get; set; } + public global::Baseten.InstanceTypesV1? Type15 { get; set; } /// /// /// - public global::Baseten.InstanceTypeWithPriceV1? Type16 { get; set; } + public global::System.Collections.Generic.IList? Type16 { get; set; } /// /// /// - public double? Type17 { get; set; } + public global::Baseten.InstanceTypeWithPriceV1? Type17 { get; set; } /// /// /// - public global::Baseten.InstanceTypePricesV1? Type18 { get; set; } + public double? Type18 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type19 { get; set; } + public global::Baseten.InstanceTypePricesV1? Type19 { get; set; } /// /// /// - public global::Baseten.ModelV1? Type20 { get; set; } + public global::System.Collections.Generic.IList? Type20 { get; set; } /// /// /// - public global::Baseten.ModelsV1? Type21 { get; set; } + public global::Baseten.DeploymentArchivePayloadV1? Type21 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type22 { get; set; } + public global::Baseten.PrepareModelUploadRequestV1? Type22 { get; set; } /// /// /// - public global::Baseten.ModelTombstoneV1? Type23 { get; set; } + public global::Baseten.AWSCredentialsV1? Type23 { get; set; } /// /// /// - public global::Baseten.AutoscalingSettingsV1? Type24 { get; set; } + public global::Baseten.PrepareModelUploadResponseV1? Type24 { get; set; } /// /// /// - public global::Baseten.DeploymentStatusV1? Type25 { get; set; } + public global::Baseten.ModelV1? Type25 { get; set; } /// /// /// - public global::Baseten.DeploymentV1? Type26 { get; set; } + public global::Baseten.ModelsV1? Type26 { get; set; } /// /// /// - public global::Baseten.DeploymentsV1? Type27 { get; set; } + public global::System.Collections.Generic.IList? Type27 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type28 { get; set; } + public global::Baseten.LibraryListingSourceV1? Type28 { get; set; } /// /// /// - public global::Baseten.DeploymentTombstoneV1? Type29 { get; set; } + public global::Baseten.ModelArchiveSourceV1? Type29 { get; set; } /// /// /// - public global::Baseten.UpdateAutoscalingSettingsV1? Type30 { get; set; } + public global::Baseten.CreateModelRequestV1? Type30 { get; set; } /// /// /// - public global::Baseten.UpdateAutoscalingSettingsStatusV1? Type31 { get; set; } + public global::Baseten.Source? Type31 { get; set; } /// /// /// - public global::Baseten.UpdateAutoscalingSettingsResponseV1? Type32 { get; set; } + public global::Baseten.CreateModelRequestV1SourceDiscriminator? Type32 { get; set; } /// /// /// - public global::Baseten.PromoteRequestV1? Type33 { get; set; } + public global::Baseten.CreateModelRequestV1SourceDiscriminatorKind? Type33 { get; set; } /// /// /// - public global::Baseten.ActivateResponseV1? Type34 { get; set; } + public global::Baseten.AutoscalingSettingsV1? Type34 { get; set; } /// /// /// - public global::Baseten.DeactivateResponseV1? Type35 { get; set; } + public global::Baseten.DeploymentStatusV1? Type35 { get; set; } /// /// /// - public global::Baseten.RetryDeploymentResponseV1? Type36 { get; set; } + public global::Baseten.DeploymentV1? Type36 { get; set; } /// /// /// - public global::Baseten.DownloadDeploymentResponseV1? Type37 { get; set; } + public global::Baseten.CreatedModelDeploymentV1? Type37 { get; set; } /// /// /// - public global::Baseten.DeploymentConfigResponseV1? Type38 { get; set; } + public global::Baseten.ModelTombstoneV1? Type38 { get; set; } /// /// /// - public global::Baseten.SortOrderV1? Type39 { get; set; } + public global::Baseten.DeploymentsV1? Type39 { get; set; } /// /// /// - public global::Baseten.GetDeploymentLogsRequestV1? Type40 { get; set; } + public global::System.Collections.Generic.IList? Type40 { get; set; } /// /// /// - public global::Baseten.LogV1? Type41 { get; set; } + public global::Baseten.DeploymentArchiveSourceV1? Type41 { get; set; } /// /// /// - public global::Baseten.GetLogsResponseV1? Type42 { get; set; } + public global::Baseten.CreateModelDeploymentRequestV1? Type42 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type43 { get; set; } + public global::Baseten.CreateModelDeploymentRequestV1SourceDiscriminator? Type43 { get; set; } /// /// /// - public global::Baseten.TerminateReplicaResponseV1? Type44 { get; set; } + public global::Baseten.CreateModelDeploymentRequestV1SourceDiscriminatorKind? Type44 { get; set; } /// /// /// - public global::Baseten.SignSSHCertificateRequestV1? Type45 { get; set; } + public global::Baseten.DeploymentTombstoneV1? Type45 { get; set; } /// /// /// - public global::Baseten.SignSSHCertificateResponseV1? Type46 { get; set; } + public global::Baseten.UpdateAutoscalingSettingsV1? Type46 { get; set; } /// /// /// - public global::Baseten.EnvironmentV1? Type47 { get; set; } + public global::Baseten.UpdateAutoscalingSettingsStatusV1? Type47 { get; set; } /// /// /// - public global::Baseten.InProgressPromotionV1? Type48 { get; set; } + public global::Baseten.UpdateAutoscalingSettingsResponseV1? Type48 { get; set; } /// /// /// - public global::Baseten.PromotionSettingsV1? Type49 { get; set; } + public global::Baseten.PromoteRequestV1? Type49 { get; set; } /// /// /// - public global::Baseten.InProgressPromotionStatusV1? Type50 { get; set; } + public global::Baseten.ActivateResponseV1? Type50 { get; set; } /// /// /// - public global::Baseten.PromotionCleanupStrategyV1? Type51 { get; set; } + public global::Baseten.DeactivateResponseV1? Type51 { get; set; } /// /// /// - public global::Baseten.RollingDeployConfigV1? Type52 { get; set; } + public global::Baseten.RetryDeploymentResponseV1? Type52 { get; set; } /// /// /// - public global::Baseten.RollingDeployStrategyV1? Type53 { get; set; } + public global::Baseten.DownloadDeploymentResponseV1? Type53 { get; set; } /// /// /// - public global::Baseten.EnvironmentsV1? Type54 { get; set; } + public global::Baseten.DeploymentConfigResponseV1? Type54 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type55 { get; set; } + public global::Baseten.SortOrderV1? Type55 { get; set; } /// /// /// - public global::Baseten.UpdatePromotionSettingsV1? Type56 { get; set; } + public global::Baseten.GetDeploymentLogsRequestV1? Type56 { get; set; } /// /// /// - public global::Baseten.UpdateRollingDeployConfigV1? Type57 { get; set; } + public global::Baseten.LogV1? Type57 { get; set; } /// /// /// - public global::Baseten.CreateEnvironmentRequestV1? Type58 { get; set; } + public global::Baseten.GetLogsResponseV1? Type58 { get; set; } /// /// /// - public global::Baseten.UpdateEnvironmentRequestV1? Type59 { get; set; } + public global::System.Collections.Generic.IList? Type59 { get; set; } /// /// /// - public global::Baseten.PromoteToEnvironmentRequestV1? Type60 { get; set; } + public global::Baseten.TerminateReplicaResponseV1? Type60 { get; set; } /// /// /// - public global::Baseten.CancelPromotionStatusV1? Type61 { get; set; } + public global::Baseten.SignSSHCertificateRequestV1? Type61 { get; set; } /// /// /// - public global::Baseten.CancelPromotionResponseV1? Type62 { get; set; } + public global::Baseten.SignSSHCertificateResponseV1? Type62 { get; set; } /// /// /// - public global::Baseten.SignalPromotionResponseV1? Type63 { get; set; } + public global::Baseten.EnvironmentV1? Type63 { get; set; } /// /// /// - public global::Baseten.ChainV1? Type64 { get; set; } + public global::Baseten.InProgressPromotionV1? Type64 { get; set; } /// /// /// - public global::Baseten.ChainsV1? Type65 { get; set; } + public global::Baseten.PromotionSettingsV1? Type65 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type66 { get; set; } + public global::Baseten.InProgressPromotionStatusV1? Type66 { get; set; } /// /// /// - public global::Baseten.ChainTombstoneV1? Type67 { get; set; } + public global::Baseten.PromotionCleanupStrategyV1? Type67 { get; set; } /// /// /// - public global::Baseten.ChainDeploymentV1? Type68 { get; set; } + public global::Baseten.RollingDeployConfigV1? Type68 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type69 { get; set; } + public global::Baseten.RollingDeployStrategyV1? Type69 { get; set; } /// /// /// - public global::Baseten.ChainletV1? Type70 { get; set; } + public global::Baseten.EnvironmentsV1? Type70 { get; set; } /// /// /// - public global::Baseten.ChainDeploymentsV1? Type71 { get; set; } + public global::System.Collections.Generic.IList? Type71 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type72 { get; set; } + public global::Baseten.UpdatePromotionSettingsV1? Type72 { get; set; } /// /// /// - public global::Baseten.ChainDeploymentTombstoneV1? Type73 { get; set; } + public global::Baseten.UpdateRollingDeployConfigV1? Type73 { get; set; } /// /// /// - public global::Baseten.ChainletEnvironmentSettingsRequestV1? Type74 { get; set; } + public global::Baseten.CreateEnvironmentRequestV1? Type74 { get; set; } /// /// /// - public global::Baseten.CreateChainEnvironmentRequestV1? Type75 { get; set; } + public global::Baseten.UpdateEnvironmentRequestV1? Type75 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type76 { get; set; } + public global::Baseten.PromoteToEnvironmentRequestV1? Type76 { get; set; } /// /// /// - public global::Baseten.ChainletEnvironmentSettingsV1? Type77 { get; set; } + public global::Baseten.CancelPromotionStatusV1? Type77 { get; set; } /// /// /// - public global::Baseten.ChainEnvironmentV1? Type78 { get; set; } + public global::Baseten.CancelPromotionResponseV1? Type78 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type79 { get; set; } + public global::Baseten.SignalPromotionResponseV1? Type79 { get; set; } /// /// /// - public global::Baseten.UpdateChainEnvironmentRequestV1? Type80 { get; set; } + public global::Baseten.ChainV1? Type80 { get; set; } /// /// /// - public global::Baseten.UpdateChainEnvironmentResponseV1? Type81 { get; set; } + public global::Baseten.ChainsV1? Type81 { get; set; } /// /// /// - public global::Baseten.PromoteToChainEnvironmentRequestV1? Type82 { get; set; } + public global::System.Collections.Generic.IList? Type82 { get; set; } /// /// /// - public global::Baseten.ChainletEnvironmentAutoscalingSettingsUpdateV1? Type83 { get; set; } + public global::Baseten.ChainTombstoneV1? Type83 { get; set; } /// /// /// - public global::Baseten.UpdateChainletEnvironmentAutoscalingSettingsRequestV1? Type84 { get; set; } + public global::Baseten.ChainDeploymentV1? Type84 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type85 { get; set; } + public global::System.Collections.Generic.IList? Type85 { get; set; } /// /// /// - public global::Baseten.ChainletEnvironmentInstanceTypeUpdateV1? Type86 { get; set; } + public global::Baseten.ChainletV1? Type86 { get; set; } /// /// /// - public global::Baseten.UpdateChainletEnvironmentInstanceTypeRequestV1? Type87 { get; set; } + public global::Baseten.ChainDeploymentsV1? Type87 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type88 { get; set; } + public global::System.Collections.Generic.IList? Type88 { get; set; } /// /// /// - public global::Baseten.UpdateChainletEnvironmentInstanceTypeResponseV1? Type89 { get; set; } + public global::Baseten.ChainDeploymentTombstoneV1? Type89 { get; set; } /// /// /// - public global::Baseten.UpsertTrainingProjectV1? Type90 { get; set; } + public global::Baseten.ChainletEnvironmentSettingsRequestV1? Type90 { get; set; } /// /// /// - public global::Baseten.UpsertTrainingProjectRequestV1? Type91 { get; set; } + public global::Baseten.CreateChainEnvironmentRequestV1? Type91 { get; set; } /// /// /// - public global::Baseten.CheckpointSyncStatus? Type92 { get; set; } + public global::System.Collections.Generic.IList? Type92 { get; set; } /// /// /// - public global::Baseten.TrainingJobV1? Type93 { get; set; } + public global::Baseten.ChainletEnvironmentSettingsV1? Type93 { get; set; } /// /// /// - public global::Baseten.TrainingProjectSummaryV1? Type94 { get; set; } + public global::Baseten.ChainEnvironmentV1? Type94 { get; set; } /// /// /// - public global::Baseten.UserV1? Type95 { get; set; } + public global::System.Collections.Generic.IList? Type95 { get; set; } /// /// /// - public global::Baseten.TrainingProjectV1? Type96 { get; set; } + public global::Baseten.UpdateChainEnvironmentRequestV1? Type96 { get; set; } /// /// /// - public global::Baseten.UpsertTrainingProjectResponseV1? Type97 { get; set; } + public global::Baseten.UpdateChainEnvironmentResponseV1? Type97 { get; set; } /// /// /// - public global::Baseten.ListTrainingProjectsResponseV1? Type98 { get; set; } + public global::Baseten.PromoteToChainEnvironmentRequestV1? Type98 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type99 { get; set; } + public global::Baseten.ChainletEnvironmentAutoscalingSettingsUpdateV1? Type99 { get; set; } /// /// /// - public global::Baseten.ListTrainingJobsResponseV1? Type100 { get; set; } + public global::Baseten.UpdateChainletEnvironmentAutoscalingSettingsRequestV1? Type100 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type101 { get; set; } + public global::System.Collections.Generic.IList? Type101 { get; set; } /// /// /// - public global::Baseten.AwsIamDockerAuthV1? Type102 { get; set; } + public global::Baseten.ChainletEnvironmentInstanceTypeUpdateV1? Type102 { get; set; } /// /// /// - public global::Baseten.SecretReferenceV1? Type103 { get; set; } + public global::Baseten.UpdateChainletEnvironmentInstanceTypeRequestV1? Type103 { get; set; } /// /// /// - public global::Baseten.AwsOidcDockerAuthV1? Type104 { get; set; } + public global::System.Collections.Generic.IList? Type104 { get; set; } /// /// /// - public global::Baseten.BasetenLatestCheckpointConfig? Type105 { get; set; } + public global::Baseten.UpdateChainletEnvironmentInstanceTypeResponseV1? Type105 { get; set; } /// /// /// - public global::Baseten.BasetenNamedCheckpointConfig? Type106 { get; set; } + public global::Baseten.UpsertTrainingProjectV1? Type106 { get; set; } /// /// /// - public global::Baseten.CreateJobWeightConfigV1? Type107 { get; set; } + public global::Baseten.UpsertTrainingProjectRequestV1? Type107 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type108 { get; set; } + public global::Baseten.CheckpointSyncStatus? Type108 { get; set; } /// /// /// - public global::Baseten.CreateTrainingJobAcceleratorV1? Type109 { get; set; } + public global::Baseten.TrainingJobV1? Type109 { get; set; } /// /// /// - public global::Baseten.CreateTrainingJobCacheConfig? Type110 { get; set; } + public global::Baseten.TrainingProjectSummaryV1? Type110 { get; set; } /// /// /// - public global::Baseten.CreateTrainingJobCheckpointingConfig? Type111 { get; set; } + public global::Baseten.UserV1? Type111 { get; set; } /// /// /// - public global::Baseten.CreateTrainingJobComputeV1? Type112 { get; set; } + public global::Baseten.TrainingProjectV1? Type112 { get; set; } /// /// /// - public global::Baseten.CreateTrainingJobImageV1? Type113 { get; set; } + public global::Baseten.UpsertTrainingProjectResponseV1? Type113 { get; set; } /// /// /// - public global::Baseten.DockerAuthV1? Type114 { get; set; } + public global::Baseten.ListTrainingProjectsResponseV1? Type114 { get; set; } /// /// /// - public global::Baseten.CreateTrainingJobRuntimeV1? Type115 { get; set; } + public global::System.Collections.Generic.IList? Type115 { get; set; } /// /// /// - public global::Baseten.AnyOf? Type116 { get; set; } + public global::Baseten.ListTrainingJobsResponseV1? Type116 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type117 { get; set; } + public global::System.Collections.Generic.IList? Type117 { get; set; } /// /// /// - public global::Baseten.CreateTrainingJobS3Artifact? Type118 { get; set; } + public global::Baseten.AwsIamDockerAuthV1? Type118 { get; set; } /// /// /// - public global::Baseten.LoadCheckpointConfig? Type119 { get; set; } + public global::Baseten.SecretReferenceV1? Type119 { get; set; } /// /// /// - public global::Baseten.CreateTrainingJobV1? Type120 { get; set; } + public global::Baseten.AwsOidcDockerAuthV1? Type120 { get; set; } /// /// /// - public global::Baseten.TrussUserEnv? Type121 { get; set; } + public global::Baseten.BasetenLatestCheckpointConfig? Type121 { get; set; } /// /// /// - public global::Baseten.InteractiveSessionConfigV1? Type122 { get; set; } + public global::Baseten.BasetenNamedCheckpointConfig? Type122 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type123 { get; set; } + public global::Baseten.CreateJobWeightConfigV1? Type123 { get; set; } /// /// /// - public global::Baseten.DockerAuthType? Type124 { get; set; } + public global::System.Collections.Generic.IList? Type124 { get; set; } /// /// /// - public global::Baseten.GcpServiceAccountJsonDockerAuthV1? Type125 { get; set; } + public global::Baseten.CreateTrainingJobAcceleratorV1? Type125 { get; set; } /// /// /// - public global::Baseten.GcpOidcDockerAuthV1? Type126 { get; set; } + public global::Baseten.CreateTrainingJobCacheConfig? Type126 { get; set; } /// /// /// - public global::Baseten.RegistrySecretDockerAuthV1? Type127 { get; set; } + public global::Baseten.CreateTrainingJobCheckpointingConfig? Type127 { get; set; } /// /// /// - public global::Baseten.GitInfo? Type128 { get; set; } + public global::Baseten.CreateTrainingJobComputeV1? Type128 { get; set; } /// /// /// - public global::Baseten.V1InteractiveSessionTrigger? Type129 { get; set; } + public global::Baseten.CreateTrainingJobImageV1? Type129 { get; set; } /// /// /// - public global::Baseten.V1InteractiveSessionProvider? Type130 { get; set; } + public global::Baseten.DockerAuthV1? Type130 { get; set; } /// /// /// - public global::Baseten.V1InteractiveSessionAuthProvider? Type131 { get; set; } + public global::Baseten.CreateTrainingJobRuntimeV1? Type131 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type132 { get; set; } + public global::Baseten.AnyOf? Type132 { get; set; } /// /// /// - public global::Baseten.CheckpointsItem? Type133 { get; set; } + public global::System.Collections.Generic.IList? Type133 { get; set; } /// /// /// - public global::Baseten.LoadCheckpointConfigCheckpointDiscriminator? Type134 { get; set; } + public global::Baseten.CreateTrainingJobS3Artifact? Type134 { get; set; } /// /// /// - public global::Baseten.LoadCheckpointConfigCheckpointDiscriminatorTyp? Type135 { get; set; } + public global::Baseten.LoadCheckpointConfig? Type135 { get; set; } /// /// /// - public global::Baseten.CreateTrainingJobRequestV1? Type136 { get; set; } + public global::Baseten.CreateTrainingJobV1? Type136 { get; set; } /// /// /// - public global::Baseten.CreateTrainingJobResponseV1? Type137 { get; set; } + public global::Baseten.TrussUserEnv? Type137 { get; set; } /// /// /// - public global::Baseten.TrainingJobTombstoneV1? Type138 { get; set; } + public global::Baseten.InteractiveSessionConfigV1? Type138 { get; set; } /// /// /// - public global::Baseten.GetTrainingJobResponseV1? Type139 { get; set; } + public global::System.Collections.Generic.IList? Type139 { get; set; } /// /// /// - public global::Baseten.DownloadTrainingJobResponseV1? Type140 { get; set; } + public global::Baseten.DockerAuthType? Type140 { get; set; } /// /// /// - public global::Baseten.RecreateTrainingJobResponseV1? Type141 { get; set; } + public global::Baseten.GcpServiceAccountJsonDockerAuthV1? Type141 { get; set; } /// /// /// - public global::Baseten.GetTrainingJobLogsRequestV1? Type142 { get; set; } + public global::Baseten.GcpOidcDockerAuthV1? Type142 { get; set; } /// /// /// - public global::Baseten.GetTrainingJobMetricsRequestV1? Type143 { get; set; } + public global::Baseten.RegistrySecretDockerAuthV1? Type143 { get; set; } /// /// /// - public global::Baseten.StorageMetricsV1? Type144 { get; set; } + public global::Baseten.GitInfo? Type144 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type145 { get; set; } + public global::Baseten.V1InteractiveSessionTrigger? Type145 { get; set; } /// /// /// - public global::Baseten.TrainingJobMetricV1? Type146 { get; set; } + public global::Baseten.V1InteractiveSessionProvider? Type146 { get; set; } /// /// /// - public global::Baseten.TrainingJobMetricsV1? Type147 { get; set; } + public global::Baseten.V1InteractiveSessionAuthProvider? Type147 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary>? Type148 { get; set; } + public global::System.Collections.Generic.IList? Type148 { get; set; } /// /// /// - public global::Baseten.TrainingJobNodeMetricsV1? Type149 { get; set; } + public global::Baseten.CheckpointsItem? Type149 { get; set; } /// /// /// - public global::Baseten.GetTrainingJobMetricsResponseV1? Type150 { get; set; } + public global::Baseten.LoadCheckpointConfigCheckpointDiscriminator? Type150 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type151 { get; set; } + public global::Baseten.LoadCheckpointConfigCheckpointDiscriminatorTyp? Type151 { get; set; } /// /// /// - public global::Baseten.StopTrainingJobRequestV1? Type152 { get; set; } + public global::Baseten.CreateTrainingJobRequestV1? Type152 { get; set; } /// /// /// - public global::Baseten.StopTrainingJobResponseV1? Type153 { get; set; } + public global::Baseten.CreateTrainingJobResponseV1? Type153 { get; set; } /// /// /// - public global::Baseten.TrainingJobCheckpointV1? Type154 { get; set; } + public global::Baseten.TrainingJobTombstoneV1? Type154 { get; set; } /// /// /// - public global::Baseten.GetTrainingJobCheckpointsResponseV1? Type155 { get; set; } + public global::Baseten.GetTrainingJobResponseV1? Type155 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type156 { get; set; } + public global::Baseten.DownloadTrainingJobResponseV1? Type156 { get; set; } /// /// /// - public global::Baseten.CheckpointFile? Type157 { get; set; } + public global::Baseten.RecreateTrainingJobResponseV1? Type157 { get; set; } /// /// /// - public global::Baseten.GetTrainingJobCheckpointFilesResponseV1? Type158 { get; set; } + public global::Baseten.GetTrainingJobLogsRequestV1? Type158 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type159 { get; set; } + public global::Baseten.GetTrainingJobMetricsRequestV1? Type159 { get; set; } /// /// /// - public global::Baseten.AuthCodeV1? Type160 { get; set; } + public global::Baseten.StorageMetricsV1? Type160 { get; set; } /// /// /// - public global::Baseten.GetAuthCodesResponseV1? Type161 { get; set; } + public global::System.Collections.Generic.IList? Type161 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type162 { get; set; } + public global::Baseten.TrainingJobMetricV1? Type162 { get; set; } /// /// /// - public global::Baseten.PatchInteractiveSessionRequestV1? Type163 { get; set; } + public global::Baseten.TrainingJobMetricsV1? Type163 { get; set; } /// /// /// - public global::Baseten.InteractiveSessionV1? Type164 { get; set; } + public global::System.Collections.Generic.Dictionary>? Type164 { get; set; } /// /// /// - public global::Baseten.PatchInteractiveSessionResponseV1? Type165 { get; set; } + public global::Baseten.TrainingJobNodeMetricsV1? Type165 { get; set; } /// /// /// - public global::Baseten.FileSummary? Type166 { get; set; } + public global::Baseten.GetTrainingJobMetricsResponseV1? Type166 { get; set; } /// /// /// - public global::Baseten.GetCacheSummaryResponseV1? Type167 { get; set; } + public global::System.Collections.Generic.IList? Type167 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type168 { get; set; } + public global::Baseten.StopTrainingJobRequestV1? Type168 { get; set; } /// /// /// - public global::Baseten.TrainingProjectTombstoneV1? Type169 { get; set; } + public global::Baseten.StopTrainingJobResponseV1? Type169 { get; set; } /// /// /// - public global::Baseten.GetTrainingProjectResponseV1? Type170 { get; set; } + public global::Baseten.TrainingJobCheckpointV1? Type170 { get; set; } /// /// /// - public global::Baseten.OrderByV1? Type171 { get; set; } + public global::Baseten.GetTrainingJobCheckpointsResponseV1? Type171 { get; set; } /// /// /// - public global::Baseten.SearchTrainingJobsRequestV1? Type172 { get; set; } + public global::System.Collections.Generic.IList? Type172 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type173 { get; set; } + public global::Baseten.CheckpointFile? Type173 { get; set; } /// /// /// - public global::Baseten.SearchTrainingJobsResponseV1? Type174 { get; set; } + public global::Baseten.GetTrainingJobCheckpointFilesResponseV1? Type174 { get; set; } /// /// /// - public global::Baseten.SearchTrainersRequestV1? Type175 { get; set; } + public global::System.Collections.Generic.IList? Type175 { get; set; } /// /// /// - public global::Baseten.SearchedTrainerV1? Type176 { get; set; } + public global::Baseten.AuthCodeV1? Type176 { get; set; } /// /// /// - public global::Baseten.SearchTrainersResponseV1? Type177 { get; set; } + public global::Baseten.GetAuthCodesResponseV1? Type177 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type178 { get; set; } + public global::System.Collections.Generic.IList? Type178 { get; set; } /// /// /// - public global::Baseten.CheckpointSearchRequestV1? Type179 { get; set; } + public global::Baseten.PatchInteractiveSessionRequestV1? Type179 { get; set; } /// /// /// - public global::Baseten.TrainerCheckpointTarget? Type180 { get; set; } + public global::Baseten.InteractiveSessionV1? Type180 { get; set; } /// /// /// - public global::Baseten.TrainerServerCheckpointV1? Type181 { get; set; } + public global::Baseten.PatchInteractiveSessionResponseV1? Type181 { get; set; } /// /// /// - public global::Baseten.CheckpointSearchResponseV1? Type182 { get; set; } + public global::Baseten.FileSummary? Type182 { get; set; } /// /// /// - public global::Baseten.CreateTrainerSessionRequestV1? Type183 { get; set; } + public global::Baseten.GetCacheSummaryResponseV1? Type183 { get; set; } /// /// /// - public global::Baseten.TrainerSessionV1? Type184 { get; set; } + public global::System.Collections.Generic.IList? Type184 { get; set; } /// /// /// - public global::Baseten.CreateTrainerSessionResponseV1? Type185 { get; set; } + public global::Baseten.TrainingProjectTombstoneV1? Type185 { get; set; } /// /// /// - public global::Baseten.CreateTrainerServerRequestV1? Type186 { get; set; } + public global::Baseten.GetTrainingProjectResponseV1? Type186 { get; set; } /// /// /// - public global::Baseten.SamplingServerV1? Type187 { get; set; } + public global::Baseten.OrderByV1? Type187 { get; set; } /// /// /// - public global::Baseten.TrainerServerV1? Type188 { get; set; } + public global::Baseten.SearchTrainingJobsRequestV1? Type188 { get; set; } /// /// /// - public global::Baseten.CreateTrainerServerResponseV1? Type189 { get; set; } + public global::System.Collections.Generic.IList? Type189 { get; set; } /// /// /// - public global::Baseten.CreateSamplingServerRequestV1? Type190 { get; set; } + public global::Baseten.SearchTrainingJobsResponseV1? Type190 { get; set; } /// /// /// - public global::Baseten.CreateSamplingServerResponseV1? Type191 { get; set; } + public global::Baseten.SearchTrainersRequestV1? Type191 { get; set; } /// /// /// - public global::Baseten.GetTrainerServerCheckpointsResponseV1? Type192 { get; set; } + public global::Baseten.SearchedTrainerV1? Type192 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type193 { get; set; } + public global::Baseten.SearchTrainersResponseV1? Type193 { get; set; } /// /// /// - public global::Baseten.GetTrainerServerCheckpointFilesResponseV1? Type194 { get; set; } + public global::System.Collections.Generic.IList? Type194 { get; set; } /// /// /// - public global::Baseten.SupportedModelV1? Type195 { get; set; } + public global::Baseten.CheckpointSearchRequestV1? Type195 { get; set; } /// /// /// - public global::Baseten.GetLoopsCapabilitiesResponseV1? Type196 { get; set; } + public global::Baseten.TrainerCheckpointTarget? Type196 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type197 { get; set; } + public global::Baseten.TrainerServerCheckpointV1? Type197 { get; set; } /// /// /// - public global::Baseten.CreateLoopsSessionRequestV1? Type198 { get; set; } + public global::Baseten.CheckpointSearchResponseV1? Type198 { get; set; } /// /// /// - public global::Baseten.LoopsSessionV1? Type199 { get; set; } + public global::Baseten.CreateTrainerSessionRequestV1? Type199 { get; set; } /// /// /// - public global::Baseten.CreateLoopsSessionResponseV1? Type200 { get; set; } + public global::Baseten.TrainerSessionV1? Type200 { get; set; } /// /// /// - public global::Baseten.GetLoopsSessionResponseV1? Type201 { get; set; } + public global::Baseten.CreateTrainerSessionResponseV1? Type201 { get; set; } /// /// /// - public global::Baseten.LoopsRunV1? Type202 { get; set; } + public global::Baseten.CreateTrainerServerRequestV1? Type202 { get; set; } /// /// /// - public global::Baseten.LoopsSamplerV1? Type203 { get; set; } + public global::Baseten.SamplingServerV1? Type203 { get; set; } /// /// /// - public global::Baseten.ListLoopsRunsResponseV1? Type204 { get; set; } + public global::Baseten.TrainerServerV1? Type204 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type205 { get; set; } + public global::Baseten.CreateTrainerServerResponseV1? Type205 { get; set; } /// /// /// - public global::Baseten.CreateLoopsRunRequestV1? Type206 { get; set; } + public global::Baseten.CreateSamplingServerRequestV1? Type206 { get; set; } /// /// /// - public global::Baseten.CreateLoopsRunResponseV1? Type207 { get; set; } + public global::Baseten.CreateSamplingServerResponseV1? Type207 { get; set; } /// /// /// - public global::Baseten.GetLoopsRunResponseV1? Type208 { get; set; } + public global::Baseten.GetTrainerServerCheckpointsResponseV1? Type208 { get; set; } /// /// /// - public global::Baseten.ListLoopsSamplersResponseV1? Type209 { get; set; } + public global::System.Collections.Generic.IList? Type209 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type210 { get; set; } + public global::Baseten.GetTrainerServerCheckpointFilesResponseV1? Type210 { get; set; } /// /// /// - public global::Baseten.CreateLoopsSamplerRequestV1? Type211 { get; set; } + public global::Baseten.SupportedModelV1? Type211 { get; set; } /// /// /// - public global::Baseten.CreateLoopsSamplerResponseV1? Type212 { get; set; } + public global::Baseten.GetLoopsCapabilitiesResponseV1? Type212 { get; set; } /// /// /// - public global::Baseten.GetLoopsSamplerResponseV1? Type213 { get; set; } + public global::System.Collections.Generic.IList? Type213 { get; set; } /// /// /// - public global::Baseten.LoopsCheckpointV1? Type214 { get; set; } + public global::Baseten.CreateLoopsSessionRequestV1? Type214 { get; set; } /// /// /// - public global::Baseten.ListLoopsCheckpointsResponseV1? Type215 { get; set; } + public global::Baseten.LoopsSessionV1? Type215 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type216 { get; set; } + public global::Baseten.CreateLoopsSessionResponseV1? Type216 { get; set; } /// /// /// - public global::Baseten.ValidateLoopsCheckpointRequestV1? Type217 { get; set; } + public global::Baseten.GetLoopsSessionResponseV1? Type217 { get; set; } /// /// /// - public global::Baseten.ValidateLoopsCheckpointResponseV1? Type218 { get; set; } + public global::Baseten.LoopsRunV1? Type218 { get; set; } /// /// /// - public global::Baseten.LoopsCheckpointFilesResponseV1? Type219 { get; set; } + public global::Baseten.LoopsSamplerV1? Type219 { get; set; } /// /// /// - public global::Baseten.LoopsDeploymentStatusV1? Type220 { get; set; } + public global::Baseten.ListLoopsRunsResponseV1? Type220 { get; set; } /// /// /// - public global::Baseten.Name? Type221 { get; set; } + public global::System.Collections.Generic.IList? Type221 { get; set; } /// /// /// - public global::Baseten.LoopsDeploymentV1? Type222 { get; set; } + public global::Baseten.CreateLoopsRunRequestV1? Type222 { get; set; } /// /// /// - public global::Baseten.ListLoopsDeploymentsResponseV1? Type223 { get; set; } + public global::Baseten.CreateLoopsRunResponseV1? Type223 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type224 { get; set; } + public global::Baseten.GetLoopsRunResponseV1? Type224 { get; set; } /// /// /// - public global::Baseten.DeactivateLoopsDeploymentResponseV1? Type225 { get; set; } + public global::Baseten.ListLoopsSamplersResponseV1? Type225 { get; set; } /// /// /// - public global::Baseten.GetLoopsDeploymentResponseV1? Type226 { get; set; } + public global::System.Collections.Generic.IList? Type226 { get; set; } /// /// /// - public global::Baseten.TrainingGpuCapacityItemV1? Type227 { get; set; } + public global::Baseten.CreateLoopsSamplerRequestV1? Type227 { get; set; } /// /// /// - public global::Baseten.GetTrainingGpuCapacityResponseV1? Type228 { get; set; } + public global::Baseten.CreateLoopsSamplerResponseV1? Type228 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type229 { get; set; } + public global::Baseten.GetLoopsSamplerResponseV1? Type229 { get; set; } /// /// /// - public global::Baseten.AWSCredentialsV1? Type230 { get; set; } + public global::Baseten.LoopsCheckpointV1? Type230 { get; set; } /// /// /// - public global::Baseten.GetBlobCredentialsResponseV1? Type231 { get; set; } + public global::Baseten.ListLoopsCheckpointsResponseV1? Type231 { get; set; } /// /// /// - public global::Baseten.APIKeyCategory? Type232 { get; set; } + public global::System.Collections.Generic.IList? Type232 { get; set; } /// /// /// - public global::Baseten.CreateAPIKeyRequestV1? Type233 { get; set; } + public global::Baseten.ValidateLoopsCheckpointRequestV1? Type233 { get; set; } /// /// /// - public global::Baseten.APIKeyV1? Type234 { get; set; } + public global::Baseten.ValidateLoopsCheckpointResponseV1? Type234 { get; set; } /// /// /// - public global::Baseten.APIKeyInfoV1? Type235 { get; set; } + public global::Baseten.LoopsCheckpointFilesResponseV1? Type235 { get; set; } /// /// /// - public global::Baseten.APIKeysV1? Type236 { get; set; } + public global::Baseten.LoopsDeploymentStatusV1? Type236 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type237 { get; set; } + public global::Baseten.Name? Type237 { get; set; } /// /// /// - public global::Baseten.APIKeyTombstoneV1? Type238 { get; set; } + public global::Baseten.LoopsDeploymentV1? Type238 { get; set; } /// /// /// - public global::Baseten.ModelWeightSnapshotV1? Type239 { get; set; } + public global::Baseten.ListLoopsDeploymentsResponseV1? Type239 { get; set; } /// /// /// - public global::Baseten.CreateModelWeightSnapshotRequestV1? Type240 { get; set; } + public global::System.Collections.Generic.IList? Type240 { get; set; } /// /// /// - public global::Baseten.CreateLLMModelRequestV1? Type241 { get; set; } + public global::Baseten.DeactivateLoopsDeploymentResponseV1? Type241 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type242 { get; set; } + public global::Baseten.GetLoopsDeploymentResponseV1? Type242 { get; set; } /// /// /// - public global::Baseten.LLMModelHandleV1? Type243 { get; set; } + public global::Baseten.TrainingGpuCapacityItemV1? Type243 { get; set; } /// /// /// - public global::Baseten.CreateLLMModelVersionRequestV1? Type244 { get; set; } + public global::Baseten.GetTrainingGpuCapacityResponseV1? Type244 { get; set; } /// /// /// - public global::Baseten.LibraryListingV1? Type245 { get; set; } + public global::System.Collections.Generic.IList? Type245 { get; set; } /// /// /// - public global::Baseten.LibraryListingsV1? Type246 { get; set; } + public global::Baseten.GetBlobCredentialsResponseV1? Type246 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type247 { get; set; } + public global::Baseten.APIKeyCategory? Type247 { get; set; } /// /// /// - public global::Baseten.CreateLibraryListingRequestV1? Type248 { get; set; } + public global::Baseten.CreateAPIKeyRequestV1? Type248 { get; set; } /// /// /// - public global::Baseten.LibraryListingTombstoneV1? Type249 { get; set; } + public global::Baseten.APIKeyV1? Type249 { get; set; } /// /// /// - public global::Baseten.UpdateLibraryListingRequestV1? Type250 { get; set; } + public global::Baseten.APIKeyInfoV1? Type250 { get; set; } /// /// /// - public global::Baseten.LibraryListingVersionV1? Type251 { get; set; } + public global::Baseten.APIKeysV1? Type251 { get; set; } /// /// /// - public global::Baseten.LibraryListingVersionsV1? Type252 { get; set; } + public global::System.Collections.Generic.IList? Type252 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type253 { get; set; } + public global::Baseten.APIKeyTombstoneV1? Type253 { get; set; } /// /// /// - public global::Baseten.CreateLibraryListingVersionRequestV1? Type254 { get; set; } + public global::Baseten.ModelWeightSnapshotV1? Type254 { get; set; } /// /// /// - public global::Baseten.LibraryListingVersionTombstoneV1? Type255 { get; set; } + public global::Baseten.CreateModelWeightSnapshotRequestV1? Type255 { get; set; } /// /// /// - public global::Baseten.UpdateLibraryListingVersionRequestV1? Type256 { get; set; } + public global::Baseten.CreateLLMModelRequestV1? Type256 { get; set; } /// /// /// - public global::Baseten.BillableResourceV1? Type257 { get; set; } + public global::System.Collections.Generic.IList? Type257 { get; set; } /// /// /// - public global::Baseten.ResourceKind? Type258 { get; set; } + public global::Baseten.LLMModelHandleV1? Type258 { get; set; } /// /// /// - public global::Baseten.ChainMetadataV1? Type259 { get; set; } + public global::Baseten.CreateLLMModelVersionRequestV1? Type259 { get; set; } /// /// /// - public global::Baseten.DailyDedicatedUsageV1? Type260 { get; set; } + public global::Baseten.LibraryListingV1? Type260 { get; set; } /// /// /// - public global::Baseten.AnyOf? Type261 { get; set; } + public global::Baseten.LibraryListingsV1? Type261 { get; set; } /// /// /// - public global::Baseten.DailyModelApiUsageV1? Type262 { get; set; } + public global::System.Collections.Generic.IList? Type262 { get; set; } /// /// /// - public global::Baseten.DailyTrainingUsageV1? Type263 { get; set; } + public global::Baseten.CreateLibraryListingRequestV1? Type263 { get; set; } /// /// /// - public global::Baseten.DedicatedItemV1? Type264 { get; set; } + public global::Baseten.LibraryListingTombstoneV1? Type264 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type265 { get; set; } + public global::Baseten.UpdateLibraryListingRequestV1? Type265 { get; set; } /// /// /// - public global::Baseten.DedicatedUsageV1? Type266 { get; set; } + public global::Baseten.LibraryListingVersionV1? Type266 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type267 { get; set; } + public global::Baseten.LibraryListingVersionsV1? Type267 { get; set; } /// /// /// - public global::Baseten.ModelApiItemV1? Type268 { get; set; } + public global::System.Collections.Generic.IList? Type268 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type269 { get; set; } + public global::Baseten.CreateLibraryListingVersionRequestV1? Type269 { get; set; } /// /// /// - public global::Baseten.ModelApisUsageV1? Type270 { get; set; } + public global::Baseten.LibraryListingVersionTombstoneV1? Type270 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type271 { get; set; } + public global::Baseten.UpdateLibraryListingVersionRequestV1? Type271 { get; set; } /// /// /// - public global::Baseten.TrainingItemV1? Type272 { get; set; } + public global::Baseten.BillableResourceV1? Type272 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type273 { get; set; } + public global::Baseten.ResourceKind? Type273 { get; set; } /// /// /// - public global::Baseten.TrainingUsageV1? Type274 { get; set; } + public global::Baseten.ChainMetadataV1? Type274 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type275 { get; set; } + public global::Baseten.DailyDedicatedUsageV1? Type275 { get; set; } /// /// /// - public global::Baseten.UsageSummaryV1? Type276 { get; set; } + public global::Baseten.AnyOf? Type276 { get; set; } /// /// /// - public global::Baseten.UserInfoV1? Type277 { get; set; } + public global::Baseten.DailyModelApiUsageV1? Type277 { get; set; } /// /// /// - public global::Baseten.EffectiveModelConfigV1? Type278 { get; set; } + public global::Baseten.DailyTrainingUsageV1? Type278 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type279 { get; set; } + public global::Baseten.DedicatedItemV1? Type279 { get; set; } /// /// /// - public global::Baseten.EffectiveRateLimitV1? Type280 { get; set; } + public global::System.Collections.Generic.IList? Type280 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type281 { get; set; } + public global::Baseten.DedicatedUsageV1? Type281 { get; set; } /// /// /// - public global::Baseten.EffectiveUsageLimitV1? Type282 { get; set; } + public global::System.Collections.Generic.IList? Type282 { get; set; } /// /// /// - public global::Baseten.LimitTypeV1? Type283 { get; set; } + public global::Baseten.ModelApiItemV1? Type283 { get; set; } /// /// /// - public global::Baseten.RateLimitUnitV1? Type284 { get; set; } + public global::System.Collections.Generic.IList? Type284 { get; set; } /// /// /// - public global::Baseten.UsageLimitUnitV1? Type285 { get; set; } + public global::Baseten.ModelApisUsageV1? Type285 { get; set; } /// /// /// - public global::Baseten.GroupHierarchyV1? Type286 { get; set; } + public global::System.Collections.Generic.IList? Type286 { get; set; } /// /// /// - public global::Baseten.LimitEnforcementV1? Type287 { get; set; } + public global::Baseten.TrainingItemV1? Type287 { get; set; } /// /// /// - public global::Baseten.GroupMetadataV1? Type288 { get; set; } + public global::System.Collections.Generic.IList? Type288 { get; set; } /// /// /// - public global::Baseten.GroupV1? Type289 { get; set; } + public global::Baseten.TrainingUsageV1? Type289 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type290 { get; set; } + public global::System.Collections.Generic.IList? Type290 { get; set; } /// /// /// - public global::Baseten.ModelConfigV1? Type291 { get; set; } + public global::Baseten.UsageSummaryV1? Type291 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type292 { get; set; } + public global::Baseten.UserInfoV1? Type292 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type293 { get; set; } + public global::Baseten.EffectiveModelConfigV1? Type293 { get; set; } /// /// /// - public global::Baseten.RateLimitV1? Type294 { get; set; } + public global::System.Collections.Generic.IList? Type294 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type295 { get; set; } + public global::Baseten.EffectiveRateLimitV1? Type295 { get; set; } /// /// /// - public global::Baseten.UsageLimitV1? Type296 { get; set; } + public global::System.Collections.Generic.IList? Type296 { get; set; } /// /// /// - public global::Baseten.PaginationResponseV1? Type297 { get; set; } + public global::Baseten.EffectiveUsageLimitV1? Type297 { get; set; } /// /// /// - public global::Baseten.GroupsResponseV1? Type298 { get; set; } + public global::Baseten.LimitTypeV1? Type298 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type299 { get; set; } + public global::Baseten.RateLimitUnitV1? Type299 { get; set; } /// /// /// - public global::Baseten.CreateGroupRequestV1? Type300 { get; set; } + public global::Baseten.UsageLimitUnitV1? Type300 { get; set; } /// /// /// - public global::Baseten.UpdateGroupMetadataV1? Type301 { get; set; } + public global::Baseten.GroupHierarchyV1? Type301 { get; set; } /// /// /// - public global::Baseten.UpdateGroupRequestV1? Type302 { get; set; } + public global::Baseten.LimitEnforcementV1? Type302 { get; set; } /// /// /// - public global::Baseten.GatewayKeyInfoV1? Type303 { get; set; } + public global::Baseten.GroupMetadataV1? Type303 { get; set; } /// /// /// - public global::Baseten.KeysForGroupResponseV1? Type304 { get; set; } + public global::Baseten.GroupV1? Type304 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type305 { get; set; } + public global::System.Collections.Generic.IList? Type305 { get; set; } /// /// /// - public global::Baseten.CreateApiKeyForGroupRequestV1? Type306 { get; set; } + public global::Baseten.ModelConfigV1? Type306 { get; set; } /// /// /// - public global::Baseten.CreateApiKeyForGroupResponseV1? Type307 { get; set; } + public global::System.Collections.Generic.IList? Type307 { get; set; } /// /// /// - public global::Baseten.RegisterAPIKeyRequestV1? Type308 { get; set; } + public global::System.Collections.Generic.IList? Type308 { get; set; } /// /// /// - public global::Baseten.RegisterAPIKeyResponseV1? Type309 { get; set; } + public global::Baseten.RateLimitV1? Type309 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type310 { get; set; } + /// + /// + /// + public global::Baseten.UsageLimitV1? Type311 { get; set; } + /// + /// + /// + public global::Baseten.PaginationResponseV1? Type312 { get; set; } + /// + /// + /// + public global::Baseten.GroupsResponseV1? Type313 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type314 { get; set; } + /// + /// + /// + public global::Baseten.CreateGroupRequestV1? Type315 { get; set; } + /// + /// + /// + public global::Baseten.UpdateGroupMetadataV1? Type316 { get; set; } + /// + /// + /// + public global::Baseten.UpdateGroupRequestV1? Type317 { get; set; } + /// + /// + /// + public global::Baseten.GatewayKeyInfoV1? Type318 { get; set; } + /// + /// + /// + public global::Baseten.KeysForGroupResponseV1? Type319 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type320 { get; set; } + /// + /// + /// + public global::Baseten.CreateApiKeyForGroupRequestV1? Type321 { get; set; } + /// + /// + /// + public global::Baseten.CreateApiKeyForGroupResponseV1? Type322 { get; set; } + /// + /// + /// + public global::Baseten.RegisterAPIKeyRequestV1? Type323 { get; set; } + /// + /// + /// + public global::Baseten.RegisterAPIKeyResponseV1? Type324 { get; set; } /// /// diff --git a/src/libs/Baseten/Generated/Baseten.Models.CreateModelDeploymentRequestV1.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.CreateModelDeploymentRequestV1.Json.g.cs new file mode 100644 index 0000000..64c5e8f --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.CreateModelDeploymentRequestV1.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class CreateModelDeploymentRequestV1 + { + /// + /// 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.CreateModelDeploymentRequestV1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.CreateModelDeploymentRequestV1), + jsonSerializerContext) as global::Baseten.CreateModelDeploymentRequestV1; + } + + /// + /// 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.CreateModelDeploymentRequestV1? 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.CreateModelDeploymentRequestV1), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.CreateModelDeploymentRequestV1; + } + + /// + /// 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.CreateModelDeploymentRequestV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.CreateModelDeploymentRequestV1.g.cs new file mode 100644 index 0000000..3261769 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.CreateModelDeploymentRequestV1.g.cs @@ -0,0 +1,48 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// Body for adding a deployment to an existing model via
+ /// `POST /v1/models/{model_id}/deployments`. + ///
+ public sealed partial class CreateModelDeploymentRequestV1 + { + /// + /// Where the new deployment is created from. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("source")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Baseten.DeploymentArchiveSourceV1 Source { 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. + /// + /// + /// Where the new deployment is created from. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreateModelDeploymentRequestV1( + global::Baseten.DeploymentArchiveSourceV1 source) + { + this.Source = source ?? throw new global::System.ArgumentNullException(nameof(source)); + } + + /// + /// Initializes a new instance of the class. + /// + public CreateModelDeploymentRequestV1() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.CreateModelDeploymentRequestV1SourceDiscriminator.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.CreateModelDeploymentRequestV1SourceDiscriminator.Json.g.cs new file mode 100644 index 0000000..dbf90fb --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.CreateModelDeploymentRequestV1SourceDiscriminator.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class CreateModelDeploymentRequestV1SourceDiscriminator + { + /// + /// 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.CreateModelDeploymentRequestV1SourceDiscriminator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.CreateModelDeploymentRequestV1SourceDiscriminator), + jsonSerializerContext) as global::Baseten.CreateModelDeploymentRequestV1SourceDiscriminator; + } + + /// + /// 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.CreateModelDeploymentRequestV1SourceDiscriminator? 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.CreateModelDeploymentRequestV1SourceDiscriminator), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.CreateModelDeploymentRequestV1SourceDiscriminator; + } + + /// + /// 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.CreateModelDeploymentRequestV1SourceDiscriminator.g.cs b/src/libs/Baseten/Generated/Baseten.Models.CreateModelDeploymentRequestV1SourceDiscriminator.g.cs new file mode 100644 index 0000000..e7d42df --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.CreateModelDeploymentRequestV1SourceDiscriminator.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// + /// + public sealed partial class CreateModelDeploymentRequestV1SourceDiscriminator + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("kind")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Baseten.JsonConverters.CreateModelDeploymentRequestV1SourceDiscriminatorKindJsonConverter))] + public global::Baseten.CreateModelDeploymentRequestV1SourceDiscriminatorKind? Kind { 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. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreateModelDeploymentRequestV1SourceDiscriminator( + global::Baseten.CreateModelDeploymentRequestV1SourceDiscriminatorKind? kind) + { + this.Kind = kind; + } + + /// + /// Initializes a new instance of the class. + /// + public CreateModelDeploymentRequestV1SourceDiscriminator() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.CreateModelDeploymentRequestV1SourceDiscriminatorKind.g.cs b/src/libs/Baseten/Generated/Baseten.Models.CreateModelDeploymentRequestV1SourceDiscriminatorKind.g.cs new file mode 100644 index 0000000..c1ac92e --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.CreateModelDeploymentRequestV1SourceDiscriminatorKind.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// + /// + public enum CreateModelDeploymentRequestV1SourceDiscriminatorKind + { + /// + /// + /// + ModelArchive, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class CreateModelDeploymentRequestV1SourceDiscriminatorKindExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this CreateModelDeploymentRequestV1SourceDiscriminatorKind value) + { + return value switch + { + CreateModelDeploymentRequestV1SourceDiscriminatorKind.ModelArchive => "model_archive", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static CreateModelDeploymentRequestV1SourceDiscriminatorKind? ToEnum(string value) + { + return value switch + { + "model_archive" => CreateModelDeploymentRequestV1SourceDiscriminatorKind.ModelArchive, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.CreateModelRequestV1.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.CreateModelRequestV1.Json.g.cs new file mode 100644 index 0000000..282c820 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.CreateModelRequestV1.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class CreateModelRequestV1 + { + /// + /// 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.CreateModelRequestV1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.CreateModelRequestV1), + jsonSerializerContext) as global::Baseten.CreateModelRequestV1; + } + + /// + /// 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.CreateModelRequestV1? 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.CreateModelRequestV1), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.CreateModelRequestV1; + } + + /// + /// 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.CreateModelRequestV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.CreateModelRequestV1.g.cs new file mode 100644 index 0000000..0ce3e94 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.CreateModelRequestV1.g.cs @@ -0,0 +1,48 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// Body for creating a model via `POST /v1/models`. + /// + public sealed partial class CreateModelRequestV1 + { + /// + /// Where the new model is created from. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("source")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Baseten.JsonConverters.SourceJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Baseten.Source Source { 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. + /// + /// + /// Where the new model is created from. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreateModelRequestV1( + global::Baseten.Source source) + { + this.Source = source; + } + + /// + /// Initializes a new instance of the class. + /// + public CreateModelRequestV1() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.CreateModelRequestV1SourceDiscriminator.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.CreateModelRequestV1SourceDiscriminator.Json.g.cs new file mode 100644 index 0000000..8363a67 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.CreateModelRequestV1SourceDiscriminator.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class CreateModelRequestV1SourceDiscriminator + { + /// + /// 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.CreateModelRequestV1SourceDiscriminator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.CreateModelRequestV1SourceDiscriminator), + jsonSerializerContext) as global::Baseten.CreateModelRequestV1SourceDiscriminator; + } + + /// + /// 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.CreateModelRequestV1SourceDiscriminator? 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.CreateModelRequestV1SourceDiscriminator), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.CreateModelRequestV1SourceDiscriminator; + } + + /// + /// 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.CreateModelRequestV1SourceDiscriminator.g.cs b/src/libs/Baseten/Generated/Baseten.Models.CreateModelRequestV1SourceDiscriminator.g.cs new file mode 100644 index 0000000..c997fc5 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.CreateModelRequestV1SourceDiscriminator.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// + /// + public sealed partial class CreateModelRequestV1SourceDiscriminator + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("kind")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Baseten.JsonConverters.CreateModelRequestV1SourceDiscriminatorKindJsonConverter))] + public global::Baseten.CreateModelRequestV1SourceDiscriminatorKind? Kind { 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. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreateModelRequestV1SourceDiscriminator( + global::Baseten.CreateModelRequestV1SourceDiscriminatorKind? kind) + { + this.Kind = kind; + } + + /// + /// Initializes a new instance of the class. + /// + public CreateModelRequestV1SourceDiscriminator() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.CreateModelRequestV1SourceDiscriminatorKind.g.cs b/src/libs/Baseten/Generated/Baseten.Models.CreateModelRequestV1SourceDiscriminatorKind.g.cs new file mode 100644 index 0000000..14be054 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.CreateModelRequestV1SourceDiscriminatorKind.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// + /// + public enum CreateModelRequestV1SourceDiscriminatorKind + { + /// + /// + /// + LibraryListing, + /// + /// + /// + ModelArchive, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class CreateModelRequestV1SourceDiscriminatorKindExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this CreateModelRequestV1SourceDiscriminatorKind value) + { + return value switch + { + CreateModelRequestV1SourceDiscriminatorKind.LibraryListing => "library_listing", + CreateModelRequestV1SourceDiscriminatorKind.ModelArchive => "model_archive", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static CreateModelRequestV1SourceDiscriminatorKind? ToEnum(string value) + { + return value switch + { + "library_listing" => CreateModelRequestV1SourceDiscriminatorKind.LibraryListing, + "model_archive" => CreateModelRequestV1SourceDiscriminatorKind.ModelArchive, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.CreatedModelDeploymentV1.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.CreatedModelDeploymentV1.Json.g.cs new file mode 100644 index 0000000..e7da419 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.CreatedModelDeploymentV1.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class CreatedModelDeploymentV1 + { + /// + /// 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.CreatedModelDeploymentV1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.CreatedModelDeploymentV1), + jsonSerializerContext) as global::Baseten.CreatedModelDeploymentV1; + } + + /// + /// 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.CreatedModelDeploymentV1? 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.CreatedModelDeploymentV1), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.CreatedModelDeploymentV1; + } + + /// + /// 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.CreatedModelDeploymentV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.CreatedModelDeploymentV1.g.cs new file mode 100644 index 0000000..4cdad49 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.CreatedModelDeploymentV1.g.cs @@ -0,0 +1,59 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// A newly created deployment and its model. + /// + public sealed partial class CreatedModelDeploymentV1 + { + /// + /// The model the deployment belongs to. May have been created by this call. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("model")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Baseten.ModelV1 Model { get; set; } + + /// + /// The newly created deployment. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("deployment")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Baseten.DeploymentV1 Deployment { 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. + /// + /// + /// The model the deployment belongs to. May have been created by this call. + /// + /// + /// The newly created deployment. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreatedModelDeploymentV1( + global::Baseten.ModelV1 model, + global::Baseten.DeploymentV1 deployment) + { + this.Model = model ?? throw new global::System.ArgumentNullException(nameof(model)); + this.Deployment = deployment ?? throw new global::System.ArgumentNullException(nameof(deployment)); + } + + /// + /// Initializes a new instance of the class. + /// + public CreatedModelDeploymentV1() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.DeploymentArchivePayloadV1.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.DeploymentArchivePayloadV1.Json.g.cs new file mode 100644 index 0000000..76d7253 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.DeploymentArchivePayloadV1.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class DeploymentArchivePayloadV1 + { + /// + /// 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.DeploymentArchivePayloadV1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.DeploymentArchivePayloadV1), + jsonSerializerContext) as global::Baseten.DeploymentArchivePayloadV1; + } + + /// + /// 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.DeploymentArchivePayloadV1? 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.DeploymentArchivePayloadV1), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.DeploymentArchivePayloadV1; + } + + /// + /// 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.DeploymentArchivePayloadV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.DeploymentArchivePayloadV1.g.cs new file mode 100644 index 0000000..38c4ed6 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.DeploymentArchivePayloadV1.g.cs @@ -0,0 +1,141 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// Deployment-level fields for a model-archive push.
+ /// Shared by every endpoint that creates a deployment from an uploaded archive:
+ /// `POST /v1/prepare_model_upload`, the `model_archive` source on `POST
+ /// /v1/models`, and `POST /v1/models/{model_id}/deployments`. + ///
+ public sealed partial class DeploymentArchivePayloadV1 + { + /// + /// Parsed model config as a JSON object. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("config")] + [global::System.Text.Json.Serialization.JsonRequired] + public required object Config { get; set; } + + /// + /// Original config.yaml text, persisted as-is on the deployment. Best-effort: invalid raw configs are logged and dropped without failing the request.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("raw_config")] + public string? RawConfig { get; set; } + + /// + /// Client environment metadata (e.g. client version, Python version). Validated server-side.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("user_env")] + public object? UserEnv { get; set; } + + /// + /// Stable environment to push to (e.g. `production`). If unset, the deployment is created without environment selection. Caller must have push permission for the named environment.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("environment_name")] + public string? EnvironmentName { get; set; } + + /// + /// Retain the target environment's current instance type rather than the one in `config`. Only meaningful when `environment_name` is set and that environment already exists.
+ /// Default Value: true + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("preserve_env_instance_type")] + public bool? PreserveEnvInstanceType { get; set; } + + /// + /// Deploy timeout in minutes; allowed range 10 to 1440. Server default applies if unset.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("deploy_timeout_minutes")] + public int? DeployTimeoutMinutes { get; set; } + + /// + /// Optional human-readable name for the deployment.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("deployment_name")] + public string? DeploymentName { get; set; } + + /// + /// User-provided key-value labels for the deployment.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("labels")] + public object? Labels { 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. + /// + /// + /// Parsed model config as a JSON object. + /// + /// + /// Original config.yaml text, persisted as-is on the deployment. Best-effort: invalid raw configs are logged and dropped without failing the request.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// + /// + /// Client environment metadata (e.g. client version, Python version). Validated server-side.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// + /// + /// Stable environment to push to (e.g. `production`). If unset, the deployment is created without environment selection. Caller must have push permission for the named environment.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// + /// + /// Retain the target environment's current instance type rather than the one in `config`. Only meaningful when `environment_name` is set and that environment already exists.
+ /// Default Value: true + /// + /// + /// Deploy timeout in minutes; allowed range 10 to 1440. Server default applies if unset.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// + /// + /// Optional human-readable name for the deployment.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// + /// + /// User-provided key-value labels for the deployment.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public DeploymentArchivePayloadV1( + object config, + string? rawConfig, + object? userEnv, + string? environmentName, + bool? preserveEnvInstanceType, + int? deployTimeoutMinutes, + string? deploymentName, + object? labels) + { + this.Config = config ?? throw new global::System.ArgumentNullException(nameof(config)); + this.RawConfig = rawConfig; + this.UserEnv = userEnv; + this.EnvironmentName = environmentName; + this.PreserveEnvInstanceType = preserveEnvInstanceType; + this.DeployTimeoutMinutes = deployTimeoutMinutes; + this.DeploymentName = deploymentName; + this.Labels = labels; + } + + /// + /// Initializes a new instance of the class. + /// + public DeploymentArchivePayloadV1() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.DeploymentArchivePayloadV1Config.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.DeploymentArchivePayloadV1Config.Json.g.cs new file mode 100644 index 0000000..b22ccbf --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.DeploymentArchivePayloadV1Config.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class DeploymentArchivePayloadV1Config + { + /// + /// 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.DeploymentArchivePayloadV1Config? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.DeploymentArchivePayloadV1Config), + jsonSerializerContext) as global::Baseten.DeploymentArchivePayloadV1Config; + } + + /// + /// 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.DeploymentArchivePayloadV1Config? 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.DeploymentArchivePayloadV1Config), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.DeploymentArchivePayloadV1Config; + } + + /// + /// 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.DeploymentArchivePayloadV1Config.g.cs b/src/libs/Baseten/Generated/Baseten.Models.DeploymentArchivePayloadV1Config.g.cs new file mode 100644 index 0000000..fc4017a --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.DeploymentArchivePayloadV1Config.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// Parsed model config as a JSON object. + /// + public sealed partial class DeploymentArchivePayloadV1Config + { + + /// + /// 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/Generated/Baseten.Models.DeploymentArchivePayloadV1DeployTimeoutMinutes.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.DeploymentArchivePayloadV1DeployTimeoutMinutes.Json.g.cs new file mode 100644 index 0000000..64fbbc5 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.DeploymentArchivePayloadV1DeployTimeoutMinutes.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class DeploymentArchivePayloadV1DeployTimeoutMinutes + { + /// + /// 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.DeploymentArchivePayloadV1DeployTimeoutMinutes? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.DeploymentArchivePayloadV1DeployTimeoutMinutes), + jsonSerializerContext) as global::Baseten.DeploymentArchivePayloadV1DeployTimeoutMinutes; + } + + /// + /// 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.DeploymentArchivePayloadV1DeployTimeoutMinutes? 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.DeploymentArchivePayloadV1DeployTimeoutMinutes), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.DeploymentArchivePayloadV1DeployTimeoutMinutes; + } + + /// + /// 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.DeploymentArchivePayloadV1DeployTimeoutMinutes.g.cs b/src/libs/Baseten/Generated/Baseten.Models.DeploymentArchivePayloadV1DeployTimeoutMinutes.g.cs new file mode 100644 index 0000000..9f27ade --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.DeploymentArchivePayloadV1DeployTimeoutMinutes.g.cs @@ -0,0 +1,20 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// Deploy timeout in minutes; allowed range 10 to 1440. Server default applies if unset.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ public sealed partial class DeploymentArchivePayloadV1DeployTimeoutMinutes + { + + /// + /// 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/Generated/Baseten.Models.DeploymentArchivePayloadV1DeploymentName.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.DeploymentArchivePayloadV1DeploymentName.Json.g.cs new file mode 100644 index 0000000..e7eeaef --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.DeploymentArchivePayloadV1DeploymentName.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class DeploymentArchivePayloadV1DeploymentName + { + /// + /// 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.DeploymentArchivePayloadV1DeploymentName? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.DeploymentArchivePayloadV1DeploymentName), + jsonSerializerContext) as global::Baseten.DeploymentArchivePayloadV1DeploymentName; + } + + /// + /// 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.DeploymentArchivePayloadV1DeploymentName? 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.DeploymentArchivePayloadV1DeploymentName), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.DeploymentArchivePayloadV1DeploymentName; + } + + /// + /// 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.DeploymentArchivePayloadV1DeploymentName.g.cs b/src/libs/Baseten/Generated/Baseten.Models.DeploymentArchivePayloadV1DeploymentName.g.cs new file mode 100644 index 0000000..76e25fe --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.DeploymentArchivePayloadV1DeploymentName.g.cs @@ -0,0 +1,20 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// Optional human-readable name for the deployment.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ public sealed partial class DeploymentArchivePayloadV1DeploymentName + { + + /// + /// 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/Generated/Baseten.Models.DeploymentArchivePayloadV1EnvironmentName.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.DeploymentArchivePayloadV1EnvironmentName.Json.g.cs new file mode 100644 index 0000000..edf9c21 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.DeploymentArchivePayloadV1EnvironmentName.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class DeploymentArchivePayloadV1EnvironmentName + { + /// + /// 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.DeploymentArchivePayloadV1EnvironmentName? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.DeploymentArchivePayloadV1EnvironmentName), + jsonSerializerContext) as global::Baseten.DeploymentArchivePayloadV1EnvironmentName; + } + + /// + /// 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.DeploymentArchivePayloadV1EnvironmentName? 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.DeploymentArchivePayloadV1EnvironmentName), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.DeploymentArchivePayloadV1EnvironmentName; + } + + /// + /// 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.DeploymentArchivePayloadV1EnvironmentName.g.cs b/src/libs/Baseten/Generated/Baseten.Models.DeploymentArchivePayloadV1EnvironmentName.g.cs new file mode 100644 index 0000000..7425711 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.DeploymentArchivePayloadV1EnvironmentName.g.cs @@ -0,0 +1,20 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// Stable environment to push to (e.g. `production`). If unset, the deployment is created without environment selection. Caller must have push permission for the named environment.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ public sealed partial class DeploymentArchivePayloadV1EnvironmentName + { + + /// + /// 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/Generated/Baseten.Models.DeploymentArchivePayloadV1Labels.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.DeploymentArchivePayloadV1Labels.Json.g.cs new file mode 100644 index 0000000..e738c00 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.DeploymentArchivePayloadV1Labels.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class DeploymentArchivePayloadV1Labels + { + /// + /// 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.DeploymentArchivePayloadV1Labels? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.DeploymentArchivePayloadV1Labels), + jsonSerializerContext) as global::Baseten.DeploymentArchivePayloadV1Labels; + } + + /// + /// 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.DeploymentArchivePayloadV1Labels? 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.DeploymentArchivePayloadV1Labels), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.DeploymentArchivePayloadV1Labels; + } + + /// + /// 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.DeploymentArchivePayloadV1Labels.g.cs b/src/libs/Baseten/Generated/Baseten.Models.DeploymentArchivePayloadV1Labels.g.cs new file mode 100644 index 0000000..395458a --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.DeploymentArchivePayloadV1Labels.g.cs @@ -0,0 +1,20 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// User-provided key-value labels for the deployment.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ public sealed partial class DeploymentArchivePayloadV1Labels + { + + /// + /// 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/Generated/Baseten.Models.DeploymentArchivePayloadV1Labels2.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.DeploymentArchivePayloadV1Labels2.Json.g.cs new file mode 100644 index 0000000..ad18bc7 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.DeploymentArchivePayloadV1Labels2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class DeploymentArchivePayloadV1Labels2 + { + /// + /// 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.DeploymentArchivePayloadV1Labels2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.DeploymentArchivePayloadV1Labels2), + jsonSerializerContext) as global::Baseten.DeploymentArchivePayloadV1Labels2; + } + + /// + /// 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.DeploymentArchivePayloadV1Labels2? 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.DeploymentArchivePayloadV1Labels2), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.DeploymentArchivePayloadV1Labels2; + } + + /// + /// 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.DeploymentArchivePayloadV1Labels2.g.cs b/src/libs/Baseten/Generated/Baseten.Models.DeploymentArchivePayloadV1Labels2.g.cs new file mode 100644 index 0000000..f5504b2 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.DeploymentArchivePayloadV1Labels2.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// + /// + public sealed partial class DeploymentArchivePayloadV1Labels2 + { + + /// + /// 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/Generated/Baseten.Models.DeploymentArchivePayloadV1RawConfig.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.DeploymentArchivePayloadV1RawConfig.Json.g.cs new file mode 100644 index 0000000..a5f742e --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.DeploymentArchivePayloadV1RawConfig.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class DeploymentArchivePayloadV1RawConfig + { + /// + /// 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.DeploymentArchivePayloadV1RawConfig? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.DeploymentArchivePayloadV1RawConfig), + jsonSerializerContext) as global::Baseten.DeploymentArchivePayloadV1RawConfig; + } + + /// + /// 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.DeploymentArchivePayloadV1RawConfig? 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.DeploymentArchivePayloadV1RawConfig), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.DeploymentArchivePayloadV1RawConfig; + } + + /// + /// 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.DeploymentArchivePayloadV1RawConfig.g.cs b/src/libs/Baseten/Generated/Baseten.Models.DeploymentArchivePayloadV1RawConfig.g.cs new file mode 100644 index 0000000..1d84ae0 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.DeploymentArchivePayloadV1RawConfig.g.cs @@ -0,0 +1,20 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// Original config.yaml text, persisted as-is on the deployment. Best-effort: invalid raw configs are logged and dropped without failing the request.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ public sealed partial class DeploymentArchivePayloadV1RawConfig + { + + /// + /// 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/Generated/Baseten.Models.DeploymentArchivePayloadV1UserEnv.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.DeploymentArchivePayloadV1UserEnv.Json.g.cs new file mode 100644 index 0000000..254a448 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.DeploymentArchivePayloadV1UserEnv.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class DeploymentArchivePayloadV1UserEnv + { + /// + /// 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.DeploymentArchivePayloadV1UserEnv? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.DeploymentArchivePayloadV1UserEnv), + jsonSerializerContext) as global::Baseten.DeploymentArchivePayloadV1UserEnv; + } + + /// + /// 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.DeploymentArchivePayloadV1UserEnv? 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.DeploymentArchivePayloadV1UserEnv), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.DeploymentArchivePayloadV1UserEnv; + } + + /// + /// 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.DeploymentArchivePayloadV1UserEnv.g.cs b/src/libs/Baseten/Generated/Baseten.Models.DeploymentArchivePayloadV1UserEnv.g.cs new file mode 100644 index 0000000..2e1a396 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.DeploymentArchivePayloadV1UserEnv.g.cs @@ -0,0 +1,20 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// Client environment metadata (e.g. client version, Python version). Validated server-side.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ public sealed partial class DeploymentArchivePayloadV1UserEnv + { + + /// + /// 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/Generated/Baseten.Models.DeploymentArchivePayloadV1UserEnv2.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.DeploymentArchivePayloadV1UserEnv2.Json.g.cs new file mode 100644 index 0000000..d032451 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.DeploymentArchivePayloadV1UserEnv2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class DeploymentArchivePayloadV1UserEnv2 + { + /// + /// 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.DeploymentArchivePayloadV1UserEnv2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.DeploymentArchivePayloadV1UserEnv2), + jsonSerializerContext) as global::Baseten.DeploymentArchivePayloadV1UserEnv2; + } + + /// + /// 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.DeploymentArchivePayloadV1UserEnv2? 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.DeploymentArchivePayloadV1UserEnv2), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.DeploymentArchivePayloadV1UserEnv2; + } + + /// + /// 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.DeploymentArchivePayloadV1UserEnv2.g.cs b/src/libs/Baseten/Generated/Baseten.Models.DeploymentArchivePayloadV1UserEnv2.g.cs new file mode 100644 index 0000000..e3f4ffd --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.DeploymentArchivePayloadV1UserEnv2.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// + /// + public sealed partial class DeploymentArchivePayloadV1UserEnv2 + { + + /// + /// 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/Generated/Baseten.Models.DeploymentArchiveSourceV1.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.DeploymentArchiveSourceV1.Json.g.cs new file mode 100644 index 0000000..6b9400f --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.DeploymentArchiveSourceV1.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class DeploymentArchiveSourceV1 + { + /// + /// 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.DeploymentArchiveSourceV1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.DeploymentArchiveSourceV1), + jsonSerializerContext) as global::Baseten.DeploymentArchiveSourceV1; + } + + /// + /// 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.DeploymentArchiveSourceV1? 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.DeploymentArchiveSourceV1), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.DeploymentArchiveSourceV1; + } + + /// + /// 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.DeploymentArchiveSourceV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.DeploymentArchiveSourceV1.g.cs new file mode 100644 index 0000000..32e4c57 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.DeploymentArchiveSourceV1.g.cs @@ -0,0 +1,71 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// Add a deployment from an archive previously uploaded via the credentials
+ /// issued by `POST /v1/prepare_model_upload`. + ///
+ public sealed partial class DeploymentArchiveSourceV1 + { + /// + /// Default Value: model_archive + /// + [global::System.Text.Json.Serialization.JsonPropertyName("kind")] + public string? Kind { get; set; } + + /// + /// Deployment-level configuration. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("deployment")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Baseten.DeploymentArchivePayloadV1 Deployment { get; set; } + + /// + /// S3 key of the uploaded archive, from the credentials returned by `POST /v1/prepare_model_upload`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("s3_key")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string S3Key { 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. + /// + /// + /// Deployment-level configuration. + /// + /// + /// S3 key of the uploaded archive, from the credentials returned by `POST /v1/prepare_model_upload`. + /// + /// + /// Default Value: model_archive + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public DeploymentArchiveSourceV1( + global::Baseten.DeploymentArchivePayloadV1 deployment, + string s3Key, + string? kind) + { + this.Kind = kind; + this.Deployment = deployment ?? throw new global::System.ArgumentNullException(nameof(deployment)); + this.S3Key = s3Key ?? throw new global::System.ArgumentNullException(nameof(s3Key)); + } + + /// + /// Initializes a new instance of the class. + /// + public DeploymentArchiveSourceV1() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.LibraryListingSourceV1.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.LibraryListingSourceV1.Json.g.cs new file mode 100644 index 0000000..dc8bedb --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.LibraryListingSourceV1.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class LibraryListingSourceV1 + { + /// + /// 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.LibraryListingSourceV1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.LibraryListingSourceV1), + jsonSerializerContext) as global::Baseten.LibraryListingSourceV1; + } + + /// + /// 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.LibraryListingSourceV1? 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.LibraryListingSourceV1), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.LibraryListingSourceV1; + } + + /// + /// 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.LibraryListingSourceV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.LibraryListingSourceV1.g.cs new file mode 100644 index 0000000..081289d --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.LibraryListingSourceV1.g.cs @@ -0,0 +1,83 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// Create a model by forking a library listing accessible to the caller's organization. + /// + public sealed partial class LibraryListingSourceV1 + { + /// + /// Default Value: library_listing + /// + [global::System.Text.Json.Serialization.JsonPropertyName("kind")] + public string? Kind { get; set; } + + /// + /// Identifier of the publishing organization, as returned by `GET /v1/library_models`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("org_foundation_name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string OrgFoundationName { get; set; } + + /// + /// Listing identifier within the publishing organization. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("user_defined_listing_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string UserDefinedListingId { get; set; } + + /// + /// Optional name for the new deployed model. Defaults to the listing's configured name.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("deployed_model_name")] + public string? DeployedModelName { 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. + /// + /// + /// Identifier of the publishing organization, as returned by `GET /v1/library_models`. + /// + /// + /// Listing identifier within the publishing organization. + /// + /// + /// Default Value: library_listing + /// + /// + /// Optional name for the new deployed model. Defaults to the listing's configured name.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public LibraryListingSourceV1( + string orgFoundationName, + string userDefinedListingId, + string? kind, + string? deployedModelName) + { + this.Kind = kind; + this.OrgFoundationName = orgFoundationName ?? throw new global::System.ArgumentNullException(nameof(orgFoundationName)); + this.UserDefinedListingId = userDefinedListingId ?? throw new global::System.ArgumentNullException(nameof(userDefinedListingId)); + this.DeployedModelName = deployedModelName; + } + + /// + /// Initializes a new instance of the class. + /// + public LibraryListingSourceV1() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.LibraryListingSourceV1DeployedModelName.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.LibraryListingSourceV1DeployedModelName.Json.g.cs new file mode 100644 index 0000000..6b3c529 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.LibraryListingSourceV1DeployedModelName.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class LibraryListingSourceV1DeployedModelName + { + /// + /// 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.LibraryListingSourceV1DeployedModelName? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.LibraryListingSourceV1DeployedModelName), + jsonSerializerContext) as global::Baseten.LibraryListingSourceV1DeployedModelName; + } + + /// + /// 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.LibraryListingSourceV1DeployedModelName? 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.LibraryListingSourceV1DeployedModelName), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.LibraryListingSourceV1DeployedModelName; + } + + /// + /// 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.LibraryListingSourceV1DeployedModelName.g.cs b/src/libs/Baseten/Generated/Baseten.Models.LibraryListingSourceV1DeployedModelName.g.cs new file mode 100644 index 0000000..3dab52d --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.LibraryListingSourceV1DeployedModelName.g.cs @@ -0,0 +1,20 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// Optional name for the new deployed model. Defaults to the listing's configured name.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ public sealed partial class LibraryListingSourceV1DeployedModelName + { + + /// + /// 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/Generated/Baseten.Models.ModelArchiveSourceV1.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.ModelArchiveSourceV1.Json.g.cs new file mode 100644 index 0000000..5fb1787 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.ModelArchiveSourceV1.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class ModelArchiveSourceV1 + { + /// + /// 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.ModelArchiveSourceV1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.ModelArchiveSourceV1), + jsonSerializerContext) as global::Baseten.ModelArchiveSourceV1; + } + + /// + /// 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.ModelArchiveSourceV1? 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.ModelArchiveSourceV1), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.ModelArchiveSourceV1; + } + + /// + /// 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.ModelArchiveSourceV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.ModelArchiveSourceV1.g.cs new file mode 100644 index 0000000..2441e12 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.ModelArchiveSourceV1.g.cs @@ -0,0 +1,109 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// Create a model from an archive previously uploaded via the credentials
+ /// issued by `POST /v1/prepare_model_upload`. + ///
+ public sealed partial class ModelArchiveSourceV1 + { + /// + /// Default Value: model_archive + /// + [global::System.Text.Json.Serialization.JsonPropertyName("kind")] + public string? Kind { get; set; } + + /// + /// Name of the new model. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Name { get; set; } + + /// + /// Deployment-level configuration for the model's first deployment. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("deployment")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Baseten.DeploymentArchivePayloadV1 Deployment { get; set; } + + /// + /// S3 key of the uploaded archive, from the credentials returned by `POST /v1/prepare_model_upload`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("s3_key")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string S3Key { get; set; } + + /// + /// If true, the uploaded archive is not downloadable after creation. Locked at model creation; cannot be changed by subsequent deployments.
+ /// Default Value: false + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("disable_archive_download")] + public bool? DisableArchiveDownload { get; set; } + + /// + /// If true, push as a development deployment (the model's single mutable dev slot; overwrites any existing development deployment). The following `deployment` fields must be left at their defaults: `environment_name`, `preserve_env_instance_type`, `deployment_name`.
+ /// Default Value: false + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("is_development")] + public bool? IsDevelopment { 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. + /// + /// + /// Name of the new model. + /// + /// + /// Deployment-level configuration for the model's first deployment. + /// + /// + /// S3 key of the uploaded archive, from the credentials returned by `POST /v1/prepare_model_upload`. + /// + /// + /// Default Value: model_archive + /// + /// + /// If true, the uploaded archive is not downloadable after creation. Locked at model creation; cannot be changed by subsequent deployments.
+ /// Default Value: false + /// + /// + /// If true, push as a development deployment (the model's single mutable dev slot; overwrites any existing development deployment). The following `deployment` fields must be left at their defaults: `environment_name`, `preserve_env_instance_type`, `deployment_name`.
+ /// Default Value: false + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ModelArchiveSourceV1( + string name, + global::Baseten.DeploymentArchivePayloadV1 deployment, + string s3Key, + string? kind, + bool? disableArchiveDownload, + bool? isDevelopment) + { + this.Kind = kind; + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.Deployment = deployment ?? throw new global::System.ArgumentNullException(nameof(deployment)); + this.S3Key = s3Key ?? throw new global::System.ArgumentNullException(nameof(s3Key)); + this.DisableArchiveDownload = disableArchiveDownload; + this.IsDevelopment = isDevelopment; + } + + /// + /// Initializes a new instance of the class. + /// + public ModelArchiveSourceV1() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.PrepareModelUploadRequestV1.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.PrepareModelUploadRequestV1.Json.g.cs new file mode 100644 index 0000000..fecf322 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.PrepareModelUploadRequestV1.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class PrepareModelUploadRequestV1 + { + /// + /// 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.PrepareModelUploadRequestV1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.PrepareModelUploadRequestV1), + jsonSerializerContext) as global::Baseten.PrepareModelUploadRequestV1; + } + + /// + /// 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.PrepareModelUploadRequestV1? 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.PrepareModelUploadRequestV1), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.PrepareModelUploadRequestV1; + } + + /// + /// 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.PrepareModelUploadRequestV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.PrepareModelUploadRequestV1.g.cs new file mode 100644 index 0000000..01047ef --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.PrepareModelUploadRequestV1.g.cs @@ -0,0 +1,117 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// Body for `POST /v1/prepare_model_upload`.
+ /// Validates the same payload the commit endpoint will validate, and on
+ /// `dry_run=false` issues STS upload credentials. Exactly one of `name` or
+ /// `model_id` is required: `name` validates the new-model path (`POST
+ /// /v1/models`); `model_id` validates the add-deployment path (`POST
+ /// /v1/models/{model_id}/deployments`). + ///
+ public sealed partial class PrepareModelUploadRequestV1 + { + /// + /// Deployment-level payload, identical to the payload sent at commit. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("deployment")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Baseten.DeploymentArchivePayloadV1 Deployment { get; set; } + + /// + /// Set to validate a new-model push. Exactly one of `name` or `model_id` is required.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("name")] + public string? Name { get; set; } + + /// + /// Team the new model will belong to. Only valid when `name` is set; defaults to the organization's default team when omitted. Must not be set when `model_id` is set (the existing model already has a team).
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("team_id")] + public string? TeamId { get; set; } + + /// + /// Set to validate an add-deployment push to an existing model. Exactly one of `name` or `model_id` is required.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("model_id")] + public string? ModelId { get; set; } + + /// + /// If true, validate the payload only and do not issue upload credentials. The response sets `creds`, `s3_bucket`, and `s3_key` to `null`.
+ /// Default Value: false + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("dry_run")] + public bool? DryRun { get; set; } + + /// + /// If true, validate a development-deployment push. Only valid when `name` is set. The following `deployment` fields must be left at their defaults: `environment_name`, `preserve_env_instance_type`, `deployment_name`.
+ /// Default Value: false + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("is_development")] + public bool? IsDevelopment { 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. + /// + /// + /// Deployment-level payload, identical to the payload sent at commit. + /// + /// + /// Set to validate a new-model push. Exactly one of `name` or `model_id` is required.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// + /// + /// Team the new model will belong to. Only valid when `name` is set; defaults to the organization's default team when omitted. Must not be set when `model_id` is set (the existing model already has a team).
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// + /// + /// Set to validate an add-deployment push to an existing model. Exactly one of `name` or `model_id` is required.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// + /// + /// If true, validate the payload only and do not issue upload credentials. The response sets `creds`, `s3_bucket`, and `s3_key` to `null`.
+ /// Default Value: false + /// + /// + /// If true, validate a development-deployment push. Only valid when `name` is set. The following `deployment` fields must be left at their defaults: `environment_name`, `preserve_env_instance_type`, `deployment_name`.
+ /// Default Value: false + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public PrepareModelUploadRequestV1( + global::Baseten.DeploymentArchivePayloadV1 deployment, + string? name, + string? teamId, + string? modelId, + bool? dryRun, + bool? isDevelopment) + { + this.Deployment = deployment ?? throw new global::System.ArgumentNullException(nameof(deployment)); + this.Name = name; + this.TeamId = teamId; + this.ModelId = modelId; + this.DryRun = dryRun; + this.IsDevelopment = isDevelopment; + } + + /// + /// Initializes a new instance of the class. + /// + public PrepareModelUploadRequestV1() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.PrepareModelUploadRequestV1ModelId.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.PrepareModelUploadRequestV1ModelId.Json.g.cs new file mode 100644 index 0000000..03eff13 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.PrepareModelUploadRequestV1ModelId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class PrepareModelUploadRequestV1ModelId + { + /// + /// 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.PrepareModelUploadRequestV1ModelId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.PrepareModelUploadRequestV1ModelId), + jsonSerializerContext) as global::Baseten.PrepareModelUploadRequestV1ModelId; + } + + /// + /// 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.PrepareModelUploadRequestV1ModelId? 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.PrepareModelUploadRequestV1ModelId), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.PrepareModelUploadRequestV1ModelId; + } + + /// + /// 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.PrepareModelUploadRequestV1ModelId.g.cs b/src/libs/Baseten/Generated/Baseten.Models.PrepareModelUploadRequestV1ModelId.g.cs new file mode 100644 index 0000000..f064b99 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.PrepareModelUploadRequestV1ModelId.g.cs @@ -0,0 +1,20 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// Set to validate an add-deployment push to an existing model. Exactly one of `name` or `model_id` is required.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ public sealed partial class PrepareModelUploadRequestV1ModelId + { + + /// + /// 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/Generated/Baseten.Models.PrepareModelUploadRequestV1Name.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.PrepareModelUploadRequestV1Name.Json.g.cs new file mode 100644 index 0000000..5aa028a --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.PrepareModelUploadRequestV1Name.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class PrepareModelUploadRequestV1Name + { + /// + /// 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.PrepareModelUploadRequestV1Name? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.PrepareModelUploadRequestV1Name), + jsonSerializerContext) as global::Baseten.PrepareModelUploadRequestV1Name; + } + + /// + /// 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.PrepareModelUploadRequestV1Name? 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.PrepareModelUploadRequestV1Name), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.PrepareModelUploadRequestV1Name; + } + + /// + /// 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.PrepareModelUploadRequestV1Name.g.cs b/src/libs/Baseten/Generated/Baseten.Models.PrepareModelUploadRequestV1Name.g.cs new file mode 100644 index 0000000..d6dd534 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.PrepareModelUploadRequestV1Name.g.cs @@ -0,0 +1,20 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// Set to validate a new-model push. Exactly one of `name` or `model_id` is required.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ public sealed partial class PrepareModelUploadRequestV1Name + { + + /// + /// 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/Generated/Baseten.Models.PrepareModelUploadRequestV1TeamId.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.PrepareModelUploadRequestV1TeamId.Json.g.cs new file mode 100644 index 0000000..f291790 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.PrepareModelUploadRequestV1TeamId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class PrepareModelUploadRequestV1TeamId + { + /// + /// 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.PrepareModelUploadRequestV1TeamId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.PrepareModelUploadRequestV1TeamId), + jsonSerializerContext) as global::Baseten.PrepareModelUploadRequestV1TeamId; + } + + /// + /// 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.PrepareModelUploadRequestV1TeamId? 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.PrepareModelUploadRequestV1TeamId), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.PrepareModelUploadRequestV1TeamId; + } + + /// + /// 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.PrepareModelUploadRequestV1TeamId.g.cs b/src/libs/Baseten/Generated/Baseten.Models.PrepareModelUploadRequestV1TeamId.g.cs new file mode 100644 index 0000000..3b5544f --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.PrepareModelUploadRequestV1TeamId.g.cs @@ -0,0 +1,20 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// Team the new model will belong to. Only valid when `name` is set; defaults to the organization's default team when omitted. Must not be set when `model_id` is set (the existing model already has a team).
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ public sealed partial class PrepareModelUploadRequestV1TeamId + { + + /// + /// 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/Generated/Baseten.Models.PrepareModelUploadResponseV1.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.PrepareModelUploadResponseV1.Json.g.cs new file mode 100644 index 0000000..ac72b62 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.PrepareModelUploadResponseV1.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class PrepareModelUploadResponseV1 + { + /// + /// 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.PrepareModelUploadResponseV1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.PrepareModelUploadResponseV1), + jsonSerializerContext) as global::Baseten.PrepareModelUploadResponseV1; + } + + /// + /// 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.PrepareModelUploadResponseV1? 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.PrepareModelUploadResponseV1), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.PrepareModelUploadResponseV1; + } + + /// + /// 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.PrepareModelUploadResponseV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.PrepareModelUploadResponseV1.g.cs new file mode 100644 index 0000000..2c9237a --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.PrepareModelUploadResponseV1.g.cs @@ -0,0 +1,90 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// Response from `POST /v1/prepare_model_upload`.
+ /// On success with `dry_run=false`, returns STS upload credentials. On success
+ /// with `dry_run=true`, `creds`, `s3_bucket`, and `s3_key` are `null` and only
+ /// validation has run. + ///
+ public sealed partial class PrepareModelUploadResponseV1 + { + /// + /// STS credentials to upload the model archive.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("creds")] + public global::Baseten.AWSCredentialsV1? Creds { get; set; } + + /// + /// S3 bucket the credentials are scoped to.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("s3_bucket")] + public string? S3Bucket { get; set; } + + /// + /// S3 key the credentials are scoped to. Pass this to `POST /v1/models` (in the `model_archive` source) once the upload completes.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("s3_key")] + public string? S3Key { get; set; } + + /// + /// AWS region the S3 bucket resides in.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("s3_region")] + public string? S3Region { 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. + /// + /// + /// STS credentials to upload the model archive.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// + /// + /// S3 bucket the credentials are scoped to.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// + /// + /// S3 key the credentials are scoped to. Pass this to `POST /v1/models` (in the `model_archive` source) once the upload completes.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// + /// + /// AWS region the S3 bucket resides in.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public PrepareModelUploadResponseV1( + global::Baseten.AWSCredentialsV1? creds, + string? s3Bucket, + string? s3Key, + string? s3Region) + { + this.Creds = creds; + this.S3Bucket = s3Bucket; + this.S3Key = s3Key; + this.S3Region = s3Region; + } + + /// + /// Initializes a new instance of the class. + /// + public PrepareModelUploadResponseV1() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.PrepareModelUploadResponseV1Creds.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.PrepareModelUploadResponseV1Creds.Json.g.cs new file mode 100644 index 0000000..d881c0c --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.PrepareModelUploadResponseV1Creds.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class PrepareModelUploadResponseV1Creds + { + /// + /// 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.PrepareModelUploadResponseV1Creds? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.PrepareModelUploadResponseV1Creds), + jsonSerializerContext) as global::Baseten.PrepareModelUploadResponseV1Creds; + } + + /// + /// 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.PrepareModelUploadResponseV1Creds? 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.PrepareModelUploadResponseV1Creds), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.PrepareModelUploadResponseV1Creds; + } + + /// + /// 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.PrepareModelUploadResponseV1Creds.g.cs b/src/libs/Baseten/Generated/Baseten.Models.PrepareModelUploadResponseV1Creds.g.cs new file mode 100644 index 0000000..76b35f0 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.PrepareModelUploadResponseV1Creds.g.cs @@ -0,0 +1,20 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// STS credentials to upload the model archive.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ public sealed partial class PrepareModelUploadResponseV1Creds + { + + /// + /// 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/Generated/Baseten.Models.PrepareModelUploadResponseV1S3Bucket.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.PrepareModelUploadResponseV1S3Bucket.Json.g.cs new file mode 100644 index 0000000..8729e4c --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.PrepareModelUploadResponseV1S3Bucket.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class PrepareModelUploadResponseV1S3Bucket + { + /// + /// 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.PrepareModelUploadResponseV1S3Bucket? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.PrepareModelUploadResponseV1S3Bucket), + jsonSerializerContext) as global::Baseten.PrepareModelUploadResponseV1S3Bucket; + } + + /// + /// 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.PrepareModelUploadResponseV1S3Bucket? 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.PrepareModelUploadResponseV1S3Bucket), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.PrepareModelUploadResponseV1S3Bucket; + } + + /// + /// 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.PrepareModelUploadResponseV1S3Bucket.g.cs b/src/libs/Baseten/Generated/Baseten.Models.PrepareModelUploadResponseV1S3Bucket.g.cs new file mode 100644 index 0000000..df568bc --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.PrepareModelUploadResponseV1S3Bucket.g.cs @@ -0,0 +1,20 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// S3 bucket the credentials are scoped to.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ public sealed partial class PrepareModelUploadResponseV1S3Bucket + { + + /// + /// 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/Generated/Baseten.Models.PrepareModelUploadResponseV1S3Key.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.PrepareModelUploadResponseV1S3Key.Json.g.cs new file mode 100644 index 0000000..2705bc8 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.PrepareModelUploadResponseV1S3Key.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class PrepareModelUploadResponseV1S3Key + { + /// + /// 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.PrepareModelUploadResponseV1S3Key? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.PrepareModelUploadResponseV1S3Key), + jsonSerializerContext) as global::Baseten.PrepareModelUploadResponseV1S3Key; + } + + /// + /// 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.PrepareModelUploadResponseV1S3Key? 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.PrepareModelUploadResponseV1S3Key), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.PrepareModelUploadResponseV1S3Key; + } + + /// + /// 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.PrepareModelUploadResponseV1S3Key.g.cs b/src/libs/Baseten/Generated/Baseten.Models.PrepareModelUploadResponseV1S3Key.g.cs new file mode 100644 index 0000000..b4c077e --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.PrepareModelUploadResponseV1S3Key.g.cs @@ -0,0 +1,20 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// S3 key the credentials are scoped to. Pass this to `POST /v1/models` (in the `model_archive` source) once the upload completes.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ public sealed partial class PrepareModelUploadResponseV1S3Key + { + + /// + /// 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/Generated/Baseten.Models.PrepareModelUploadResponseV1S3Region.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.PrepareModelUploadResponseV1S3Region.Json.g.cs new file mode 100644 index 0000000..d861107 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.PrepareModelUploadResponseV1S3Region.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class PrepareModelUploadResponseV1S3Region + { + /// + /// 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.PrepareModelUploadResponseV1S3Region? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.PrepareModelUploadResponseV1S3Region), + jsonSerializerContext) as global::Baseten.PrepareModelUploadResponseV1S3Region; + } + + /// + /// 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.PrepareModelUploadResponseV1S3Region? 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.PrepareModelUploadResponseV1S3Region), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.PrepareModelUploadResponseV1S3Region; + } + + /// + /// 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.PrepareModelUploadResponseV1S3Region.g.cs b/src/libs/Baseten/Generated/Baseten.Models.PrepareModelUploadResponseV1S3Region.g.cs new file mode 100644 index 0000000..feefb2b --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.PrepareModelUploadResponseV1S3Region.g.cs @@ -0,0 +1,20 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// AWS region the S3 bucket resides in.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ public sealed partial class PrepareModelUploadResponseV1S3Region + { + + /// + /// 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/Generated/Baseten.Models.SecretTombstoneV1.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.SecretTombstoneV1.Json.g.cs new file mode 100644 index 0000000..edafddd --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.SecretTombstoneV1.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class SecretTombstoneV1 + { + /// + /// 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.SecretTombstoneV1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.SecretTombstoneV1), + jsonSerializerContext) as global::Baseten.SecretTombstoneV1; + } + + /// + /// 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.SecretTombstoneV1? 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.SecretTombstoneV1), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.SecretTombstoneV1; + } + + /// + /// 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.SecretTombstoneV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.SecretTombstoneV1.g.cs new file mode 100644 index 0000000..fda50a4 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.SecretTombstoneV1.g.cs @@ -0,0 +1,47 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// A secret tombstone. + /// + public sealed partial class SecretTombstoneV1 + { + /// + /// Name of the deleted secret + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Name { 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. + /// + /// + /// Name of the deleted secret + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public SecretTombstoneV1( + string name) + { + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + } + + /// + /// Initializes a new instance of the class. + /// + public SecretTombstoneV1() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.Source.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.Source.Json.g.cs new file mode 100644 index 0000000..b6e476a --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.Source.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public readonly partial struct Source + { + /// + /// 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.Source? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.Source), + jsonSerializerContext) as global::Baseten.Source?; + } + + /// + /// 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.Source? 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.Source), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.Source?; + } + + /// + /// 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.Source.g.cs b/src/libs/Baseten/Generated/Baseten.Models.Source.g.cs new file mode 100644 index 0000000..9d97333 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.Source.g.cs @@ -0,0 +1,304 @@ +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace Baseten +{ + /// + /// Where the new model is created from. + /// + public readonly partial struct Source : global::System.IEquatable + { + /// + /// + /// + public global::Baseten.CreateModelRequestV1SourceDiscriminatorKind? Kind { get; } + + /// + /// Create a model by forking a library listing accessible to the caller's organization. + /// +#if NET6_0_OR_GREATER + public global::Baseten.LibraryListingSourceV1? LibraryListing { get; init; } +#else + public global::Baseten.LibraryListingSourceV1? LibraryListing { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(LibraryListing))] +#endif + public bool IsLibraryListing => LibraryListing != null; + + /// + /// + /// + public bool TryPickLibraryListing( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Baseten.LibraryListingSourceV1? value) + { + value = LibraryListing; + return IsLibraryListing; + } + + /// + /// + /// + public global::Baseten.LibraryListingSourceV1 PickLibraryListing() => IsLibraryListing + ? LibraryListing! + : throw new global::System.InvalidOperationException($"Expected union variant 'LibraryListing' but the value was {ToString()}."); + + /// + /// Create a model from an archive previously uploaded via the credentials
+ /// issued by `POST /v1/prepare_model_upload`. + ///
+#if NET6_0_OR_GREATER + public global::Baseten.ModelArchiveSourceV1? ModelArchive { get; init; } +#else + public global::Baseten.ModelArchiveSourceV1? ModelArchive { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ModelArchive))] +#endif + public bool IsModelArchive => ModelArchive != null; + + /// + /// + /// + public bool TryPickModelArchive( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Baseten.ModelArchiveSourceV1? value) + { + value = ModelArchive; + return IsModelArchive; + } + + /// + /// + /// + public global::Baseten.ModelArchiveSourceV1 PickModelArchive() => IsModelArchive + ? ModelArchive! + : throw new global::System.InvalidOperationException($"Expected union variant 'ModelArchive' but the value was {ToString()}."); + /// + /// + /// + public static implicit operator Source(global::Baseten.LibraryListingSourceV1 value) => new Source((global::Baseten.LibraryListingSourceV1?)value); + + /// + /// + /// + public static implicit operator global::Baseten.LibraryListingSourceV1?(Source @this) => @this.LibraryListing; + + /// + /// + /// + public Source(global::Baseten.LibraryListingSourceV1? value) + { + LibraryListing = value; + } + + /// + /// + /// + public static Source FromLibraryListing(global::Baseten.LibraryListingSourceV1? value) => new Source(value); + + /// + /// + /// + public static implicit operator Source(global::Baseten.ModelArchiveSourceV1 value) => new Source((global::Baseten.ModelArchiveSourceV1?)value); + + /// + /// + /// + public static implicit operator global::Baseten.ModelArchiveSourceV1?(Source @this) => @this.ModelArchive; + + /// + /// + /// + public Source(global::Baseten.ModelArchiveSourceV1? value) + { + ModelArchive = value; + } + + /// + /// + /// + public static Source FromModelArchive(global::Baseten.ModelArchiveSourceV1? value) => new Source(value); + + /// + /// + /// + public Source( + global::Baseten.CreateModelRequestV1SourceDiscriminatorKind? kind, + global::Baseten.LibraryListingSourceV1? libraryListing, + global::Baseten.ModelArchiveSourceV1? modelArchive + ) + { + Kind = kind; + + LibraryListing = libraryListing; + ModelArchive = modelArchive; + } + + /// + /// + /// + public object? Object => + ModelArchive as object ?? + LibraryListing as object + ; + + /// + /// + /// + public override string? ToString() => + LibraryListing?.ToString() ?? + ModelArchive?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsLibraryListing && !IsModelArchive || !IsLibraryListing && IsModelArchive; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? libraryListing = null, + global::System.Func? modelArchive = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsLibraryListing && libraryListing != null) + { + return libraryListing(LibraryListing!); + } + else if (IsModelArchive && modelArchive != null) + { + return modelArchive(ModelArchive!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? libraryListing = null, + + global::System.Action? modelArchive = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsLibraryListing) + { + libraryListing?.Invoke(LibraryListing!); + } + else if (IsModelArchive) + { + modelArchive?.Invoke(ModelArchive!); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? libraryListing = null, + global::System.Action? modelArchive = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsLibraryListing) + { + libraryListing?.Invoke(LibraryListing!); + } + else if (IsModelArchive) + { + modelArchive?.Invoke(ModelArchive!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + LibraryListing, + typeof(global::Baseten.LibraryListingSourceV1), + ModelArchive, + typeof(global::Baseten.ModelArchiveSourceV1), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + + return global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(Source other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(LibraryListing, other.LibraryListing) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ModelArchive, other.ModelArchive) + ; + } + + /// + /// + /// + public static bool operator ==(Source obj1, Source obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(Source obj1, Source obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is Source o && Equals(o); + } + } +} diff --git a/src/libs/Baseten/openapi.yaml b/src/libs/Baseten/openapi.yaml index bc624b0..e76a4ff 100644 --- a/src/libs/Baseten/openapi.yaml +++ b/src/libs/Baseten/openapi.yaml @@ -78,6 +78,39 @@ } } }, + "/v1/secrets/{secret_name}": { + "delete": { + "summary": "Deletes a secret by name", + "x-codeSamples": [ + { + "lang": "bash", + "source": "curl --request DELETE \\\n--url https://api.baseten.co/v1/secrets/{secret_name} \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n" + }, + { + "lang": "python", + "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"\")\nurl = \"https://api.baseten.co/v1/secrets/{secret_name}\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n \"DELETE\",\n url,\n headers=headers,\n json={}\n)\n\nprint(response.text)" + } + ], + "description": "Deletes a secret by name in the specified team, or in the caller's organization default team when no team is specified.", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SecretTombstoneV1" + } + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/secret_name" + } + ] + }, "/v1/teams/{team_id}/secrets": { "get": { "summary": "Gets all secrets for a team (metadata only, no plain text keys)", @@ -146,6 +179,42 @@ } } }, + "/v1/teams/{team_id}/secrets/{secret_name}": { + "delete": { + "summary": "Deletes a secret by name", + "x-codeSamples": [ + { + "lang": "bash", + "source": "curl --request DELETE \\\n--url https://api.baseten.co/v1/teams/{team_id}/secrets/{secret_name} \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n" + }, + { + "lang": "python", + "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"\")\nurl = \"https://api.baseten.co/v1/teams/{team_id}/secrets/{secret_name}\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n \"DELETE\",\n url,\n headers=headers,\n json={}\n)\n\nprint(response.text)" + } + ], + "description": "Deletes a secret by name in the specified team, or in the caller's organization default team when no team is specified.", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SecretTombstoneV1" + } + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/team_id" + }, + { + "$ref": "#/components/parameters/secret_name" + } + ] + }, "/v1/teams": { "get": { "summary": "Lists all teams", @@ -228,6 +297,43 @@ } } }, + "/v1/prepare_model_upload": { + "post": { + "summary": "Validates a model push payload and issues upload credentials", + "x-codeSamples": [ + { + "lang": "bash", + "source": "curl --request POST \\\n--url https://api.baseten.co/v1/prepare_model_upload \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\" \\\n--data '{\n \"deployment\": {\n \"config\": null,\n \"raw_config\": null,\n \"user_env\": null,\n \"environment_name\": null,\n \"preserve_env_instance_type\": null,\n \"deploy_timeout_minutes\": null,\n \"deployment_name\": null,\n \"labels\": null\n },\n \"name\": null,\n \"team_id\": null,\n \"model_id\": null,\n \"dry_run\": null,\n \"is_development\": null\n}'" + }, + { + "lang": "python", + "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"\")\nurl = \"https://api.baseten.co/v1/prepare_model_upload\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n \"POST\",\n url,\n headers=headers,\n json={'deployment': {'config': None, 'raw_config': None, 'user_env': None, 'environment_name': None, 'preserve_env_instance_type': None, 'deploy_timeout_minutes': None, 'deployment_name': None, 'labels': None}, 'name': None, 'team_id': None, 'model_id': None, 'dry_run': None, 'is_development': None}\n)\n\nprint(response.text)" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PrepareModelUploadRequestV1" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PrepareModelUploadResponseV1" + } + } + } + } + } + } + }, "/v1/models": { "get": { "summary": "Gets all models", @@ -253,6 +359,42 @@ } } } + }, + "post": { + "summary": "Creates a new model from a source", + "x-codeSamples": [ + { + "lang": "bash", + "source": "curl --request POST \\\n--url https://api.baseten.co/v1/models \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\" \\\n--data '{\n \"source\": null\n}'" + }, + { + "lang": "python", + "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"\")\nurl = \"https://api.baseten.co/v1/models\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n \"POST\",\n url,\n headers=headers,\n json={'source': None}\n)\n\nprint(response.text)" + } + ], + "description": "Creates a new model in the caller's organization. The `source` field selects how the model is constructed (currently: `library_listing` \u2014 fork an accessible listing from `GET /v1/library_models`). The deployment isn't instantly ready \u2014 poll GET endpoint until status is ACTIVE.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateModelRequestV1" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreatedModelDeploymentV1" + } + } + } + } + } } }, "/v1/teams/{team_id}/models": { @@ -285,7 +427,43 @@ { "$ref": "#/components/parameters/team_id" } - ] + ], + "post": { + "summary": "Creates a new model from a source", + "x-codeSamples": [ + { + "lang": "bash", + "source": "curl --request POST \\\n--url https://api.baseten.co/v1/teams/{team_id}/models \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\" \\\n--data '{\n \"source\": null\n}'" + }, + { + "lang": "python", + "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"\")\nurl = \"https://api.baseten.co/v1/teams/{team_id}/models\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n \"POST\",\n url,\n headers=headers,\n json={'source': None}\n)\n\nprint(response.text)" + } + ], + "description": "Creates a new model in the caller's organization. The `source` field selects how the model is constructed (currently: `library_listing` \u2014 fork an accessible listing from `GET /v1/library_models`). The deployment isn't instantly ready \u2014 poll GET endpoint until status is ACTIVE.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateModelRequestV1" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreatedModelDeploymentV1" + } + } + } + } + } + } }, "/v1/models/{model_id}": { "delete": { @@ -374,7 +552,42 @@ { "$ref": "#/components/parameters/model_id" } - ] + ], + "post": { + "summary": "Adds a new deployment to a model", + "x-codeSamples": [ + { + "lang": "bash", + "source": "curl --request POST \\\n--url https://api.baseten.co/v1/models/{model_id}/deployments \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\" \\\n--data '{\n \"source\": null\n}'" + }, + { + "lang": "python", + "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"\")\nurl = \"https://api.baseten.co/v1/models/{model_id}/deployments\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n \"POST\",\n url,\n headers=headers,\n json={'source': None}\n)\n\nprint(response.text)" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateModelDeploymentRequestV1" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreatedModelDeploymentV1" + } + } + } + } + } + } }, "/v1/models/{model_id}/deployments/development": { "get": { @@ -5103,6 +5316,21 @@ "title": "UpsertSecretRequestV1", "type": "object" }, + "SecretTombstoneV1": { + "description": "A secret tombstone.", + "properties": { + "name": { + "description": "Name of the deleted secret", + "title": "Name", + "type": "string" + } + }, + "required": [ + "name" + ], + "title": "SecretTombstoneV1", + "type": "object" + }, "TeamV1": { "description": "A team.", "properties": { @@ -5183,7 +5411,306 @@ "title": "Gpu Count", "type": "integer" }, - "gpu_type": { + "gpu_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Type of GPU on the instance type", + "title": "Gpu Type" + }, + "gpu_memory_limit_mib": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "Memory limit of the GPU on the instance type in Mebibytes", + "title": "Gpu Memory Limit Mib" + } + }, + "required": [ + "id", + "name", + "memory_limit_mib", + "millicpu_limit", + "gpu_count", + "gpu_type", + "gpu_memory_limit_mib" + ], + "title": "InstanceTypeV1", + "type": "object" + }, + "InstanceTypesV1": { + "description": "A list of instance types.", + "properties": { + "instance_types": { + "items": { + "$ref": "#/components/schemas/InstanceTypeV1" + }, + "title": "Instance Types", + "type": "array" + } + }, + "required": [ + "instance_types" + ], + "title": "InstanceTypesV1", + "type": "object" + }, + "InstanceTypeWithPriceV1": { + "properties": { + "instance_type": { + "$ref": "#/components/schemas/InstanceTypeV1", + "description": "Instance type properties." + }, + "price": { + "description": "Usage price in USD / minute.", + "title": "Price", + "type": "number" + } + }, + "required": [ + "instance_type", + "price" + ], + "title": "InstanceTypeWithPriceV1", + "type": "object" + }, + "InstanceTypePricesV1": { + "description": "A list of instance types.", + "properties": { + "instance_types": { + "items": { + "$ref": "#/components/schemas/InstanceTypeWithPriceV1" + }, + "title": "Instance Types", + "type": "array" + } + }, + "required": [ + "instance_types" + ], + "title": "InstanceTypePricesV1", + "type": "object" + }, + "DeploymentArchivePayloadV1": { + "description": "Deployment-level fields for a model-archive push.\n\nShared by every endpoint that creates a deployment from an uploaded archive:\n`POST /v1/prepare_model_upload`, the `model_archive` source on `POST\n/v1/models`, and `POST /v1/models/{model_id}/deployments`.", + "properties": { + "config": { + "additionalProperties": true, + "description": "Parsed model config as a JSON object.", + "title": "Config", + "type": "object" + }, + "raw_config": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Original config.yaml text, persisted as-is on the deployment. Best-effort: invalid raw configs are logged and dropped without failing the request.", + "title": "Raw Config" + }, + "user_env": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Client environment metadata (e.g. client version, Python version). Validated server-side.", + "title": "User Env" + }, + "environment_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Stable environment to push to (e.g. `production`). If unset, the deployment is created without environment selection. Caller must have push permission for the named environment.", + "title": "Environment Name" + }, + "preserve_env_instance_type": { + "default": true, + "description": "Retain the target environment's current instance type rather than the one in `config`. Only meaningful when `environment_name` is set and that environment already exists.", + "title": "Preserve Env Instance Type", + "type": "boolean" + }, + "deploy_timeout_minutes": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Deploy timeout in minutes; allowed range 10 to 1440. Server default applies if unset.", + "title": "Deploy Timeout Minutes" + }, + "deployment_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Optional human-readable name for the deployment.", + "title": "Deployment Name" + }, + "labels": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "default": null, + "description": "User-provided key-value labels for the deployment.", + "title": "Labels" + } + }, + "required": [ + "config" + ], + "title": "DeploymentArchivePayloadV1", + "type": "object" + }, + "PrepareModelUploadRequestV1": { + "description": "Body for `POST /v1/prepare_model_upload`.\n\nValidates the same payload the commit endpoint will validate, and on\n`dry_run=false` issues STS upload credentials. Exactly one of `name` or\n`model_id` is required: `name` validates the new-model path (`POST\n/v1/models`); `model_id` validates the add-deployment path (`POST\n/v1/models/{model_id}/deployments`).", + "properties": { + "deployment": { + "$ref": "#/components/schemas/DeploymentArchivePayloadV1", + "description": "Deployment-level payload, identical to the payload sent at commit." + }, + "name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Set to validate a new-model push. Exactly one of `name` or `model_id` is required.", + "title": "Name" + }, + "team_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Team the new model will belong to. Only valid when `name` is set; defaults to the organization's default team when omitted. Must not be set when `model_id` is set (the existing model already has a team).", + "title": "Team Id" + }, + "model_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Set to validate an add-deployment push to an existing model. Exactly one of `name` or `model_id` is required.", + "title": "Model Id" + }, + "dry_run": { + "default": false, + "description": "If true, validate the payload only and do not issue upload credentials. The response sets `creds`, `s3_bucket`, and `s3_key` to `null`.", + "title": "Dry Run", + "type": "boolean" + }, + "is_development": { + "default": false, + "description": "If true, validate a development-deployment push. Only valid when `name` is set. The following `deployment` fields must be left at their defaults: `environment_name`, `preserve_env_instance_type`, `deployment_name`.", + "title": "Is Development", + "type": "boolean" + } + }, + "required": [ + "deployment" + ], + "title": "PrepareModelUploadRequestV1", + "type": "object" + }, + "AWSCredentialsV1": { + "description": "AWS credentials", + "properties": { + "aws_access_key_id": { + "description": "The AWS access key ID", + "title": "Aws Access Key Id", + "type": "string" + }, + "aws_secret_access_key": { + "description": "The AWS secret access key", + "title": "Aws Secret Access Key", + "type": "string" + }, + "aws_session_token": { + "description": "The AWS session token", + "title": "Aws Session Token", + "type": "string" + } + }, + "required": [ + "aws_access_key_id", + "aws_secret_access_key", + "aws_session_token" + ], + "title": "AWSCredentialsV1", + "type": "object" + }, + "PrepareModelUploadResponseV1": { + "description": "Response from `POST /v1/prepare_model_upload`.\n\nOn success with `dry_run=false`, returns STS upload credentials. On success\nwith `dry_run=true`, `creds`, `s3_bucket`, and `s3_key` are `null` and only\nvalidation has run.", + "properties": { + "creds": { + "anyOf": [ + { + "$ref": "#/components/schemas/AWSCredentialsV1" + }, + { + "type": "null" + } + ], + "default": null, + "description": "STS credentials to upload the model archive." + }, + "s3_bucket": { "anyOf": [ { "type": "string" @@ -5192,85 +5719,38 @@ "type": "null" } ], - "description": "Type of GPU on the instance type", - "title": "Gpu Type" + "default": null, + "description": "S3 bucket the credentials are scoped to.", + "title": "S3 Bucket" }, - "gpu_memory_limit_mib": { + "s3_key": { "anyOf": [ { - "type": "integer" + "type": "string" }, { "type": "null" } ], - "description": "Memory limit of the GPU on the instance type in Mebibytes", - "title": "Gpu Memory Limit Mib" - } - }, - "required": [ - "id", - "name", - "memory_limit_mib", - "millicpu_limit", - "gpu_count", - "gpu_type", - "gpu_memory_limit_mib" - ], - "title": "InstanceTypeV1", - "type": "object" - }, - "InstanceTypesV1": { - "description": "A list of instance types.", - "properties": { - "instance_types": { - "items": { - "$ref": "#/components/schemas/InstanceTypeV1" - }, - "title": "Instance Types", - "type": "array" - } - }, - "required": [ - "instance_types" - ], - "title": "InstanceTypesV1", - "type": "object" - }, - "InstanceTypeWithPriceV1": { - "properties": { - "instance_type": { - "$ref": "#/components/schemas/InstanceTypeV1", - "description": "Instance type properties." + "default": null, + "description": "S3 key the credentials are scoped to. Pass this to `POST /v1/models` (in the `model_archive` source) once the upload completes.", + "title": "S3 Key" }, - "price": { - "description": "Usage price in USD / minute.", - "title": "Price", - "type": "number" - } - }, - "required": [ - "instance_type", - "price" - ], - "title": "InstanceTypeWithPriceV1", - "type": "object" - }, - "InstanceTypePricesV1": { - "description": "A list of instance types.", - "properties": { - "instance_types": { - "items": { - "$ref": "#/components/schemas/InstanceTypeWithPriceV1" - }, - "title": "Instance Types", - "type": "array" + "s3_region": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "AWS region the S3 bucket resides in.", + "title": "S3 Region" } }, - "required": [ - "instance_types" - ], - "title": "InstanceTypePricesV1", + "title": "PrepareModelUploadResponseV1", "type": "object" }, "ModelV1": { @@ -5362,25 +5842,117 @@ "title": "ModelsV1", "type": "object" }, - "ModelTombstoneV1": { - "description": "A model tombstone.", + "LibraryListingSourceV1": { + "description": "Create a model by forking a library listing accessible to the caller's organization.", "properties": { - "id": { - "description": "Unique identifier of the model", - "title": "Id", + "kind": { + "const": "library_listing", + "default": "library_listing", + "title": "Kind", "type": "string" }, - "deleted": { - "description": "Whether the model was deleted", - "title": "Deleted", + "org_foundation_name": { + "description": "Identifier of the publishing organization, as returned by `GET /v1/library_models`.", + "title": "Org Foundation Name", + "type": "string" + }, + "user_defined_listing_id": { + "description": "Listing identifier within the publishing organization.", + "title": "User Defined Listing Id", + "type": "string" + }, + "deployed_model_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Optional name for the new deployed model. Defaults to the listing's configured name.", + "title": "Deployed Model Name" + } + }, + "required": [ + "org_foundation_name", + "user_defined_listing_id" + ], + "title": "LibraryListingSourceV1", + "type": "object" + }, + "ModelArchiveSourceV1": { + "description": "Create a model from an archive previously uploaded via the credentials\nissued by `POST /v1/prepare_model_upload`.", + "properties": { + "kind": { + "const": "model_archive", + "default": "model_archive", + "title": "Kind", + "type": "string" + }, + "name": { + "description": "Name of the new model.", + "title": "Name", + "type": "string" + }, + "deployment": { + "$ref": "#/components/schemas/DeploymentArchivePayloadV1", + "description": "Deployment-level configuration for the model's first deployment." + }, + "s3_key": { + "description": "S3 key of the uploaded archive, from the credentials returned by `POST /v1/prepare_model_upload`.", + "title": "S3 Key", + "type": "string" + }, + "disable_archive_download": { + "default": false, + "description": "If true, the uploaded archive is not downloadable after creation. Locked at model creation; cannot be changed by subsequent deployments.", + "title": "Disable Archive Download", + "type": "boolean" + }, + "is_development": { + "default": false, + "description": "If true, push as a development deployment (the model's single mutable dev slot; overwrites any existing development deployment). The following `deployment` fields must be left at their defaults: `environment_name`, `preserve_env_instance_type`, `deployment_name`.", + "title": "Is Development", "type": "boolean" } }, "required": [ - "id", - "deleted" + "name", + "deployment", + "s3_key" ], - "title": "ModelTombstoneV1", + "title": "ModelArchiveSourceV1", + "type": "object" + }, + "CreateModelRequestV1": { + "description": "Body for creating a model via `POST /v1/models`.", + "properties": { + "source": { + "description": "Where the new model is created from.", + "discriminator": { + "mapping": { + "library_listing": "#/components/schemas/LibraryListingSourceV1", + "model_archive": "#/components/schemas/ModelArchiveSourceV1" + }, + "propertyName": "kind" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/LibraryListingSourceV1" + }, + { + "$ref": "#/components/schemas/ModelArchiveSourceV1" + } + ], + "title": "Source" + } + }, + "required": [ + "source" + ], + "title": "CreateModelRequestV1", "type": "object" }, "AutoscalingSettingsV1": { @@ -5592,6 +6164,46 @@ "title": "DeploymentV1", "type": "object" }, + "CreatedModelDeploymentV1": { + "description": "A newly created deployment and its model.", + "properties": { + "model": { + "$ref": "#/components/schemas/ModelV1", + "description": "The model the deployment belongs to. May have been created by this call." + }, + "deployment": { + "$ref": "#/components/schemas/DeploymentV1", + "description": "The newly created deployment." + } + }, + "required": [ + "model", + "deployment" + ], + "title": "CreatedModelDeploymentV1", + "type": "object" + }, + "ModelTombstoneV1": { + "description": "A model tombstone.", + "properties": { + "id": { + "description": "Unique identifier of the model", + "title": "Id", + "type": "string" + }, + "deleted": { + "description": "Whether the model was deleted", + "title": "Deleted", + "type": "boolean" + } + }, + "required": [ + "id", + "deleted" + ], + "title": "ModelTombstoneV1", + "type": "object" + }, "DeploymentsV1": { "description": "A list of deployments of a model.", "properties": { @@ -5610,6 +6222,57 @@ "title": "DeploymentsV1", "type": "object" }, + "DeploymentArchiveSourceV1": { + "description": "Add a deployment from an archive previously uploaded via the credentials\nissued by `POST /v1/prepare_model_upload`.", + "properties": { + "kind": { + "const": "model_archive", + "default": "model_archive", + "title": "Kind", + "type": "string" + }, + "deployment": { + "$ref": "#/components/schemas/DeploymentArchivePayloadV1", + "description": "Deployment-level configuration." + }, + "s3_key": { + "description": "S3 key of the uploaded archive, from the credentials returned by `POST /v1/prepare_model_upload`.", + "title": "S3 Key", + "type": "string" + } + }, + "required": [ + "deployment", + "s3_key" + ], + "title": "DeploymentArchiveSourceV1", + "type": "object" + }, + "CreateModelDeploymentRequestV1": { + "description": "Body for adding a deployment to an existing model via\n`POST /v1/models/{model_id}/deployments`.", + "properties": { + "source": { + "description": "Where the new deployment is created from.", + "discriminator": { + "mapping": { + "model_archive": "#/components/schemas/DeploymentArchiveSourceV1" + }, + "propertyName": "kind" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/DeploymentArchiveSourceV1" + } + ], + "title": "Source" + } + }, + "required": [ + "source" + ], + "title": "CreateModelDeploymentRequestV1", + "type": "object" + }, "DeploymentTombstoneV1": { "description": "A model deployment tombstone.", "properties": { @@ -11273,33 +11936,6 @@ "title": "GetTrainingGpuCapacityResponseV1", "type": "object" }, - "AWSCredentialsV1": { - "description": "AWS credentials", - "properties": { - "aws_access_key_id": { - "description": "The AWS access key ID", - "title": "Aws Access Key Id", - "type": "string" - }, - "aws_secret_access_key": { - "description": "The AWS secret access key", - "title": "Aws Secret Access Key", - "type": "string" - }, - "aws_session_token": { - "description": "The AWS session token", - "title": "Aws Session Token", - "type": "string" - } - }, - "required": [ - "aws_access_key_id", - "aws_secret_access_key", - "aws_session_token" - ], - "title": "AWSCredentialsV1", - "type": "object" - }, "GetBlobCredentialsResponseV1": { "description": "Response to create a new set of credentials for blob upload.", "properties": { @@ -13539,6 +14175,14 @@ } }, "parameters": { + "secret_name": { + "schema": { + "type": "string" + }, + "name": "secret_name", + "in": "path", + "required": true + }, "team_id": { "schema": { "type": "string"