From 133b75f188838ce3e529f2eec0b9ae2eff96f334 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 8 Oct 2026 00:53:01 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- ...ByModelIdDeploymentsCommandApiCommand.g.cs | 11 +- .../CreateLlmModelsCommandApiCommand.g.cs | 13 +- .../CreateLoopsRunRequestV1OptionSet.g.cs | 7 +- .../CreateLoopsRunsCommandApiCommand.g.cs | 3 + .../CreateLoopsSamplerRequestV1OptionSet.g.cs | 7 +- .../CreateLoopsSamplersCommandApiCommand.g.cs | 3 + .../CreateLoopsTrainerRequestV1OptionSet.g.cs | 79 + .../CreateLoopsTrainersCommandApiCommand.g.cs | 52 +- ...amsByTeamIdLlmModelsCommandApiCommand.g.cs | 13 +- ...amsByTeamIdLoopsRunsCommandApiCommand.g.cs | 3 + ...yTeamIdLoopsSamplersCommandApiCommand.g.cs | 3 + ...yTeamIdLoopsTrainersCommandApiCommand.g.cs | 52 +- .../Commands/ImagesApiGroupCommand.g.cs | 2 + .../ImagesCleanupImagesCommandApiCommand.g.cs | 4 +- .../ImagesDeleteImageCommandApiCommand.g.cs | 12 +- ...ImagesDeleteImageTagCommandApiCommand.g.cs | 12 +- ...gesGetImageBuildLogsCommandApiCommand.g.cs | 129 ++ .../ImagesGetImageCommandApiCommand.g.cs | 12 +- .../ImagesListImageTagsCommandApiCommand.g.cs | 4 +- .../ImagesListImagesCommandApiCommand.g.cs | 4 +- ...SandboxLibraryImagesCommandApiCommand.g.cs | 71 + .../ImagesPushImageCommandApiCommand.g.cs | 10 +- .../Commands/SandboxesApiGroupCommand.g.cs | 3 + ...ndboxesCreateSandboxCommandApiCommand.g.cs | 22 +- .../SandboxesGetSandboxCommandApiCommand.g.cs | 9 +- ...SandboxConfigurationCommandApiCommand.g.cs | 71 + ...dboxesGetSandboxLogsCommandApiCommand.g.cs | 135 ++ ...xesGetSandboxMetricsCommandApiCommand.g.cs | 130 ++ ...ndboxesUpdateSandboxCommandApiCommand.g.cs | 45 +- ...Baseten.BasetenClient.CreateLlmModels.g.cs | 8 + ...t.CreateLlmModelsByModelIdDeployments.g.cs | 12 +- ...Baseten.BasetenClient.CreateLoopsRuns.g.cs | 12 +- ...ten.BasetenClient.CreateLoopsSamplers.g.cs | 12 +- ...ten.BasetenClient.CreateLoopsTrainers.g.cs | 10 +- ...enClient.CreateTeamsByTeamIdLlmModels.g.cs | 8 + ...enClient.CreateTeamsByTeamIdLoopsRuns.g.cs | 12 +- ...ient.CreateTeamsByTeamIdLoopsSamplers.g.cs | 12 +- ...ient.CreateTeamsByTeamIdLoopsTrainers.g.cs | 10 +- ...aseten.IBasetenClient.CreateLlmModels.g.cs | 7 + ...t.CreateLlmModelsByModelIdDeployments.g.cs | 11 +- ...aseten.IBasetenClient.CreateLoopsRuns.g.cs | 11 +- ...en.IBasetenClient.CreateLoopsSamplers.g.cs | 11 +- ...en.IBasetenClient.CreateLoopsTrainers.g.cs | 4 +- ...enClient.CreateTeamsByTeamIdLlmModels.g.cs | 7 + ...enClient.CreateTeamsByTeamIdLoopsRuns.g.cs | 11 +- ...ient.CreateTeamsByTeamIdLoopsSamplers.g.cs | 11 +- ...ient.CreateTeamsByTeamIdLoopsTrainers.g.cs | 4 +- .../Baseten.IImagesClient.CleanupImages.g.cs | 4 +- .../Baseten.IImagesClient.DeleteImage.g.cs | 4 +- .../Baseten.IImagesClient.DeleteImageTag.g.cs | 4 +- .../Baseten.IImagesClient.GetImage.g.cs | 4 +- ...seten.IImagesClient.GetImageBuildLogs.g.cs | 64 + .../Baseten.IImagesClient.ListImageTags.g.cs | 4 +- .../Baseten.IImagesClient.ListImages.g.cs | 4 +- ...ImagesClient.ListSandboxLibraryImages.g.cs | 28 + .../Baseten.IImagesClient.PushImage.g.cs | 18 +- ...aseten.ISandboxesClient.CreateSandbox.g.cs | 23 +- .../Baseten.ISandboxesClient.GetSandbox.g.cs | 12 +- ...ndboxesClient.GetSandboxConfiguration.g.cs | 28 + ...seten.ISandboxesClient.GetSandboxLogs.g.cs | 70 + ...en.ISandboxesClient.GetSandboxMetrics.g.cs | 68 + ...aseten.ISandboxesClient.UpdateSandbox.g.cs | 31 +- .../Baseten.Images.JsonSerializerContext.g.cs | 75 +- .../Baseten.ImagesClient.CleanupImages.g.cs | 12 +- .../Baseten.ImagesClient.DeleteImage.g.cs | 12 +- .../Baseten.ImagesClient.DeleteImageTag.g.cs | 12 +- .../Baseten.ImagesClient.GetImage.g.cs | 12 +- ...aseten.ImagesClient.GetImageBuildLogs.g.cs | 725 ++++++++ .../Baseten.ImagesClient.ListImageTags.g.cs | 12 +- .../Baseten.ImagesClient.ListImages.g.cs | 12 +- ...ImagesClient.ListSandboxLibraryImages.g.cs | 545 ++++++ .../Baseten.ImagesClient.PushImage.g.cs | 32 +- ....JsonConverters.SandboxImageStatusV1.g.cs} | 14 +- ...verters.SandboxImageStatusV1Nullable.g.cs} | 14 +- ...Baseten.JsonConverters.SandboxImageV1.g.cs | 108 ++ ...erters.SandboxRegionV1InfoGeneration.g.cs} | 14 +- ...andboxRegionV1InfoGenerationNullable.g.cs} | 14 +- .../Baseten.JsonSerializerContext.g.cs | 102 +- .../Baseten.JsonSerializerContextTypes.g.cs | 778 +++++---- ....CleanupSandboxImagesResponseV1.Json.g.cs} | 26 +- ...odels.CleanupSandboxImagesResponseV1.g.cs} | 10 +- ...aseten.Models.CreateLLMModelRequestV1.g.cs | 15 +- ...Models.CreateLLMModelVersionRequestV1.g.cs | 15 +- ...aseten.Models.CreateLoopsRunRequestV1.g.cs | 17 +- ...en.Models.CreateLoopsSamplerRequestV1.g.cs | 15 +- ...dels.CreateLoopsTrainerRequestV1.Json.g.cs | 141 ++ ...en.Models.CreateLoopsTrainerRequestV1.g.cs | 190 +++ ...Baseten.Models.CreateSandboxRequestV1.g.cs | 45 +- ...ten.Models.EgressRestrictionsV1.Json.g.cs} | 26 +- .../Baseten.Models.EgressRestrictionsV1.g.cs | 61 + ...etSandboxConfigurationResponseV1.Json.g.cs | 141 ++ ...els.GetSandboxConfigurationResponseV1.g.cs | 47 + ...s.ListSandboxImageTagsResponseV1.Json.g.cs | 141 ++ ...odels.ListSandboxImageTagsResponseV1.g.cs} | 14 +- ...dels.ListSandboxImagesResponseV1.Json.g.cs | 141 ++ ...n.Models.ListSandboxImagesResponseV1.g.cs} | 14 +- ...stSandboxLibraryImagesResponseV1.Json.g.cs | 141 ++ ...ls.ListSandboxLibraryImagesResponseV1.g.cs | 47 + ...aseten.Models.ListSandboxesResponseV1.g.cs | 8 +- ...odels.PushSandboxImageRequestV1.Json.g.cs} | 26 +- ...ten.Models.PushSandboxImageRequestV1.g.cs} | 14 +- ...odels.PushSandboxImageResponseV1.Json.g.cs | 141 ++ ...en.Models.PushSandboxImageResponseV1.g.cs} | 20 +- ...Baseten.Models.SandboxConfigurationV1.g.cs | 42 +- .../Baseten.Models.SandboxEnvV1.g.cs | 6 +- ...en.Models.SandboxImageBuildLogV1.Json.g.cs | 141 ++ ...Baseten.Models.SandboxImageBuildLogV1.g.cs | 67 + ....SandboxImageBuildLogsResponseV1.Json.g.cs | 141 ++ ...odels.SandboxImageBuildLogsResponseV1.g.cs | 57 + ... Baseten.Models.SandboxImageStatusV1.g.cs} | 24 +- ...ten.Models.SandboxImageSummaryV1.Json.g.cs | 141 ++ ...Baseten.Models.SandboxImageSummaryV1.g.cs} | 49 +- ...aseten.Models.SandboxImageTagV1.Json.g.cs} | 26 +- ... => Baseten.Models.SandboxImageTagV1.g.cs} | 10 +- ...> Baseten.Models.SandboxImageV1.Json.g.cs} | 26 +- .../Baseten.Models.SandboxImageV1.g.cs | 297 ++++ ...en.Models.SandboxImageV1Variant2.Json.g.cs | 141 ++ ...Baseten.Models.SandboxImageV1Variant2.g.cs | 50 + ...boxLibraryImageCreationOptionsV1.Json.g.cs | 141 ++ ....SandboxLibraryImageCreationOptionsV1.g.cs | 57 + ...yImageCreationOptionsV1ExtraArgs.Json.g.cs | 141 ++ ...ibraryImageCreationOptionsV1ExtraArgs.g.cs | 19 + ...ten.Models.SandboxLibraryImageV1.Json.g.cs | 141 ++ .../Baseten.Models.SandboxLibraryImageV1.g.cs | 251 +++ ...dels.SandboxLibraryImageVolumeV1.Json.g.cs | 141 ++ ...en.Models.SandboxLibraryImageVolumeV1.g.cs | 107 ++ ...aseten.Models.SandboxLogEntryV1.Json.g.cs} | 26 +- .../Baseten.Models.SandboxLogEntryV1.g.cs | 90 + ...=> Baseten.Models.SandboxLogsV1.Json.g.cs} | 26 +- .../Baseten.Models.SandboxLogsV1.g.cs | 86 + ...ten.Models.SandboxMetricsPointV1.Json.g.cs | 141 ++ .../Baseten.Models.SandboxMetricsPointV1.g.cs | 91 + .../Baseten.Models.SandboxMetricsV1.Json.g.cs | 141 ++ .../Baseten.Models.SandboxMetricsV1.g.cs | 85 + .../Baseten.Models.SandboxRegionV1.Json.g.cs | 141 ++ .../Baseten.Models.SandboxRegionV1.g.cs | 107 ++ ...Models.SandboxRegionV1InfoGeneration.g.cs} | 24 +- .../Baseten.Models.SandboxStatusV1.g.cs | 2 +- ...dels.SandboxTTLIdleExpirationPolicyV1.g.cs | 4 +- ...ls.SandboxTTLMaxAgeExpirationPolicyV1.g.cs | 4 +- .../Generated/Baseten.Models.SandboxV1.g.cs | 6 +- .../Baseten.Models.SandboxV1Variant2.g.cs | 36 +- ...Baseten.Models.UpdateSandboxRequestV1.g.cs | 74 +- ...seten.Sandboxes.JsonSerializerContext.g.cs | 49 +- ...Baseten.SandboxesClient.CreateSandbox.g.cs | 25 +- .../Baseten.SandboxesClient.GetSandbox.g.cs | 18 +- ...ndboxesClient.GetSandboxConfiguration.g.cs | 577 +++++++ ...aseten.SandboxesClient.GetSandboxLogs.g.cs | 699 ++++++++ ...ten.SandboxesClient.GetSandboxMetrics.g.cs | 691 ++++++++ ...Baseten.SandboxesClient.UpdateSandbox.g.cs | 36 +- .../Generated/autosdk.generated-examples.json | 67 +- src/libs/Baseten/openapi.yaml | 1511 ++++++++++++++--- 152 files changed, 10929 insertions(+), 1453 deletions(-) create mode 100644 src/cli/Baseten.CLI/Commands/CreateLoopsTrainerRequestV1OptionSet.g.cs create mode 100644 src/cli/Baseten.CLI/Commands/ImagesGetImageBuildLogsCommandApiCommand.g.cs create mode 100644 src/cli/Baseten.CLI/Commands/ImagesListSandboxLibraryImagesCommandApiCommand.g.cs create mode 100644 src/cli/Baseten.CLI/Commands/SandboxesGetSandboxConfigurationCommandApiCommand.g.cs create mode 100644 src/cli/Baseten.CLI/Commands/SandboxesGetSandboxLogsCommandApiCommand.g.cs create mode 100644 src/cli/Baseten.CLI/Commands/SandboxesGetSandboxMetricsCommandApiCommand.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.IImagesClient.GetImageBuildLogs.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.IImagesClient.ListSandboxLibraryImages.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.ISandboxesClient.GetSandboxConfiguration.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.ISandboxesClient.GetSandboxLogs.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.ISandboxesClient.GetSandboxMetrics.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.ImagesClient.GetImageBuildLogs.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.ImagesClient.ListSandboxLibraryImages.g.cs rename src/libs/Baseten/Generated/{Baseten.JsonConverters.ImageStatusV1.g.cs => Baseten.JsonConverters.SandboxImageStatusV1.g.cs} (68%) rename src/libs/Baseten/Generated/{Baseten.JsonConverters.ImageStatusV1Nullable.g.cs => Baseten.JsonConverters.SandboxImageStatusV1Nullable.g.cs} (70%) create mode 100644 src/libs/Baseten/Generated/Baseten.JsonConverters.SandboxImageV1.g.cs rename src/libs/Baseten/Generated/{Baseten.JsonConverters.SandboxV1Variant2State.g.cs => Baseten.JsonConverters.SandboxRegionV1InfoGeneration.g.cs} (65%) rename src/libs/Baseten/Generated/{Baseten.JsonConverters.SandboxV1Variant2StateNullable.g.cs => Baseten.JsonConverters.SandboxRegionV1InfoGenerationNullable.g.cs} (67%) rename src/libs/Baseten/Generated/{Baseten.Models.CleanupImagesResponseV1.Json.g.cs => Baseten.Models.CleanupSandboxImagesResponseV1.Json.g.cs} (87%) rename src/libs/Baseten/Generated/{Baseten.Models.CleanupImagesResponseV1.g.cs => Baseten.Models.CleanupSandboxImagesResponseV1.g.cs} (91%) create mode 100644 src/libs/Baseten/Generated/Baseten.Models.CreateLoopsTrainerRequestV1.Json.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.CreateLoopsTrainerRequestV1.g.cs rename src/libs/Baseten/Generated/{Baseten.Models.ListImagesResponseV1.Json.g.cs => Baseten.Models.EgressRestrictionsV1.Json.g.cs} (88%) create mode 100644 src/libs/Baseten/Generated/Baseten.Models.EgressRestrictionsV1.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.GetSandboxConfigurationResponseV1.Json.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.GetSandboxConfigurationResponseV1.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.ListSandboxImageTagsResponseV1.Json.g.cs rename src/libs/Baseten/Generated/{Baseten.Models.ListImageTagsResponseV1.g.cs => Baseten.Models.ListSandboxImageTagsResponseV1.g.cs} (83%) create mode 100644 src/libs/Baseten/Generated/Baseten.Models.ListSandboxImagesResponseV1.Json.g.cs rename src/libs/Baseten/Generated/{Baseten.Models.ListImagesResponseV1.g.cs => Baseten.Models.ListSandboxImagesResponseV1.g.cs} (85%) create mode 100644 src/libs/Baseten/Generated/Baseten.Models.ListSandboxLibraryImagesResponseV1.Json.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.ListSandboxLibraryImagesResponseV1.g.cs rename src/libs/Baseten/Generated/{Baseten.Models.ListImageTagsResponseV1.Json.g.cs => Baseten.Models.PushSandboxImageRequestV1.Json.g.cs} (87%) rename src/libs/Baseten/Generated/{Baseten.Models.PushImageRequestV1.g.cs => Baseten.Models.PushSandboxImageRequestV1.g.cs} (88%) create mode 100644 src/libs/Baseten/Generated/Baseten.Models.PushSandboxImageResponseV1.Json.g.cs rename src/libs/Baseten/Generated/{Baseten.Models.PushImageResponseV1.g.cs => Baseten.Models.PushSandboxImageResponseV1.g.cs} (82%) create mode 100644 src/libs/Baseten/Generated/Baseten.Models.SandboxImageBuildLogV1.Json.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.SandboxImageBuildLogV1.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.SandboxImageBuildLogsResponseV1.Json.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.SandboxImageBuildLogsResponseV1.g.cs rename src/libs/Baseten/Generated/{Baseten.Models.ImageStatusV1.g.cs => Baseten.Models.SandboxImageStatusV1.g.cs} (61%) create mode 100644 src/libs/Baseten/Generated/Baseten.Models.SandboxImageSummaryV1.Json.g.cs rename src/libs/Baseten/Generated/{Baseten.Models.ImageV1.g.cs => Baseten.Models.SandboxImageSummaryV1.g.cs} (62%) rename src/libs/Baseten/Generated/{Baseten.Models.PushImageRequestV1.Json.g.cs => Baseten.Models.SandboxImageTagV1.Json.g.cs} (88%) rename src/libs/Baseten/Generated/{Baseten.Models.ImageTagV1.g.cs => Baseten.Models.SandboxImageTagV1.g.cs} (91%) rename src/libs/Baseten/Generated/{Baseten.Models.ImageV1.Json.g.cs => Baseten.Models.SandboxImageV1.Json.g.cs} (89%) create mode 100644 src/libs/Baseten/Generated/Baseten.Models.SandboxImageV1.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.SandboxImageV1Variant2.Json.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.SandboxImageV1Variant2.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.SandboxLibraryImageCreationOptionsV1.Json.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.SandboxLibraryImageCreationOptionsV1.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.SandboxLibraryImageCreationOptionsV1ExtraArgs.Json.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.SandboxLibraryImageCreationOptionsV1ExtraArgs.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.SandboxLibraryImageV1.Json.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.SandboxLibraryImageV1.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.SandboxLibraryImageVolumeV1.Json.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.SandboxLibraryImageVolumeV1.g.cs rename src/libs/Baseten/Generated/{Baseten.Models.PushImageResponseV1.Json.g.cs => Baseten.Models.SandboxLogEntryV1.Json.g.cs} (88%) create mode 100644 src/libs/Baseten/Generated/Baseten.Models.SandboxLogEntryV1.g.cs rename src/libs/Baseten/Generated/{Baseten.Models.ImageTagV1.Json.g.cs => Baseten.Models.SandboxLogsV1.Json.g.cs} (89%) create mode 100644 src/libs/Baseten/Generated/Baseten.Models.SandboxLogsV1.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.SandboxMetricsPointV1.Json.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.SandboxMetricsPointV1.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.SandboxMetricsV1.Json.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.SandboxMetricsV1.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.SandboxRegionV1.Json.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.SandboxRegionV1.g.cs rename src/libs/Baseten/Generated/{Baseten.Models.SandboxV1Variant2State.g.cs => Baseten.Models.SandboxRegionV1InfoGeneration.g.cs} (51%) create mode 100644 src/libs/Baseten/Generated/Baseten.SandboxesClient.GetSandboxConfiguration.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.SandboxesClient.GetSandboxLogs.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.SandboxesClient.GetSandboxMetrics.g.cs diff --git a/src/cli/Baseten.CLI/Commands/CreateLlmModelsByModelIdDeploymentsCommandApiCommand.g.cs b/src/cli/Baseten.CLI/Commands/CreateLlmModelsByModelIdDeploymentsCommandApiCommand.g.cs index f76adee4..0d854072 100644 --- a/src/cli/Baseten.CLI/Commands/CreateLlmModelsByModelIdDeploymentsCommandApiCommand.g.cs +++ b/src/cli/Baseten.CLI/Commands/CreateLlmModelsByModelIdDeploymentsCommandApiCommand.g.cs @@ -67,6 +67,12 @@ internal static partial class CreateLlmModelsByModelIdDeploymentsCommandApiComma { Description = @"Weight configurations for BDN model weight distribution", }; + + private static Option EgressRestrictions { get; } = new( + name: @"--egress-restrictions") + { + Description = @"Restricts this deployment's egress to the specified FQDNs and IP addresses; an empty block allows none. Requires the organization to have egress restrictions enabled.", + }; private static readonly UpdateAutoscalingSettingsV1OptionSet AutoscalingSettingsOptions = UpdateAutoscalingSettingsV1OptionSet.Create(@"autoscaling-settings"); private static Option Input { get; } = new(@"--input") { @@ -119,7 +125,8 @@ public static Command Create(string? commandName = null) command.Options.Add(ModelMetadata); command.Options.Add(AdditionalAutoscalingConfig); command.Options.Add(Metadata); - command.Options.Add(Weights); command.Options.Add(AutoscalingSettingsOptions.MinReplica); + command.Options.Add(Weights); + command.Options.Add(EgressRestrictions); command.Options.Add(AutoscalingSettingsOptions.MinReplica); command.Options.Add(AutoscalingSettingsOptions.MaxReplica); command.Options.Add(AutoscalingSettingsOptions.AutoscalingWindow); command.Options.Add(AutoscalingSettingsOptions.ScaleDownDelay); @@ -162,6 +169,7 @@ await CliRuntime.RunAsync(async () => var additionalAutoscalingConfig = CliRuntime.WasSpecified(parseResult, AdditionalAutoscalingConfig) ? parseResult.GetValue(AdditionalAutoscalingConfig) : (__requestBase is { } __AdditionalAutoscalingConfigBaseValue ? __AdditionalAutoscalingConfigBaseValue.AdditionalAutoscalingConfig : default); var metadata = CliRuntime.WasSpecified(parseResult, Metadata) ? parseResult.GetValue(Metadata) : (__requestBase is { } __MetadataBaseValue ? __MetadataBaseValue.Metadata : default); var weights = CliRuntime.WasSpecified(parseResult, Weights) ? parseResult.GetValue(Weights) : (__requestBase is { } __WeightsBaseValue ? __WeightsBaseValue.Weights : default); + var egressRestrictions = CliRuntime.WasSpecified(parseResult, EgressRestrictions) ? parseResult.GetValue(EgressRestrictions) : (__requestBase is { } __EgressRestrictionsBaseValue ? __EgressRestrictionsBaseValue.EgressRestrictions : default); var __AutoscalingSettingsBase = __requestBase is { } __AutoscalingSettingsBaseValue ? __AutoscalingSettingsBaseValue.AutoscalingSettings : default; var autoscalingSettingsMinReplica = CliRuntime.WasSpecified(parseResult, AutoscalingSettingsOptions.MinReplica) ? parseResult.GetValue(AutoscalingSettingsOptions.MinReplica) : (__AutoscalingSettingsBase is { } __AutoscalingSettingsminReplicaBaseValue ? __AutoscalingSettingsminReplicaBaseValue.MinReplica : default); var autoscalingSettingsMaxReplica = CliRuntime.WasSpecified(parseResult, AutoscalingSettingsOptions.MaxReplica) ? parseResult.GetValue(AutoscalingSettingsOptions.MaxReplica) : (__AutoscalingSettingsBase is { } __AutoscalingSettingsmaxReplicaBaseValue ? __AutoscalingSettingsmaxReplicaBaseValue.MaxReplica : default); @@ -201,6 +209,7 @@ await CliRuntime.RunAsync(async () => additionalAutoscalingConfig: additionalAutoscalingConfig, metadata: metadata, weights: weights, + egressRestrictions: egressRestrictions, autoscalingSettings: autoscalingSettings, cancellationToken: cancellationToken).ConfigureAwait(false); diff --git a/src/cli/Baseten.CLI/Commands/CreateLlmModelsCommandApiCommand.g.cs b/src/cli/Baseten.CLI/Commands/CreateLlmModelsCommandApiCommand.g.cs index d2e3befb..42924296 100644 --- a/src/cli/Baseten.CLI/Commands/CreateLlmModelsCommandApiCommand.g.cs +++ b/src/cli/Baseten.CLI/Commands/CreateLlmModelsCommandApiCommand.g.cs @@ -55,6 +55,12 @@ internal static partial class CreateLlmModelsCommandApiCommand { Description = @"Weight configurations for BDN model weight distribution", }; + + private static Option EgressRestrictions { get; } = new( + name: @"--egress-restrictions") + { + Description = @"Restricts this deployment's egress to the specified FQDNs and IP addresses; an empty block allows none. Requires the organization to have egress restrictions enabled.", + }; private static readonly CreateLLMModelRequestV1OptionSet CreateLLMModelRequestV1OptionSetOptions = CreateLLMModelRequestV1OptionSet.Create(); private static readonly UpdateAutoscalingSettingsV1OptionSet AutoscalingSettingsOptions = UpdateAutoscalingSettingsV1OptionSet.Create(@"autoscaling-settings"); @@ -107,7 +113,8 @@ public static Command Create(string? commandName = null) command.Options.Add(ModelMetadata); command.Options.Add(AdditionalAutoscalingConfig); command.Options.Add(Metadata); - command.Options.Add(Weights); command.Options.Add(CreateLLMModelRequestV1OptionSetOptions.Region); + command.Options.Add(Weights); + command.Options.Add(EgressRestrictions); command.Options.Add(CreateLLMModelRequestV1OptionSetOptions.Region); command.Options.Add(CreateLLMModelRequestV1OptionSetOptions.LlmVersion); command.Options.Add(AutoscalingSettingsOptions.MinReplica); command.Options.Add(AutoscalingSettingsOptions.MaxReplica); command.Options.Add(AutoscalingSettingsOptions.AutoscalingWindow); @@ -148,7 +155,8 @@ await CliRuntime.RunAsync(async () => var modelMetadata = CliRuntime.WasSpecified(parseResult, ModelMetadata) ? parseResult.GetValue(ModelMetadata) : (__requestBase is { } __ModelMetadataBaseValue ? __ModelMetadataBaseValue.ModelMetadata : default); var additionalAutoscalingConfig = CliRuntime.WasSpecified(parseResult, AdditionalAutoscalingConfig) ? parseResult.GetValue(AdditionalAutoscalingConfig) : (__requestBase is { } __AdditionalAutoscalingConfigBaseValue ? __AdditionalAutoscalingConfigBaseValue.AdditionalAutoscalingConfig : default); var metadata = CliRuntime.WasSpecified(parseResult, Metadata) ? parseResult.GetValue(Metadata) : (__requestBase is { } __MetadataBaseValue ? __MetadataBaseValue.Metadata : default); - var weights = CliRuntime.WasSpecified(parseResult, Weights) ? parseResult.GetValue(Weights) : (__requestBase is { } __WeightsBaseValue ? __WeightsBaseValue.Weights : default); var region = CliRuntime.WasSpecified(parseResult, CreateLLMModelRequestV1OptionSetOptions.Region) ? parseResult.GetValue(CreateLLMModelRequestV1OptionSetOptions.Region) : (__requestBase is { } __RegionBaseValue ? __RegionBaseValue.Region : default); + var weights = CliRuntime.WasSpecified(parseResult, Weights) ? parseResult.GetValue(Weights) : (__requestBase is { } __WeightsBaseValue ? __WeightsBaseValue.Weights : default); + var egressRestrictions = CliRuntime.WasSpecified(parseResult, EgressRestrictions) ? parseResult.GetValue(EgressRestrictions) : (__requestBase is { } __EgressRestrictionsBaseValue ? __EgressRestrictionsBaseValue.EgressRestrictions : default); var region = CliRuntime.WasSpecified(parseResult, CreateLLMModelRequestV1OptionSetOptions.Region) ? parseResult.GetValue(CreateLLMModelRequestV1OptionSetOptions.Region) : (__requestBase is { } __RegionBaseValue ? __RegionBaseValue.Region : default); var llmVersion = CliRuntime.WasSpecified(parseResult, CreateLLMModelRequestV1OptionSetOptions.LlmVersion) ? parseResult.GetValue(CreateLLMModelRequestV1OptionSetOptions.LlmVersion) : (__requestBase is { } __LlmVersionBaseValue ? __LlmVersionBaseValue.LlmVersion : default); var __AutoscalingSettingsBase = __requestBase is { } __AutoscalingSettingsBaseValue ? __AutoscalingSettingsBaseValue.AutoscalingSettings : default; var autoscalingSettingsMinReplica = CliRuntime.WasSpecified(parseResult, AutoscalingSettingsOptions.MinReplica) ? parseResult.GetValue(AutoscalingSettingsOptions.MinReplica) : (__AutoscalingSettingsBase is { } __AutoscalingSettingsminReplicaBaseValue ? __AutoscalingSettingsminReplicaBaseValue.MinReplica : default); @@ -187,6 +195,7 @@ await CliRuntime.RunAsync(async () => additionalAutoscalingConfig: additionalAutoscalingConfig, metadata: metadata, weights: weights, + egressRestrictions: egressRestrictions, region: region, llmVersion: llmVersion, autoscalingSettings: autoscalingSettings, diff --git a/src/cli/Baseten.CLI/Commands/CreateLoopsRunRequestV1OptionSet.g.cs b/src/cli/Baseten.CLI/Commands/CreateLoopsRunRequestV1OptionSet.g.cs index 2b00ebdd..38f30c6f 100644 --- a/src/cli/Baseten.CLI/Commands/CreateLoopsRunRequestV1OptionSet.g.cs +++ b/src/cli/Baseten.CLI/Commands/CreateLoopsRunRequestV1OptionSet.g.cs @@ -16,7 +16,8 @@ internal sealed record CreateLoopsRunRequestV1OptionSet( Option Replicas, Option Path, Option ReuseFromRunId, - Option ReuseFromSessionId) + Option ReuseFromSessionId, + Option SamplerNumReplicas) { public static CreateLoopsRunRequestV1OptionSet Create(string? prefix = null) { @@ -73,6 +74,10 @@ public static CreateLoopsRunRequestV1OptionSet Create(string? prefix = null) ReuseFromSessionId: new Option($"--{normalizedPrefix}reuse-from-session-id") { Description = @"Optional ID of a prior Loops session whose trainer and/or sampler should be reused for this run. Deprecated in favor of reuse_from_run_id.", + }, + SamplerNumReplicas: new Option($"--{normalizedPrefix}sampler-num-replicas") + { + Description = @"Number of replicas the run's sampler runs, applied as both its minimum and maximum. Must be at least 1. If omitted, a new sampler uses the platform defaults and a sampler reused from an earlier run keeps its settings. A run that already has a sampler keeps it unchanged. When the run ends, its sampler is scaled down.", } ); } diff --git a/src/cli/Baseten.CLI/Commands/CreateLoopsRunsCommandApiCommand.g.cs b/src/cli/Baseten.CLI/Commands/CreateLoopsRunsCommandApiCommand.g.cs index bd067bbd..41009f52 100644 --- a/src/cli/Baseten.CLI/Commands/CreateLoopsRunsCommandApiCommand.g.cs +++ b/src/cli/Baseten.CLI/Commands/CreateLoopsRunsCommandApiCommand.g.cs @@ -63,6 +63,7 @@ public static Command Create(string? commandName = null) command.Options.Add(CreateLoopsRunRequestV1OptionSetOptions.Path); command.Options.Add(CreateLoopsRunRequestV1OptionSetOptions.ReuseFromRunId); command.Options.Add(CreateLoopsRunRequestV1OptionSetOptions.ReuseFromSessionId); + command.Options.Add(CreateLoopsRunRequestV1OptionSetOptions.SamplerNumReplicas); command.Options.Add(Input); command.Options.Add(RequestJson); command.Options.Add(RequestFile); @@ -99,6 +100,7 @@ await CliRuntime.RunAsync(async () => var path = CliRuntime.WasSpecified(parseResult, CreateLoopsRunRequestV1OptionSetOptions.Path) ? parseResult.GetValue(CreateLoopsRunRequestV1OptionSetOptions.Path) : (__requestBase is { } __PathBaseValue ? __PathBaseValue.Path : default); var reuseFromRunId = CliRuntime.WasSpecified(parseResult, CreateLoopsRunRequestV1OptionSetOptions.ReuseFromRunId) ? parseResult.GetValue(CreateLoopsRunRequestV1OptionSetOptions.ReuseFromRunId) : (__requestBase is { } __ReuseFromRunIdBaseValue ? __ReuseFromRunIdBaseValue.ReuseFromRunId : default); var reuseFromSessionId = CliRuntime.WasSpecified(parseResult, CreateLoopsRunRequestV1OptionSetOptions.ReuseFromSessionId) ? parseResult.GetValue(CreateLoopsRunRequestV1OptionSetOptions.ReuseFromSessionId) : (__requestBase is { } __ReuseFromSessionIdBaseValue ? __ReuseFromSessionIdBaseValue.ReuseFromSessionId : default); + var samplerNumReplicas = CliRuntime.WasSpecified(parseResult, CreateLoopsRunRequestV1OptionSetOptions.SamplerNumReplicas) ? parseResult.GetValue(CreateLoopsRunRequestV1OptionSetOptions.SamplerNumReplicas) : (__requestBase is { } __SamplerNumReplicasBaseValue ? __SamplerNumReplicasBaseValue.SamplerNumReplicas : default); using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); @@ -115,6 +117,7 @@ await CliRuntime.RunAsync(async () => path: path, reuseFromRunId: reuseFromRunId, reuseFromSessionId: reuseFromSessionId, + samplerNumReplicas: samplerNumReplicas, cancellationToken: cancellationToken).ConfigureAwait(false); diff --git a/src/cli/Baseten.CLI/Commands/CreateLoopsSamplerRequestV1OptionSet.g.cs b/src/cli/Baseten.CLI/Commands/CreateLoopsSamplerRequestV1OptionSet.g.cs index ee8680ed..d85fd5e5 100644 --- a/src/cli/Baseten.CLI/Commands/CreateLoopsSamplerRequestV1OptionSet.g.cs +++ b/src/cli/Baseten.CLI/Commands/CreateLoopsSamplerRequestV1OptionSet.g.cs @@ -10,7 +10,8 @@ internal sealed record CreateLoopsSamplerRequestV1OptionSet( Option RunId, Option MaxSeqLength, Option ModelPath, - Option ReuseFromSessionId) + Option ReuseFromSessionId, + Option NumReplicas) { public static CreateLoopsSamplerRequestV1OptionSet Create(string? prefix = null) { @@ -42,6 +43,10 @@ public static CreateLoopsSamplerRequestV1OptionSet Create(string? prefix = null) ReuseFromSessionId: new Option($"--{normalizedPrefix}reuse-from-session-id") { Description = @"Optional ID of a prior Loops session to reuse a trainer and/or sampler from. Deprecated.", + }, + NumReplicas: new Option($"--{normalizedPrefix}num-replicas") + { + Description = @"Number of replicas the sampler runs, applied as both its minimum and maximum. Must be at least 1. If omitted, a new sampler uses the platform defaults and a paired sampler reused from an earlier run keeps its settings. A run that already has a sampler keeps it unchanged, and when a run ends, its sampler is scaled down.", } ); } diff --git a/src/cli/Baseten.CLI/Commands/CreateLoopsSamplersCommandApiCommand.g.cs b/src/cli/Baseten.CLI/Commands/CreateLoopsSamplersCommandApiCommand.g.cs index c4ef29d8..4f1984ee 100644 --- a/src/cli/Baseten.CLI/Commands/CreateLoopsSamplersCommandApiCommand.g.cs +++ b/src/cli/Baseten.CLI/Commands/CreateLoopsSamplersCommandApiCommand.g.cs @@ -62,6 +62,7 @@ public static Command Create(string? commandName = null) command.Options.Add(CreateLoopsSamplerRequestV1OptionSetOptions.MaxSeqLength); command.Options.Add(CreateLoopsSamplerRequestV1OptionSetOptions.ModelPath); command.Options.Add(CreateLoopsSamplerRequestV1OptionSetOptions.ReuseFromSessionId); + command.Options.Add(CreateLoopsSamplerRequestV1OptionSetOptions.NumReplicas); command.Options.Add(Input); command.Options.Add(RequestJson); command.Options.Add(RequestFile); @@ -93,6 +94,7 @@ await CliRuntime.RunAsync(async () => var maxSeqLength = CliRuntime.WasSpecified(parseResult, CreateLoopsSamplerRequestV1OptionSetOptions.MaxSeqLength) ? parseResult.GetValue(CreateLoopsSamplerRequestV1OptionSetOptions.MaxSeqLength) : (__requestBase is { } __MaxSeqLengthBaseValue ? __MaxSeqLengthBaseValue.MaxSeqLength : default); var modelPath = CliRuntime.WasSpecified(parseResult, CreateLoopsSamplerRequestV1OptionSetOptions.ModelPath) ? parseResult.GetValue(CreateLoopsSamplerRequestV1OptionSetOptions.ModelPath) : (__requestBase is { } __ModelPathBaseValue ? __ModelPathBaseValue.ModelPath : default); var reuseFromSessionId = CliRuntime.WasSpecified(parseResult, CreateLoopsSamplerRequestV1OptionSetOptions.ReuseFromSessionId) ? parseResult.GetValue(CreateLoopsSamplerRequestV1OptionSetOptions.ReuseFromSessionId) : (__requestBase is { } __ReuseFromSessionIdBaseValue ? __ReuseFromSessionIdBaseValue.ReuseFromSessionId : default); + var numReplicas = CliRuntime.WasSpecified(parseResult, CreateLoopsSamplerRequestV1OptionSetOptions.NumReplicas) ? parseResult.GetValue(CreateLoopsSamplerRequestV1OptionSetOptions.NumReplicas) : (__requestBase is { } __NumReplicasBaseValue ? __NumReplicasBaseValue.NumReplicas : default); using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); @@ -104,6 +106,7 @@ await CliRuntime.RunAsync(async () => maxSeqLength: maxSeqLength, modelPath: modelPath, reuseFromSessionId: reuseFromSessionId, + numReplicas: numReplicas, cancellationToken: cancellationToken).ConfigureAwait(false); diff --git a/src/cli/Baseten.CLI/Commands/CreateLoopsTrainerRequestV1OptionSet.g.cs b/src/cli/Baseten.CLI/Commands/CreateLoopsTrainerRequestV1OptionSet.g.cs new file mode 100644 index 00000000..f6758381 --- /dev/null +++ b/src/cli/Baseten.CLI/Commands/CreateLoopsTrainerRequestV1OptionSet.g.cs @@ -0,0 +1,79 @@ +#nullable enable + +using System.CommandLine; + +namespace Baseten.CLI.Commands; + +internal sealed record CreateLoopsTrainerRequestV1OptionSet( + Option SessionId, + Option BaseModel, + Option NameOption, + Option MaxSeqLen, + Option LoraRank, + Option Seed, + Option ScaleDownDelaySeconds, + Option AvailabilityModel, + Option Replicas, + Option Path, + Option ReuseFromRunId, + Option ReuseFromSessionId) +{ + public static CreateLoopsTrainerRequestV1OptionSet Create(string? prefix = null) + { + var normalizedPrefix = string.IsNullOrWhiteSpace(prefix) + ? string.Empty + : prefix.Trim().Trim('-') + "-"; + return new CreateLoopsTrainerRequestV1OptionSet( + SessionId: new Option($"--{normalizedPrefix}session-id") + { + Description = @"ID of the Loops session this run belongs to.", + Required = true, + }, + BaseModel: new Option($"--{normalizedPrefix}base-model") + { + Description = @"Base model ID (e.g. 'Qwen/Qwen3-8B').", + Required = true, + }, + NameOption: new Option($"--{normalizedPrefix}name") + { + Description = @"Optional display name for the run. Defaults to the base model name when omitted.", + }, + MaxSeqLen: new Option($"--{normalizedPrefix}max-seq-len") + { + Description = @"Maximum prompt length (in tokens) the run must handle. Set this to the longest training example you plan to send. Defaults to the maximum supported by the model configuration.", + }, + LoraRank: new Option($"--{normalizedPrefix}lora-rank") + { + Description = @"LoRA rank.", + }, + Seed: new Option($"--{normalizedPrefix}seed") + { + Description = @"Random seed for reproducibility.", + }, + ScaleDownDelaySeconds: new Option($"--{normalizedPrefix}scale-down-delay-seconds") + { + Description = @"Seconds of inactivity before the run scales to zero. Must be between 1 and 3600 (1 hour). Defaults to 900 (15 minutes).", + }, + AvailabilityModel: new Option($"--{normalizedPrefix}availability-model") + { + Description = @"Capacity the trainer runs on. 'dedicated' is not preempted. 'spot' runs below inference and reaches idle reserved capacity, but the run is stopped if its GPUs are reclaimed and cannot be resumed.", + }, + Replicas: new Option($"--{normalizedPrefix}replicas") + { + Description = @"Number of data-parallel trainer replicas. Each replica is one full copy of the model's preset node group, so the trainer deployment runs (preset node_count * replicas) nodes (e.g. replicas=4 on a 4-node preset → 16 nodes, 4 DP workers). Must be a positive integer. Defaults to 1.", + }, + Path: new Option($"--{normalizedPrefix}path") + { + Description = @"Optional bt:// URI of an existing checkpoint to load weights from on startup. Form: bt://loops:/weights/.", + }, + ReuseFromRunId: new Option($"--{normalizedPrefix}reuse-from-run-id") + { + Description = @"Optional ID of a prior Loops run whose trainer and/or sampler should be reused for this run instead of provisioning fresh. The prior run must use the same base model and belong to the same team.", + }, + ReuseFromSessionId: new Option($"--{normalizedPrefix}reuse-from-session-id") + { + Description = @"Optional ID of a prior Loops session whose trainer and/or sampler should be reused for this run. Deprecated in favor of reuse_from_run_id.", + } + ); + } +} \ No newline at end of file diff --git a/src/cli/Baseten.CLI/Commands/CreateLoopsTrainersCommandApiCommand.g.cs b/src/cli/Baseten.CLI/Commands/CreateLoopsTrainersCommandApiCommand.g.cs index 7cd6545b..ebc49cce 100644 --- a/src/cli/Baseten.CLI/Commands/CreateLoopsTrainersCommandApiCommand.g.cs +++ b/src/cli/Baseten.CLI/Commands/CreateLoopsTrainersCommandApiCommand.g.cs @@ -7,7 +7,7 @@ namespace Baseten.CLI.Commands; internal static partial class CreateLoopsTrainersCommandApiCommand { - private static readonly CreateLoopsRunRequestV1OptionSet CreateLoopsRunRequestV1OptionSetOptions = CreateLoopsRunRequestV1OptionSet.Create(); + private static readonly CreateLoopsTrainerRequestV1OptionSet CreateLoopsTrainerRequestV1OptionSetOptions = CreateLoopsTrainerRequestV1OptionSet.Create(); private static Option Input { get; } = new(@"--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", @@ -51,18 +51,18 @@ public static Command Create(string? commandName = null) { var command = new Command(commandName ?? @"create-loops-trainers", @"Creates a Loops trainer Creates a trainer-only Loops run in the given session, without a sampler. To sample from it, create a sampler with POST /v1/loops/samplers and pass this run's ID as run_id to pair the two. List and read the trainer through the /v1/loops/runs endpoints."); - command.Options.Add(CreateLoopsRunRequestV1OptionSetOptions.SessionId); - command.Options.Add(CreateLoopsRunRequestV1OptionSetOptions.BaseModel); - command.Options.Add(CreateLoopsRunRequestV1OptionSetOptions.NameOption); - command.Options.Add(CreateLoopsRunRequestV1OptionSetOptions.MaxSeqLen); - command.Options.Add(CreateLoopsRunRequestV1OptionSetOptions.LoraRank); - command.Options.Add(CreateLoopsRunRequestV1OptionSetOptions.Seed); - command.Options.Add(CreateLoopsRunRequestV1OptionSetOptions.ScaleDownDelaySeconds); - command.Options.Add(CreateLoopsRunRequestV1OptionSetOptions.AvailabilityModel); - command.Options.Add(CreateLoopsRunRequestV1OptionSetOptions.Replicas); - command.Options.Add(CreateLoopsRunRequestV1OptionSetOptions.Path); - command.Options.Add(CreateLoopsRunRequestV1OptionSetOptions.ReuseFromRunId); - command.Options.Add(CreateLoopsRunRequestV1OptionSetOptions.ReuseFromSessionId); + command.Options.Add(CreateLoopsTrainerRequestV1OptionSetOptions.SessionId); + command.Options.Add(CreateLoopsTrainerRequestV1OptionSetOptions.BaseModel); + command.Options.Add(CreateLoopsTrainerRequestV1OptionSetOptions.NameOption); + command.Options.Add(CreateLoopsTrainerRequestV1OptionSetOptions.MaxSeqLen); + command.Options.Add(CreateLoopsTrainerRequestV1OptionSetOptions.LoraRank); + command.Options.Add(CreateLoopsTrainerRequestV1OptionSetOptions.Seed); + command.Options.Add(CreateLoopsTrainerRequestV1OptionSetOptions.ScaleDownDelaySeconds); + command.Options.Add(CreateLoopsTrainerRequestV1OptionSetOptions.AvailabilityModel); + command.Options.Add(CreateLoopsTrainerRequestV1OptionSetOptions.Replicas); + command.Options.Add(CreateLoopsTrainerRequestV1OptionSetOptions.Path); + command.Options.Add(CreateLoopsTrainerRequestV1OptionSetOptions.ReuseFromRunId); + command.Options.Add(CreateLoopsTrainerRequestV1OptionSetOptions.ReuseFromSessionId); command.Options.Add(Input); command.Options.Add(RequestJson); command.Options.Add(RequestFile); @@ -81,24 +81,24 @@ public static Command Create(string? commandName = null) command.SetAction(async (ParseResult parseResult, CancellationToken cancellationToken) => await CliRuntime.RunAsync(async () => { - var __requestBase = await CliRuntime.ReadRequestOrDefaultAsync( + var __requestBase = await CliRuntime.ReadRequestOrDefaultAsync( parseResult, Input, RequestJson, RequestFile, global::Baseten.SourceGenerationContext.Default, - cancellationToken).ConfigureAwait(false); var sessionId = parseResult.GetRequiredValue(CreateLoopsRunRequestV1OptionSetOptions.SessionId); - var baseModel = parseResult.GetRequiredValue(CreateLoopsRunRequestV1OptionSetOptions.BaseModel); - var name = CliRuntime.WasSpecified(parseResult, CreateLoopsRunRequestV1OptionSetOptions.NameOption) ? parseResult.GetValue(CreateLoopsRunRequestV1OptionSetOptions.NameOption) : (__requestBase is { } __NameBaseValue ? __NameBaseValue.Name : default); - var maxSeqLen = CliRuntime.WasSpecified(parseResult, CreateLoopsRunRequestV1OptionSetOptions.MaxSeqLen) ? parseResult.GetValue(CreateLoopsRunRequestV1OptionSetOptions.MaxSeqLen) : (__requestBase is { } __MaxSeqLenBaseValue ? __MaxSeqLenBaseValue.MaxSeqLen : default); - var loraRank = CliRuntime.WasSpecified(parseResult, CreateLoopsRunRequestV1OptionSetOptions.LoraRank) ? parseResult.GetValue(CreateLoopsRunRequestV1OptionSetOptions.LoraRank) : (__requestBase is { } __LoraRankBaseValue ? __LoraRankBaseValue.LoraRank : default); - var seed = CliRuntime.WasSpecified(parseResult, CreateLoopsRunRequestV1OptionSetOptions.Seed) ? parseResult.GetValue(CreateLoopsRunRequestV1OptionSetOptions.Seed) : (__requestBase is { } __SeedBaseValue ? __SeedBaseValue.Seed : default); - var scaleDownDelaySeconds = CliRuntime.WasSpecified(parseResult, CreateLoopsRunRequestV1OptionSetOptions.ScaleDownDelaySeconds) ? parseResult.GetValue(CreateLoopsRunRequestV1OptionSetOptions.ScaleDownDelaySeconds) : (__requestBase is { } __ScaleDownDelaySecondsBaseValue ? __ScaleDownDelaySecondsBaseValue.ScaleDownDelaySeconds : default); - var availabilityModel = CliRuntime.WasSpecified(parseResult, CreateLoopsRunRequestV1OptionSetOptions.AvailabilityModel) ? parseResult.GetValue(CreateLoopsRunRequestV1OptionSetOptions.AvailabilityModel) : (__requestBase is { } __AvailabilityModelBaseValue ? __AvailabilityModelBaseValue.AvailabilityModel : default); - var replicas = CliRuntime.WasSpecified(parseResult, CreateLoopsRunRequestV1OptionSetOptions.Replicas) ? parseResult.GetValue(CreateLoopsRunRequestV1OptionSetOptions.Replicas) : (__requestBase is { } __ReplicasBaseValue ? __ReplicasBaseValue.Replicas : default); - var path = CliRuntime.WasSpecified(parseResult, CreateLoopsRunRequestV1OptionSetOptions.Path) ? parseResult.GetValue(CreateLoopsRunRequestV1OptionSetOptions.Path) : (__requestBase is { } __PathBaseValue ? __PathBaseValue.Path : default); - var reuseFromRunId = CliRuntime.WasSpecified(parseResult, CreateLoopsRunRequestV1OptionSetOptions.ReuseFromRunId) ? parseResult.GetValue(CreateLoopsRunRequestV1OptionSetOptions.ReuseFromRunId) : (__requestBase is { } __ReuseFromRunIdBaseValue ? __ReuseFromRunIdBaseValue.ReuseFromRunId : default); - var reuseFromSessionId = CliRuntime.WasSpecified(parseResult, CreateLoopsRunRequestV1OptionSetOptions.ReuseFromSessionId) ? parseResult.GetValue(CreateLoopsRunRequestV1OptionSetOptions.ReuseFromSessionId) : (__requestBase is { } __ReuseFromSessionIdBaseValue ? __ReuseFromSessionIdBaseValue.ReuseFromSessionId : default); + cancellationToken).ConfigureAwait(false); var sessionId = parseResult.GetRequiredValue(CreateLoopsTrainerRequestV1OptionSetOptions.SessionId); + var baseModel = parseResult.GetRequiredValue(CreateLoopsTrainerRequestV1OptionSetOptions.BaseModel); + var name = CliRuntime.WasSpecified(parseResult, CreateLoopsTrainerRequestV1OptionSetOptions.NameOption) ? parseResult.GetValue(CreateLoopsTrainerRequestV1OptionSetOptions.NameOption) : (__requestBase is { } __NameBaseValue ? __NameBaseValue.Name : default); + var maxSeqLen = CliRuntime.WasSpecified(parseResult, CreateLoopsTrainerRequestV1OptionSetOptions.MaxSeqLen) ? parseResult.GetValue(CreateLoopsTrainerRequestV1OptionSetOptions.MaxSeqLen) : (__requestBase is { } __MaxSeqLenBaseValue ? __MaxSeqLenBaseValue.MaxSeqLen : default); + var loraRank = CliRuntime.WasSpecified(parseResult, CreateLoopsTrainerRequestV1OptionSetOptions.LoraRank) ? parseResult.GetValue(CreateLoopsTrainerRequestV1OptionSetOptions.LoraRank) : (__requestBase is { } __LoraRankBaseValue ? __LoraRankBaseValue.LoraRank : default); + var seed = CliRuntime.WasSpecified(parseResult, CreateLoopsTrainerRequestV1OptionSetOptions.Seed) ? parseResult.GetValue(CreateLoopsTrainerRequestV1OptionSetOptions.Seed) : (__requestBase is { } __SeedBaseValue ? __SeedBaseValue.Seed : default); + var scaleDownDelaySeconds = CliRuntime.WasSpecified(parseResult, CreateLoopsTrainerRequestV1OptionSetOptions.ScaleDownDelaySeconds) ? parseResult.GetValue(CreateLoopsTrainerRequestV1OptionSetOptions.ScaleDownDelaySeconds) : (__requestBase is { } __ScaleDownDelaySecondsBaseValue ? __ScaleDownDelaySecondsBaseValue.ScaleDownDelaySeconds : default); + var availabilityModel = CliRuntime.WasSpecified(parseResult, CreateLoopsTrainerRequestV1OptionSetOptions.AvailabilityModel) ? parseResult.GetValue(CreateLoopsTrainerRequestV1OptionSetOptions.AvailabilityModel) : (__requestBase is { } __AvailabilityModelBaseValue ? __AvailabilityModelBaseValue.AvailabilityModel : default); + var replicas = CliRuntime.WasSpecified(parseResult, CreateLoopsTrainerRequestV1OptionSetOptions.Replicas) ? parseResult.GetValue(CreateLoopsTrainerRequestV1OptionSetOptions.Replicas) : (__requestBase is { } __ReplicasBaseValue ? __ReplicasBaseValue.Replicas : default); + var path = CliRuntime.WasSpecified(parseResult, CreateLoopsTrainerRequestV1OptionSetOptions.Path) ? parseResult.GetValue(CreateLoopsTrainerRequestV1OptionSetOptions.Path) : (__requestBase is { } __PathBaseValue ? __PathBaseValue.Path : default); + var reuseFromRunId = CliRuntime.WasSpecified(parseResult, CreateLoopsTrainerRequestV1OptionSetOptions.ReuseFromRunId) ? parseResult.GetValue(CreateLoopsTrainerRequestV1OptionSetOptions.ReuseFromRunId) : (__requestBase is { } __ReuseFromRunIdBaseValue ? __ReuseFromRunIdBaseValue.ReuseFromRunId : default); + var reuseFromSessionId = CliRuntime.WasSpecified(parseResult, CreateLoopsTrainerRequestV1OptionSetOptions.ReuseFromSessionId) ? parseResult.GetValue(CreateLoopsTrainerRequestV1OptionSetOptions.ReuseFromSessionId) : (__requestBase is { } __ReuseFromSessionIdBaseValue ? __ReuseFromSessionIdBaseValue.ReuseFromSessionId : default); using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); diff --git a/src/cli/Baseten.CLI/Commands/CreateTeamsByTeamIdLlmModelsCommandApiCommand.g.cs b/src/cli/Baseten.CLI/Commands/CreateTeamsByTeamIdLlmModelsCommandApiCommand.g.cs index fd625337..1fc8c038 100644 --- a/src/cli/Baseten.CLI/Commands/CreateTeamsByTeamIdLlmModelsCommandApiCommand.g.cs +++ b/src/cli/Baseten.CLI/Commands/CreateTeamsByTeamIdLlmModelsCommandApiCommand.g.cs @@ -55,6 +55,12 @@ internal static partial class CreateTeamsByTeamIdLlmModelsCommandApiCommand { Description = @"Weight configurations for BDN model weight distribution", }; + + private static Option EgressRestrictions { get; } = new( + name: @"--egress-restrictions") + { + Description = @"Restricts this deployment's egress to the specified FQDNs and IP addresses; an empty block allows none. Requires the organization to have egress restrictions enabled.", + }; private static readonly CreateLLMModelRequestV1OptionSet CreateLLMModelRequestV1OptionSetOptions = CreateLLMModelRequestV1OptionSet.Create(); private static readonly UpdateAutoscalingSettingsV1OptionSet AutoscalingSettingsOptions = UpdateAutoscalingSettingsV1OptionSet.Create(@"autoscaling-settings"); @@ -107,7 +113,8 @@ public static Command Create(string? commandName = null) command.Options.Add(ModelMetadata); command.Options.Add(AdditionalAutoscalingConfig); command.Options.Add(Metadata); - command.Options.Add(Weights); command.Options.Add(CreateLLMModelRequestV1OptionSetOptions.Region); + command.Options.Add(Weights); + command.Options.Add(EgressRestrictions); command.Options.Add(CreateLLMModelRequestV1OptionSetOptions.Region); command.Options.Add(CreateLLMModelRequestV1OptionSetOptions.LlmVersion); command.Options.Add(CreateLLMModelRequestV1OptionSetOptions.NameOption); command.Options.Add(AutoscalingSettingsOptions.MinReplica); command.Options.Add(AutoscalingSettingsOptions.MaxReplica); @@ -149,7 +156,8 @@ await CliRuntime.RunAsync(async () => var modelMetadata = CliRuntime.WasSpecified(parseResult, ModelMetadata) ? parseResult.GetValue(ModelMetadata) : (__requestBase is { } __ModelMetadataBaseValue ? __ModelMetadataBaseValue.ModelMetadata : default); var additionalAutoscalingConfig = CliRuntime.WasSpecified(parseResult, AdditionalAutoscalingConfig) ? parseResult.GetValue(AdditionalAutoscalingConfig) : (__requestBase is { } __AdditionalAutoscalingConfigBaseValue ? __AdditionalAutoscalingConfigBaseValue.AdditionalAutoscalingConfig : default); var metadata = CliRuntime.WasSpecified(parseResult, Metadata) ? parseResult.GetValue(Metadata) : (__requestBase is { } __MetadataBaseValue ? __MetadataBaseValue.Metadata : default); - var weights = CliRuntime.WasSpecified(parseResult, Weights) ? parseResult.GetValue(Weights) : (__requestBase is { } __WeightsBaseValue ? __WeightsBaseValue.Weights : default); var region = CliRuntime.WasSpecified(parseResult, CreateLLMModelRequestV1OptionSetOptions.Region) ? parseResult.GetValue(CreateLLMModelRequestV1OptionSetOptions.Region) : (__requestBase is { } __RegionBaseValue ? __RegionBaseValue.Region : default); + var weights = CliRuntime.WasSpecified(parseResult, Weights) ? parseResult.GetValue(Weights) : (__requestBase is { } __WeightsBaseValue ? __WeightsBaseValue.Weights : default); + var egressRestrictions = CliRuntime.WasSpecified(parseResult, EgressRestrictions) ? parseResult.GetValue(EgressRestrictions) : (__requestBase is { } __EgressRestrictionsBaseValue ? __EgressRestrictionsBaseValue.EgressRestrictions : default); var region = CliRuntime.WasSpecified(parseResult, CreateLLMModelRequestV1OptionSetOptions.Region) ? parseResult.GetValue(CreateLLMModelRequestV1OptionSetOptions.Region) : (__requestBase is { } __RegionBaseValue ? __RegionBaseValue.Region : default); var llmVersion = CliRuntime.WasSpecified(parseResult, CreateLLMModelRequestV1OptionSetOptions.LlmVersion) ? parseResult.GetValue(CreateLLMModelRequestV1OptionSetOptions.LlmVersion) : (__requestBase is { } __LlmVersionBaseValue ? __LlmVersionBaseValue.LlmVersion : default); var name = parseResult.GetRequiredValue(CreateLLMModelRequestV1OptionSetOptions.NameOption); @@ -189,6 +197,7 @@ await CliRuntime.RunAsync(async () => additionalAutoscalingConfig: additionalAutoscalingConfig, metadata: metadata, weights: weights, + egressRestrictions: egressRestrictions, region: region, llmVersion: llmVersion, name: name, diff --git a/src/cli/Baseten.CLI/Commands/CreateTeamsByTeamIdLoopsRunsCommandApiCommand.g.cs b/src/cli/Baseten.CLI/Commands/CreateTeamsByTeamIdLoopsRunsCommandApiCommand.g.cs index 7d1c9413..c5e06fd5 100644 --- a/src/cli/Baseten.CLI/Commands/CreateTeamsByTeamIdLoopsRunsCommandApiCommand.g.cs +++ b/src/cli/Baseten.CLI/Commands/CreateTeamsByTeamIdLoopsRunsCommandApiCommand.g.cs @@ -68,6 +68,7 @@ public static Command Create(string? commandName = null) command.Options.Add(CreateLoopsRunRequestV1OptionSetOptions.Path); command.Options.Add(CreateLoopsRunRequestV1OptionSetOptions.ReuseFromRunId); command.Options.Add(CreateLoopsRunRequestV1OptionSetOptions.ReuseFromSessionId); + command.Options.Add(CreateLoopsRunRequestV1OptionSetOptions.SamplerNumReplicas); command.Options.Add(Input); command.Options.Add(RequestJson); command.Options.Add(RequestFile); @@ -105,6 +106,7 @@ await CliRuntime.RunAsync(async () => var path = CliRuntime.WasSpecified(parseResult, CreateLoopsRunRequestV1OptionSetOptions.Path) ? parseResult.GetValue(CreateLoopsRunRequestV1OptionSetOptions.Path) : (__requestBase is { } __PathBaseValue ? __PathBaseValue.Path : default); var reuseFromRunId = CliRuntime.WasSpecified(parseResult, CreateLoopsRunRequestV1OptionSetOptions.ReuseFromRunId) ? parseResult.GetValue(CreateLoopsRunRequestV1OptionSetOptions.ReuseFromRunId) : (__requestBase is { } __ReuseFromRunIdBaseValue ? __ReuseFromRunIdBaseValue.ReuseFromRunId : default); var reuseFromSessionId = CliRuntime.WasSpecified(parseResult, CreateLoopsRunRequestV1OptionSetOptions.ReuseFromSessionId) ? parseResult.GetValue(CreateLoopsRunRequestV1OptionSetOptions.ReuseFromSessionId) : (__requestBase is { } __ReuseFromSessionIdBaseValue ? __ReuseFromSessionIdBaseValue.ReuseFromSessionId : default); + var samplerNumReplicas = CliRuntime.WasSpecified(parseResult, CreateLoopsRunRequestV1OptionSetOptions.SamplerNumReplicas) ? parseResult.GetValue(CreateLoopsRunRequestV1OptionSetOptions.SamplerNumReplicas) : (__requestBase is { } __SamplerNumReplicasBaseValue ? __SamplerNumReplicasBaseValue.SamplerNumReplicas : default); using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); @@ -122,6 +124,7 @@ await CliRuntime.RunAsync(async () => path: path, reuseFromRunId: reuseFromRunId, reuseFromSessionId: reuseFromSessionId, + samplerNumReplicas: samplerNumReplicas, cancellationToken: cancellationToken).ConfigureAwait(false); diff --git a/src/cli/Baseten.CLI/Commands/CreateTeamsByTeamIdLoopsSamplersCommandApiCommand.g.cs b/src/cli/Baseten.CLI/Commands/CreateTeamsByTeamIdLoopsSamplersCommandApiCommand.g.cs index 09139ab2..1fe37294 100644 --- a/src/cli/Baseten.CLI/Commands/CreateTeamsByTeamIdLoopsSamplersCommandApiCommand.g.cs +++ b/src/cli/Baseten.CLI/Commands/CreateTeamsByTeamIdLoopsSamplersCommandApiCommand.g.cs @@ -69,6 +69,7 @@ public static Command Create(string? commandName = null) command.Options.Add(CreateLoopsSamplerRequestV1OptionSetOptions.MaxSeqLength); command.Options.Add(CreateLoopsSamplerRequestV1OptionSetOptions.ModelPath); command.Options.Add(CreateLoopsSamplerRequestV1OptionSetOptions.ReuseFromSessionId); + command.Options.Add(CreateLoopsSamplerRequestV1OptionSetOptions.NumReplicas); command.Options.Add(Input); command.Options.Add(RequestJson); command.Options.Add(RequestFile); @@ -101,6 +102,7 @@ await CliRuntime.RunAsync(async () => var maxSeqLength = CliRuntime.WasSpecified(parseResult, CreateLoopsSamplerRequestV1OptionSetOptions.MaxSeqLength) ? parseResult.GetValue(CreateLoopsSamplerRequestV1OptionSetOptions.MaxSeqLength) : (__requestBase is { } __MaxSeqLengthBaseValue ? __MaxSeqLengthBaseValue.MaxSeqLength : default); var modelPath = CliRuntime.WasSpecified(parseResult, CreateLoopsSamplerRequestV1OptionSetOptions.ModelPath) ? parseResult.GetValue(CreateLoopsSamplerRequestV1OptionSetOptions.ModelPath) : (__requestBase is { } __ModelPathBaseValue ? __ModelPathBaseValue.ModelPath : default); var reuseFromSessionId = CliRuntime.WasSpecified(parseResult, CreateLoopsSamplerRequestV1OptionSetOptions.ReuseFromSessionId) ? parseResult.GetValue(CreateLoopsSamplerRequestV1OptionSetOptions.ReuseFromSessionId) : (__requestBase is { } __ReuseFromSessionIdBaseValue ? __ReuseFromSessionIdBaseValue.ReuseFromSessionId : default); + var numReplicas = CliRuntime.WasSpecified(parseResult, CreateLoopsSamplerRequestV1OptionSetOptions.NumReplicas) ? parseResult.GetValue(CreateLoopsSamplerRequestV1OptionSetOptions.NumReplicas) : (__requestBase is { } __NumReplicasBaseValue ? __NumReplicasBaseValue.NumReplicas : default); using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); @@ -113,6 +115,7 @@ await CliRuntime.RunAsync(async () => maxSeqLength: maxSeqLength, modelPath: modelPath, reuseFromSessionId: reuseFromSessionId, + numReplicas: numReplicas, cancellationToken: cancellationToken).ConfigureAwait(false); diff --git a/src/cli/Baseten.CLI/Commands/CreateTeamsByTeamIdLoopsTrainersCommandApiCommand.g.cs b/src/cli/Baseten.CLI/Commands/CreateTeamsByTeamIdLoopsTrainersCommandApiCommand.g.cs index c7dd049d..0e2ba9e7 100644 --- a/src/cli/Baseten.CLI/Commands/CreateTeamsByTeamIdLoopsTrainersCommandApiCommand.g.cs +++ b/src/cli/Baseten.CLI/Commands/CreateTeamsByTeamIdLoopsTrainersCommandApiCommand.g.cs @@ -12,7 +12,7 @@ internal static partial class CreateTeamsByTeamIdLoopsTrainersCommandApiCommand { Description = @"This is a missing parameter that was added automatically. Please check the OpenAPI spec.", }; - private static readonly CreateLoopsRunRequestV1OptionSet CreateLoopsRunRequestV1OptionSetOptions = CreateLoopsRunRequestV1OptionSet.Create(); + private static readonly CreateLoopsTrainerRequestV1OptionSet CreateLoopsTrainerRequestV1OptionSetOptions = CreateLoopsTrainerRequestV1OptionSet.Create(); private static Option Input { get; } = new(@"--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", @@ -56,18 +56,18 @@ public static Command Create(string? commandName = null) { var command = new Command(commandName ?? @"create-teams-by-team-id-loops-trainers", @"Creates a Loops trainer Creates a trainer-only Loops run in the given session, without a sampler. To sample from it, create a sampler with POST /v1/loops/samplers and pass this run's ID as run_id to pair the two. List and read the trainer through the /v1/loops/runs endpoints."); - command.Arguments.Add(TeamId); command.Options.Add(CreateLoopsRunRequestV1OptionSetOptions.SessionId); - command.Options.Add(CreateLoopsRunRequestV1OptionSetOptions.BaseModel); - command.Options.Add(CreateLoopsRunRequestV1OptionSetOptions.NameOption); - command.Options.Add(CreateLoopsRunRequestV1OptionSetOptions.MaxSeqLen); - command.Options.Add(CreateLoopsRunRequestV1OptionSetOptions.LoraRank); - command.Options.Add(CreateLoopsRunRequestV1OptionSetOptions.Seed); - command.Options.Add(CreateLoopsRunRequestV1OptionSetOptions.ScaleDownDelaySeconds); - command.Options.Add(CreateLoopsRunRequestV1OptionSetOptions.AvailabilityModel); - command.Options.Add(CreateLoopsRunRequestV1OptionSetOptions.Replicas); - command.Options.Add(CreateLoopsRunRequestV1OptionSetOptions.Path); - command.Options.Add(CreateLoopsRunRequestV1OptionSetOptions.ReuseFromRunId); - command.Options.Add(CreateLoopsRunRequestV1OptionSetOptions.ReuseFromSessionId); + command.Arguments.Add(TeamId); command.Options.Add(CreateLoopsTrainerRequestV1OptionSetOptions.SessionId); + command.Options.Add(CreateLoopsTrainerRequestV1OptionSetOptions.BaseModel); + command.Options.Add(CreateLoopsTrainerRequestV1OptionSetOptions.NameOption); + command.Options.Add(CreateLoopsTrainerRequestV1OptionSetOptions.MaxSeqLen); + command.Options.Add(CreateLoopsTrainerRequestV1OptionSetOptions.LoraRank); + command.Options.Add(CreateLoopsTrainerRequestV1OptionSetOptions.Seed); + command.Options.Add(CreateLoopsTrainerRequestV1OptionSetOptions.ScaleDownDelaySeconds); + command.Options.Add(CreateLoopsTrainerRequestV1OptionSetOptions.AvailabilityModel); + command.Options.Add(CreateLoopsTrainerRequestV1OptionSetOptions.Replicas); + command.Options.Add(CreateLoopsTrainerRequestV1OptionSetOptions.Path); + command.Options.Add(CreateLoopsTrainerRequestV1OptionSetOptions.ReuseFromRunId); + command.Options.Add(CreateLoopsTrainerRequestV1OptionSetOptions.ReuseFromSessionId); command.Options.Add(Input); command.Options.Add(RequestJson); command.Options.Add(RequestFile); @@ -86,25 +86,25 @@ public static Command Create(string? commandName = null) command.SetAction(async (ParseResult parseResult, CancellationToken cancellationToken) => await CliRuntime.RunAsync(async () => { - var __requestBase = await CliRuntime.ReadRequestOrDefaultAsync( + var __requestBase = await CliRuntime.ReadRequestOrDefaultAsync( parseResult, Input, RequestJson, RequestFile, global::Baseten.SourceGenerationContext.Default, cancellationToken).ConfigureAwait(false); - var teamId = parseResult.GetRequiredValue(TeamId); var sessionId = parseResult.GetRequiredValue(CreateLoopsRunRequestV1OptionSetOptions.SessionId); - var baseModel = parseResult.GetRequiredValue(CreateLoopsRunRequestV1OptionSetOptions.BaseModel); - var name = CliRuntime.WasSpecified(parseResult, CreateLoopsRunRequestV1OptionSetOptions.NameOption) ? parseResult.GetValue(CreateLoopsRunRequestV1OptionSetOptions.NameOption) : (__requestBase is { } __NameBaseValue ? __NameBaseValue.Name : default); - var maxSeqLen = CliRuntime.WasSpecified(parseResult, CreateLoopsRunRequestV1OptionSetOptions.MaxSeqLen) ? parseResult.GetValue(CreateLoopsRunRequestV1OptionSetOptions.MaxSeqLen) : (__requestBase is { } __MaxSeqLenBaseValue ? __MaxSeqLenBaseValue.MaxSeqLen : default); - var loraRank = CliRuntime.WasSpecified(parseResult, CreateLoopsRunRequestV1OptionSetOptions.LoraRank) ? parseResult.GetValue(CreateLoopsRunRequestV1OptionSetOptions.LoraRank) : (__requestBase is { } __LoraRankBaseValue ? __LoraRankBaseValue.LoraRank : default); - var seed = CliRuntime.WasSpecified(parseResult, CreateLoopsRunRequestV1OptionSetOptions.Seed) ? parseResult.GetValue(CreateLoopsRunRequestV1OptionSetOptions.Seed) : (__requestBase is { } __SeedBaseValue ? __SeedBaseValue.Seed : default); - var scaleDownDelaySeconds = CliRuntime.WasSpecified(parseResult, CreateLoopsRunRequestV1OptionSetOptions.ScaleDownDelaySeconds) ? parseResult.GetValue(CreateLoopsRunRequestV1OptionSetOptions.ScaleDownDelaySeconds) : (__requestBase is { } __ScaleDownDelaySecondsBaseValue ? __ScaleDownDelaySecondsBaseValue.ScaleDownDelaySeconds : default); - var availabilityModel = CliRuntime.WasSpecified(parseResult, CreateLoopsRunRequestV1OptionSetOptions.AvailabilityModel) ? parseResult.GetValue(CreateLoopsRunRequestV1OptionSetOptions.AvailabilityModel) : (__requestBase is { } __AvailabilityModelBaseValue ? __AvailabilityModelBaseValue.AvailabilityModel : default); - var replicas = CliRuntime.WasSpecified(parseResult, CreateLoopsRunRequestV1OptionSetOptions.Replicas) ? parseResult.GetValue(CreateLoopsRunRequestV1OptionSetOptions.Replicas) : (__requestBase is { } __ReplicasBaseValue ? __ReplicasBaseValue.Replicas : default); - var path = CliRuntime.WasSpecified(parseResult, CreateLoopsRunRequestV1OptionSetOptions.Path) ? parseResult.GetValue(CreateLoopsRunRequestV1OptionSetOptions.Path) : (__requestBase is { } __PathBaseValue ? __PathBaseValue.Path : default); - var reuseFromRunId = CliRuntime.WasSpecified(parseResult, CreateLoopsRunRequestV1OptionSetOptions.ReuseFromRunId) ? parseResult.GetValue(CreateLoopsRunRequestV1OptionSetOptions.ReuseFromRunId) : (__requestBase is { } __ReuseFromRunIdBaseValue ? __ReuseFromRunIdBaseValue.ReuseFromRunId : default); - var reuseFromSessionId = CliRuntime.WasSpecified(parseResult, CreateLoopsRunRequestV1OptionSetOptions.ReuseFromSessionId) ? parseResult.GetValue(CreateLoopsRunRequestV1OptionSetOptions.ReuseFromSessionId) : (__requestBase is { } __ReuseFromSessionIdBaseValue ? __ReuseFromSessionIdBaseValue.ReuseFromSessionId : default); + var teamId = parseResult.GetRequiredValue(TeamId); var sessionId = parseResult.GetRequiredValue(CreateLoopsTrainerRequestV1OptionSetOptions.SessionId); + var baseModel = parseResult.GetRequiredValue(CreateLoopsTrainerRequestV1OptionSetOptions.BaseModel); + var name = CliRuntime.WasSpecified(parseResult, CreateLoopsTrainerRequestV1OptionSetOptions.NameOption) ? parseResult.GetValue(CreateLoopsTrainerRequestV1OptionSetOptions.NameOption) : (__requestBase is { } __NameBaseValue ? __NameBaseValue.Name : default); + var maxSeqLen = CliRuntime.WasSpecified(parseResult, CreateLoopsTrainerRequestV1OptionSetOptions.MaxSeqLen) ? parseResult.GetValue(CreateLoopsTrainerRequestV1OptionSetOptions.MaxSeqLen) : (__requestBase is { } __MaxSeqLenBaseValue ? __MaxSeqLenBaseValue.MaxSeqLen : default); + var loraRank = CliRuntime.WasSpecified(parseResult, CreateLoopsTrainerRequestV1OptionSetOptions.LoraRank) ? parseResult.GetValue(CreateLoopsTrainerRequestV1OptionSetOptions.LoraRank) : (__requestBase is { } __LoraRankBaseValue ? __LoraRankBaseValue.LoraRank : default); + var seed = CliRuntime.WasSpecified(parseResult, CreateLoopsTrainerRequestV1OptionSetOptions.Seed) ? parseResult.GetValue(CreateLoopsTrainerRequestV1OptionSetOptions.Seed) : (__requestBase is { } __SeedBaseValue ? __SeedBaseValue.Seed : default); + var scaleDownDelaySeconds = CliRuntime.WasSpecified(parseResult, CreateLoopsTrainerRequestV1OptionSetOptions.ScaleDownDelaySeconds) ? parseResult.GetValue(CreateLoopsTrainerRequestV1OptionSetOptions.ScaleDownDelaySeconds) : (__requestBase is { } __ScaleDownDelaySecondsBaseValue ? __ScaleDownDelaySecondsBaseValue.ScaleDownDelaySeconds : default); + var availabilityModel = CliRuntime.WasSpecified(parseResult, CreateLoopsTrainerRequestV1OptionSetOptions.AvailabilityModel) ? parseResult.GetValue(CreateLoopsTrainerRequestV1OptionSetOptions.AvailabilityModel) : (__requestBase is { } __AvailabilityModelBaseValue ? __AvailabilityModelBaseValue.AvailabilityModel : default); + var replicas = CliRuntime.WasSpecified(parseResult, CreateLoopsTrainerRequestV1OptionSetOptions.Replicas) ? parseResult.GetValue(CreateLoopsTrainerRequestV1OptionSetOptions.Replicas) : (__requestBase is { } __ReplicasBaseValue ? __ReplicasBaseValue.Replicas : default); + var path = CliRuntime.WasSpecified(parseResult, CreateLoopsTrainerRequestV1OptionSetOptions.Path) ? parseResult.GetValue(CreateLoopsTrainerRequestV1OptionSetOptions.Path) : (__requestBase is { } __PathBaseValue ? __PathBaseValue.Path : default); + var reuseFromRunId = CliRuntime.WasSpecified(parseResult, CreateLoopsTrainerRequestV1OptionSetOptions.ReuseFromRunId) ? parseResult.GetValue(CreateLoopsTrainerRequestV1OptionSetOptions.ReuseFromRunId) : (__requestBase is { } __ReuseFromRunIdBaseValue ? __ReuseFromRunIdBaseValue.ReuseFromRunId : default); + var reuseFromSessionId = CliRuntime.WasSpecified(parseResult, CreateLoopsTrainerRequestV1OptionSetOptions.ReuseFromSessionId) ? parseResult.GetValue(CreateLoopsTrainerRequestV1OptionSetOptions.ReuseFromSessionId) : (__requestBase is { } __ReuseFromSessionIdBaseValue ? __ReuseFromSessionIdBaseValue.ReuseFromSessionId : default); using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); diff --git a/src/cli/Baseten.CLI/Commands/ImagesApiGroupCommand.g.cs b/src/cli/Baseten.CLI/Commands/ImagesApiGroupCommand.g.cs index c5b1733f..cc847b06 100644 --- a/src/cli/Baseten.CLI/Commands/ImagesApiGroupCommand.g.cs +++ b/src/cli/Baseten.CLI/Commands/ImagesApiGroupCommand.g.cs @@ -15,8 +15,10 @@ public static Command Create() command.Subcommands.Add(ImagesDeleteImageCommandApiCommand.Create()); command.Subcommands.Add(ImagesDeleteImageTagCommandApiCommand.Create()); command.Subcommands.Add(ImagesGetImageCommandApiCommand.Create()); + command.Subcommands.Add(ImagesGetImageBuildLogsCommandApiCommand.Create()); command.Subcommands.Add(ImagesListImageTagsCommandApiCommand.Create()); command.Subcommands.Add(ImagesListImagesCommandApiCommand.Create()); + command.Subcommands.Add(ImagesListSandboxLibraryImagesCommandApiCommand.Create()); command.Subcommands.Add(ImagesPushImageCommandApiCommand.Create()); CustomizeCommand(ref command); return command; diff --git a/src/cli/Baseten.CLI/Commands/ImagesCleanupImagesCommandApiCommand.g.cs b/src/cli/Baseten.CLI/Commands/ImagesCleanupImagesCommandApiCommand.g.cs index 3334e152..44721dbf 100644 --- a/src/cli/Baseten.CLI/Commands/ImagesCleanupImagesCommandApiCommand.g.cs +++ b/src/cli/Baseten.CLI/Commands/ImagesCleanupImagesCommandApiCommand.g.cs @@ -19,7 +19,7 @@ internal static partial class ImagesCleanupImagesCommandApiCommand Description = @"Optional team ID. Must match the team_id query parameter when both are supplied. If neither selector is supplied, defaults to the caller's only accessible team. Callers with multiple accessible teams must select a team. Requests without access to any team are forbidden.", }; - private static string FormatResponse(ParseResult parseResult, global::Baseten.CleanupImagesResponseV1 value, global::System.Text.Json.Serialization.JsonSerializerContext context, bool truncateLongStrings) + private static string FormatResponse(ParseResult parseResult, global::Baseten.CleanupSandboxImagesResponseV1 value, global::System.Text.Json.Serialization.JsonSerializerContext context, bool truncateLongStrings) { string? text = null; CustomizeResponseText(parseResult, value, ref text); @@ -35,7 +35,7 @@ private static string FormatResponse(ParseResult parseResult, global::Baseten.Cl return CliRuntime.FormatHumanReadable(value, context, truncateLongStrings, hints); } - static partial void CustomizeResponseText(ParseResult parseResult, global::Baseten.CleanupImagesResponseV1 value, ref string? text); + static partial void CustomizeResponseText(ParseResult parseResult, global::Baseten.CleanupSandboxImagesResponseV1 value, ref string? text); static partial void CustomizeResponseFormatHints(Dictionary hints); diff --git a/src/cli/Baseten.CLI/Commands/ImagesDeleteImageCommandApiCommand.g.cs b/src/cli/Baseten.CLI/Commands/ImagesDeleteImageCommandApiCommand.g.cs index 5f6e74be..31297b83 100644 --- a/src/cli/Baseten.CLI/Commands/ImagesDeleteImageCommandApiCommand.g.cs +++ b/src/cli/Baseten.CLI/Commands/ImagesDeleteImageCommandApiCommand.g.cs @@ -25,7 +25,7 @@ internal static partial class ImagesDeleteImageCommandApiCommand Description = @"Optional team ID. Must match the team_id query parameter when both are supplied. If neither selector is supplied, defaults to the caller's only accessible team. Callers with multiple accessible teams must select a team. Requests without access to any team are forbidden.", }; - private static string FormatResponse(ParseResult parseResult, global::Baseten.ImageV1 value, global::System.Text.Json.Serialization.JsonSerializerContext context, bool truncateLongStrings) + private static string FormatResponse(ParseResult parseResult, global::Baseten.SandboxImageV1 value, global::System.Text.Json.Serialization.JsonSerializerContext context, bool truncateLongStrings) { string? text = null; CustomizeResponseText(parseResult, value, ref text); @@ -41,7 +41,7 @@ private static string FormatResponse(ParseResult parseResult, global::Baseten.Im return CliRuntime.FormatHumanReadable(value, context, truncateLongStrings, hints); } - static partial void CustomizeResponseText(ParseResult parseResult, global::Baseten.ImageV1 value, ref string? text); + static partial void CustomizeResponseText(ParseResult parseResult, global::Baseten.SandboxImageV1 value, ref string? text); static partial void CustomizeResponseFormatHints(Dictionary hints); @@ -72,20 +72,12 @@ await CliRuntime.RunAsync(async () => cancellationToken: cancellationToken).ConfigureAwait(false); - if (!await CliRuntime.TryWriteOutputDirectoryAsync( - parseResult, - response, - global::Baseten.SourceGenerationContext.Default, - @"Tags", - cancellationToken).ConfigureAwait(false)) - { await CliRuntime.WriteResponseAsync( parseResult, response, global::Baseten.SourceGenerationContext.Default, FormatResponse, cancellationToken).ConfigureAwait(false); - } }, cancellationToken).ConfigureAwait(false)); CustomizeCommand(ref command); return command; diff --git a/src/cli/Baseten.CLI/Commands/ImagesDeleteImageTagCommandApiCommand.g.cs b/src/cli/Baseten.CLI/Commands/ImagesDeleteImageTagCommandApiCommand.g.cs index 1e828ae9..583740cc 100644 --- a/src/cli/Baseten.CLI/Commands/ImagesDeleteImageTagCommandApiCommand.g.cs +++ b/src/cli/Baseten.CLI/Commands/ImagesDeleteImageTagCommandApiCommand.g.cs @@ -31,7 +31,7 @@ internal static partial class ImagesDeleteImageTagCommandApiCommand Description = @"Optional team ID. Must match the team_id query parameter when both are supplied. If neither selector is supplied, defaults to the caller's only accessible team. Callers with multiple accessible teams must select a team. Requests without access to any team are forbidden.", }; - private static string FormatResponse(ParseResult parseResult, global::Baseten.ImageV1 value, global::System.Text.Json.Serialization.JsonSerializerContext context, bool truncateLongStrings) + private static string FormatResponse(ParseResult parseResult, global::Baseten.SandboxImageV1 value, global::System.Text.Json.Serialization.JsonSerializerContext context, bool truncateLongStrings) { string? text = null; CustomizeResponseText(parseResult, value, ref text); @@ -47,7 +47,7 @@ private static string FormatResponse(ParseResult parseResult, global::Baseten.Im return CliRuntime.FormatHumanReadable(value, context, truncateLongStrings, hints); } - static partial void CustomizeResponseText(ParseResult parseResult, global::Baseten.ImageV1 value, ref string? text); + static partial void CustomizeResponseText(ParseResult parseResult, global::Baseten.SandboxImageV1 value, ref string? text); static partial void CustomizeResponseFormatHints(Dictionary hints); @@ -81,20 +81,12 @@ await CliRuntime.RunAsync(async () => cancellationToken: cancellationToken).ConfigureAwait(false); - if (!await CliRuntime.TryWriteOutputDirectoryAsync( - parseResult, - response, - global::Baseten.SourceGenerationContext.Default, - @"Tags", - cancellationToken).ConfigureAwait(false)) - { await CliRuntime.WriteResponseAsync( parseResult, response, global::Baseten.SourceGenerationContext.Default, FormatResponse, cancellationToken).ConfigureAwait(false); - } }, cancellationToken).ConfigureAwait(false)); CustomizeCommand(ref command); return command; diff --git a/src/cli/Baseten.CLI/Commands/ImagesGetImageBuildLogsCommandApiCommand.g.cs b/src/cli/Baseten.CLI/Commands/ImagesGetImageBuildLogsCommandApiCommand.g.cs new file mode 100644 index 00000000..65943896 --- /dev/null +++ b/src/cli/Baseten.CLI/Commands/ImagesGetImageBuildLogsCommandApiCommand.g.cs @@ -0,0 +1,129 @@ +#nullable enable +#pragma warning disable CS0618 + +using System.CommandLine; + +namespace Baseten.CLI.Commands; + +internal static partial class ImagesGetImageBuildLogsCommandApiCommand +{ + private static Argument ImageName { get; } = new( + name: @"image-name") + { + Description = @"This is a missing parameter that was added automatically. Please check the OpenAPI spec.", + }; + + private static Option TeamId { get; } = new( + name: @"--team-id") + { + Description = @"Optional team ID. Must match X-Team-Id when both are supplied. If neither selector is supplied, defaults to the caller's only accessible team. Callers with multiple accessible teams must select a team. Requests without access to any team are forbidden.", + }; + + private static Option XTeamId { get; } = new( + name: @"--x-team-id") + { + Description = @"Optional team ID. Must match the team_id query parameter when both are supplied. If neither selector is supplied, defaults to the caller's only accessible team. Callers with multiple accessible teams must select a team. Requests without access to any team are forbidden.", + }; + + private static Option StartTime { get; } = new( + name: @"--start-time") + { + Description = @"Inclusive RFC 3339 start time. Defaults to 24 hours before end_time.", + }; + + private static Option EndTime { get; } = new( + name: @"--end-time") + { + Description = @"RFC 3339 end time. Defaults to the current time.", + }; + + private static Option Limit { get; } = new( + name: @"--limit") + { + Description = @"Maximum number of log entries to return.", + }; + + private static Option Offset { get; } = new( + name: @"--offset") + { + Description = @"Number of log entries to skip. Narrow the time range beyond 10000 entries.", + }; + + private static string FormatResponse(ParseResult parseResult, global::Baseten.SandboxImageBuildLogsResponseV1 value, global::System.Text.Json.Serialization.JsonSerializerContext context, bool truncateLongStrings) + { + string? text = null; + CustomizeResponseText(parseResult, value, ref text); + if (!string.IsNullOrWhiteSpace(text)) + { + return text; + } + + var hints = new Dictionary(StringComparer.OrdinalIgnoreCase) + { + }; + CustomizeResponseFormatHints(hints); + return CliRuntime.FormatHumanReadable(value, context, truncateLongStrings, hints); + } + + static partial void CustomizeResponseText(ParseResult parseResult, global::Baseten.SandboxImageBuildLogsResponseV1 value, ref string? text); + static partial void CustomizeResponseFormatHints(Dictionary hints); + + + static partial void CustomizeCommand(ref Command command); + + public static Command Create(string? commandName = null) + { + var command = new Command(commandName ?? @"get-image-build-logs", @"Get image build logs +Return one page of logs from the latest recorded build of this image, including failed builds, newest first. Logs may take a short time to appear. Defaults to the last 24 hours; the requested time range must not exceed 7 days. Keep start_time and end_time fixed when paging with offset. A new build changes the log source; this endpoint does not retrieve a historical build by ID. While a new upload is waiting to start, logs may still refer to the preceding build. Older builds without a recorded environment use image-level build logs within the requested time range."); + command.Arguments.Add(ImageName); + command.Options.Add(TeamId); + command.Options.Add(XTeamId); + command.Options.Add(StartTime); + command.Options.Add(EndTime); + command.Options.Add(Limit); + command.Options.Add(Offset); + + + command.SetAction(async (ParseResult parseResult, CancellationToken cancellationToken) => + await CliRuntime.RunAsync(async () => + { + var imageName = parseResult.GetRequiredValue(ImageName); + var teamId = parseResult.GetValue(TeamId); + var xTeamId = parseResult.GetValue(XTeamId); + var startTime = parseResult.GetValue(StartTime); + var endTime = parseResult.GetValue(EndTime); + var limit = parseResult.GetValue(Limit); + var offset = parseResult.GetValue(Offset); + using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); + + + var response = await client.Images.GetImageBuildLogsAsync( + imageName: imageName, + teamId: teamId, + xTeamId: xTeamId, + startTime: startTime, + endTime: endTime, + limit: limit, + offset: offset, + cancellationToken: cancellationToken).ConfigureAwait(false); + + + if (!await CliRuntime.TryWriteOutputDirectoryAsync( + parseResult, + response, + global::Baseten.SourceGenerationContext.Default, + @"Logs", + cancellationToken).ConfigureAwait(false)) + { + await CliRuntime.WriteResponseAsync( + parseResult, + response, + global::Baseten.SourceGenerationContext.Default, + FormatResponse, + cancellationToken).ConfigureAwait(false); + } + }, cancellationToken).ConfigureAwait(false)); + CustomizeCommand(ref command); + return command; + } +} \ No newline at end of file diff --git a/src/cli/Baseten.CLI/Commands/ImagesGetImageCommandApiCommand.g.cs b/src/cli/Baseten.CLI/Commands/ImagesGetImageCommandApiCommand.g.cs index b0df4fec..8893994f 100644 --- a/src/cli/Baseten.CLI/Commands/ImagesGetImageCommandApiCommand.g.cs +++ b/src/cli/Baseten.CLI/Commands/ImagesGetImageCommandApiCommand.g.cs @@ -25,7 +25,7 @@ internal static partial class ImagesGetImageCommandApiCommand Description = @"Optional team ID. Must match the team_id query parameter when both are supplied. If neither selector is supplied, defaults to the caller's only accessible team. Callers with multiple accessible teams must select a team. Requests without access to any team are forbidden.", }; - private static string FormatResponse(ParseResult parseResult, global::Baseten.ImageV1 value, global::System.Text.Json.Serialization.JsonSerializerContext context, bool truncateLongStrings) + private static string FormatResponse(ParseResult parseResult, global::Baseten.SandboxImageV1 value, global::System.Text.Json.Serialization.JsonSerializerContext context, bool truncateLongStrings) { string? text = null; CustomizeResponseText(parseResult, value, ref text); @@ -41,7 +41,7 @@ private static string FormatResponse(ParseResult parseResult, global::Baseten.Im return CliRuntime.FormatHumanReadable(value, context, truncateLongStrings, hints); } - static partial void CustomizeResponseText(ParseResult parseResult, global::Baseten.ImageV1 value, ref string? text); + static partial void CustomizeResponseText(ParseResult parseResult, global::Baseten.SandboxImageV1 value, ref string? text); static partial void CustomizeResponseFormatHints(Dictionary hints); @@ -72,20 +72,12 @@ await CliRuntime.RunAsync(async () => cancellationToken: cancellationToken).ConfigureAwait(false); - if (!await CliRuntime.TryWriteOutputDirectoryAsync( - parseResult, - response, - global::Baseten.SourceGenerationContext.Default, - @"Tags", - cancellationToken).ConfigureAwait(false)) - { await CliRuntime.WriteResponseAsync( parseResult, response, global::Baseten.SourceGenerationContext.Default, FormatResponse, cancellationToken).ConfigureAwait(false); - } }, cancellationToken).ConfigureAwait(false)); CustomizeCommand(ref command); return command; diff --git a/src/cli/Baseten.CLI/Commands/ImagesListImageTagsCommandApiCommand.g.cs b/src/cli/Baseten.CLI/Commands/ImagesListImageTagsCommandApiCommand.g.cs index d8166e56..0cdf7b1e 100644 --- a/src/cli/Baseten.CLI/Commands/ImagesListImageTagsCommandApiCommand.g.cs +++ b/src/cli/Baseten.CLI/Commands/ImagesListImageTagsCommandApiCommand.g.cs @@ -55,7 +55,7 @@ internal static partial class ImagesListImageTagsCommandApiCommand Description = @"Exact tag name. Cannot be combined with q. Forces ascending name order.", }; - private static string FormatResponse(ParseResult parseResult, global::Baseten.ListImageTagsResponseV1 value, global::System.Text.Json.Serialization.JsonSerializerContext context, bool truncateLongStrings) + private static string FormatResponse(ParseResult parseResult, global::Baseten.ListSandboxImageTagsResponseV1 value, global::System.Text.Json.Serialization.JsonSerializerContext context, bool truncateLongStrings) { string? text = null; CustomizeResponseText(parseResult, value, ref text); @@ -71,7 +71,7 @@ private static string FormatResponse(ParseResult parseResult, global::Baseten.Li return CliRuntime.FormatHumanReadable(value, context, truncateLongStrings, hints); } - static partial void CustomizeResponseText(ParseResult parseResult, global::Baseten.ListImageTagsResponseV1 value, ref string? text); + static partial void CustomizeResponseText(ParseResult parseResult, global::Baseten.ListSandboxImageTagsResponseV1 value, ref string? text); static partial void CustomizeResponseFormatHints(Dictionary hints); diff --git a/src/cli/Baseten.CLI/Commands/ImagesListImagesCommandApiCommand.g.cs b/src/cli/Baseten.CLI/Commands/ImagesListImagesCommandApiCommand.g.cs index b90ea2fe..18d72fd8 100644 --- a/src/cli/Baseten.CLI/Commands/ImagesListImagesCommandApiCommand.g.cs +++ b/src/cli/Baseten.CLI/Commands/ImagesListImagesCommandApiCommand.g.cs @@ -43,7 +43,7 @@ internal static partial class ImagesListImagesCommandApiCommand Description = @"Case-sensitive repository name prefix. Search is applied before pagination.", }; - private static string FormatResponse(ParseResult parseResult, global::Baseten.ListImagesResponseV1 value, global::System.Text.Json.Serialization.JsonSerializerContext context, bool truncateLongStrings) + private static string FormatResponse(ParseResult parseResult, global::Baseten.ListSandboxImagesResponseV1 value, global::System.Text.Json.Serialization.JsonSerializerContext context, bool truncateLongStrings) { string? text = null; CustomizeResponseText(parseResult, value, ref text); @@ -59,7 +59,7 @@ private static string FormatResponse(ParseResult parseResult, global::Baseten.Li return CliRuntime.FormatHumanReadable(value, context, truncateLongStrings, hints); } - static partial void CustomizeResponseText(ParseResult parseResult, global::Baseten.ListImagesResponseV1 value, ref string? text); + static partial void CustomizeResponseText(ParseResult parseResult, global::Baseten.ListSandboxImagesResponseV1 value, ref string? text); static partial void CustomizeResponseFormatHints(Dictionary hints); diff --git a/src/cli/Baseten.CLI/Commands/ImagesListSandboxLibraryImagesCommandApiCommand.g.cs b/src/cli/Baseten.CLI/Commands/ImagesListSandboxLibraryImagesCommandApiCommand.g.cs new file mode 100644 index 00000000..61118aa1 --- /dev/null +++ b/src/cli/Baseten.CLI/Commands/ImagesListSandboxLibraryImagesCommandApiCommand.g.cs @@ -0,0 +1,71 @@ +#nullable enable +#pragma warning disable CS0618 + +using System.CommandLine; + +namespace Baseten.CLI.Commands; + +internal static partial class ImagesListSandboxLibraryImagesCommandApiCommand +{ + + + private static string FormatResponse(ParseResult parseResult, global::Baseten.ListSandboxLibraryImagesResponseV1 value, global::System.Text.Json.Serialization.JsonSerializerContext context, bool truncateLongStrings) + { + string? text = null; + CustomizeResponseText(parseResult, value, ref text); + if (!string.IsNullOrWhiteSpace(text)) + { + return text; + } + + var hints = new Dictionary(StringComparer.OrdinalIgnoreCase) + { + }; + CustomizeResponseFormatHints(hints); + return CliRuntime.FormatHumanReadable(value, context, truncateLongStrings, hints); + } + + static partial void CustomizeResponseText(ParseResult parseResult, global::Baseten.ListSandboxLibraryImagesResponseV1 value, ref string? text); + static partial void CustomizeResponseFormatHints(Dictionary hints); + + + static partial void CustomizeCommand(ref Command command); + + public static Command Create(string? commandName = null) + { + var command = new Command(commandName ?? @"list-sandbox-library-images", @"List built-in sandbox images +Return the built-in sandbox images, the same for every team, so no team is selected. Use the image field directly as the image of a sandbox, without building or pushing it. Hidden and upcoming images are excluded."); + + + + command.SetAction(async (ParseResult parseResult, CancellationToken cancellationToken) => + await CliRuntime.RunAsync(async () => + { + + using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); + + + var response = await client.Images.ListSandboxLibraryImagesAsync( + + cancellationToken: cancellationToken).ConfigureAwait(false); + + + if (!await CliRuntime.TryWriteOutputDirectoryAsync( + parseResult, + response, + global::Baseten.SourceGenerationContext.Default, + @"Items", + cancellationToken).ConfigureAwait(false)) + { + await CliRuntime.WriteResponseAsync( + parseResult, + response, + global::Baseten.SourceGenerationContext.Default, + FormatResponse, + cancellationToken).ConfigureAwait(false); + } + }, cancellationToken).ConfigureAwait(false)); + CustomizeCommand(ref command); + return command; + } +} \ No newline at end of file diff --git a/src/cli/Baseten.CLI/Commands/ImagesPushImageCommandApiCommand.g.cs b/src/cli/Baseten.CLI/Commands/ImagesPushImageCommandApiCommand.g.cs index fd59140d..3e7897ac 100644 --- a/src/cli/Baseten.CLI/Commands/ImagesPushImageCommandApiCommand.g.cs +++ b/src/cli/Baseten.CLI/Commands/ImagesPushImageCommandApiCommand.g.cs @@ -28,7 +28,7 @@ internal static partial class ImagesPushImageCommandApiCommand private static Option Image { get; } = new( name: @"--image") { - Description = @"Optional source registry image reference including a registry hostname. When omitted, the response provides an archive upload URL.", + Description = @"Optional source registry image reference including a registry hostname. When omitted, the response provides an archive upload URL. The uploaded ZIP archive must not exceed 5 GB.", }; private static Option DockerConfig { get; } = new( @@ -53,7 +53,7 @@ internal static partial class ImagesPushImageCommandApiCommand Hidden = true, }; - private static string FormatResponse(ParseResult parseResult, global::Baseten.PushImageResponseV1 value, global::System.Text.Json.Serialization.JsonSerializerContext context, bool truncateLongStrings) + private static string FormatResponse(ParseResult parseResult, global::Baseten.PushSandboxImageResponseV1 value, global::System.Text.Json.Serialization.JsonSerializerContext context, bool truncateLongStrings) { string? text = null; CustomizeResponseText(parseResult, value, ref text); @@ -69,7 +69,7 @@ private static string FormatResponse(ParseResult parseResult, global::Baseten.Pu return CliRuntime.FormatHumanReadable(value, context, truncateLongStrings, hints); } - static partial void CustomizeResponseText(ParseResult parseResult, global::Baseten.PushImageResponseV1 value, ref string? text); + static partial void CustomizeResponseText(ParseResult parseResult, global::Baseten.PushSandboxImageResponseV1 value, ref string? text); static partial void CustomizeResponseFormatHints(Dictionary hints); @@ -78,7 +78,7 @@ private static string FormatResponse(ParseResult parseResult, global::Baseten.Pu public static Command Create(string? commandName = null) { var command = new Command(commandName ?? @"push-image", @"Push a sandbox image -With image supplied, import the registry image asynchronously. Otherwise return an upload URL for a ZIP source archive containing its Dockerfile and build context. Processing starts after upload. No sandbox is created. Poll the image until BUILT or FAILED."); +With image supplied, import the registry image asynchronously. Otherwise return an upload URL for a ZIP source archive containing its Dockerfile and build context. The uploaded ZIP archive must not exceed 5 GB. Processing starts after upload. No sandbox is created. Poll the image until BUILT or FAILED."); command.Arguments.Add(NameOption); command.Options.Add(TeamId); command.Options.Add(XTeamId); @@ -102,7 +102,7 @@ public static Command Create(string? commandName = null) command.SetAction(async (ParseResult parseResult, CancellationToken cancellationToken) => await CliRuntime.RunAsync(async () => { - var __requestBase = await CliRuntime.ReadRequestOrDefaultAsync( + var __requestBase = await CliRuntime.ReadRequestOrDefaultAsync( parseResult, Input, RequestJson, diff --git a/src/cli/Baseten.CLI/Commands/SandboxesApiGroupCommand.g.cs b/src/cli/Baseten.CLI/Commands/SandboxesApiGroupCommand.g.cs index 5b375e6c..0452f4e7 100644 --- a/src/cli/Baseten.CLI/Commands/SandboxesApiGroupCommand.g.cs +++ b/src/cli/Baseten.CLI/Commands/SandboxesApiGroupCommand.g.cs @@ -14,6 +14,9 @@ public static Command Create() command.Subcommands.Add(SandboxesCreateSandboxCommandApiCommand.Create()); command.Subcommands.Add(SandboxesDeleteSandboxCommandApiCommand.Create()); command.Subcommands.Add(SandboxesGetSandboxCommandApiCommand.Create()); + command.Subcommands.Add(SandboxesGetSandboxConfigurationCommandApiCommand.Create()); + command.Subcommands.Add(SandboxesGetSandboxLogsCommandApiCommand.Create()); + command.Subcommands.Add(SandboxesGetSandboxMetricsCommandApiCommand.Create()); command.Subcommands.Add(SandboxesListSandboxesCommandApiCommand.Create()); command.Subcommands.Add(SandboxesUpdateSandboxCommandApiCommand.Create()); CustomizeCommand(ref command); diff --git a/src/cli/Baseten.CLI/Commands/SandboxesCreateSandboxCommandApiCommand.g.cs b/src/cli/Baseten.CLI/Commands/SandboxesCreateSandboxCommandApiCommand.g.cs index b19d8ebc..e05fb4d7 100644 --- a/src/cli/Baseten.CLI/Commands/SandboxesCreateSandboxCommandApiCommand.g.cs +++ b/src/cli/Baseten.CLI/Commands/SandboxesCreateSandboxCommandApiCommand.g.cs @@ -19,6 +19,10 @@ internal static partial class SandboxesCreateSandboxCommandApiCommand Description = @"Optional team ID. Must match the team_id query parameter when both are supplied. If neither selector is supplied, defaults to the caller's only accessible team. Callers with multiple accessible teams must select a team. Requests without access to any team are forbidden.", }; + private static Option CreateIfNotExists { get; } = CliRuntime.CreateNullableBoolOption( + name: @"--create-if-not-exists", + description: @"When true, return the existing live sandbox with this name or recreate it if it is failed, terminated, or being deleted. The server handles concurrent creation and deletion races with a bounded wait; persistent contention returns a conflict. Requires name. Existing configuration is preserved. Defaults to false when omitted."); + private static Option NameOption { get; } = new( name: @"--name") { @@ -46,13 +50,13 @@ internal static partial class SandboxesCreateSandboxCommandApiCommand private static Option Image { get; } = new( name: @"--image") { - Description = @"Image reference including its tag. Use blaxel/base-image:latest to get started with the built-in sandbox execution API. This image is available directly without building, pushing, or listing images through GET /v1/sandboxes/images.", + Description = @"Image reference including its tag. Defaults to baseten/base-image:latest, the built-in sandbox execution API. This image is available directly without building, pushing, or listing images through GET /v1/sandboxes/images.", }; private static Option Memory { get; } = new( name: @"--memory") { - Description = @"Memory allocation in megabytes. Also determines CPU allocation (CPU cores = memory in MB / 2048, e.g., 4096MB = 2 CPUs).", + Description = @"Memory allocation in megabytes. Also determines CPU allocation (CPU cores = memory in MB / 2048, e.g., 4096MB = 2 CPUs). Defaults to 4096.", }; private static Option?> Ports { get; } = new( @@ -61,12 +65,6 @@ internal static partial class SandboxesCreateSandboxCommandApiCommand Description = @"Set of ports for a resource", }; - private static Option DisplayName { get; } = new( - name: @"--display-name") - { - Description = @"Human-readable name for display in the UI. Can contain spaces and special characters, max 63 characters.", - }; - private static Option ExternalId { get; } = new( name: @"--external-id") { @@ -121,9 +119,10 @@ private static string FormatResponse(ParseResult parseResult, global::Baseten.Sa public static Command Create(string? commandName = null) { var command = new Command(commandName ?? @"create-sandbox", @"Create a sandbox -Create a sandbox with an optional client-provided name, generated by the server when omitted. The request waits briefly for deployment, then returns the created resource. Deployment may continue after the response; inspect status to determine readiness. Names belonging to failed or terminated sandboxes can be reused; an active sandbox reserves its name. To get started, set image to blaxel/base-image:latest, the built-in image with the sandbox execution API ready to use. It is available directly; no image build, push, or GET /v1/sandboxes/images is needed. Use the returned url to execute commands with the same Bearer API key."); +Create a sandbox with an optional client-provided name, generated by the server when omitted. The request waits briefly for deployment, then returns the created resource. Deployment may continue after the response; inspect status to determine readiness. Names belonging to failed or terminated sandboxes can be reused; an active sandbox reserves its name. Every field is optional. The server applies image and memory defaults; SDKs should omit fields the caller did not set. A request with no body creates a sandbox from baseten/base-image:latest, the built-in image with the sandbox execution API ready to use, with 4096 MB of memory. It is available directly; no image build, push, or GET /v1/sandboxes/images is needed. Use the returned url to execute commands with your authentication token as a Bearer token, not your Baseten API key."); command.Options.Add(TeamId); command.Options.Add(XTeamId); + command.Options.Add(CreateIfNotExists); command.Options.Add(NameOption); command.Options.Add(Network); command.Options.Add(Region); @@ -131,7 +130,6 @@ public static Command Create(string? commandName = null) command.Options.Add(Image); command.Options.Add(Memory); command.Options.Add(Ports); - command.Options.Add(DisplayName); command.Options.Add(ExternalId); command.Options.Add(Labels); command.Options.Add(LifecycleOptions.TerminatedRetention); command.Options.Add(Input); @@ -161,6 +159,7 @@ await CliRuntime.RunAsync(async () => cancellationToken).ConfigureAwait(false); var teamId = parseResult.GetValue(TeamId); var xTeamId = parseResult.GetValue(XTeamId); + var createIfNotExists = CliRuntime.WasSpecified(parseResult, CreateIfNotExists) ? parseResult.GetValue(CreateIfNotExists) : (__requestBase is { } __CreateIfNotExistsBaseValue ? __CreateIfNotExistsBaseValue.CreateIfNotExists : default); var name = CliRuntime.WasSpecified(parseResult, NameOption) ? parseResult.GetValue(NameOption) : (__requestBase is { } __NameBaseValue ? __NameBaseValue.Name : default); var network = CliRuntime.WasSpecified(parseResult, Network) ? parseResult.GetValue(Network) : (__requestBase is { } __NetworkBaseValue ? __NetworkBaseValue.Network : default); var region = CliRuntime.WasSpecified(parseResult, Region) ? parseResult.GetValue(Region) : (__requestBase is { } __RegionBaseValue ? __RegionBaseValue.Region : default); @@ -168,7 +167,6 @@ await CliRuntime.RunAsync(async () => var image = CliRuntime.WasSpecified(parseResult, Image) ? parseResult.GetValue(Image) : (__requestBase is { } __ImageBaseValue ? __ImageBaseValue.Image : default); var memory = CliRuntime.WasSpecified(parseResult, Memory) ? parseResult.GetValue(Memory) : (__requestBase is { } __MemoryBaseValue ? __MemoryBaseValue.Memory : default); var ports = CliRuntime.WasSpecified(parseResult, Ports) ? parseResult.GetValue(Ports) : (__requestBase is { } __PortsBaseValue ? __PortsBaseValue.Ports : default); - var displayName = CliRuntime.WasSpecified(parseResult, DisplayName) ? parseResult.GetValue(DisplayName) : (__requestBase is { } __DisplayNameBaseValue ? __DisplayNameBaseValue.DisplayName : default); var externalId = CliRuntime.WasSpecified(parseResult, ExternalId) ? parseResult.GetValue(ExternalId) : (__requestBase is { } __ExternalIdBaseValue ? __ExternalIdBaseValue.ExternalId : default); var labels = CliRuntime.WasSpecified(parseResult, Labels) ? parseResult.GetValue(Labels) : (__requestBase is { } __LabelsBaseValue ? __LabelsBaseValue.Labels : default); @@ -188,6 +186,7 @@ await CliRuntime.RunAsync(async () => var response = await client.Sandboxes.CreateSandboxAsync( teamId: teamId, xTeamId: xTeamId, + createIfNotExists: createIfNotExists, name: name, network: network, region: region, @@ -195,7 +194,6 @@ await CliRuntime.RunAsync(async () => image: image, memory: memory, ports: ports, - displayName: displayName, externalId: externalId, labels: labels, lifecycle: lifecycle, diff --git a/src/cli/Baseten.CLI/Commands/SandboxesGetSandboxCommandApiCommand.g.cs b/src/cli/Baseten.CLI/Commands/SandboxesGetSandboxCommandApiCommand.g.cs index 541604cb..8f067ba5 100644 --- a/src/cli/Baseten.CLI/Commands/SandboxesGetSandboxCommandApiCommand.g.cs +++ b/src/cli/Baseten.CLI/Commands/SandboxesGetSandboxCommandApiCommand.g.cs @@ -25,6 +25,10 @@ internal static partial class SandboxesGetSandboxCommandApiCommand Description = @"Optional team ID. Must match the team_id query parameter when both are supplied. If neither selector is supplied, defaults to the caller's only accessible team. Callers with multiple accessible teams must select a team. Requests without access to any team are forbidden.", }; + private static Option ShowSecrets { get; } = CliRuntime.CreateNullableBoolOption( + name: @"--show-secrets", + description: @"Reveal environment variable values for workspace administrators. Defaults to false. Callers without the admin role receive masked values even when true."); + private static string FormatResponse(ParseResult parseResult, global::Baseten.SandboxV1 value, global::System.Text.Json.Serialization.JsonSerializerContext context, bool truncateLongStrings) { string? text = null; @@ -50,10 +54,11 @@ private static string FormatResponse(ParseResult parseResult, global::Baseten.Sa public static Command Create(string? commandName = null) { var command = new Command(commandName ?? @"get-sandbox", @"Get a sandbox -Return the sandbox configuration and current state."); +Return the sandbox configuration and status."); command.Arguments.Add(SandboxName); command.Options.Add(TeamId); command.Options.Add(XTeamId); + command.Options.Add(ShowSecrets); command.SetAction(async (ParseResult parseResult, CancellationToken cancellationToken) => @@ -62,6 +67,7 @@ await CliRuntime.RunAsync(async () => var sandboxName = parseResult.GetRequiredValue(SandboxName); var teamId = parseResult.GetValue(TeamId); var xTeamId = parseResult.GetValue(XTeamId); + var showSecrets = parseResult.GetValue(ShowSecrets); using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); @@ -69,6 +75,7 @@ await CliRuntime.RunAsync(async () => sandboxName: sandboxName, teamId: teamId, xTeamId: xTeamId, + showSecrets: showSecrets, cancellationToken: cancellationToken).ConfigureAwait(false); diff --git a/src/cli/Baseten.CLI/Commands/SandboxesGetSandboxConfigurationCommandApiCommand.g.cs b/src/cli/Baseten.CLI/Commands/SandboxesGetSandboxConfigurationCommandApiCommand.g.cs new file mode 100644 index 00000000..a27ddac1 --- /dev/null +++ b/src/cli/Baseten.CLI/Commands/SandboxesGetSandboxConfigurationCommandApiCommand.g.cs @@ -0,0 +1,71 @@ +#nullable enable +#pragma warning disable CS0618 + +using System.CommandLine; + +namespace Baseten.CLI.Commands; + +internal static partial class SandboxesGetSandboxConfigurationCommandApiCommand +{ + + + private static string FormatResponse(ParseResult parseResult, global::Baseten.GetSandboxConfigurationResponseV1 value, global::System.Text.Json.Serialization.JsonSerializerContext context, bool truncateLongStrings) + { + string? text = null; + CustomizeResponseText(parseResult, value, ref text); + if (!string.IsNullOrWhiteSpace(text)) + { + return text; + } + + var hints = new Dictionary(StringComparer.OrdinalIgnoreCase) + { + }; + CustomizeResponseFormatHints(hints); + return CliRuntime.FormatHumanReadable(value, context, truncateLongStrings, hints); + } + + static partial void CustomizeResponseText(ParseResult parseResult, global::Baseten.GetSandboxConfigurationResponseV1 value, ref string? text); + static partial void CustomizeResponseFormatHints(Dictionary hints); + + + static partial void CustomizeCommand(ref Command command); + + public static Command Create(string? commandName = null) + { + var command = new Command(commandName ?? @"get-sandbox-configuration", @"Get sandbox configuration +Return available Carbon-compatible sandbox regions. Configuration is the same for every team, so no team is selected. Only enabled regions supporting Carbon are returned. This describes regional capability, not the runtime selected for a particular team or sandbox. Region configuration is cached for up to 30 seconds."); + + + + command.SetAction(async (ParseResult parseResult, CancellationToken cancellationToken) => + await CliRuntime.RunAsync(async () => + { + + using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); + + + var response = await client.Sandboxes.GetSandboxConfigurationAsync( + + cancellationToken: cancellationToken).ConfigureAwait(false); + + + if (!await CliRuntime.TryWriteOutputDirectoryAsync( + parseResult, + response, + global::Baseten.SourceGenerationContext.Default, + @"Regions", + cancellationToken).ConfigureAwait(false)) + { + await CliRuntime.WriteResponseAsync( + parseResult, + response, + global::Baseten.SourceGenerationContext.Default, + FormatResponse, + cancellationToken).ConfigureAwait(false); + } + }, cancellationToken).ConfigureAwait(false)); + CustomizeCommand(ref command); + return command; + } +} \ No newline at end of file diff --git a/src/cli/Baseten.CLI/Commands/SandboxesGetSandboxLogsCommandApiCommand.g.cs b/src/cli/Baseten.CLI/Commands/SandboxesGetSandboxLogsCommandApiCommand.g.cs new file mode 100644 index 00000000..00d42e03 --- /dev/null +++ b/src/cli/Baseten.CLI/Commands/SandboxesGetSandboxLogsCommandApiCommand.g.cs @@ -0,0 +1,135 @@ +#nullable enable +#pragma warning disable CS0618 + +using System.CommandLine; + +namespace Baseten.CLI.Commands; + +internal static partial class SandboxesGetSandboxLogsCommandApiCommand +{ + private static Argument SandboxName { get; } = new( + name: @"sandbox-name") + { + Description = @"Immutable sandbox name returned by creation.", + }; + + private static Option TeamId { get; } = new( + name: @"--team-id") + { + Description = @"Optional team ID. Must match X-Team-Id when both are supplied. If neither selector is supplied, defaults to the caller's only accessible team. Callers with multiple accessible teams must select a team. Requests without access to any team are forbidden.", + }; + + private static Option XTeamId { get; } = new( + name: @"--x-team-id") + { + Description = @"Optional team ID. Must match the team_id query parameter when both are supplied. If neither selector is supplied, defaults to the caller's only accessible team. Callers with multiple accessible teams must select a team. Requests without access to any team are forbidden.", + }; + + private static Option StartTime { get; } = new( + name: @"--start-time") + { + Description = @"", + Required = true, + }; + + private static Option EndTime { get; } = new( + name: @"--end-time") + { + Description = @"", + Required = true, + }; + + private static Option Limit { get; } = new( + name: @"--limit") + { + Description = @"", + }; + + private static Option Cursor { get; } = new( + name: @"--cursor") + { + Description = @"Opaque next_cursor from the previous page. Omit for the first page.", + }; + + private static string FormatResponse(ParseResult parseResult, global::Baseten.SandboxLogsV1 value, global::System.Text.Json.Serialization.JsonSerializerContext context, bool truncateLongStrings) + { + string? text = null; + CustomizeResponseText(parseResult, value, ref text); + if (!string.IsNullOrWhiteSpace(text)) + { + return text; + } + + var hints = new Dictionary(StringComparer.OrdinalIgnoreCase) + { + }; + CustomizeResponseFormatHints(hints); + return CliRuntime.FormatHumanReadable(value, context, truncateLongStrings, hints); + } + + static partial void CustomizeResponseText(ParseResult parseResult, global::Baseten.SandboxLogsV1 value, ref string? text); + static partial void CustomizeResponseFormatHints(Dictionary hints); + + + static partial void CustomizeCommand(ref Command command); + + public static Command Create(string? commandName = null) + { + var command = new Command(commandName ?? @"get-sandbox-logs", @"Get sandbox logs +Returns sandbox runtime logs, newest first, within the half-open range +[start_time, end_time). Ranges are limited to 7 days. Follow next_cursor +until it is null to retrieve all pages, keeping the same range and limit. +Logs before sandbox creation are excluded. Unavailable telemetry returns an error. +"); + command.Arguments.Add(SandboxName); + command.Options.Add(TeamId); + command.Options.Add(XTeamId); + command.Options.Add(StartTime); + command.Options.Add(EndTime); + command.Options.Add(Limit); + command.Options.Add(Cursor); + + + command.SetAction(async (ParseResult parseResult, CancellationToken cancellationToken) => + await CliRuntime.RunAsync(async () => + { + var sandboxName = parseResult.GetRequiredValue(SandboxName); + var teamId = parseResult.GetValue(TeamId); + var xTeamId = parseResult.GetValue(XTeamId); + var startTime = parseResult.GetRequiredValue(StartTime); + var endTime = parseResult.GetRequiredValue(EndTime); + var limit = parseResult.GetValue(Limit); + var cursor = parseResult.GetValue(Cursor); + using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); + + + var response = await client.Sandboxes.GetSandboxLogsAsync( + sandboxName: sandboxName, + teamId: teamId, + xTeamId: xTeamId, + startTime: startTime, + endTime: endTime, + limit: limit, + cursor: cursor, + cancellationToken: cancellationToken).ConfigureAwait(false); + + + if (!await CliRuntime.TryWriteOutputDirectoryAsync( + parseResult, + response, + global::Baseten.SourceGenerationContext.Default, + @"Logs", + cancellationToken).ConfigureAwait(false)) + { + await CliRuntime.WriteResponseAsync( + parseResult, + response, + global::Baseten.SourceGenerationContext.Default, + FormatResponse, + cancellationToken).ConfigureAwait(false); + } + }, cancellationToken).ConfigureAwait(false)); + CustomizeCommand(ref command); + return command; + } +} \ No newline at end of file diff --git a/src/cli/Baseten.CLI/Commands/SandboxesGetSandboxMetricsCommandApiCommand.g.cs b/src/cli/Baseten.CLI/Commands/SandboxesGetSandboxMetricsCommandApiCommand.g.cs new file mode 100644 index 00000000..553f0767 --- /dev/null +++ b/src/cli/Baseten.CLI/Commands/SandboxesGetSandboxMetricsCommandApiCommand.g.cs @@ -0,0 +1,130 @@ +#nullable enable +#pragma warning disable CS0618 + +using System.CommandLine; + +namespace Baseten.CLI.Commands; + +internal static partial class SandboxesGetSandboxMetricsCommandApiCommand +{ + private static Argument SandboxName { get; } = new( + name: @"sandbox-name") + { + Description = @"Immutable sandbox name returned by creation.", + }; + + private static Option TeamId { get; } = new( + name: @"--team-id") + { + Description = @"Optional team ID. Must match X-Team-Id when both are supplied. If neither selector is supplied, defaults to the caller's only accessible team. Callers with multiple accessible teams must select a team. Requests without access to any team are forbidden.", + }; + + private static Option XTeamId { get; } = new( + name: @"--x-team-id") + { + Description = @"Optional team ID. Must match the team_id query parameter when both are supplied. If neither selector is supplied, defaults to the caller's only accessible team. Callers with multiple accessible teams must select a team. Requests without access to any team are forbidden.", + }; + + private static Option StartTime { get; } = new( + name: @"--start-time") + { + Description = @"", + Required = true, + }; + + private static Option EndTime { get; } = new( + name: @"--end-time") + { + Description = @"", + Required = true, + }; + + private static Option IntervalSeconds { get; } = new( + name: @"--interval-seconds") + { + Description = @"", + Required = true, + }; + + private static string FormatResponse(ParseResult parseResult, global::Baseten.SandboxMetricsV1 value, global::System.Text.Json.Serialization.JsonSerializerContext context, bool truncateLongStrings) + { + string? text = null; + CustomizeResponseText(parseResult, value, ref text); + if (!string.IsNullOrWhiteSpace(text)) + { + return text; + } + + var hints = new Dictionary(StringComparer.OrdinalIgnoreCase) + { + }; + CustomizeResponseFormatHints(hints); + return CliRuntime.FormatHumanReadable(value, context, truncateLongStrings, hints); + } + + static partial void CustomizeResponseText(ParseResult parseResult, global::Baseten.SandboxMetricsV1 value, ref string? text); + static partial void CustomizeResponseFormatHints(Dictionary hints); + + + static partial void CustomizeCommand(ref Command command); + + public static Command Create(string? commandName = null) + { + var command = new Command(commandName ?? @"get-sandbox-metrics", @"Get sandbox metrics +Returns every interval in the requested half-open range [start_time, end_time). +Buckets align to UTC interval boundaries; partial boundary buckets include only samples +within the requested range. The first bucket may start before start_time. Ranges are limited to 31 days +and 10000 buckets. Request counts are zero when there is no traffic, and null +for buckets entirely before sandbox creation. CPU and memory are null without +samples, including standby. Error rate is the fraction of requests returning +4xx or 5xx, null when there are no requests. Telemetry failures return an error. +"); + command.Arguments.Add(SandboxName); + command.Options.Add(TeamId); + command.Options.Add(XTeamId); + command.Options.Add(StartTime); + command.Options.Add(EndTime); + command.Options.Add(IntervalSeconds); + + + command.SetAction(async (ParseResult parseResult, CancellationToken cancellationToken) => + await CliRuntime.RunAsync(async () => + { + var sandboxName = parseResult.GetRequiredValue(SandboxName); + var teamId = parseResult.GetValue(TeamId); + var xTeamId = parseResult.GetValue(XTeamId); + var startTime = parseResult.GetRequiredValue(StartTime); + var endTime = parseResult.GetRequiredValue(EndTime); + var intervalSeconds = parseResult.GetRequiredValue(IntervalSeconds); + using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); + + + var response = await client.Sandboxes.GetSandboxMetricsAsync( + sandboxName: sandboxName, + teamId: teamId, + xTeamId: xTeamId, + startTime: startTime, + endTime: endTime, + intervalSeconds: intervalSeconds, + cancellationToken: cancellationToken).ConfigureAwait(false); + + + if (!await CliRuntime.TryWriteOutputDirectoryAsync( + parseResult, + response, + global::Baseten.SourceGenerationContext.Default, + @"Data", + cancellationToken).ConfigureAwait(false)) + { + await CliRuntime.WriteResponseAsync( + parseResult, + response, + global::Baseten.SourceGenerationContext.Default, + FormatResponse, + cancellationToken).ConfigureAwait(false); + } + }, cancellationToken).ConfigureAwait(false)); + CustomizeCommand(ref command); + return command; + } +} \ No newline at end of file diff --git a/src/cli/Baseten.CLI/Commands/SandboxesUpdateSandboxCommandApiCommand.g.cs b/src/cli/Baseten.CLI/Commands/SandboxesUpdateSandboxCommandApiCommand.g.cs index ce76436e..7c719659 100644 --- a/src/cli/Baseten.CLI/Commands/SandboxesUpdateSandboxCommandApiCommand.g.cs +++ b/src/cli/Baseten.CLI/Commands/SandboxesUpdateSandboxCommandApiCommand.g.cs @@ -25,40 +25,12 @@ internal static partial class SandboxesUpdateSandboxCommandApiCommand Description = @"Optional team ID. Must match the team_id query parameter when both are supplied. If neither selector is supplied, defaults to the caller's only accessible team. Callers with multiple accessible teams must select a team. Requests without access to any team are forbidden.", }; - private static Option Enabled { get; } = CliRuntime.CreateNullableBoolOption( - name: @"--enabled", - description: @"When false, the sandbox is disabled and will not accept connections"); - - private static Option Region { get; } = new( - name: @"--region") - { - Description = @"Region where the sandbox runs (for example us-pdx-1 or eu-lon-1). When omitted at creation, the closest region is selected.", - }; - private static Option?> Envs { get; } = new( name: @"--envs") { Description = @"Environment variables injected into the sandbox.", }; - private static Option Image { get; } = new( - name: @"--image") - { - Description = @"Image reference including its tag. Use blaxel/base-image:latest to get started with the built-in sandbox execution API. This image is available directly without building, pushing, or listing images through GET /v1/sandboxes/images.", - }; - - private static Option?> Ports { get; } = new( - name: @"--ports") - { - Description = @"Set of ports for a resource", - }; - - private static Option DisplayName { get; } = new( - name: @"--display-name") - { - Description = @"Human-readable name for display in the UI. Can contain spaces and special characters, max 63 characters.", - }; - private static Option ExternalId { get; } = new( name: @"--external-id") { @@ -113,16 +85,11 @@ private static string FormatResponse(ParseResult parseResult, global::Baseten.Sa public static Command Create(string? commandName = null) { var command = new Command(commandName ?? @"update-sandbox", @"Update a sandbox -Partially update configuration. Omitted fields remain unchanged; supplied arrays and maps replace their previous values. Structured objects update only supplied fields. Changes to image may reset running state. The name, memory, and network configuration are immutable after creation. Supplying memory or network returns 400, including unchanged, empty, or null values."); +Partially update configuration. Omitted fields remain unchanged; supplied arrays and maps replace their previous values. Structured objects update only supplied fields. The name, memory, network, region, image, and ports are immutable after creation. Supplying any of these fields returns 400, including unchanged, empty, or null values."); command.Arguments.Add(SandboxName); command.Options.Add(TeamId); command.Options.Add(XTeamId); - command.Options.Add(Enabled); - command.Options.Add(Region); command.Options.Add(Envs); - command.Options.Add(Image); - command.Options.Add(Ports); - command.Options.Add(DisplayName); command.Options.Add(ExternalId); command.Options.Add(Labels); command.Options.Add(LifecycleOptions.TerminatedRetention); command.Options.Add(Input); @@ -153,12 +120,7 @@ await CliRuntime.RunAsync(async () => var sandboxName = parseResult.GetRequiredValue(SandboxName); var teamId = parseResult.GetValue(TeamId); var xTeamId = parseResult.GetValue(XTeamId); - var enabled = CliRuntime.WasSpecified(parseResult, Enabled) ? parseResult.GetValue(Enabled) : (__requestBase is { } __EnabledBaseValue ? __EnabledBaseValue.Enabled : default); - var region = CliRuntime.WasSpecified(parseResult, Region) ? parseResult.GetValue(Region) : (__requestBase is { } __RegionBaseValue ? __RegionBaseValue.Region : default); var envs = CliRuntime.WasSpecified(parseResult, Envs) ? parseResult.GetValue(Envs) : (__requestBase is { } __EnvsBaseValue ? __EnvsBaseValue.Envs : default); - var image = CliRuntime.WasSpecified(parseResult, Image) ? parseResult.GetValue(Image) : (__requestBase is { } __ImageBaseValue ? __ImageBaseValue.Image : default); - var ports = CliRuntime.WasSpecified(parseResult, Ports) ? parseResult.GetValue(Ports) : (__requestBase is { } __PortsBaseValue ? __PortsBaseValue.Ports : default); - var displayName = CliRuntime.WasSpecified(parseResult, DisplayName) ? parseResult.GetValue(DisplayName) : (__requestBase is { } __DisplayNameBaseValue ? __DisplayNameBaseValue.DisplayName : default); var externalId = CliRuntime.WasSpecified(parseResult, ExternalId) ? parseResult.GetValue(ExternalId) : (__requestBase is { } __ExternalIdBaseValue ? __ExternalIdBaseValue.ExternalId : default); var labels = CliRuntime.WasSpecified(parseResult, Labels) ? parseResult.GetValue(Labels) : (__requestBase is { } __LabelsBaseValue ? __LabelsBaseValue.Labels : default); @@ -179,12 +141,7 @@ await CliRuntime.RunAsync(async () => sandboxName: sandboxName, teamId: teamId, xTeamId: xTeamId, - enabled: enabled, - region: region, envs: envs, - image: image, - ports: ports, - displayName: displayName, externalId: externalId, labels: labels, lifecycle: lifecycle, diff --git a/src/libs/Baseten/Generated/Baseten.BasetenClient.CreateLlmModels.g.cs b/src/libs/Baseten/Generated/Baseten.BasetenClient.CreateLlmModels.g.cs index 613325db..6e83085b 100644 --- a/src/libs/Baseten/Generated/Baseten.BasetenClient.CreateLlmModels.g.cs +++ b/src/libs/Baseten/Generated/Baseten.BasetenClient.CreateLlmModels.g.cs @@ -85,6 +85,7 @@ partial void ProcessCreateLlmModelsResponseContent( /// "source": "hf://meta-llama/Llama-3-8B"
/// }
/// ],
+ /// "egress_restrictions": null,
/// "name": null
/// }' /// @@ -147,6 +148,7 @@ partial void ProcessCreateLlmModelsResponseContent( /// "source": "hf://meta-llama/Llama-3-8B"
/// }
/// ],
+ /// "egress_restrictions": null,
/// "name": null
/// }' /// @@ -551,6 +553,10 @@ partial void ProcessCreateLlmModelsResponseContent( /// Weight configurations for BDN model weight distribution
/// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 /// + /// + /// Restricts this deployment's egress to the specified FQDNs and IP addresses; an empty block allows none. Requires the organization to have egress restrictions enabled.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// /// /// Name of the model /// @@ -569,6 +575,7 @@ partial void ProcessCreateLlmModelsResponseContent( object? additionalAutoscalingConfig = default, object? metadata = default, global::System.Collections.Generic.IList? weights = default, + global::Baseten.EgressRestrictionsV1? egressRestrictions = default, global::Baseten.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) { @@ -584,6 +591,7 @@ partial void ProcessCreateLlmModelsResponseContent( AdditionalAutoscalingConfig = additionalAutoscalingConfig, Metadata = metadata, Weights = weights, + EgressRestrictions = egressRestrictions, Name = name, }; diff --git a/src/libs/Baseten/Generated/Baseten.BasetenClient.CreateLlmModelsByModelIdDeployments.g.cs b/src/libs/Baseten/Generated/Baseten.BasetenClient.CreateLlmModelsByModelIdDeployments.g.cs index 2273b34a..49790f1f 100644 --- a/src/libs/Baseten/Generated/Baseten.BasetenClient.CreateLlmModelsByModelIdDeployments.g.cs +++ b/src/libs/Baseten/Generated/Baseten.BasetenClient.CreateLlmModelsByModelIdDeployments.g.cs @@ -87,7 +87,8 @@ partial void ProcessCreateLlmModelsByModelIdDeploymentsResponseContent( /// "mount_location": "/models/base",
/// "source": "hf://meta-llama/Llama-3-8B"
/// }
- /// ]
+ /// ],
+ /// "egress_restrictions": null
/// }' /// public async global::System.Threading.Tasks.Task CreateLlmModelsByModelIdDeploymentsAsync( @@ -151,7 +152,8 @@ partial void ProcessCreateLlmModelsByModelIdDeploymentsResponseContent( /// "mount_location": "/models/base",
/// "source": "hf://meta-llama/Llama-3-8B"
/// }
- /// ]
+ /// ],
+ /// "egress_restrictions": null
/// }' /// public async global::System.Threading.Tasks.Task> CreateLlmModelsByModelIdDeploymentsAsResponseAsync( @@ -559,6 +561,10 @@ partial void ProcessCreateLlmModelsByModelIdDeploymentsResponseContent( /// Weight configurations for BDN model weight distribution
/// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 /// + /// + /// Restricts this deployment's egress to the specified FQDNs and IP addresses; an empty block allows none. Requires the organization to have egress restrictions enabled.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// @@ -574,6 +580,7 @@ partial void ProcessCreateLlmModelsByModelIdDeploymentsResponseContent( object? additionalAutoscalingConfig = default, object? metadata = default, global::System.Collections.Generic.IList? weights = default, + global::Baseten.EgressRestrictionsV1? egressRestrictions = default, global::Baseten.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) { @@ -589,6 +596,7 @@ partial void ProcessCreateLlmModelsByModelIdDeploymentsResponseContent( AdditionalAutoscalingConfig = additionalAutoscalingConfig, Metadata = metadata, Weights = weights, + EgressRestrictions = egressRestrictions, }; return await CreateLlmModelsByModelIdDeploymentsAsync( diff --git a/src/libs/Baseten/Generated/Baseten.BasetenClient.CreateLoopsRuns.g.cs b/src/libs/Baseten/Generated/Baseten.BasetenClient.CreateLoopsRuns.g.cs index a477baae..39b7c21a 100644 --- a/src/libs/Baseten/Generated/Baseten.BasetenClient.CreateLoopsRuns.g.cs +++ b/src/libs/Baseten/Generated/Baseten.BasetenClient.CreateLoopsRuns.g.cs @@ -62,7 +62,8 @@ partial void ProcessCreateLoopsRunsResponseContent( /// "availability_model": "spot",
/// "path": "bt://loops:k4q95w5/weights/step-100",
/// "reuse_from_run_id": null,
- /// "reuse_from_session_id": null
+ /// "reuse_from_session_id": null,
+ /// "sampler_num_replicas": null
/// }' /// public async global::System.Threading.Tasks.Task CreateLoopsRunsAsync( @@ -101,7 +102,8 @@ partial void ProcessCreateLoopsRunsResponseContent( /// "availability_model": "spot",
/// "path": "bt://loops:k4q95w5/weights/step-100",
/// "reuse_from_run_id": null,
- /// "reuse_from_session_id": null
+ /// "reuse_from_session_id": null,
+ /// "sampler_num_replicas": null
/// }' /// public async global::System.Threading.Tasks.Task> CreateLoopsRunsAsResponseAsync( @@ -515,6 +517,10 @@ partial void ProcessCreateLoopsRunsResponseContent( /// Optional ID of a prior Loops session whose trainer and/or sampler should be reused for this run. Deprecated in favor of reuse_from_run_id.
/// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 /// + /// + /// Number of replicas the run's sampler runs, applied as both its minimum and maximum. Must be at least 1. If omitted, a new sampler uses the platform defaults and a sampler reused from an earlier run keeps its settings. A run that already has a sampler keeps it unchanged. When the run ends, its sampler is scaled down.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// @@ -531,6 +537,7 @@ partial void ProcessCreateLoopsRunsResponseContent( string? path = default, string? reuseFromRunId = default, string? reuseFromSessionId = default, + int? samplerNumReplicas = default, global::Baseten.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) { @@ -548,6 +555,7 @@ partial void ProcessCreateLoopsRunsResponseContent( Path = path, ReuseFromRunId = reuseFromRunId, ReuseFromSessionId = reuseFromSessionId, + SamplerNumReplicas = samplerNumReplicas, }; return await CreateLoopsRunsAsync( diff --git a/src/libs/Baseten/Generated/Baseten.BasetenClient.CreateLoopsSamplers.g.cs b/src/libs/Baseten/Generated/Baseten.BasetenClient.CreateLoopsSamplers.g.cs index d2099422..16167c6f 100644 --- a/src/libs/Baseten/Generated/Baseten.BasetenClient.CreateLoopsSamplers.g.cs +++ b/src/libs/Baseten/Generated/Baseten.BasetenClient.CreateLoopsSamplers.g.cs @@ -60,7 +60,8 @@ partial void ProcessCreateLoopsSamplersResponseContent( /// "run_id": null,
/// "max_seq_length": null,
/// "model_path": "bt://loops:k4q95w5/sampler_weights/step-100",
- /// "reuse_from_session_id": null
+ /// "reuse_from_session_id": null,
+ /// "num_replicas": null
/// }' /// public async global::System.Threading.Tasks.Task CreateLoopsSamplersAsync( @@ -97,7 +98,8 @@ partial void ProcessCreateLoopsSamplersResponseContent( /// "run_id": null,
/// "max_seq_length": null,
/// "model_path": "bt://loops:k4q95w5/sampler_weights/step-100",
- /// "reuse_from_session_id": null
+ /// "reuse_from_session_id": null,
+ /// "num_replicas": null
/// }' /// public async global::System.Threading.Tasks.Task> CreateLoopsSamplersAsResponseAsync( @@ -492,6 +494,10 @@ partial void ProcessCreateLoopsSamplersResponseContent( /// Optional ID of a prior Loops session to reuse a trainer and/or sampler from. Deprecated.
/// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 /// + /// + /// Number of replicas the sampler runs, applied as both its minimum and maximum. Must be at least 1. If omitted, a new sampler uses the platform defaults and a paired sampler reused from an earlier run keeps its settings. A run that already has a sampler keeps it unchanged, and when a run ends, its sampler is scaled down.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// @@ -503,6 +509,7 @@ partial void ProcessCreateLoopsSamplersResponseContent( int? maxSeqLength = default, string? modelPath = default, string? reuseFromSessionId = default, + int? numReplicas = default, global::Baseten.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) { @@ -515,6 +522,7 @@ partial void ProcessCreateLoopsSamplersResponseContent( MaxSeqLength = maxSeqLength, ModelPath = modelPath, ReuseFromSessionId = reuseFromSessionId, + NumReplicas = numReplicas, }; return await CreateLoopsSamplersAsync( diff --git a/src/libs/Baseten/Generated/Baseten.BasetenClient.CreateLoopsTrainers.g.cs b/src/libs/Baseten/Generated/Baseten.BasetenClient.CreateLoopsTrainers.g.cs index 4e96d5e0..46d4baf9 100644 --- a/src/libs/Baseten/Generated/Baseten.BasetenClient.CreateLoopsTrainers.g.cs +++ b/src/libs/Baseten/Generated/Baseten.BasetenClient.CreateLoopsTrainers.g.cs @@ -27,11 +27,11 @@ public partial class BasetenClient }; partial void PrepareCreateLoopsTrainersArguments( global::System.Net.Http.HttpClient httpClient, - global::Baseten.CreateLoopsRunRequestV1 request); + global::Baseten.CreateLoopsTrainerRequestV1 request); partial void PrepareCreateLoopsTrainersRequest( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpRequestMessage httpRequestMessage, - global::Baseten.CreateLoopsRunRequestV1 request); + global::Baseten.CreateLoopsTrainerRequestV1 request); partial void ProcessCreateLoopsTrainersResponse( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpResponseMessage httpResponseMessage); @@ -67,7 +67,7 @@ partial void ProcessCreateLoopsTrainersResponseContent( /// public async global::System.Threading.Tasks.Task CreateLoopsTrainersAsync( - global::Baseten.CreateLoopsRunRequestV1 request, + global::Baseten.CreateLoopsTrainerRequestV1 request, global::Baseten.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) { @@ -106,7 +106,7 @@ partial void ProcessCreateLoopsTrainersResponseContent( /// public async global::System.Threading.Tasks.Task> CreateLoopsTrainersAsResponseAsync( - global::Baseten.CreateLoopsRunRequestV1 request, + global::Baseten.CreateLoopsTrainerRequestV1 request, global::Baseten.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) { @@ -534,7 +534,7 @@ partial void ProcessCreateLoopsTrainersResponseContent( global::Baseten.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) { - var __request = new global::Baseten.CreateLoopsRunRequestV1 + var __request = new global::Baseten.CreateLoopsTrainerRequestV1 { SessionId = sessionId, BaseModel = baseModel, diff --git a/src/libs/Baseten/Generated/Baseten.BasetenClient.CreateTeamsByTeamIdLlmModels.g.cs b/src/libs/Baseten/Generated/Baseten.BasetenClient.CreateTeamsByTeamIdLlmModels.g.cs index 3cad0958..11c6a5ab 100644 --- a/src/libs/Baseten/Generated/Baseten.BasetenClient.CreateTeamsByTeamIdLlmModels.g.cs +++ b/src/libs/Baseten/Generated/Baseten.BasetenClient.CreateTeamsByTeamIdLlmModels.g.cs @@ -88,6 +88,7 @@ partial void ProcessCreateTeamsByTeamIdLlmModelsResponseContent( /// "source": "hf://meta-llama/Llama-3-8B"
/// }
/// ],
+ /// "egress_restrictions": null,
/// "name": null
/// }' /// @@ -153,6 +154,7 @@ partial void ProcessCreateTeamsByTeamIdLlmModelsResponseContent( /// "source": "hf://meta-llama/Llama-3-8B"
/// }
/// ],
+ /// "egress_restrictions": null,
/// "name": null
/// }' /// @@ -561,6 +563,10 @@ partial void ProcessCreateTeamsByTeamIdLlmModelsResponseContent( /// Weight configurations for BDN model weight distribution
/// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 /// + /// + /// Restricts this deployment's egress to the specified FQDNs and IP addresses; an empty block allows none. Requires the organization to have egress restrictions enabled.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// /// /// Name of the model /// @@ -580,6 +586,7 @@ partial void ProcessCreateTeamsByTeamIdLlmModelsResponseContent( object? additionalAutoscalingConfig = default, object? metadata = default, global::System.Collections.Generic.IList? weights = default, + global::Baseten.EgressRestrictionsV1? egressRestrictions = default, global::Baseten.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) { @@ -595,6 +602,7 @@ partial void ProcessCreateTeamsByTeamIdLlmModelsResponseContent( AdditionalAutoscalingConfig = additionalAutoscalingConfig, Metadata = metadata, Weights = weights, + EgressRestrictions = egressRestrictions, Name = name, }; diff --git a/src/libs/Baseten/Generated/Baseten.BasetenClient.CreateTeamsByTeamIdLoopsRuns.g.cs b/src/libs/Baseten/Generated/Baseten.BasetenClient.CreateTeamsByTeamIdLoopsRuns.g.cs index 284242bb..3f8d6dd5 100644 --- a/src/libs/Baseten/Generated/Baseten.BasetenClient.CreateTeamsByTeamIdLoopsRuns.g.cs +++ b/src/libs/Baseten/Generated/Baseten.BasetenClient.CreateTeamsByTeamIdLoopsRuns.g.cs @@ -65,7 +65,8 @@ partial void ProcessCreateTeamsByTeamIdLoopsRunsResponseContent( /// "availability_model": "spot",
/// "path": "bt://loops:k4q95w5/weights/step-100",
/// "reuse_from_run_id": null,
- /// "reuse_from_session_id": null
+ /// "reuse_from_session_id": null,
+ /// "sampler_num_replicas": null
/// }' /// public async global::System.Threading.Tasks.Task CreateTeamsByTeamIdLoopsRunsAsync( @@ -107,7 +108,8 @@ partial void ProcessCreateTeamsByTeamIdLoopsRunsResponseContent( /// "availability_model": "spot",
/// "path": "bt://loops:k4q95w5/weights/step-100",
/// "reuse_from_run_id": null,
- /// "reuse_from_session_id": null
+ /// "reuse_from_session_id": null,
+ /// "sampler_num_replicas": null
/// }' /// public async global::System.Threading.Tasks.Task> CreateTeamsByTeamIdLoopsRunsAsResponseAsync( @@ -525,6 +527,10 @@ partial void ProcessCreateTeamsByTeamIdLoopsRunsResponseContent( /// Optional ID of a prior Loops session whose trainer and/or sampler should be reused for this run. Deprecated in favor of reuse_from_run_id.
/// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 /// + /// + /// Number of replicas the run's sampler runs, applied as both its minimum and maximum. Must be at least 1. If omitted, a new sampler uses the platform defaults and a sampler reused from an earlier run keeps its settings. A run that already has a sampler keeps it unchanged. When the run ends, its sampler is scaled down.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// @@ -542,6 +548,7 @@ partial void ProcessCreateTeamsByTeamIdLoopsRunsResponseContent( string? path = default, string? reuseFromRunId = default, string? reuseFromSessionId = default, + int? samplerNumReplicas = default, global::Baseten.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) { @@ -559,6 +566,7 @@ partial void ProcessCreateTeamsByTeamIdLoopsRunsResponseContent( Path = path, ReuseFromRunId = reuseFromRunId, ReuseFromSessionId = reuseFromSessionId, + SamplerNumReplicas = samplerNumReplicas, }; return await CreateTeamsByTeamIdLoopsRunsAsync( diff --git a/src/libs/Baseten/Generated/Baseten.BasetenClient.CreateTeamsByTeamIdLoopsSamplers.g.cs b/src/libs/Baseten/Generated/Baseten.BasetenClient.CreateTeamsByTeamIdLoopsSamplers.g.cs index d041df28..7167c4af 100644 --- a/src/libs/Baseten/Generated/Baseten.BasetenClient.CreateTeamsByTeamIdLoopsSamplers.g.cs +++ b/src/libs/Baseten/Generated/Baseten.BasetenClient.CreateTeamsByTeamIdLoopsSamplers.g.cs @@ -63,7 +63,8 @@ partial void ProcessCreateTeamsByTeamIdLoopsSamplersResponseContent( /// "run_id": null,
/// "max_seq_length": null,
/// "model_path": "bt://loops:k4q95w5/sampler_weights/step-100",
- /// "reuse_from_session_id": null
+ /// "reuse_from_session_id": null,
+ /// "num_replicas": null
/// }' /// public async global::System.Threading.Tasks.Task CreateTeamsByTeamIdLoopsSamplersAsync( @@ -103,7 +104,8 @@ partial void ProcessCreateTeamsByTeamIdLoopsSamplersResponseContent( /// "run_id": null,
/// "max_seq_length": null,
/// "model_path": "bt://loops:k4q95w5/sampler_weights/step-100",
- /// "reuse_from_session_id": null
+ /// "reuse_from_session_id": null,
+ /// "num_replicas": null
/// }' /// public async global::System.Threading.Tasks.Task> CreateTeamsByTeamIdLoopsSamplersAsResponseAsync( @@ -502,6 +504,10 @@ partial void ProcessCreateTeamsByTeamIdLoopsSamplersResponseContent( /// Optional ID of a prior Loops session to reuse a trainer and/or sampler from. Deprecated.
/// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 /// + /// + /// Number of replicas the sampler runs, applied as both its minimum and maximum. Must be at least 1. If omitted, a new sampler uses the platform defaults and a paired sampler reused from an earlier run keeps its settings. A run that already has a sampler keeps it unchanged, and when a run ends, its sampler is scaled down.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// @@ -514,6 +520,7 @@ partial void ProcessCreateTeamsByTeamIdLoopsSamplersResponseContent( int? maxSeqLength = default, string? modelPath = default, string? reuseFromSessionId = default, + int? numReplicas = default, global::Baseten.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) { @@ -526,6 +533,7 @@ partial void ProcessCreateTeamsByTeamIdLoopsSamplersResponseContent( MaxSeqLength = maxSeqLength, ModelPath = modelPath, ReuseFromSessionId = reuseFromSessionId, + NumReplicas = numReplicas, }; return await CreateTeamsByTeamIdLoopsSamplersAsync( diff --git a/src/libs/Baseten/Generated/Baseten.BasetenClient.CreateTeamsByTeamIdLoopsTrainers.g.cs b/src/libs/Baseten/Generated/Baseten.BasetenClient.CreateTeamsByTeamIdLoopsTrainers.g.cs index 14e9ea4c..be4c8228 100644 --- a/src/libs/Baseten/Generated/Baseten.BasetenClient.CreateTeamsByTeamIdLoopsTrainers.g.cs +++ b/src/libs/Baseten/Generated/Baseten.BasetenClient.CreateTeamsByTeamIdLoopsTrainers.g.cs @@ -28,12 +28,12 @@ public partial class BasetenClient partial void PrepareCreateTeamsByTeamIdLoopsTrainersArguments( global::System.Net.Http.HttpClient httpClient, ref string teamId, - global::Baseten.CreateLoopsRunRequestV1 request); + global::Baseten.CreateLoopsTrainerRequestV1 request); partial void PrepareCreateTeamsByTeamIdLoopsTrainersRequest( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpRequestMessage httpRequestMessage, string teamId, - global::Baseten.CreateLoopsRunRequestV1 request); + global::Baseten.CreateLoopsTrainerRequestV1 request); partial void ProcessCreateTeamsByTeamIdLoopsTrainersResponse( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpResponseMessage httpResponseMessage); @@ -71,7 +71,7 @@ partial void ProcessCreateTeamsByTeamIdLoopsTrainersResponseContent( public async global::System.Threading.Tasks.Task CreateTeamsByTeamIdLoopsTrainersAsync( string teamId, - global::Baseten.CreateLoopsRunRequestV1 request, + global::Baseten.CreateLoopsTrainerRequestV1 request, global::Baseten.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) { @@ -113,7 +113,7 @@ partial void ProcessCreateTeamsByTeamIdLoopsTrainersResponseContent( public async global::System.Threading.Tasks.Task> CreateTeamsByTeamIdLoopsTrainersAsResponseAsync( string teamId, - global::Baseten.CreateLoopsRunRequestV1 request, + global::Baseten.CreateLoopsTrainerRequestV1 request, global::Baseten.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) { @@ -545,7 +545,7 @@ partial void ProcessCreateTeamsByTeamIdLoopsTrainersResponseContent( global::Baseten.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) { - var __request = new global::Baseten.CreateLoopsRunRequestV1 + var __request = new global::Baseten.CreateLoopsTrainerRequestV1 { SessionId = sessionId, BaseModel = baseModel, diff --git a/src/libs/Baseten/Generated/Baseten.IBasetenClient.CreateLlmModels.g.cs b/src/libs/Baseten/Generated/Baseten.IBasetenClient.CreateLlmModels.g.cs index 9c58aaf6..065126a2 100644 --- a/src/libs/Baseten/Generated/Baseten.IBasetenClient.CreateLlmModels.g.cs +++ b/src/libs/Baseten/Generated/Baseten.IBasetenClient.CreateLlmModels.g.cs @@ -48,6 +48,7 @@ public partial interface IBasetenClient /// "source": "hf://meta-llama/Llama-3-8B"
/// }
/// ],
+ /// "egress_restrictions": null,
/// "name": null
/// }' /// @@ -100,6 +101,7 @@ public partial interface IBasetenClient /// "source": "hf://meta-llama/Llama-3-8B"
/// }
/// ],
+ /// "egress_restrictions": null,
/// "name": null
/// }' /// @@ -148,6 +150,10 @@ public partial interface IBasetenClient /// Weight configurations for BDN model weight distribution
/// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 /// + /// + /// Restricts this deployment's egress to the specified FQDNs and IP addresses; an empty block allows none. Requires the organization to have egress restrictions enabled.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// /// /// Name of the model /// @@ -166,6 +172,7 @@ public partial interface IBasetenClient object? additionalAutoscalingConfig = default, object? metadata = default, global::System.Collections.Generic.IList? weights = default, + global::Baseten.EgressRestrictionsV1? egressRestrictions = default, global::Baseten.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); } diff --git a/src/libs/Baseten/Generated/Baseten.IBasetenClient.CreateLlmModelsByModelIdDeployments.g.cs b/src/libs/Baseten/Generated/Baseten.IBasetenClient.CreateLlmModelsByModelIdDeployments.g.cs index a71c524d..ed13a477 100644 --- a/src/libs/Baseten/Generated/Baseten.IBasetenClient.CreateLlmModelsByModelIdDeployments.g.cs +++ b/src/libs/Baseten/Generated/Baseten.IBasetenClient.CreateLlmModelsByModelIdDeployments.g.cs @@ -48,7 +48,8 @@ public partial interface IBasetenClient /// "mount_location": "/models/base",
/// "source": "hf://meta-llama/Llama-3-8B"
/// }
- /// ]
+ /// ],
+ /// "egress_restrictions": null
/// }' /// global::System.Threading.Tasks.Task CreateLlmModelsByModelIdDeploymentsAsync( @@ -101,7 +102,8 @@ public partial interface IBasetenClient /// "mount_location": "/models/base",
/// "source": "hf://meta-llama/Llama-3-8B"
/// }
- /// ]
+ /// ],
+ /// "egress_restrictions": null
/// }' /// global::System.Threading.Tasks.Task> CreateLlmModelsByModelIdDeploymentsAsResponseAsync( @@ -151,6 +153,10 @@ public partial interface IBasetenClient /// Weight configurations for BDN model weight distribution
/// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 /// + /// + /// Restricts this deployment's egress to the specified FQDNs and IP addresses; an empty block allows none. Requires the organization to have egress restrictions enabled.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// @@ -166,6 +172,7 @@ public partial interface IBasetenClient object? additionalAutoscalingConfig = default, object? metadata = default, global::System.Collections.Generic.IList? weights = default, + global::Baseten.EgressRestrictionsV1? egressRestrictions = default, global::Baseten.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); } diff --git a/src/libs/Baseten/Generated/Baseten.IBasetenClient.CreateLoopsRuns.g.cs b/src/libs/Baseten/Generated/Baseten.IBasetenClient.CreateLoopsRuns.g.cs index fc7a0baf..753447cc 100644 --- a/src/libs/Baseten/Generated/Baseten.IBasetenClient.CreateLoopsRuns.g.cs +++ b/src/libs/Baseten/Generated/Baseten.IBasetenClient.CreateLoopsRuns.g.cs @@ -25,7 +25,8 @@ public partial interface IBasetenClient /// "availability_model": "spot",
/// "path": "bt://loops:k4q95w5/weights/step-100",
/// "reuse_from_run_id": null,
- /// "reuse_from_session_id": null
+ /// "reuse_from_session_id": null,
+ /// "sampler_num_replicas": null
/// }' /// global::System.Threading.Tasks.Task CreateLoopsRunsAsync( @@ -54,7 +55,8 @@ public partial interface IBasetenClient /// "availability_model": "spot",
/// "path": "bt://loops:k4q95w5/weights/step-100",
/// "reuse_from_run_id": null,
- /// "reuse_from_session_id": null
+ /// "reuse_from_session_id": null,
+ /// "sampler_num_replicas": null
/// }' /// global::System.Threading.Tasks.Task> CreateLoopsRunsAsResponseAsync( @@ -112,6 +114,10 @@ public partial interface IBasetenClient /// Optional ID of a prior Loops session whose trainer and/or sampler should be reused for this run. Deprecated in favor of reuse_from_run_id.
/// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 /// + /// + /// Number of replicas the run's sampler runs, applied as both its minimum and maximum. Must be at least 1. If omitted, a new sampler uses the platform defaults and a sampler reused from an earlier run keeps its settings. A run that already has a sampler keeps it unchanged. When the run ends, its sampler is scaled down.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// @@ -128,6 +134,7 @@ public partial interface IBasetenClient string? path = default, string? reuseFromRunId = default, string? reuseFromSessionId = default, + int? samplerNumReplicas = default, global::Baseten.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); } diff --git a/src/libs/Baseten/Generated/Baseten.IBasetenClient.CreateLoopsSamplers.g.cs b/src/libs/Baseten/Generated/Baseten.IBasetenClient.CreateLoopsSamplers.g.cs index dc055b46..f10a862d 100644 --- a/src/libs/Baseten/Generated/Baseten.IBasetenClient.CreateLoopsSamplers.g.cs +++ b/src/libs/Baseten/Generated/Baseten.IBasetenClient.CreateLoopsSamplers.g.cs @@ -23,7 +23,8 @@ public partial interface IBasetenClient /// "run_id": null,
/// "max_seq_length": null,
/// "model_path": "bt://loops:k4q95w5/sampler_weights/step-100",
- /// "reuse_from_session_id": null
+ /// "reuse_from_session_id": null,
+ /// "num_replicas": null
/// }' /// global::System.Threading.Tasks.Task CreateLoopsSamplersAsync( @@ -50,7 +51,8 @@ public partial interface IBasetenClient /// "run_id": null,
/// "max_seq_length": null,
/// "model_path": "bt://loops:k4q95w5/sampler_weights/step-100",
- /// "reuse_from_session_id": null
+ /// "reuse_from_session_id": null,
+ /// "num_replicas": null
/// }' /// global::System.Threading.Tasks.Task> CreateLoopsSamplersAsResponseAsync( @@ -89,6 +91,10 @@ public partial interface IBasetenClient /// Optional ID of a prior Loops session to reuse a trainer and/or sampler from. Deprecated.
/// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 /// + /// + /// Number of replicas the sampler runs, applied as both its minimum and maximum. Must be at least 1. If omitted, a new sampler uses the platform defaults and a paired sampler reused from an earlier run keeps its settings. A run that already has a sampler keeps it unchanged, and when a run ends, its sampler is scaled down.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// @@ -100,6 +106,7 @@ public partial interface IBasetenClient int? maxSeqLength = default, string? modelPath = default, string? reuseFromSessionId = default, + int? numReplicas = default, global::Baseten.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); } diff --git a/src/libs/Baseten/Generated/Baseten.IBasetenClient.CreateLoopsTrainers.g.cs b/src/libs/Baseten/Generated/Baseten.IBasetenClient.CreateLoopsTrainers.g.cs index c2a1dcda..01ecc98b 100644 --- a/src/libs/Baseten/Generated/Baseten.IBasetenClient.CreateLoopsTrainers.g.cs +++ b/src/libs/Baseten/Generated/Baseten.IBasetenClient.CreateLoopsTrainers.g.cs @@ -30,7 +30,7 @@ public partial interface IBasetenClient /// global::System.Threading.Tasks.Task CreateLoopsTrainersAsync( - global::Baseten.CreateLoopsRunRequestV1 request, + global::Baseten.CreateLoopsTrainerRequestV1 request, global::Baseten.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); /// @@ -59,7 +59,7 @@ public partial interface IBasetenClient /// global::System.Threading.Tasks.Task> CreateLoopsTrainersAsResponseAsync( - global::Baseten.CreateLoopsRunRequestV1 request, + global::Baseten.CreateLoopsTrainerRequestV1 request, global::Baseten.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); /// diff --git a/src/libs/Baseten/Generated/Baseten.IBasetenClient.CreateTeamsByTeamIdLlmModels.g.cs b/src/libs/Baseten/Generated/Baseten.IBasetenClient.CreateTeamsByTeamIdLlmModels.g.cs index 7abd1a03..a047baca 100644 --- a/src/libs/Baseten/Generated/Baseten.IBasetenClient.CreateTeamsByTeamIdLlmModels.g.cs +++ b/src/libs/Baseten/Generated/Baseten.IBasetenClient.CreateTeamsByTeamIdLlmModels.g.cs @@ -49,6 +49,7 @@ public partial interface IBasetenClient /// "source": "hf://meta-llama/Llama-3-8B"
/// }
/// ],
+ /// "egress_restrictions": null,
/// "name": null
/// }' /// @@ -103,6 +104,7 @@ public partial interface IBasetenClient /// "source": "hf://meta-llama/Llama-3-8B"
/// }
/// ],
+ /// "egress_restrictions": null,
/// "name": null
/// }' /// @@ -153,6 +155,10 @@ public partial interface IBasetenClient /// Weight configurations for BDN model weight distribution
/// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 /// + /// + /// Restricts this deployment's egress to the specified FQDNs and IP addresses; an empty block allows none. Requires the organization to have egress restrictions enabled.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// /// /// Name of the model /// @@ -172,6 +178,7 @@ public partial interface IBasetenClient object? additionalAutoscalingConfig = default, object? metadata = default, global::System.Collections.Generic.IList? weights = default, + global::Baseten.EgressRestrictionsV1? egressRestrictions = default, global::Baseten.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); } diff --git a/src/libs/Baseten/Generated/Baseten.IBasetenClient.CreateTeamsByTeamIdLoopsRuns.g.cs b/src/libs/Baseten/Generated/Baseten.IBasetenClient.CreateTeamsByTeamIdLoopsRuns.g.cs index 01db7356..4520eb9d 100644 --- a/src/libs/Baseten/Generated/Baseten.IBasetenClient.CreateTeamsByTeamIdLoopsRuns.g.cs +++ b/src/libs/Baseten/Generated/Baseten.IBasetenClient.CreateTeamsByTeamIdLoopsRuns.g.cs @@ -26,7 +26,8 @@ public partial interface IBasetenClient /// "availability_model": "spot",
/// "path": "bt://loops:k4q95w5/weights/step-100",
/// "reuse_from_run_id": null,
- /// "reuse_from_session_id": null
+ /// "reuse_from_session_id": null,
+ /// "sampler_num_replicas": null
/// }' /// global::System.Threading.Tasks.Task CreateTeamsByTeamIdLoopsRunsAsync( @@ -57,7 +58,8 @@ public partial interface IBasetenClient /// "availability_model": "spot",
/// "path": "bt://loops:k4q95w5/weights/step-100",
/// "reuse_from_run_id": null,
- /// "reuse_from_session_id": null
+ /// "reuse_from_session_id": null,
+ /// "sampler_num_replicas": null
/// }' /// global::System.Threading.Tasks.Task> CreateTeamsByTeamIdLoopsRunsAsResponseAsync( @@ -117,6 +119,10 @@ public partial interface IBasetenClient /// Optional ID of a prior Loops session whose trainer and/or sampler should be reused for this run. Deprecated in favor of reuse_from_run_id.
/// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 /// + /// + /// Number of replicas the run's sampler runs, applied as both its minimum and maximum. Must be at least 1. If omitted, a new sampler uses the platform defaults and a sampler reused from an earlier run keeps its settings. A run that already has a sampler keeps it unchanged. When the run ends, its sampler is scaled down.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// @@ -134,6 +140,7 @@ public partial interface IBasetenClient string? path = default, string? reuseFromRunId = default, string? reuseFromSessionId = default, + int? samplerNumReplicas = default, global::Baseten.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); } diff --git a/src/libs/Baseten/Generated/Baseten.IBasetenClient.CreateTeamsByTeamIdLoopsSamplers.g.cs b/src/libs/Baseten/Generated/Baseten.IBasetenClient.CreateTeamsByTeamIdLoopsSamplers.g.cs index 2ba40066..ee86ea80 100644 --- a/src/libs/Baseten/Generated/Baseten.IBasetenClient.CreateTeamsByTeamIdLoopsSamplers.g.cs +++ b/src/libs/Baseten/Generated/Baseten.IBasetenClient.CreateTeamsByTeamIdLoopsSamplers.g.cs @@ -24,7 +24,8 @@ public partial interface IBasetenClient /// "run_id": null,
/// "max_seq_length": null,
/// "model_path": "bt://loops:k4q95w5/sampler_weights/step-100",
- /// "reuse_from_session_id": null
+ /// "reuse_from_session_id": null,
+ /// "num_replicas": null
/// }' /// global::System.Threading.Tasks.Task CreateTeamsByTeamIdLoopsSamplersAsync( @@ -53,7 +54,8 @@ public partial interface IBasetenClient /// "run_id": null,
/// "max_seq_length": null,
/// "model_path": "bt://loops:k4q95w5/sampler_weights/step-100",
- /// "reuse_from_session_id": null
+ /// "reuse_from_session_id": null,
+ /// "num_replicas": null
/// }' /// global::System.Threading.Tasks.Task> CreateTeamsByTeamIdLoopsSamplersAsResponseAsync( @@ -94,6 +96,10 @@ public partial interface IBasetenClient /// Optional ID of a prior Loops session to reuse a trainer and/or sampler from. Deprecated.
/// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 /// + /// + /// Number of replicas the sampler runs, applied as both its minimum and maximum. Must be at least 1. If omitted, a new sampler uses the platform defaults and a paired sampler reused from an earlier run keeps its settings. A run that already has a sampler keeps it unchanged, and when a run ends, its sampler is scaled down.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// @@ -106,6 +112,7 @@ public partial interface IBasetenClient int? maxSeqLength = default, string? modelPath = default, string? reuseFromSessionId = default, + int? numReplicas = default, global::Baseten.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); } diff --git a/src/libs/Baseten/Generated/Baseten.IBasetenClient.CreateTeamsByTeamIdLoopsTrainers.g.cs b/src/libs/Baseten/Generated/Baseten.IBasetenClient.CreateTeamsByTeamIdLoopsTrainers.g.cs index 459c7f42..45ea0da6 100644 --- a/src/libs/Baseten/Generated/Baseten.IBasetenClient.CreateTeamsByTeamIdLoopsTrainers.g.cs +++ b/src/libs/Baseten/Generated/Baseten.IBasetenClient.CreateTeamsByTeamIdLoopsTrainers.g.cs @@ -32,7 +32,7 @@ public partial interface IBasetenClient global::System.Threading.Tasks.Task CreateTeamsByTeamIdLoopsTrainersAsync( string teamId, - global::Baseten.CreateLoopsRunRequestV1 request, + global::Baseten.CreateLoopsTrainerRequestV1 request, global::Baseten.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); /// @@ -63,7 +63,7 @@ public partial interface IBasetenClient global::System.Threading.Tasks.Task> CreateTeamsByTeamIdLoopsTrainersAsResponseAsync( string teamId, - global::Baseten.CreateLoopsRunRequestV1 request, + global::Baseten.CreateLoopsTrainerRequestV1 request, global::Baseten.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); /// diff --git a/src/libs/Baseten/Generated/Baseten.IImagesClient.CleanupImages.g.cs b/src/libs/Baseten/Generated/Baseten.IImagesClient.CleanupImages.g.cs index 5b2d514c..115c02c6 100644 --- a/src/libs/Baseten/Generated/Baseten.IImagesClient.CleanupImages.g.cs +++ b/src/libs/Baseten/Generated/Baseten.IImagesClient.CleanupImages.g.cs @@ -13,7 +13,7 @@ public partial interface IImagesClient /// 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 CleanupImagesAsync( + global::System.Threading.Tasks.Task CleanupImagesAsync( string? teamId = default, string? xTeamId = default, global::Baseten.AutoSDKRequestOptions? requestOptions = default, @@ -27,7 +27,7 @@ public partial interface IImagesClient /// 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> CleanupImagesAsResponseAsync( + global::System.Threading.Tasks.Task> CleanupImagesAsResponseAsync( string? teamId = default, string? xTeamId = default, global::Baseten.AutoSDKRequestOptions? requestOptions = default, diff --git a/src/libs/Baseten/Generated/Baseten.IImagesClient.DeleteImage.g.cs b/src/libs/Baseten/Generated/Baseten.IImagesClient.DeleteImage.g.cs index 2b1abf86..0c05a48f 100644 --- a/src/libs/Baseten/Generated/Baseten.IImagesClient.DeleteImage.g.cs +++ b/src/libs/Baseten/Generated/Baseten.IImagesClient.DeleteImage.g.cs @@ -14,7 +14,7 @@ public partial interface IImagesClient /// 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 DeleteImageAsync( + global::System.Threading.Tasks.Task DeleteImageAsync( string imageName, string? teamId = default, string? xTeamId = default, @@ -30,7 +30,7 @@ public partial interface IImagesClient /// 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> DeleteImageAsResponseAsync( + global::System.Threading.Tasks.Task> DeleteImageAsResponseAsync( string imageName, string? teamId = default, string? xTeamId = default, diff --git a/src/libs/Baseten/Generated/Baseten.IImagesClient.DeleteImageTag.g.cs b/src/libs/Baseten/Generated/Baseten.IImagesClient.DeleteImageTag.g.cs index d2890ce7..80b32e8b 100644 --- a/src/libs/Baseten/Generated/Baseten.IImagesClient.DeleteImageTag.g.cs +++ b/src/libs/Baseten/Generated/Baseten.IImagesClient.DeleteImageTag.g.cs @@ -15,7 +15,7 @@ public partial interface IImagesClient /// 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 DeleteImageTagAsync( + global::System.Threading.Tasks.Task DeleteImageTagAsync( string imageName, string tagName, string? teamId = default, @@ -33,7 +33,7 @@ public partial interface IImagesClient /// 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> DeleteImageTagAsResponseAsync( + global::System.Threading.Tasks.Task> DeleteImageTagAsResponseAsync( string imageName, string tagName, string? teamId = default, diff --git a/src/libs/Baseten/Generated/Baseten.IImagesClient.GetImage.g.cs b/src/libs/Baseten/Generated/Baseten.IImagesClient.GetImage.g.cs index f10d8028..1e17f25f 100644 --- a/src/libs/Baseten/Generated/Baseten.IImagesClient.GetImage.g.cs +++ b/src/libs/Baseten/Generated/Baseten.IImagesClient.GetImage.g.cs @@ -14,7 +14,7 @@ public partial interface IImagesClient /// 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 GetImageAsync( + global::System.Threading.Tasks.Task GetImageAsync( string imageName, string? teamId = default, string? xTeamId = default, @@ -30,7 +30,7 @@ public partial interface IImagesClient /// 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> GetImageAsResponseAsync( + global::System.Threading.Tasks.Task> GetImageAsResponseAsync( string imageName, string? teamId = default, string? xTeamId = default, diff --git a/src/libs/Baseten/Generated/Baseten.IImagesClient.GetImageBuildLogs.g.cs b/src/libs/Baseten/Generated/Baseten.IImagesClient.GetImageBuildLogs.g.cs new file mode 100644 index 00000000..d341455b --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.IImagesClient.GetImageBuildLogs.g.cs @@ -0,0 +1,64 @@ +#nullable enable + +namespace Baseten +{ + public partial interface IImagesClient + { + /// + /// Get image build logs
+ /// Return one page of logs from the latest recorded build of this image, including failed builds, newest first. Logs may take a short time to appear. Defaults to the last 24 hours; the requested time range must not exceed 7 days. Keep start_time and end_time fixed when paging with offset. A new build changes the log source; this endpoint does not retrieve a historical build by ID. While a new upload is waiting to start, logs may still refer to the preceding build. Older builds without a recorded environment use image-level build logs within the requested time range. + ///
+ /// + /// + /// + /// + /// + /// Default Value: 100 + /// + /// + /// Default Value: 0 + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task GetImageBuildLogsAsync( + string imageName, + string? teamId = default, + string? xTeamId = default, + global::System.DateTime? startTime = default, + global::System.DateTime? endTime = default, + int? limit = default, + int? offset = default, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get image build logs
+ /// Return one page of logs from the latest recorded build of this image, including failed builds, newest first. Logs may take a short time to appear. Defaults to the last 24 hours; the requested time range must not exceed 7 days. Keep start_time and end_time fixed when paging with offset. A new build changes the log source; this endpoint does not retrieve a historical build by ID. While a new upload is waiting to start, logs may still refer to the preceding build. Older builds without a recorded environment use image-level build logs within the requested time range. + ///
+ /// + /// + /// + /// + /// + /// Default Value: 100 + /// + /// + /// Default Value: 0 + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetImageBuildLogsAsResponseAsync( + string imageName, + string? teamId = default, + string? xTeamId = default, + global::System.DateTime? startTime = default, + global::System.DateTime? endTime = default, + int? limit = default, + int? offset = 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.IImagesClient.ListImageTags.g.cs b/src/libs/Baseten/Generated/Baseten.IImagesClient.ListImageTags.g.cs index b97727c6..2bd2769d 100644 --- a/src/libs/Baseten/Generated/Baseten.IImagesClient.ListImageTags.g.cs +++ b/src/libs/Baseten/Generated/Baseten.IImagesClient.ListImageTags.g.cs @@ -26,7 +26,7 @@ public partial interface IImagesClient /// 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 ListImageTagsAsync( + global::System.Threading.Tasks.Task ListImageTagsAsync( string imageName, string? teamId = default, string? xTeamId = default, @@ -59,7 +59,7 @@ public partial interface IImagesClient /// 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> ListImageTagsAsResponseAsync( + global::System.Threading.Tasks.Task> ListImageTagsAsResponseAsync( string imageName, string? teamId = default, string? xTeamId = default, diff --git a/src/libs/Baseten/Generated/Baseten.IImagesClient.ListImages.g.cs b/src/libs/Baseten/Generated/Baseten.IImagesClient.ListImages.g.cs index feb49f6e..7b0bf715 100644 --- a/src/libs/Baseten/Generated/Baseten.IImagesClient.ListImages.g.cs +++ b/src/libs/Baseten/Generated/Baseten.IImagesClient.ListImages.g.cs @@ -24,7 +24,7 @@ public partial interface IImagesClient /// 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 ListImagesAsync( + global::System.Threading.Tasks.Task ListImagesAsync( string? teamId = default, string? xTeamId = default, string? cursor = default, @@ -53,7 +53,7 @@ public partial interface IImagesClient /// 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> ListImagesAsResponseAsync( + global::System.Threading.Tasks.Task> ListImagesAsResponseAsync( string? teamId = default, string? xTeamId = default, string? cursor = default, diff --git a/src/libs/Baseten/Generated/Baseten.IImagesClient.ListSandboxLibraryImages.g.cs b/src/libs/Baseten/Generated/Baseten.IImagesClient.ListSandboxLibraryImages.g.cs new file mode 100644 index 00000000..c92962c2 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.IImagesClient.ListSandboxLibraryImages.g.cs @@ -0,0 +1,28 @@ +#nullable enable + +namespace Baseten +{ + public partial interface IImagesClient + { + /// + /// List built-in sandbox images
+ /// Return the built-in sandbox images, the same for every team, so no team is selected. Use the image field directly as the image of a sandbox, without building or pushing it. Hidden and upcoming images are excluded. + ///
+ /// 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 ListSandboxLibraryImagesAsync( + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List built-in sandbox images
+ /// Return the built-in sandbox images, the same for every team, so no team is selected. Use the image field directly as the image of a sandbox, without building or pushing it. Hidden and upcoming images are excluded. + ///
+ /// 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> ListSandboxLibraryImagesAsResponseAsync( + 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.IImagesClient.PushImage.g.cs b/src/libs/Baseten/Generated/Baseten.IImagesClient.PushImage.g.cs index 431bd06c..f19f6bff 100644 --- a/src/libs/Baseten/Generated/Baseten.IImagesClient.PushImage.g.cs +++ b/src/libs/Baseten/Generated/Baseten.IImagesClient.PushImage.g.cs @@ -6,7 +6,7 @@ public partial interface IImagesClient { /// /// Push a sandbox image
- /// With image supplied, import the registry image asynchronously. Otherwise return an upload URL for a ZIP source archive containing its Dockerfile and build context. Processing starts after upload. No sandbox is created. Poll the image until BUILT or FAILED. + /// With image supplied, import the registry image asynchronously. Otherwise return an upload URL for a ZIP source archive containing its Dockerfile and build context. The uploaded ZIP archive must not exceed 5 GB. Processing starts after upload. No sandbox is created. Poll the image until BUILT or FAILED. ///
/// /// @@ -14,16 +14,16 @@ public partial interface IImagesClient /// 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 PushImageAsync( + global::System.Threading.Tasks.Task PushImageAsync( - global::Baseten.PushImageRequestV1 request, + global::Baseten.PushSandboxImageRequestV1 request, string? teamId = default, string? xTeamId = default, global::Baseten.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); /// /// Push a sandbox image
- /// With image supplied, import the registry image asynchronously. Otherwise return an upload URL for a ZIP source archive containing its Dockerfile and build context. Processing starts after upload. No sandbox is created. Poll the image until BUILT or FAILED. + /// With image supplied, import the registry image asynchronously. Otherwise return an upload URL for a ZIP source archive containing its Dockerfile and build context. The uploaded ZIP archive must not exceed 5 GB. Processing starts after upload. No sandbox is created. Poll the image until BUILT or FAILED. ///
/// /// @@ -31,16 +31,16 @@ public partial interface IImagesClient /// 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> PushImageAsResponseAsync( + global::System.Threading.Tasks.Task> PushImageAsResponseAsync( - global::Baseten.PushImageRequestV1 request, + global::Baseten.PushSandboxImageRequestV1 request, string? teamId = default, string? xTeamId = default, global::Baseten.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); /// /// Push a sandbox image
- /// With image supplied, import the registry image asynchronously. Otherwise return an upload URL for a ZIP source archive containing its Dockerfile and build context. Processing starts after upload. No sandbox is created. Poll the image until BUILT or FAILED. + /// With image supplied, import the registry image asynchronously. Otherwise return an upload URL for a ZIP source archive containing its Dockerfile and build context. The uploaded ZIP archive must not exceed 5 GB. Processing starts after upload. No sandbox is created. Poll the image until BUILT or FAILED. ///
/// /// @@ -49,7 +49,7 @@ public partial interface IImagesClient /// Example: base-image /// /// - /// Optional source registry image reference including a registry hostname. When omitted, the response provides an archive upload URL.
+ /// Optional source registry image reference including a registry hostname. When omitted, the response provides an archive upload URL. The uploaded ZIP archive must not exceed 5 GB.
/// Example: docker.io/b10/base-image:latest /// /// @@ -60,7 +60,7 @@ public partial interface IImagesClient /// 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 PushImageAsync( + global::System.Threading.Tasks.Task PushImageAsync( string name, string? teamId = default, string? xTeamId = default, diff --git a/src/libs/Baseten/Generated/Baseten.ISandboxesClient.CreateSandbox.g.cs b/src/libs/Baseten/Generated/Baseten.ISandboxesClient.CreateSandbox.g.cs index ff1c380f..7be3ebc1 100644 --- a/src/libs/Baseten/Generated/Baseten.ISandboxesClient.CreateSandbox.g.cs +++ b/src/libs/Baseten/Generated/Baseten.ISandboxesClient.CreateSandbox.g.cs @@ -6,7 +6,7 @@ public partial interface ISandboxesClient { /// /// Create a sandbox
- /// Create a sandbox with an optional client-provided name, generated by the server when omitted. The request waits briefly for deployment, then returns the created resource. Deployment may continue after the response; inspect status to determine readiness. Names belonging to failed or terminated sandboxes can be reused; an active sandbox reserves its name. To get started, set image to blaxel/base-image:latest, the built-in image with the sandbox execution API ready to use. It is available directly; no image build, push, or GET /v1/sandboxes/images is needed. Use the returned url to execute commands with the same Bearer API key. + /// Create a sandbox with an optional client-provided name, generated by the server when omitted. The request waits briefly for deployment, then returns the created resource. Deployment may continue after the response; inspect status to determine readiness. Names belonging to failed or terminated sandboxes can be reused; an active sandbox reserves its name. Every field is optional. The server applies image and memory defaults; SDKs should omit fields the caller did not set. A request with no body creates a sandbox from baseten/base-image:latest, the built-in image with the sandbox execution API ready to use, with 4096 MB of memory. It is available directly; no image build, push, or GET /v1/sandboxes/images is needed. Use the returned url to execute commands with your authentication token as a Bearer token, not your Baseten API key. ///
/// /// @@ -23,7 +23,7 @@ public partial interface ISandboxesClient global::System.Threading.CancellationToken cancellationToken = default); /// /// Create a sandbox
- /// Create a sandbox with an optional client-provided name, generated by the server when omitted. The request waits briefly for deployment, then returns the created resource. Deployment may continue after the response; inspect status to determine readiness. Names belonging to failed or terminated sandboxes can be reused; an active sandbox reserves its name. To get started, set image to blaxel/base-image:latest, the built-in image with the sandbox execution API ready to use. It is available directly; no image build, push, or GET /v1/sandboxes/images is needed. Use the returned url to execute commands with the same Bearer API key. + /// Create a sandbox with an optional client-provided name, generated by the server when omitted. The request waits briefly for deployment, then returns the created resource. Deployment may continue after the response; inspect status to determine readiness. Names belonging to failed or terminated sandboxes can be reused; an active sandbox reserves its name. Every field is optional. The server applies image and memory defaults; SDKs should omit fields the caller did not set. A request with no body creates a sandbox from baseten/base-image:latest, the built-in image with the sandbox execution API ready to use, with 4096 MB of memory. It is available directly; no image build, push, or GET /v1/sandboxes/images is needed. Use the returned url to execute commands with your authentication token as a Bearer token, not your Baseten API key. ///
/// /// @@ -40,10 +40,13 @@ public partial interface ISandboxesClient global::System.Threading.CancellationToken cancellationToken = default); /// /// Create a sandbox
- /// Create a sandbox with an optional client-provided name, generated by the server when omitted. The request waits briefly for deployment, then returns the created resource. Deployment may continue after the response; inspect status to determine readiness. Names belonging to failed or terminated sandboxes can be reused; an active sandbox reserves its name. To get started, set image to blaxel/base-image:latest, the built-in image with the sandbox execution API ready to use. It is available directly; no image build, push, or GET /v1/sandboxes/images is needed. Use the returned url to execute commands with the same Bearer API key. + /// Create a sandbox with an optional client-provided name, generated by the server when omitted. The request waits briefly for deployment, then returns the created resource. Deployment may continue after the response; inspect status to determine readiness. Names belonging to failed or terminated sandboxes can be reused; an active sandbox reserves its name. Every field is optional. The server applies image and memory defaults; SDKs should omit fields the caller did not set. A request with no body creates a sandbox from baseten/base-image:latest, the built-in image with the sandbox execution API ready to use, with 4096 MB of memory. It is available directly; no image build, push, or GET /v1/sandboxes/images is needed. Use the returned url to execute commands with your authentication token as a Bearer token, not your Baseten API key. ///
/// /// + /// + /// When true, return the existing live sandbox with this name or recreate it if it is failed, terminated, or being deleted. The server handles concurrent creation and deletion races with a bounded wait; persistent contention returns a conflict. Requires name. Existing configuration is preserved. Defaults to false when omitted. + /// /// /// Optional unique sandbox name. Generated by the server when omitted; immutable after creation.
/// Example: baseten-api-review-0916 @@ -65,21 +68,19 @@ public partial interface ISandboxesClient /// Example: [{"name":"NODE_ENV","secret":false,"value":"production"}, {"name":"PORT","secret":false,"value":"3000"}] /// /// - /// Image reference including its tag. Use blaxel/base-image:latest to get started with the built-in sandbox execution API. This image is available directly without building, pushing, or listing images through GET /v1/sandboxes/images.
- /// Example: blaxel/base-image:latest + /// Image reference including its tag. Defaults to baseten/base-image:latest, the built-in sandbox execution API. This image is available directly without building, pushing, or listing images through GET /v1/sandboxes/images.
+ /// Default Value: baseten/base-image:latest
+ /// Example: baseten/base-image:latest /// /// - /// Memory allocation in megabytes. Also determines CPU allocation (CPU cores = memory in MB / 2048, e.g., 4096MB = 2 CPUs).
+ /// Memory allocation in megabytes. Also determines CPU allocation (CPU cores = memory in MB / 2048, e.g., 4096MB = 2 CPUs). Defaults to 4096.
+ /// Default Value: 4096
/// Example: 4096 /// /// /// Set of ports for a resource
/// Example: [{"name":"http","protocol":"HTTP","target":3000}] /// - /// - /// Human-readable name for display in the UI. Can contain spaces and special characters, max 63 characters.
- /// Example: Baseten API review - /// /// /// Caller-owned identifier for external lookups. Max 64 chars, alphanumeric + dash.
/// Example: api-review-20260916-001 @@ -94,6 +95,7 @@ public partial interface ISandboxesClient global::System.Threading.Tasks.Task CreateSandboxAsync( string? teamId = default, string? xTeamId = default, + bool? createIfNotExists = default, string? name = default, global::Baseten.SandboxLifecycleV1? lifecycle = default, global::Baseten.SandboxNetworkV1? network = default, @@ -102,7 +104,6 @@ public partial interface ISandboxesClient string? image = default, long? memory = default, global::System.Collections.Generic.IList? ports = default, - string? displayName = default, string? externalId = default, global::System.Collections.Generic.Dictionary? labels = default, global::Baseten.AutoSDKRequestOptions? requestOptions = default, diff --git a/src/libs/Baseten/Generated/Baseten.ISandboxesClient.GetSandbox.g.cs b/src/libs/Baseten/Generated/Baseten.ISandboxesClient.GetSandbox.g.cs index 18bdf947..1d7d1118 100644 --- a/src/libs/Baseten/Generated/Baseten.ISandboxesClient.GetSandbox.g.cs +++ b/src/libs/Baseten/Generated/Baseten.ISandboxesClient.GetSandbox.g.cs @@ -6,10 +6,13 @@ public partial interface ISandboxesClient { /// /// Get a sandbox
- /// Return the sandbox configuration and current state. + /// Return the sandbox configuration and status. ///
/// /// + /// + /// Default Value: false + /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with @@ -18,14 +21,18 @@ public partial interface ISandboxesClient string sandboxName, string? teamId = default, string? xTeamId = default, + bool? showSecrets = default, global::Baseten.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); /// /// Get a sandbox
- /// Return the sandbox configuration and current state. + /// Return the sandbox configuration and status. ///
/// /// + /// + /// Default Value: false + /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with @@ -34,6 +41,7 @@ public partial interface ISandboxesClient string sandboxName, string? teamId = default, string? xTeamId = default, + bool? showSecrets = default, global::Baseten.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); } diff --git a/src/libs/Baseten/Generated/Baseten.ISandboxesClient.GetSandboxConfiguration.g.cs b/src/libs/Baseten/Generated/Baseten.ISandboxesClient.GetSandboxConfiguration.g.cs new file mode 100644 index 00000000..08b97173 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.ISandboxesClient.GetSandboxConfiguration.g.cs @@ -0,0 +1,28 @@ +#nullable enable + +namespace Baseten +{ + public partial interface ISandboxesClient + { + /// + /// Get sandbox configuration
+ /// Return available Carbon-compatible sandbox regions. Configuration is the same for every team, so no team is selected. Only enabled regions supporting Carbon are returned. This describes regional capability, not the runtime selected for a particular team or sandbox. Region configuration is cached for up to 30 seconds. + ///
+ /// 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 GetSandboxConfigurationAsync( + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get sandbox configuration
+ /// Return available Carbon-compatible sandbox regions. Configuration is the same for every team, so no team is selected. Only enabled regions supporting Carbon are returned. This describes regional capability, not the runtime selected for a particular team or sandbox. Region configuration is cached for up to 30 seconds. + ///
+ /// 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> GetSandboxConfigurationAsResponseAsync( + 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.ISandboxesClient.GetSandboxLogs.g.cs b/src/libs/Baseten/Generated/Baseten.ISandboxesClient.GetSandboxLogs.g.cs new file mode 100644 index 00000000..b383e8e9 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.ISandboxesClient.GetSandboxLogs.g.cs @@ -0,0 +1,70 @@ +#nullable enable + +namespace Baseten +{ + public partial interface ISandboxesClient + { + /// + /// Get sandbox logs
+ /// Returns sandbox runtime logs, newest first, within the half-open range
+ /// [start_time, end_time). Ranges are limited to 7 days. Follow next_cursor
+ /// until it is null to retrieve all pages, keeping the same range and limit.
+ /// Logs before sandbox creation are excluded. Unavailable telemetry returns an error. + ///
+ /// + /// + /// + /// Example: baseten-api-review-0916 + /// + /// + /// + /// + /// Default Value: 100 + /// + /// + /// 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 GetSandboxLogsAsync( + string sandboxName, + global::System.DateTime startTime, + global::System.DateTime endTime, + string? teamId = default, + string? xTeamId = default, + int? limit = default, + string? cursor = default, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get sandbox logs
+ /// Returns sandbox runtime logs, newest first, within the half-open range
+ /// [start_time, end_time). Ranges are limited to 7 days. Follow next_cursor
+ /// until it is null to retrieve all pages, keeping the same range and limit.
+ /// Logs before sandbox creation are excluded. Unavailable telemetry returns an error. + ///
+ /// + /// + /// + /// Example: baseten-api-review-0916 + /// + /// + /// + /// + /// Default Value: 100 + /// + /// + /// 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> GetSandboxLogsAsResponseAsync( + string sandboxName, + global::System.DateTime startTime, + global::System.DateTime endTime, + string? teamId = default, + string? xTeamId = default, + int? limit = default, + string? cursor = 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.ISandboxesClient.GetSandboxMetrics.g.cs b/src/libs/Baseten/Generated/Baseten.ISandboxesClient.GetSandboxMetrics.g.cs new file mode 100644 index 00000000..0f1f3d4e --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.ISandboxesClient.GetSandboxMetrics.g.cs @@ -0,0 +1,68 @@ +#nullable enable + +namespace Baseten +{ + public partial interface ISandboxesClient + { + /// + /// Get sandbox metrics
+ /// Returns every interval in the requested half-open range [start_time, end_time).
+ /// Buckets align to UTC interval boundaries; partial boundary buckets include only samples
+ /// within the requested range. The first bucket may start before start_time. Ranges are limited to 31 days
+ /// and 10000 buckets. Request counts are zero when there is no traffic, and null
+ /// for buckets entirely before sandbox creation. CPU and memory are null without
+ /// samples, including standby. Error rate is the fraction of requests returning
+ /// 4xx or 5xx, null when there are no requests. Telemetry failures return an error. + ///
+ /// + /// + /// + /// Example: baseten-api-review-0916 + /// + /// + /// + /// + /// 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 GetSandboxMetricsAsync( + string sandboxName, + global::System.DateTime startTime, + global::System.DateTime endTime, + int intervalSeconds, + string? teamId = default, + string? xTeamId = default, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get sandbox metrics
+ /// Returns every interval in the requested half-open range [start_time, end_time).
+ /// Buckets align to UTC interval boundaries; partial boundary buckets include only samples
+ /// within the requested range. The first bucket may start before start_time. Ranges are limited to 31 days
+ /// and 10000 buckets. Request counts are zero when there is no traffic, and null
+ /// for buckets entirely before sandbox creation. CPU and memory are null without
+ /// samples, including standby. Error rate is the fraction of requests returning
+ /// 4xx or 5xx, null when there are no requests. Telemetry failures return an error. + ///
+ /// + /// + /// + /// Example: baseten-api-review-0916 + /// + /// + /// + /// + /// 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> GetSandboxMetricsAsResponseAsync( + string sandboxName, + global::System.DateTime startTime, + global::System.DateTime endTime, + int intervalSeconds, + string? teamId = default, + string? xTeamId = 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.ISandboxesClient.UpdateSandbox.g.cs b/src/libs/Baseten/Generated/Baseten.ISandboxesClient.UpdateSandbox.g.cs index d12bb7c7..81b8161c 100644 --- a/src/libs/Baseten/Generated/Baseten.ISandboxesClient.UpdateSandbox.g.cs +++ b/src/libs/Baseten/Generated/Baseten.ISandboxesClient.UpdateSandbox.g.cs @@ -6,7 +6,7 @@ public partial interface ISandboxesClient { /// /// Update a sandbox
- /// Partially update configuration. Omitted fields remain unchanged; supplied arrays and maps replace their previous values. Structured objects update only supplied fields. Changes to image may reset running state. The name, memory, and network configuration are immutable after creation. Supplying memory or network returns 400, including unchanged, empty, or null values. + /// Partially update configuration. Omitted fields remain unchanged; supplied arrays and maps replace their previous values. Structured objects update only supplied fields. The name, memory, network, region, image, and ports are immutable after creation. Supplying any of these fields returns 400, including unchanged, empty, or null values. ///
/// /// @@ -25,7 +25,7 @@ public partial interface ISandboxesClient global::System.Threading.CancellationToken cancellationToken = default); /// /// Update a sandbox
- /// Partially update configuration. Omitted fields remain unchanged; supplied arrays and maps replace their previous values. Structured objects update only supplied fields. Changes to image may reset running state. The name, memory, and network configuration are immutable after creation. Supplying memory or network returns 400, including unchanged, empty, or null values. + /// Partially update configuration. Omitted fields remain unchanged; supplied arrays and maps replace their previous values. Structured objects update only supplied fields. The name, memory, network, region, image, and ports are immutable after creation. Supplying any of these fields returns 400, including unchanged, empty, or null values. ///
/// /// @@ -44,39 +44,19 @@ public partial interface ISandboxesClient global::System.Threading.CancellationToken cancellationToken = default); /// /// Update a sandbox
- /// Partially update configuration. Omitted fields remain unchanged; supplied arrays and maps replace their previous values. Structured objects update only supplied fields. Changes to image may reset running state. The name, memory, and network configuration are immutable after creation. Supplying memory or network returns 400, including unchanged, empty, or null values. + /// Partially update configuration. Omitted fields remain unchanged; supplied arrays and maps replace their previous values. Structured objects update only supplied fields. The name, memory, network, region, image, and ports are immutable after creation. Supplying any of these fields returns 400, including unchanged, empty, or null values. ///
/// /// /// - /// - /// When false, the sandbox is disabled and will not accept connections
- /// Example: true - /// /// /// Lifecycle configuration controlling automatic sandbox deletion based on idle time, max age, or specific dates
/// Example: {"expiration_policies":[{"action":"DELETE","type":"TTL_IDLE","value":"24h"},{"action":"DELETE","type":"TTL_MAX_AGE","value":"7d"},{"action":"DELETE","type":"DATE","value":"2026-09-23T21:26:58Z"}],"terminated_retention":"24h"} /// - /// - /// Region where the sandbox runs (for example us-pdx-1 or eu-lon-1). When omitted at creation, the closest region is selected.
- /// Example: us-pdx-1 - /// /// /// Environment variables injected into the sandbox.
/// Example: [{"name":"NODE_ENV","secret":false,"value":"production"}, {"name":"PORT","secret":false,"value":"3000"}] /// - /// - /// Image reference including its tag. Use blaxel/base-image:latest to get started with the built-in sandbox execution API. This image is available directly without building, pushing, or listing images through GET /v1/sandboxes/images.
- /// Example: blaxel/base-image:latest - /// - /// - /// Set of ports for a resource
- /// Example: [{"name":"http","protocol":"HTTP","target":3000}] - /// - /// - /// Human-readable name for display in the UI. Can contain spaces and special characters, max 63 characters.
- /// Example: Baseten API review - revised - /// /// /// Caller-owned identifier for external lookups. Max 64 chars, alphanumeric + dash.
/// Example: api-review-20260916-001 @@ -92,13 +72,8 @@ public partial interface ISandboxesClient string sandboxName, string? teamId = default, string? xTeamId = default, - bool? enabled = default, global::Baseten.SandboxLifecycleV1? lifecycle = default, - string? region = default, global::System.Collections.Generic.IList? envs = default, - string? image = default, - global::System.Collections.Generic.IList? ports = default, - string? displayName = default, string? externalId = default, global::System.Collections.Generic.Dictionary? labels = default, global::Baseten.AutoSDKRequestOptions? requestOptions = default, diff --git a/src/libs/Baseten/Generated/Baseten.Images.JsonSerializerContext.g.cs b/src/libs/Baseten/Generated/Baseten.Images.JsonSerializerContext.g.cs index 39cd2125..0e0466ac 100644 --- a/src/libs/Baseten/Generated/Baseten.Images.JsonSerializerContext.g.cs +++ b/src/libs/Baseten/Generated/Baseten.Images.JsonSerializerContext.g.cs @@ -18,23 +18,45 @@ namespace Baseten [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.DateTime))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(int))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(long))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxImageBuildLogV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxImageBuildLogsResponseV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxPortV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxPortV1Protocol), TypeInfoPropertyName = "SandboxPortV1Protocol2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxApiPaginationV1))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.ListImagesResponseV1))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.ImageV1))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.ListImageTagsResponseV1))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.ImageTagV1))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.ImageStatusV1), TypeInfoPropertyName = "ImageStatusV12")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.PushImageRequestV1))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.PushImageResponseV1))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.CleanupImagesResponseV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.ListSandboxImagesResponseV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxImageSummaryV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.ListSandboxImageTagsResponseV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxImageTagV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxImageStatusV1), TypeInfoPropertyName = "SandboxImageStatusV12")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxImageV1), TypeInfoPropertyName = "SandboxImageV12")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxImageV1Variant2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.PushSandboxImageRequestV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.PushSandboxImageResponseV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxLibraryImageVolumeV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxLibraryImageCreationOptionsV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxLibraryImageV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.ListSandboxLibraryImagesResponseV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.CleanupSandboxImagesResponseV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool?))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(int?))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(long?))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.ImageStatusV1?), TypeInfoPropertyName = "NullableImageStatusV12")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxPortV1Protocol?), TypeInfoPropertyName = "NullableSandboxPortV1Protocol2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxImageStatusV1?), TypeInfoPropertyName = "NullableSandboxImageStatusV12")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxImageV1?), TypeInfoPropertyName = "NullableSandboxImageV12")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] internal sealed partial class ImagesSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext { } @@ -82,6 +104,7 @@ private ImagesSourceGenerationContext(global::System.Text.Json.JsonSerializerOpt [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] public static void AddConverters(global::System.Text.Json.JsonSerializerOptions options) { + options.Converters.Add(new global::Baseten.JsonConverters.SandboxImageV1JsonConverter()); options.Converters.Add(new global::Baseten.JsonConverters.AnyOfJsonConverter()); options.Converters.Add(new global::Baseten.JsonConverters.AnyOfJsonConverter()); options.Converters.Add(new global::Baseten.JsonConverters.AnyOfJsonConverter()); @@ -125,23 +148,37 @@ private sealed class LazyEnumJsonConverterFactory : global::System.Text.Json.Ser public override bool CanConvert(global::System.Type typeToConvert) { return - typeToConvert == typeof(global::Baseten.ImageStatusV1) + typeToConvert == typeof(global::Baseten.SandboxPortV1Protocol) - || typeToConvert == typeof(global::Baseten.ImageStatusV1?); + || typeToConvert == typeof(global::Baseten.SandboxPortV1Protocol?) + + || typeToConvert == typeof(global::Baseten.SandboxImageStatusV1) + + || typeToConvert == typeof(global::Baseten.SandboxImageStatusV1?); } public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) { - if (typeToConvert == typeof(global::Baseten.ImageStatusV1)) + if (typeToConvert == typeof(global::Baseten.SandboxPortV1Protocol)) + { + return new global::Baseten.JsonConverters.SandboxPortV1ProtocolJsonConverter(); + } + + if (typeToConvert == typeof(global::Baseten.SandboxPortV1Protocol?)) + { + return new global::Baseten.JsonConverters.SandboxPortV1ProtocolNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Baseten.SandboxImageStatusV1)) { - return new global::Baseten.JsonConverters.ImageStatusV1JsonConverter(); + return new global::Baseten.JsonConverters.SandboxImageStatusV1JsonConverter(); } - if (typeToConvert == typeof(global::Baseten.ImageStatusV1?)) + if (typeToConvert == typeof(global::Baseten.SandboxImageStatusV1?)) { - return new global::Baseten.JsonConverters.ImageStatusV1NullableJsonConverter(); + return new global::Baseten.JsonConverters.SandboxImageStatusV1NullableJsonConverter(); } throw new global::System.NotSupportedException($"No generated enum converter is registered for '{typeToConvert}'."); } diff --git a/src/libs/Baseten/Generated/Baseten.ImagesClient.CleanupImages.g.cs b/src/libs/Baseten/Generated/Baseten.ImagesClient.CleanupImages.g.cs index dee503ee..3d56e249 100644 --- a/src/libs/Baseten/Generated/Baseten.ImagesClient.CleanupImages.g.cs +++ b/src/libs/Baseten/Generated/Baseten.ImagesClient.CleanupImages.g.cs @@ -52,7 +52,7 @@ partial void ProcessCleanupImagesResponseContent( /// 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 CleanupImagesAsync( + public async global::System.Threading.Tasks.Task CleanupImagesAsync( string? teamId = default, string? xTeamId = default, global::Baseten.AutoSDKRequestOptions? requestOptions = default, @@ -76,7 +76,7 @@ partial void ProcessCleanupImagesResponseContent( /// 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> CleanupImagesAsResponseAsync( + public async global::System.Threading.Tasks.Task> CleanupImagesAsResponseAsync( string? teamId = default, string? xTeamId = default, global::Baseten.AutoSDKRequestOptions? requestOptions = default, @@ -526,9 +526,9 @@ partial void ProcessCleanupImagesResponseContent( { __response.EnsureSuccessStatusCode(); - var __value = global::Baseten.CleanupImagesResponseV1.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Baseten.CleanupSandboxImagesResponseV1.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - return new global::Baseten.AutoSDKHttpResponse( + return new global::Baseten.AutoSDKHttpResponse( statusCode: __response.StatusCode, headers: global::Baseten.AutoSDKHttpResponse.CreateHeaders(__response), requestUri: __response.RequestMessage?.RequestUri, @@ -558,9 +558,9 @@ partial void ProcessCleanupImagesResponseContent( #endif ).ConfigureAwait(false); - var __value = await global::Baseten.CleanupImagesResponseV1.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Baseten.CleanupSandboxImagesResponseV1.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); - return new global::Baseten.AutoSDKHttpResponse( + return new global::Baseten.AutoSDKHttpResponse( statusCode: __response.StatusCode, headers: global::Baseten.AutoSDKHttpResponse.CreateHeaders(__response), requestUri: __response.RequestMessage?.RequestUri, diff --git a/src/libs/Baseten/Generated/Baseten.ImagesClient.DeleteImage.g.cs b/src/libs/Baseten/Generated/Baseten.ImagesClient.DeleteImage.g.cs index e31e8967..1ec0dff8 100644 --- a/src/libs/Baseten/Generated/Baseten.ImagesClient.DeleteImage.g.cs +++ b/src/libs/Baseten/Generated/Baseten.ImagesClient.DeleteImage.g.cs @@ -55,7 +55,7 @@ partial void ProcessDeleteImageResponseContent( /// 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 DeleteImageAsync( + public async global::System.Threading.Tasks.Task DeleteImageAsync( string imageName, string? teamId = default, string? xTeamId = default, @@ -82,7 +82,7 @@ partial void ProcessDeleteImageResponseContent( /// 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> DeleteImageAsResponseAsync( + public async global::System.Threading.Tasks.Task> DeleteImageAsResponseAsync( string imageName, string? teamId = default, string? xTeamId = default, @@ -567,9 +567,9 @@ partial void ProcessDeleteImageResponseContent( { __response.EnsureSuccessStatusCode(); - var __value = global::Baseten.ImageV1.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Baseten.SandboxImageV1.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - return new global::Baseten.AutoSDKHttpResponse( + return new global::Baseten.AutoSDKHttpResponse( statusCode: __response.StatusCode, headers: global::Baseten.AutoSDKHttpResponse.CreateHeaders(__response), requestUri: __response.RequestMessage?.RequestUri, @@ -599,9 +599,9 @@ partial void ProcessDeleteImageResponseContent( #endif ).ConfigureAwait(false); - var __value = await global::Baseten.ImageV1.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Baseten.SandboxImageV1.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); - return new global::Baseten.AutoSDKHttpResponse( + return new global::Baseten.AutoSDKHttpResponse( statusCode: __response.StatusCode, headers: global::Baseten.AutoSDKHttpResponse.CreateHeaders(__response), requestUri: __response.RequestMessage?.RequestUri, diff --git a/src/libs/Baseten/Generated/Baseten.ImagesClient.DeleteImageTag.g.cs b/src/libs/Baseten/Generated/Baseten.ImagesClient.DeleteImageTag.g.cs index 94b7fe3b..cdf75d09 100644 --- a/src/libs/Baseten/Generated/Baseten.ImagesClient.DeleteImageTag.g.cs +++ b/src/libs/Baseten/Generated/Baseten.ImagesClient.DeleteImageTag.g.cs @@ -58,7 +58,7 @@ partial void ProcessDeleteImageTagResponseContent( /// 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 DeleteImageTagAsync( + public async global::System.Threading.Tasks.Task DeleteImageTagAsync( string imageName, string tagName, string? teamId = default, @@ -88,7 +88,7 @@ partial void ProcessDeleteImageTagResponseContent( /// 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> DeleteImageTagAsResponseAsync( + public async global::System.Threading.Tasks.Task> DeleteImageTagAsResponseAsync( string imageName, string tagName, string? teamId = default, @@ -576,9 +576,9 @@ partial void ProcessDeleteImageTagResponseContent( { __response.EnsureSuccessStatusCode(); - var __value = global::Baseten.ImageV1.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Baseten.SandboxImageV1.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - return new global::Baseten.AutoSDKHttpResponse( + return new global::Baseten.AutoSDKHttpResponse( statusCode: __response.StatusCode, headers: global::Baseten.AutoSDKHttpResponse.CreateHeaders(__response), requestUri: __response.RequestMessage?.RequestUri, @@ -608,9 +608,9 @@ partial void ProcessDeleteImageTagResponseContent( #endif ).ConfigureAwait(false); - var __value = await global::Baseten.ImageV1.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Baseten.SandboxImageV1.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); - return new global::Baseten.AutoSDKHttpResponse( + return new global::Baseten.AutoSDKHttpResponse( statusCode: __response.StatusCode, headers: global::Baseten.AutoSDKHttpResponse.CreateHeaders(__response), requestUri: __response.RequestMessage?.RequestUri, diff --git a/src/libs/Baseten/Generated/Baseten.ImagesClient.GetImage.g.cs b/src/libs/Baseten/Generated/Baseten.ImagesClient.GetImage.g.cs index ff5c4f57..e210f463 100644 --- a/src/libs/Baseten/Generated/Baseten.ImagesClient.GetImage.g.cs +++ b/src/libs/Baseten/Generated/Baseten.ImagesClient.GetImage.g.cs @@ -55,7 +55,7 @@ partial void ProcessGetImageResponseContent( /// 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 GetImageAsync( + public async global::System.Threading.Tasks.Task GetImageAsync( string imageName, string? teamId = default, string? xTeamId = default, @@ -82,7 +82,7 @@ partial void ProcessGetImageResponseContent( /// 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> GetImageAsResponseAsync( + public async global::System.Threading.Tasks.Task> GetImageAsResponseAsync( string imageName, string? teamId = default, string? xTeamId = default, @@ -535,9 +535,9 @@ partial void ProcessGetImageResponseContent( { __response.EnsureSuccessStatusCode(); - var __value = global::Baseten.ImageV1.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Baseten.SandboxImageV1.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - return new global::Baseten.AutoSDKHttpResponse( + return new global::Baseten.AutoSDKHttpResponse( statusCode: __response.StatusCode, headers: global::Baseten.AutoSDKHttpResponse.CreateHeaders(__response), requestUri: __response.RequestMessage?.RequestUri, @@ -567,9 +567,9 @@ partial void ProcessGetImageResponseContent( #endif ).ConfigureAwait(false); - var __value = await global::Baseten.ImageV1.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Baseten.SandboxImageV1.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); - return new global::Baseten.AutoSDKHttpResponse( + return new global::Baseten.AutoSDKHttpResponse( statusCode: __response.StatusCode, headers: global::Baseten.AutoSDKHttpResponse.CreateHeaders(__response), requestUri: __response.RequestMessage?.RequestUri, diff --git a/src/libs/Baseten/Generated/Baseten.ImagesClient.GetImageBuildLogs.g.cs b/src/libs/Baseten/Generated/Baseten.ImagesClient.GetImageBuildLogs.g.cs new file mode 100644 index 00000000..968edef2 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.ImagesClient.GetImageBuildLogs.g.cs @@ -0,0 +1,725 @@ + +#nullable enable + +namespace Baseten +{ + public partial class ImagesClient + { + + + private static readonly global::Baseten.EndPointSecurityRequirement s_GetImageBuildLogsSecurityRequirement0 = + 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_GetImageBuildLogsSecurityRequirements = + new global::Baseten.EndPointSecurityRequirement[] + { s_GetImageBuildLogsSecurityRequirement0, + }; + partial void PrepareGetImageBuildLogsArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? teamId, + ref string? xTeamId, + ref global::System.DateTime? startTime, + ref global::System.DateTime? endTime, + ref int? limit, + ref int? offset, + ref string imageName); + partial void PrepareGetImageBuildLogsRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? teamId, + string? xTeamId, + global::System.DateTime? startTime, + global::System.DateTime? endTime, + int? limit, + int? offset, + string imageName); + partial void ProcessGetImageBuildLogsResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessGetImageBuildLogsResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Get image build logs
+ /// Return one page of logs from the latest recorded build of this image, including failed builds, newest first. Logs may take a short time to appear. Defaults to the last 24 hours; the requested time range must not exceed 7 days. Keep start_time and end_time fixed when paging with offset. A new build changes the log source; this endpoint does not retrieve a historical build by ID. While a new upload is waiting to start, logs may still refer to the preceding build. Older builds without a recorded environment use image-level build logs within the requested time range. + ///
+ /// + /// + /// + /// + /// + /// Default Value: 100 + /// + /// + /// Default Value: 0 + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task GetImageBuildLogsAsync( + string imageName, + string? teamId = default, + string? xTeamId = default, + global::System.DateTime? startTime = default, + global::System.DateTime? endTime = default, + int? limit = default, + int? offset = default, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetImageBuildLogsAsResponseAsync( + imageName: imageName, + teamId: teamId, + xTeamId: xTeamId, + startTime: startTime, + endTime: endTime, + limit: limit, + offset: offset, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get image build logs
+ /// Return one page of logs from the latest recorded build of this image, including failed builds, newest first. Logs may take a short time to appear. Defaults to the last 24 hours; the requested time range must not exceed 7 days. Keep start_time and end_time fixed when paging with offset. A new build changes the log source; this endpoint does not retrieve a historical build by ID. While a new upload is waiting to start, logs may still refer to the preceding build. Older builds without a recorded environment use image-level build logs within the requested time range. + ///
+ /// + /// + /// + /// + /// + /// Default Value: 100 + /// + /// + /// Default Value: 0 + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetImageBuildLogsAsResponseAsync( + string imageName, + string? teamId = default, + string? xTeamId = default, + global::System.DateTime? startTime = default, + global::System.DateTime? endTime = default, + int? limit = default, + int? offset = default, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareGetImageBuildLogsArguments( + httpClient: HttpClient, + teamId: ref teamId, + xTeamId: ref xTeamId, + startTime: ref startTime, + endTime: ref endTime, + limit: ref limit, + offset: ref offset, + imageName: ref imageName); + + + var __authorizations = global::Baseten.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_GetImageBuildLogsSecurityRequirements, + operationName: "GetImageBuildLogsAsync"); + + 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/sandboxes/images/{imageName}/logs", + baseUri: HttpClient.BaseAddress); + __pathBuilder + .AddOptionalParameter("team_id", teamId) + .AddOptionalParameter("start_time", startTime?.ToString("yyyy-MM-ddTHH:mm:ssZ")) + .AddOptionalParameter("end_time", endTime?.ToString("yyyy-MM-ddTHH:mm:ssZ")) + .AddOptionalParameter("limit", limit?.ToString()) + .AddOptionalParameter("offset", offset?.ToString()) + ; + 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.Get, + 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); + } + } + + if (xTeamId != default) + { + __httpRequest.Headers.TryAddWithoutValidation("X-Team-Id", xTeamId.ToString()); + } + + global::Baseten.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareGetImageBuildLogsRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + teamId: teamId, + xTeamId: xTeamId, + startTime: startTime, + endTime: endTime, + limit: limit, + offset: offset, + imageName: imageName); + + 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: "GetImageBuildLogs", + methodName: "GetImageBuildLogsAsync", + pathTemplate: "$\"/v1/sandboxes/images/{imageName}/logs\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), + 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: "GetImageBuildLogs", + methodName: "GetImageBuildLogsAsync", + pathTemplate: "$\"/v1/sandboxes/images/{imageName}/logs\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), + 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: "GetImageBuildLogs", + methodName: "GetImageBuildLogsAsync", + pathTemplate: "$\"/v1/sandboxes/images/{imageName}/logs\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), + 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); + ProcessGetImageBuildLogsResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Baseten.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Baseten.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "GetImageBuildLogs", + methodName: "GetImageBuildLogsAsync", + pathTemplate: "$\"/v1/sandboxes/images/{imageName}/logs\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), + 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: "GetImageBuildLogs", + methodName: "GetImageBuildLogsAsync", + pathTemplate: "$\"/v1/sandboxes/images/{imageName}/logs\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), + 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); + } + // Invalid request. Returns a JSON error with code, message, and optional details. + if ((int)__response.StatusCode == 400) + { + string? __content_400 = null; + global::System.Exception? __exception_400 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + else + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + } + catch (global::System.Exception __ex) + { + __exception_400 = __ex; + } + + + throw global::Baseten.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_400, + responseBody: __content_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Missing or invalid authentication. Returns a JSON error with code, message, and optional details. + if ((int)__response.StatusCode == 401) + { + string? __content_401 = null; + global::System.Exception? __exception_401 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + else + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + } + catch (global::System.Exception __ex) + { + __exception_401 = __ex; + } + + + throw global::Baseten.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_401, + responseBody: __content_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Insufficient permissions. Returns a JSON error with code, message, and optional details. + if ((int)__response.StatusCode == 403) + { + string? __content_403 = null; + global::System.Exception? __exception_403 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + else + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + } + catch (global::System.Exception __ex) + { + __exception_403 = __ex; + } + + + throw global::Baseten.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_403, + responseBody: __content_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Resource not found. Returns a JSON error with code, message, and optional details. + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::System.Exception? __exception_404 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + else + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + } + catch (global::System.Exception __ex) + { + __exception_404 = __ex; + } + + + throw global::Baseten.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_404, + responseBody: __content_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Request limit exceeded. Returns a JSON error with code, message, and optional details. + if ((int)__response.StatusCode == 429) + { + string? __content_429 = null; + global::System.Exception? __exception_429 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_429 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + else + { + __content_429 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + } + catch (global::System.Exception __ex) + { + __exception_429 = __ex; + } + + + throw global::Baseten.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_429 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_429, + responseBody: __content_429, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Internal server error. Returns a JSON error with code, message, and optional details. + if ((int)__response.StatusCode == 500) + { + string? __content_500 = null; + global::System.Exception? __exception_500 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + else + { + __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + } + catch (global::System.Exception __ex) + { + __exception_500 = __ex; + } + + + throw global::Baseten.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_500, + responseBody: __content_500, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // + if ((int)__response.StatusCode == 503) + { + string? __content_503 = null; + global::System.Exception? __exception_503 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_503 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + else + { + __content_503 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + } + catch (global::System.Exception __ex) + { + __exception_503 = __ex; + } + + + throw global::Baseten.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_503 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_503, + responseBody: __content_503, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessGetImageBuildLogsResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Baseten.SandboxImageBuildLogsResponseV1.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 global::Baseten.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + 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.SandboxImageBuildLogsResponseV1.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 global::Baseten.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + 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.ImagesClient.ListImageTags.g.cs b/src/libs/Baseten/Generated/Baseten.ImagesClient.ListImageTags.g.cs index 52fb6eb9..b26eeac0 100644 --- a/src/libs/Baseten/Generated/Baseten.ImagesClient.ListImageTags.g.cs +++ b/src/libs/Baseten/Generated/Baseten.ImagesClient.ListImageTags.g.cs @@ -77,7 +77,7 @@ partial void ProcessListImageTagsResponseContent( /// 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 ListImageTagsAsync( + public async global::System.Threading.Tasks.Task ListImageTagsAsync( string imageName, string? teamId = default, string? xTeamId = default, @@ -126,7 +126,7 @@ partial void ProcessListImageTagsResponseContent( /// 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> ListImageTagsAsResponseAsync( + public async global::System.Threading.Tasks.Task> ListImageTagsAsResponseAsync( string imageName, string? teamId = default, string? xTeamId = default, @@ -631,9 +631,9 @@ partial void ProcessListImageTagsResponseContent( { __response.EnsureSuccessStatusCode(); - var __value = global::Baseten.ListImageTagsResponseV1.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Baseten.ListSandboxImageTagsResponseV1.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - return new global::Baseten.AutoSDKHttpResponse( + return new global::Baseten.AutoSDKHttpResponse( statusCode: __response.StatusCode, headers: global::Baseten.AutoSDKHttpResponse.CreateHeaders(__response), requestUri: __response.RequestMessage?.RequestUri, @@ -663,9 +663,9 @@ partial void ProcessListImageTagsResponseContent( #endif ).ConfigureAwait(false); - var __value = await global::Baseten.ListImageTagsResponseV1.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Baseten.ListSandboxImageTagsResponseV1.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); - return new global::Baseten.AutoSDKHttpResponse( + return new global::Baseten.AutoSDKHttpResponse( statusCode: __response.StatusCode, headers: global::Baseten.AutoSDKHttpResponse.CreateHeaders(__response), requestUri: __response.RequestMessage?.RequestUri, diff --git a/src/libs/Baseten/Generated/Baseten.ImagesClient.ListImages.g.cs b/src/libs/Baseten/Generated/Baseten.ImagesClient.ListImages.g.cs index 77bb15dd..3fba554c 100644 --- a/src/libs/Baseten/Generated/Baseten.ImagesClient.ListImages.g.cs +++ b/src/libs/Baseten/Generated/Baseten.ImagesClient.ListImages.g.cs @@ -71,7 +71,7 @@ partial void ProcessListImagesResponseContent( /// 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 ListImagesAsync( + public async global::System.Threading.Tasks.Task ListImagesAsync( string? teamId = default, string? xTeamId = default, string? cursor = default, @@ -114,7 +114,7 @@ partial void ProcessListImagesResponseContent( /// 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> ListImagesAsResponseAsync( + public async global::System.Threading.Tasks.Task> ListImagesAsResponseAsync( string? teamId = default, string? xTeamId = default, string? cursor = default, @@ -580,9 +580,9 @@ partial void ProcessListImagesResponseContent( { __response.EnsureSuccessStatusCode(); - var __value = global::Baseten.ListImagesResponseV1.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Baseten.ListSandboxImagesResponseV1.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - return new global::Baseten.AutoSDKHttpResponse( + return new global::Baseten.AutoSDKHttpResponse( statusCode: __response.StatusCode, headers: global::Baseten.AutoSDKHttpResponse.CreateHeaders(__response), requestUri: __response.RequestMessage?.RequestUri, @@ -612,9 +612,9 @@ partial void ProcessListImagesResponseContent( #endif ).ConfigureAwait(false); - var __value = await global::Baseten.ListImagesResponseV1.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Baseten.ListSandboxImagesResponseV1.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); - return new global::Baseten.AutoSDKHttpResponse( + return new global::Baseten.AutoSDKHttpResponse( statusCode: __response.StatusCode, headers: global::Baseten.AutoSDKHttpResponse.CreateHeaders(__response), requestUri: __response.RequestMessage?.RequestUri, diff --git a/src/libs/Baseten/Generated/Baseten.ImagesClient.ListSandboxLibraryImages.g.cs b/src/libs/Baseten/Generated/Baseten.ImagesClient.ListSandboxLibraryImages.g.cs new file mode 100644 index 00000000..adf25ba9 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.ImagesClient.ListSandboxLibraryImages.g.cs @@ -0,0 +1,545 @@ + +#nullable enable + +namespace Baseten +{ + public partial class ImagesClient + { + + + private static readonly global::Baseten.EndPointSecurityRequirement s_ListSandboxLibraryImagesSecurityRequirement0 = + 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_ListSandboxLibraryImagesSecurityRequirements = + new global::Baseten.EndPointSecurityRequirement[] + { s_ListSandboxLibraryImagesSecurityRequirement0, + }; + partial void PrepareListSandboxLibraryImagesArguments( + global::System.Net.Http.HttpClient httpClient); + partial void PrepareListSandboxLibraryImagesRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage); + partial void ProcessListSandboxLibraryImagesResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessListSandboxLibraryImagesResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// List built-in sandbox images
+ /// Return the built-in sandbox images, the same for every team, so no team is selected. Use the image field directly as the image of a sandbox, without building or pushing it. Hidden and upcoming images are excluded. + ///
+ /// 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 ListSandboxLibraryImagesAsync( + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ListSandboxLibraryImagesAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List built-in sandbox images
+ /// Return the built-in sandbox images, the same for every team, so no team is selected. Use the image field directly as the image of a sandbox, without building or pushing it. Hidden and upcoming images are excluded. + ///
+ /// 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> ListSandboxLibraryImagesAsResponseAsync( + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareListSandboxLibraryImagesArguments( + httpClient: HttpClient); + + + var __authorizations = global::Baseten.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_ListSandboxLibraryImagesSecurityRequirements, + operationName: "ListSandboxLibraryImagesAsync"); + + 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/sandboxes/library_images", + 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.Get, + 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); + PrepareListSandboxLibraryImagesRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest); + + 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: "ListSandboxLibraryImages", + methodName: "ListSandboxLibraryImagesAsync", + pathTemplate: "\"/v1/sandboxes/library_images\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), + 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: "ListSandboxLibraryImages", + methodName: "ListSandboxLibraryImagesAsync", + pathTemplate: "\"/v1/sandboxes/library_images\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), + 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: "ListSandboxLibraryImages", + methodName: "ListSandboxLibraryImagesAsync", + pathTemplate: "\"/v1/sandboxes/library_images\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), + 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); + ProcessListSandboxLibraryImagesResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Baseten.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Baseten.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListSandboxLibraryImages", + methodName: "ListSandboxLibraryImagesAsync", + pathTemplate: "\"/v1/sandboxes/library_images\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), + 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: "ListSandboxLibraryImages", + methodName: "ListSandboxLibraryImagesAsync", + pathTemplate: "\"/v1/sandboxes/library_images\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), + 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); + } + // Missing or invalid authentication. Returns a JSON error with code, message, and optional details. + if ((int)__response.StatusCode == 401) + { + string? __content_401 = null; + global::System.Exception? __exception_401 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + else + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + } + catch (global::System.Exception __ex) + { + __exception_401 = __ex; + } + + + throw global::Baseten.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_401, + responseBody: __content_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Insufficient permissions. Returns a JSON error with code, message, and optional details. + if ((int)__response.StatusCode == 403) + { + string? __content_403 = null; + global::System.Exception? __exception_403 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + else + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + } + catch (global::System.Exception __ex) + { + __exception_403 = __ex; + } + + + throw global::Baseten.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_403, + responseBody: __content_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Request limit exceeded. Returns a JSON error with code, message, and optional details. + if ((int)__response.StatusCode == 429) + { + string? __content_429 = null; + global::System.Exception? __exception_429 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_429 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + else + { + __content_429 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + } + catch (global::System.Exception __ex) + { + __exception_429 = __ex; + } + + + throw global::Baseten.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_429 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_429, + responseBody: __content_429, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Internal server error. Returns a JSON error with code, message, and optional details. + if ((int)__response.StatusCode == 500) + { + string? __content_500 = null; + global::System.Exception? __exception_500 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + else + { + __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + } + catch (global::System.Exception __ex) + { + __exception_500 = __ex; + } + + + throw global::Baseten.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_500, + responseBody: __content_500, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessListSandboxLibraryImagesResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Baseten.ListSandboxLibraryImagesResponseV1.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 global::Baseten.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + 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.ListSandboxLibraryImagesResponseV1.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 global::Baseten.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + 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.ImagesClient.PushImage.g.cs b/src/libs/Baseten/Generated/Baseten.ImagesClient.PushImage.g.cs index d86c3ebb..d03395e4 100644 --- a/src/libs/Baseten/Generated/Baseten.ImagesClient.PushImage.g.cs +++ b/src/libs/Baseten/Generated/Baseten.ImagesClient.PushImage.g.cs @@ -29,13 +29,13 @@ partial void PreparePushImageArguments( global::System.Net.Http.HttpClient httpClient, ref string? teamId, ref string? xTeamId, - global::Baseten.PushImageRequestV1 request); + global::Baseten.PushSandboxImageRequestV1 request); partial void PreparePushImageRequest( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpRequestMessage httpRequestMessage, string? teamId, string? xTeamId, - global::Baseten.PushImageRequestV1 request); + global::Baseten.PushSandboxImageRequestV1 request); partial void ProcessPushImageResponse( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpResponseMessage httpResponseMessage); @@ -47,7 +47,7 @@ partial void ProcessPushImageResponseContent( /// /// Push a sandbox image
- /// With image supplied, import the registry image asynchronously. Otherwise return an upload URL for a ZIP source archive containing its Dockerfile and build context. Processing starts after upload. No sandbox is created. Poll the image until BUILT or FAILED. + /// With image supplied, import the registry image asynchronously. Otherwise return an upload URL for a ZIP source archive containing its Dockerfile and build context. The uploaded ZIP archive must not exceed 5 GB. Processing starts after upload. No sandbox is created. Poll the image until BUILT or FAILED. ///
/// /// @@ -55,9 +55,9 @@ partial void ProcessPushImageResponseContent( /// 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 PushImageAsync( + public async global::System.Threading.Tasks.Task PushImageAsync( - global::Baseten.PushImageRequestV1 request, + global::Baseten.PushSandboxImageRequestV1 request, string? teamId = default, string? xTeamId = default, global::Baseten.AutoSDKRequestOptions? requestOptions = default, @@ -76,7 +76,7 @@ partial void ProcessPushImageResponseContent( } /// /// Push a sandbox image
- /// With image supplied, import the registry image asynchronously. Otherwise return an upload URL for a ZIP source archive containing its Dockerfile and build context. Processing starts after upload. No sandbox is created. Poll the image until BUILT or FAILED. + /// With image supplied, import the registry image asynchronously. Otherwise return an upload URL for a ZIP source archive containing its Dockerfile and build context. The uploaded ZIP archive must not exceed 5 GB. Processing starts after upload. No sandbox is created. Poll the image until BUILT or FAILED. ///
/// /// @@ -84,9 +84,9 @@ partial void ProcessPushImageResponseContent( /// 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> PushImageAsResponseAsync( + public async global::System.Threading.Tasks.Task> PushImageAsResponseAsync( - global::Baseten.PushImageRequestV1 request, + global::Baseten.PushSandboxImageRequestV1 request, string? teamId = default, string? xTeamId = default, global::Baseten.AutoSDKRequestOptions? requestOptions = default, @@ -546,9 +546,9 @@ partial void ProcessPushImageResponseContent( { __response.EnsureSuccessStatusCode(); - var __value = global::Baseten.PushImageResponseV1.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Baseten.PushSandboxImageResponseV1.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); - return new global::Baseten.AutoSDKHttpResponse( + return new global::Baseten.AutoSDKHttpResponse( statusCode: __response.StatusCode, headers: global::Baseten.AutoSDKHttpResponse.CreateHeaders(__response), requestUri: __response.RequestMessage?.RequestUri, @@ -578,9 +578,9 @@ partial void ProcessPushImageResponseContent( #endif ).ConfigureAwait(false); - var __value = await global::Baseten.PushImageResponseV1.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Baseten.PushSandboxImageResponseV1.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); - return new global::Baseten.AutoSDKHttpResponse( + return new global::Baseten.AutoSDKHttpResponse( statusCode: __response.StatusCode, headers: global::Baseten.AutoSDKHttpResponse.CreateHeaders(__response), requestUri: __response.RequestMessage?.RequestUri, @@ -622,7 +622,7 @@ partial void ProcessPushImageResponseContent( } /// /// Push a sandbox image
- /// With image supplied, import the registry image asynchronously. Otherwise return an upload URL for a ZIP source archive containing its Dockerfile and build context. Processing starts after upload. No sandbox is created. Poll the image until BUILT or FAILED. + /// With image supplied, import the registry image asynchronously. Otherwise return an upload URL for a ZIP source archive containing its Dockerfile and build context. The uploaded ZIP archive must not exceed 5 GB. Processing starts after upload. No sandbox is created. Poll the image until BUILT or FAILED. ///
/// /// @@ -631,7 +631,7 @@ partial void ProcessPushImageResponseContent( /// Example: base-image /// /// - /// Optional source registry image reference including a registry hostname. When omitted, the response provides an archive upload URL.
+ /// Optional source registry image reference including a registry hostname. When omitted, the response provides an archive upload URL. The uploaded ZIP archive must not exceed 5 GB.
/// Example: docker.io/b10/base-image:latest /// /// @@ -642,7 +642,7 @@ partial void ProcessPushImageResponseContent( /// 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 PushImageAsync( + public async global::System.Threading.Tasks.Task PushImageAsync( string name, string? teamId = default, string? xTeamId = default, @@ -651,7 +651,7 @@ partial void ProcessPushImageResponseContent( global::Baseten.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) { - var __request = new global::Baseten.PushImageRequestV1 + var __request = new global::Baseten.PushSandboxImageRequestV1 { Name = name, Image = image, diff --git a/src/libs/Baseten/Generated/Baseten.JsonConverters.ImageStatusV1.g.cs b/src/libs/Baseten/Generated/Baseten.JsonConverters.SandboxImageStatusV1.g.cs similarity index 68% rename from src/libs/Baseten/Generated/Baseten.JsonConverters.ImageStatusV1.g.cs rename to src/libs/Baseten/Generated/Baseten.JsonConverters.SandboxImageStatusV1.g.cs index 74c9547f..a19fcbf1 100644 --- a/src/libs/Baseten/Generated/Baseten.JsonConverters.ImageStatusV1.g.cs +++ b/src/libs/Baseten/Generated/Baseten.JsonConverters.SandboxImageStatusV1.g.cs @@ -3,10 +3,10 @@ namespace Baseten.JsonConverters { /// - public sealed class ImageStatusV1JsonConverter : global::System.Text.Json.Serialization.JsonConverter + public sealed class SandboxImageStatusV1JsonConverter : global::System.Text.Json.Serialization.JsonConverter { /// - public override global::Baseten.ImageStatusV1 Read( + public override global::Baseten.SandboxImageStatusV1 Read( ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) @@ -18,7 +18,7 @@ public sealed class ImageStatusV1JsonConverter : global::System.Text.Json.Serial var stringValue = reader.GetString(); if (stringValue != null) { - return global::Baseten.ImageStatusV1Extensions.ToEnum(stringValue) ?? default; + return global::Baseten.SandboxImageStatusV1Extensions.ToEnum(stringValue) ?? default; } break; @@ -26,11 +26,11 @@ public sealed class ImageStatusV1JsonConverter : global::System.Text.Json.Serial case global::System.Text.Json.JsonTokenType.Number: { var numValue = reader.GetInt32(); - return (global::Baseten.ImageStatusV1)numValue; + return (global::Baseten.SandboxImageStatusV1)numValue; } case global::System.Text.Json.JsonTokenType.Null: { - return default(global::Baseten.ImageStatusV1); + return default(global::Baseten.SandboxImageStatusV1); } default: throw new global::System.ArgumentOutOfRangeException(nameof(reader)); @@ -42,12 +42,12 @@ public sealed class ImageStatusV1JsonConverter : global::System.Text.Json.Serial /// public override void Write( global::System.Text.Json.Utf8JsonWriter writer, - global::Baseten.ImageStatusV1 value, + global::Baseten.SandboxImageStatusV1 value, global::System.Text.Json.JsonSerializerOptions options) { writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - writer.WriteStringValue(global::Baseten.ImageStatusV1Extensions.ToValueString(value)); + writer.WriteStringValue(global::Baseten.SandboxImageStatusV1Extensions.ToValueString(value)); } } } diff --git a/src/libs/Baseten/Generated/Baseten.JsonConverters.ImageStatusV1Nullable.g.cs b/src/libs/Baseten/Generated/Baseten.JsonConverters.SandboxImageStatusV1Nullable.g.cs similarity index 70% rename from src/libs/Baseten/Generated/Baseten.JsonConverters.ImageStatusV1Nullable.g.cs rename to src/libs/Baseten/Generated/Baseten.JsonConverters.SandboxImageStatusV1Nullable.g.cs index cdf2d9cd..e5999394 100644 --- a/src/libs/Baseten/Generated/Baseten.JsonConverters.ImageStatusV1Nullable.g.cs +++ b/src/libs/Baseten/Generated/Baseten.JsonConverters.SandboxImageStatusV1Nullable.g.cs @@ -3,10 +3,10 @@ namespace Baseten.JsonConverters { /// - public sealed class ImageStatusV1NullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + public sealed class SandboxImageStatusV1NullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter { /// - public override global::Baseten.ImageStatusV1? Read( + public override global::Baseten.SandboxImageStatusV1? Read( ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) @@ -18,7 +18,7 @@ public sealed class ImageStatusV1NullableJsonConverter : global::System.Text.Jso var stringValue = reader.GetString(); if (stringValue != null) { - return global::Baseten.ImageStatusV1Extensions.ToEnum(stringValue); + return global::Baseten.SandboxImageStatusV1Extensions.ToEnum(stringValue); } break; @@ -26,11 +26,11 @@ public sealed class ImageStatusV1NullableJsonConverter : global::System.Text.Jso case global::System.Text.Json.JsonTokenType.Number: { var numValue = reader.GetInt32(); - return (global::Baseten.ImageStatusV1)numValue; + return (global::Baseten.SandboxImageStatusV1)numValue; } case global::System.Text.Json.JsonTokenType.Null: { - return default(global::Baseten.ImageStatusV1?); + return default(global::Baseten.SandboxImageStatusV1?); } default: throw new global::System.ArgumentOutOfRangeException(nameof(reader)); @@ -42,7 +42,7 @@ public sealed class ImageStatusV1NullableJsonConverter : global::System.Text.Jso /// public override void Write( global::System.Text.Json.Utf8JsonWriter writer, - global::Baseten.ImageStatusV1? value, + global::Baseten.SandboxImageStatusV1? value, global::System.Text.Json.JsonSerializerOptions options) { writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); @@ -53,7 +53,7 @@ public override void Write( } else { - writer.WriteStringValue(global::Baseten.ImageStatusV1Extensions.ToValueString(value.Value)); + writer.WriteStringValue(global::Baseten.SandboxImageStatusV1Extensions.ToValueString(value.Value)); } } } diff --git a/src/libs/Baseten/Generated/Baseten.JsonConverters.SandboxImageV1.g.cs b/src/libs/Baseten/Generated/Baseten.JsonConverters.SandboxImageV1.g.cs new file mode 100644 index 00000000..1087bbe7 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.JsonConverters.SandboxImageV1.g.cs @@ -0,0 +1,108 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace Baseten.JsonConverters +{ + /// + public class SandboxImageV1JsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Baseten.SandboxImageV1 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."); + + using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader); + var __rawJson = __jsonDocument.RootElement.GetRawText(); + + global::Baseten.SandboxImageSummaryV1? summary = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Baseten.SandboxImageSummaryV1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Baseten.SandboxImageSummaryV1).Name}"); + summary = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + + global::Baseten.SandboxImageV1Variant2? sandboxImageV1Variant2 = default; + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Baseten.SandboxImageV1Variant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Baseten.SandboxImageV1Variant2).Name}"); + sandboxImageV1Variant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + var __value = new global::Baseten.SandboxImageV1( + summary, + + sandboxImageV1Variant2 + ); + + return __value; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Baseten.SandboxImageV1 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."); + + + writer.WriteStartObject(); + var __writtenPropertyNames = new global::System.Collections.Generic.HashSet(global::System.StringComparer.Ordinal); + if (value.IsSummary) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Baseten.SandboxImageSummaryV1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Baseten.SandboxImageSummaryV1).Name}"); + var __element0 = global::System.Text.Json.JsonSerializer.SerializeToElement(value.PickSummary(), typeInfo); + if (__element0.ValueKind != global::System.Text.Json.JsonValueKind.Object) + { + throw new global::System.Text.Json.JsonException("AllOf values must serialize as JSON objects."); + } + + foreach (var __property in __element0.EnumerateObject()) + { + if (__writtenPropertyNames.Add(__property.Name)) + { + __property.WriteTo(writer); + } + } + } + if (value.IsSandboxImageV1Variant2) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Baseten.SandboxImageV1Variant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Baseten.SandboxImageV1Variant2).Name}"); + var __element1 = global::System.Text.Json.JsonSerializer.SerializeToElement(value.PickSandboxImageV1Variant2(), typeInfo); + if (__element1.ValueKind != global::System.Text.Json.JsonValueKind.Object) + { + throw new global::System.Text.Json.JsonException("AllOf values must serialize as JSON objects."); + } + + foreach (var __property in __element1.EnumerateObject()) + { + if (__writtenPropertyNames.Add(__property.Name)) + { + __property.WriteTo(writer); + } + } + } + writer.WriteEndObject(); + } + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.JsonConverters.SandboxV1Variant2State.g.cs b/src/libs/Baseten/Generated/Baseten.JsonConverters.SandboxRegionV1InfoGeneration.g.cs similarity index 65% rename from src/libs/Baseten/Generated/Baseten.JsonConverters.SandboxV1Variant2State.g.cs rename to src/libs/Baseten/Generated/Baseten.JsonConverters.SandboxRegionV1InfoGeneration.g.cs index 67f07a97..aef9a14e 100644 --- a/src/libs/Baseten/Generated/Baseten.JsonConverters.SandboxV1Variant2State.g.cs +++ b/src/libs/Baseten/Generated/Baseten.JsonConverters.SandboxRegionV1InfoGeneration.g.cs @@ -3,10 +3,10 @@ namespace Baseten.JsonConverters { /// - public sealed class SandboxV1Variant2StateJsonConverter : global::System.Text.Json.Serialization.JsonConverter + public sealed class SandboxRegionV1InfoGenerationJsonConverter : global::System.Text.Json.Serialization.JsonConverter { /// - public override global::Baseten.SandboxV1Variant2State Read( + public override global::Baseten.SandboxRegionV1InfoGeneration Read( ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) @@ -18,7 +18,7 @@ public sealed class SandboxV1Variant2StateJsonConverter : global::System.Text.Js var stringValue = reader.GetString(); if (stringValue != null) { - return global::Baseten.SandboxV1Variant2StateExtensions.ToEnum(stringValue) ?? default; + return global::Baseten.SandboxRegionV1InfoGenerationExtensions.ToEnum(stringValue) ?? default; } break; @@ -26,11 +26,11 @@ public sealed class SandboxV1Variant2StateJsonConverter : global::System.Text.Js case global::System.Text.Json.JsonTokenType.Number: { var numValue = reader.GetInt32(); - return (global::Baseten.SandboxV1Variant2State)numValue; + return (global::Baseten.SandboxRegionV1InfoGeneration)numValue; } case global::System.Text.Json.JsonTokenType.Null: { - return default(global::Baseten.SandboxV1Variant2State); + return default(global::Baseten.SandboxRegionV1InfoGeneration); } default: throw new global::System.ArgumentOutOfRangeException(nameof(reader)); @@ -42,12 +42,12 @@ public sealed class SandboxV1Variant2StateJsonConverter : global::System.Text.Js /// public override void Write( global::System.Text.Json.Utf8JsonWriter writer, - global::Baseten.SandboxV1Variant2State value, + global::Baseten.SandboxRegionV1InfoGeneration value, global::System.Text.Json.JsonSerializerOptions options) { writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - writer.WriteStringValue(global::Baseten.SandboxV1Variant2StateExtensions.ToValueString(value)); + writer.WriteStringValue(global::Baseten.SandboxRegionV1InfoGenerationExtensions.ToValueString(value)); } } } diff --git a/src/libs/Baseten/Generated/Baseten.JsonConverters.SandboxV1Variant2StateNullable.g.cs b/src/libs/Baseten/Generated/Baseten.JsonConverters.SandboxRegionV1InfoGenerationNullable.g.cs similarity index 67% rename from src/libs/Baseten/Generated/Baseten.JsonConverters.SandboxV1Variant2StateNullable.g.cs rename to src/libs/Baseten/Generated/Baseten.JsonConverters.SandboxRegionV1InfoGenerationNullable.g.cs index 57ec6d59..afc951ea 100644 --- a/src/libs/Baseten/Generated/Baseten.JsonConverters.SandboxV1Variant2StateNullable.g.cs +++ b/src/libs/Baseten/Generated/Baseten.JsonConverters.SandboxRegionV1InfoGenerationNullable.g.cs @@ -3,10 +3,10 @@ namespace Baseten.JsonConverters { /// - public sealed class SandboxV1Variant2StateNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + public sealed class SandboxRegionV1InfoGenerationNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter { /// - public override global::Baseten.SandboxV1Variant2State? Read( + public override global::Baseten.SandboxRegionV1InfoGeneration? Read( ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) @@ -18,7 +18,7 @@ public sealed class SandboxV1Variant2StateNullableJsonConverter : global::System var stringValue = reader.GetString(); if (stringValue != null) { - return global::Baseten.SandboxV1Variant2StateExtensions.ToEnum(stringValue); + return global::Baseten.SandboxRegionV1InfoGenerationExtensions.ToEnum(stringValue); } break; @@ -26,11 +26,11 @@ public sealed class SandboxV1Variant2StateNullableJsonConverter : global::System case global::System.Text.Json.JsonTokenType.Number: { var numValue = reader.GetInt32(); - return (global::Baseten.SandboxV1Variant2State)numValue; + return (global::Baseten.SandboxRegionV1InfoGeneration)numValue; } case global::System.Text.Json.JsonTokenType.Null: { - return default(global::Baseten.SandboxV1Variant2State?); + return default(global::Baseten.SandboxRegionV1InfoGeneration?); } default: throw new global::System.ArgumentOutOfRangeException(nameof(reader)); @@ -42,7 +42,7 @@ public sealed class SandboxV1Variant2StateNullableJsonConverter : global::System /// public override void Write( global::System.Text.Json.Utf8JsonWriter writer, - global::Baseten.SandboxV1Variant2State? value, + global::Baseten.SandboxRegionV1InfoGeneration? value, global::System.Text.Json.JsonSerializerOptions options) { writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); @@ -53,7 +53,7 @@ public override void Write( } else { - writer.WriteStringValue(global::Baseten.SandboxV1Variant2StateExtensions.ToValueString(value.Value)); + writer.WriteStringValue(global::Baseten.SandboxRegionV1InfoGenerationExtensions.ToValueString(value.Value)); } } } diff --git a/src/libs/Baseten/Generated/Baseten.JsonSerializerContext.g.cs b/src/libs/Baseten/Generated/Baseten.JsonSerializerContext.g.cs index fcf1fcc0..74fa66d1 100644 --- a/src/libs/Baseten/Generated/Baseten.JsonSerializerContext.g.cs +++ b/src/libs/Baseten/Generated/Baseten.JsonSerializerContext.g.cs @@ -441,6 +441,7 @@ namespace Baseten [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.CreateLoopsRunResponseV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.DeactivateLoopsRunResponseV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.GetLoopsRunResponseV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.CreateLoopsTrainerRequestV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.ListLoopsSamplersResponseV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.ListLoopsSamplersRequestV1))] @@ -508,7 +509,6 @@ namespace Baseten [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.APIKeyOwnerV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.APIKeysV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.APIKeysRequestV1))] internal sealed partial class SourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext { } @@ -519,6 +519,7 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex [global::System.Text.Json.Serialization.JsonSourceGenerationOptions( DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull )] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.APIKeysRequestV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.APIKeyTombstoneV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.LimitTypeV1), TypeInfoPropertyName = "LimitTypeV12")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.ModelAPIOrgDetailsV1))] @@ -539,6 +540,7 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.UsageDimensionV1), TypeInfoPropertyName = "UsageDimensionV12")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.ModelApisUsageRequestV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.EgressRestrictionsV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.CreateLLMModelRequestV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.LLMModelHandleV1))] @@ -734,6 +736,19 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.CreateApiKeyForGroupResponseV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.RegisterAPIKeyRequestV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.RegisterAPIKeyResponseV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.GetSandboxConfigurationResponseV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxRegionV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxRegionV1InfoGeneration), TypeInfoPropertyName = "SandboxRegionV1InfoGeneration2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxLogsV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxLogEntryV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxMetricsV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxMetricsPointV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxImageBuildLogV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxImageBuildLogsResponseV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxLifecycleV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxExpirationPolicyV1), TypeInfoPropertyName = "SandboxExpirationPolicyV12")] @@ -763,20 +778,27 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxV1), TypeInfoPropertyName = "SandboxV12")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxV1Variant2))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxStatusV1), TypeInfoPropertyName = "SandboxStatusV12")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxV1Variant2State), TypeInfoPropertyName = "SandboxV1Variant2State2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxApiPaginationV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.ListSandboxesResponseV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.ListImagesResponseV1))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.ImageV1))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.ListImageTagsResponseV1))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.ImageTagV1))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.ImageStatusV1), TypeInfoPropertyName = "ImageStatusV12")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.PushImageRequestV1))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.PushImageResponseV1))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.CleanupImagesResponseV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.ListSandboxImagesResponseV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxImageSummaryV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.ListSandboxImageTagsResponseV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxImageTagV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxImageStatusV1), TypeInfoPropertyName = "SandboxImageStatusV12")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxImageV1), TypeInfoPropertyName = "SandboxImageV12")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxImageV1Variant2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.PushSandboxImageRequestV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.PushSandboxImageResponseV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxLibraryImageVolumeV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxLibraryImageCreationOptionsV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxLibraryImageV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.ListSandboxLibraryImagesResponseV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.CleanupSandboxImagesResponseV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool?))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(int?))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(long?))] @@ -867,6 +889,7 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SharedEndpointRegionV1?), TypeInfoPropertyName = "NullableSharedEndpointRegionV12")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.UsageLimitUnitV1?), TypeInfoPropertyName = "NullableUsageLimitUnitV12")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.LimitEnforcementV1?), TypeInfoPropertyName = "NullableLimitEnforcementV12")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxRegionV1InfoGeneration?), TypeInfoPropertyName = "NullableSandboxRegionV1InfoGeneration2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxExpirationPolicyV1?), TypeInfoPropertyName = "NullableSandboxExpirationPolicyV12")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxExpirationPolicyV1DiscriminatorType?), TypeInfoPropertyName = "NullableSandboxExpirationPolicyV1DiscriminatorType2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxTTLIdleExpirationPolicyV1Action?), TypeInfoPropertyName = "NullableSandboxTTLIdleExpirationPolicyV1Action2")] @@ -878,8 +901,8 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxPortV1Protocol?), TypeInfoPropertyName = "NullableSandboxPortV1Protocol2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxV1?), TypeInfoPropertyName = "NullableSandboxV12")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxStatusV1?), TypeInfoPropertyName = "NullableSandboxStatusV12")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxV1Variant2State?), TypeInfoPropertyName = "NullableSandboxV1Variant2State2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.ImageStatusV1?), TypeInfoPropertyName = "NullableImageStatusV12")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxImageStatusV1?), TypeInfoPropertyName = "NullableSandboxImageStatusV12")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxImageV1?), TypeInfoPropertyName = "NullableSandboxImageV12")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] @@ -983,13 +1006,19 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] internal sealed partial class SourceGenerationContextChunk1 : global::System.Text.Json.Serialization.JsonSerializerContext { } @@ -1044,6 +1073,7 @@ internal static void AddConverters(global::System.Text.Json.JsonSerializerOption options.Converters.Add(new global::Baseten.JsonConverters.TargetVariant1JsonConverter()); options.Converters.Add(new global::Baseten.JsonConverters.SandboxExpirationPolicyV1JsonConverter()); options.Converters.Add(new global::Baseten.JsonConverters.SandboxV1JsonConverter()); + options.Converters.Add(new global::Baseten.JsonConverters.SandboxImageV1JsonConverter()); options.Converters.Add(new global::Baseten.JsonConverters.AnyOfJsonConverter()); options.Converters.Add(new global::Baseten.JsonConverters.AnyOfJsonConverter()); options.Converters.Add(new global::Baseten.JsonConverters.AnyOfJsonConverter()); @@ -1372,6 +1402,10 @@ public override bool CanConvert(global::System.Type typeToConvert) || typeToConvert == typeof(global::Baseten.UsageLimitUnitV1?) + || typeToConvert == typeof(global::Baseten.SandboxRegionV1InfoGeneration) + + || typeToConvert == typeof(global::Baseten.SandboxRegionV1InfoGeneration?) + || typeToConvert == typeof(global::Baseten.SandboxExpirationPolicyV1DiscriminatorType) || typeToConvert == typeof(global::Baseten.SandboxExpirationPolicyV1DiscriminatorType?) @@ -1404,17 +1438,13 @@ public override bool CanConvert(global::System.Type typeToConvert) || typeToConvert == typeof(global::Baseten.SandboxPortV1Protocol?) - || typeToConvert == typeof(global::Baseten.SandboxV1Variant2State) - - || typeToConvert == typeof(global::Baseten.SandboxV1Variant2State?) - || typeToConvert == typeof(global::Baseten.SandboxStatusV1) || typeToConvert == typeof(global::Baseten.SandboxStatusV1?) - || typeToConvert == typeof(global::Baseten.ImageStatusV1) + || typeToConvert == typeof(global::Baseten.SandboxImageStatusV1) - || typeToConvert == typeof(global::Baseten.ImageStatusV1?); + || typeToConvert == typeof(global::Baseten.SandboxImageStatusV1?); } public override global::System.Text.Json.Serialization.JsonConverter CreateConverter( @@ -2131,6 +2161,16 @@ public override bool CanConvert(global::System.Type typeToConvert) return new global::Baseten.JsonConverters.UsageLimitUnitV1NullableJsonConverter(); } + if (typeToConvert == typeof(global::Baseten.SandboxRegionV1InfoGeneration)) + { + return new global::Baseten.JsonConverters.SandboxRegionV1InfoGenerationJsonConverter(); + } + + if (typeToConvert == typeof(global::Baseten.SandboxRegionV1InfoGeneration?)) + { + return new global::Baseten.JsonConverters.SandboxRegionV1InfoGenerationNullableJsonConverter(); + } + if (typeToConvert == typeof(global::Baseten.SandboxExpirationPolicyV1DiscriminatorType)) { return new global::Baseten.JsonConverters.SandboxExpirationPolicyV1DiscriminatorTypeJsonConverter(); @@ -2211,16 +2251,6 @@ public override bool CanConvert(global::System.Type typeToConvert) return new global::Baseten.JsonConverters.SandboxPortV1ProtocolNullableJsonConverter(); } - if (typeToConvert == typeof(global::Baseten.SandboxV1Variant2State)) - { - return new global::Baseten.JsonConverters.SandboxV1Variant2StateJsonConverter(); - } - - if (typeToConvert == typeof(global::Baseten.SandboxV1Variant2State?)) - { - return new global::Baseten.JsonConverters.SandboxV1Variant2StateNullableJsonConverter(); - } - if (typeToConvert == typeof(global::Baseten.SandboxStatusV1)) { return new global::Baseten.JsonConverters.SandboxStatusV1JsonConverter(); @@ -2231,14 +2261,14 @@ public override bool CanConvert(global::System.Type typeToConvert) return new global::Baseten.JsonConverters.SandboxStatusV1NullableJsonConverter(); } - if (typeToConvert == typeof(global::Baseten.ImageStatusV1)) + if (typeToConvert == typeof(global::Baseten.SandboxImageStatusV1)) { - return new global::Baseten.JsonConverters.ImageStatusV1JsonConverter(); + return new global::Baseten.JsonConverters.SandboxImageStatusV1JsonConverter(); } - if (typeToConvert == typeof(global::Baseten.ImageStatusV1?)) + if (typeToConvert == typeof(global::Baseten.SandboxImageStatusV1?)) { - return new global::Baseten.JsonConverters.ImageStatusV1NullableJsonConverter(); + return new global::Baseten.JsonConverters.SandboxImageStatusV1NullableJsonConverter(); } throw new global::System.NotSupportedException($"No generated enum converter is registered for '{typeToConvert}'."); } diff --git a/src/libs/Baseten/Generated/Baseten.JsonSerializerContextTypes.g.cs b/src/libs/Baseten/Generated/Baseten.JsonSerializerContextTypes.g.cs index 211521bd..d495ea7b 100644 --- a/src/libs/Baseten/Generated/Baseten.JsonSerializerContextTypes.g.cs +++ b/src/libs/Baseten/Generated/Baseten.JsonSerializerContextTypes.g.cs @@ -1749,1307 +1749,1395 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::Baseten.ListLoopsSamplersResponseV1? Type429 { get; set; } + public global::Baseten.CreateLoopsTrainerRequestV1? Type429 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type430 { get; set; } + public global::Baseten.ListLoopsSamplersResponseV1? Type430 { get; set; } /// /// /// - public global::Baseten.ListLoopsSamplersRequestV1? Type431 { get; set; } + public global::System.Collections.Generic.IList? Type431 { get; set; } /// /// /// - public global::Baseten.CreateLoopsSamplerRequestV1? Type432 { get; set; } + public global::Baseten.ListLoopsSamplersRequestV1? Type432 { get; set; } /// /// /// - public global::Baseten.CreateLoopsSamplerResponseV1? Type433 { get; set; } + public global::Baseten.CreateLoopsSamplerRequestV1? Type433 { get; set; } /// /// /// - public global::Baseten.DeactivateLoopsSamplerResponseV1? Type434 { get; set; } + public global::Baseten.CreateLoopsSamplerResponseV1? Type434 { get; set; } /// /// /// - public global::Baseten.GetLoopsSamplerResponseV1? Type435 { get; set; } + public global::Baseten.DeactivateLoopsSamplerResponseV1? Type435 { get; set; } /// /// /// - public global::Baseten.LoopsCheckpointV1? Type436 { get; set; } + public global::Baseten.GetLoopsSamplerResponseV1? Type436 { get; set; } /// /// /// - public global::Baseten.TrainerCheckpointTarget? Type437 { get; set; } + public global::Baseten.LoopsCheckpointV1? Type437 { get; set; } /// /// /// - public global::Baseten.ListLoopsCheckpointsResponseV1? Type438 { get; set; } + public global::Baseten.TrainerCheckpointTarget? Type438 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type439 { get; set; } + public global::Baseten.ListLoopsCheckpointsResponseV1? Type439 { get; set; } /// /// /// - public global::Baseten.ListLoopsCheckpointsQueryParamsV1? Type440 { get; set; } + public global::System.Collections.Generic.IList? Type440 { get; set; } /// /// /// - public global::Baseten.ValidateLoopsCheckpointRequestV1? Type441 { get; set; } + public global::Baseten.ListLoopsCheckpointsQueryParamsV1? Type441 { get; set; } /// /// /// - public global::Baseten.ValidateLoopsCheckpointResponseV1? Type442 { get; set; } + public global::Baseten.ValidateLoopsCheckpointRequestV1? Type442 { get; set; } /// /// /// - public global::Baseten.DeployLoopsCheckpointRequestV1? Type443 { get; set; } + public global::Baseten.ValidateLoopsCheckpointResponseV1? Type443 { get; set; } /// /// /// - public global::Baseten.DeployLoopsCheckpointResponseV1? Type444 { get; set; } + public global::Baseten.DeployLoopsCheckpointRequestV1? Type444 { get; set; } /// /// /// - public global::Baseten.LoopsCheckpointFilesResponseV1? Type445 { get; set; } + public global::Baseten.DeployLoopsCheckpointResponseV1? Type445 { get; set; } /// /// /// - public global::Baseten.GetLoopsCheckpointFilesRequestV1? Type446 { get; set; } + public global::Baseten.LoopsCheckpointFilesResponseV1? Type446 { get; set; } /// /// /// - public global::Baseten.LoopsCheckpointS3SourceV1? Type447 { get; set; } + public global::Baseten.GetLoopsCheckpointFilesRequestV1? Type447 { get; set; } /// /// /// - public global::Baseten.LoopsCheckpointVolumeSourceV1? Type448 { get; set; } + public global::Baseten.LoopsCheckpointS3SourceV1? Type448 { get; set; } /// /// /// - public global::Baseten.LoopsCheckpointSourceResponseV1? Type449 { get; set; } + public global::Baseten.LoopsCheckpointVolumeSourceV1? Type449 { get; set; } /// /// /// - public global::Baseten.Source4? Type450 { get; set; } + public global::Baseten.LoopsCheckpointSourceResponseV1? Type450 { get; set; } /// /// /// - public global::Baseten.LoopsCheckpointSourceResponseV1SourceDiscriminator? Type451 { get; set; } + public global::Baseten.Source4? Type451 { get; set; } /// /// /// - public global::Baseten.LoopsCheckpointSourceResponseV1SourceDiscriminatorKind? Type452 { get; set; } + public global::Baseten.LoopsCheckpointSourceResponseV1SourceDiscriminator? Type452 { get; set; } /// /// /// - public global::Baseten.LoopsDeploymentStatusV1? Type453 { get; set; } + public global::Baseten.LoopsCheckpointSourceResponseV1SourceDiscriminatorKind? Type453 { get; set; } /// /// /// - public global::Baseten.Name? Type454 { get; set; } + public global::Baseten.LoopsDeploymentStatusV1? Type454 { get; set; } /// /// /// - public global::Baseten.LoopsDeploymentV1? Type455 { get; set; } + public global::Baseten.Name? Type455 { get; set; } /// /// /// - public global::Baseten.ListLoopsDeploymentsResponseV1? Type456 { get; set; } + public global::Baseten.LoopsDeploymentV1? Type456 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type457 { get; set; } + public global::Baseten.ListLoopsDeploymentsResponseV1? Type457 { get; set; } /// /// /// - public global::Baseten.ListLoopsDeploymentsRequestV1? Type458 { get; set; } + public global::System.Collections.Generic.IList? Type458 { get; set; } /// /// /// - public global::Baseten.DeactivateLoopsDeploymentResponseV1? Type459 { get; set; } + public global::Baseten.ListLoopsDeploymentsRequestV1? Type459 { get; set; } /// /// /// - public global::Baseten.GetLoopsDeploymentResponseV1? Type460 { get; set; } + public global::Baseten.DeactivateLoopsDeploymentResponseV1? Type460 { get; set; } /// /// /// - public global::Baseten.LoopsDebugArchiveFilesResponseV1? Type461 { get; set; } + public global::Baseten.GetLoopsDeploymentResponseV1? Type461 { get; set; } /// /// /// - public global::Baseten.GetLoopsDebugArchiveFilesRequestV1? Type462 { get; set; } + public global::Baseten.LoopsDebugArchiveFilesResponseV1? Type462 { get; set; } /// /// /// - public global::Baseten.GetLoopsDeploymentMetricsRequestV1? Type463 { get; set; } + public global::Baseten.GetLoopsDebugArchiveFilesRequestV1? Type463 { get; set; } /// /// /// - public global::Baseten.InferenceVolumeByStatusDatapointV1? Type464 { get; set; } + public global::Baseten.GetLoopsDeploymentMetricsRequestV1? Type464 { get; set; } /// /// /// - public global::Baseten.LoopsDeploymentMetricsV1? Type465 { get; set; } + public global::Baseten.InferenceVolumeByStatusDatapointV1? Type465 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type466 { get; set; } + public global::Baseten.LoopsDeploymentMetricsV1? Type466 { get; set; } /// /// /// - public global::Baseten.ResponseTimeDatapointV1? Type467 { get; set; } + public global::System.Collections.Generic.IList? Type467 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type468 { get; set; } + public global::Baseten.ResponseTimeDatapointV1? Type468 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type469 { get; set; } + public global::System.Collections.Generic.IList? Type469 { get; set; } /// /// /// - public global::Baseten.LoopsDeploymentNodeMetricsV1? Type470 { get; set; } + public global::System.Collections.Generic.IList? Type470 { get; set; } /// /// /// - public global::Baseten.GetLoopsDeploymentMetricsResponseV1? Type471 { get; set; } + public global::Baseten.LoopsDeploymentNodeMetricsV1? Type471 { get; set; } /// /// /// - public global::Baseten.GetLoopsDeploymentLogsRequestV1? Type472 { get; set; } + public global::Baseten.GetLoopsDeploymentMetricsResponseV1? Type472 { get; set; } /// /// /// - public global::Baseten.TeamTrainingGpuCapacityItemV1? Type473 { get; set; } + public global::Baseten.GetLoopsDeploymentLogsRequestV1? Type473 { get; set; } /// /// /// - public global::Baseten.TrainingGpuCapacityItemV1? Type474 { get; set; } + public global::Baseten.TeamTrainingGpuCapacityItemV1? Type474 { get; set; } /// /// /// - public global::Baseten.GetTrainingGpuCapacityResponseV1? Type475 { get; set; } + public global::Baseten.TrainingGpuCapacityItemV1? Type475 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type476 { get; set; } + public global::Baseten.GetTrainingGpuCapacityResponseV1? Type476 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type477 { get; set; } + public global::System.Collections.Generic.IList? Type477 { get; set; } /// /// /// - public global::Baseten.PatchTeamTrainingGpuCapacityRequestV1? Type478 { get; set; } + public global::System.Collections.Generic.IList? Type478 { get; set; } /// /// /// - public global::Baseten.PatchTeamTrainingGpuCapacityResponseV1? Type479 { get; set; } + public global::Baseten.PatchTeamTrainingGpuCapacityRequestV1? Type479 { get; set; } /// /// /// - public global::Baseten.ActiveJobAtSubmitV1? Type480 { get; set; } + public global::Baseten.PatchTeamTrainingGpuCapacityResponseV1? Type480 { get; set; } /// /// /// - public global::Baseten.CapacityAtSubmitV1? Type481 { get; set; } + public global::Baseten.ActiveJobAtSubmitV1? Type481 { get; set; } /// /// /// - public global::Baseten.PendingJobAheadAtSubmitV1? Type482 { get; set; } + public global::Baseten.CapacityAtSubmitV1? Type482 { get; set; } /// /// /// - public global::Baseten.QueueEventV1? Type483 { get; set; } + public global::Baseten.PendingJobAheadAtSubmitV1? Type483 { get; set; } /// /// /// - public global::Baseten.GetTrainingJobQueueContextResponseV1? Type484 { get; set; } + public global::Baseten.QueueEventV1? Type484 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type485 { get; set; } + public global::Baseten.GetTrainingJobQueueContextResponseV1? Type485 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type486 { get; set; } + public global::System.Collections.Generic.IList? Type486 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type487 { get; set; } + public global::System.Collections.Generic.IList? Type487 { get; set; } /// /// /// - public global::Baseten.GetBlobCredentialsResponseV1? Type488 { get; set; } + public global::System.Collections.Generic.IList? Type488 { get; set; } /// /// /// - public global::Baseten.APIKeyCategory? Type489 { get; set; } + public global::Baseten.GetBlobCredentialsResponseV1? Type489 { get; set; } /// /// /// - public global::Baseten.CreateAPIKeyRequestV1? Type490 { get; set; } + public global::Baseten.APIKeyCategory? Type490 { get; set; } /// /// /// - public global::Baseten.APIKeyV1? Type491 { get; set; } + public global::Baseten.CreateAPIKeyRequestV1? Type491 { get; set; } /// /// /// - public global::Baseten.APIKeyInfoV1? Type492 { get; set; } + public global::Baseten.APIKeyV1? Type492 { get; set; } /// /// /// - public global::Baseten.APIKeyOwnerV1? Type493 { get; set; } + public global::Baseten.APIKeyInfoV1? Type493 { get; set; } /// /// /// - public global::Baseten.APIKeysV1? Type494 { get; set; } + public global::Baseten.APIKeyOwnerV1? Type494 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type495 { get; set; } + public global::Baseten.APIKeysV1? Type495 { get; set; } /// /// /// - public global::Baseten.APIKeysRequestV1? Type496 { get; set; } + public global::System.Collections.Generic.IList? Type496 { get; set; } /// /// /// - public global::Baseten.APIKeyTombstoneV1? Type497 { get; set; } + public global::Baseten.APIKeysRequestV1? Type497 { get; set; } /// /// /// - public global::Baseten.LimitTypeV1? Type498 { get; set; } + public global::Baseten.APIKeyTombstoneV1? Type498 { get; set; } /// /// /// - public global::Baseten.ModelAPIOrgDetailsV1? Type499 { get; set; } + public global::Baseten.LimitTypeV1? Type499 { get; set; } /// /// /// - public global::Baseten.ModelAPIV1? Type500 { get; set; } + public global::Baseten.ModelAPIOrgDetailsV1? Type500 { get; set; } /// /// /// - public global::Baseten.AnyOf? Type501 { get; set; } + public global::Baseten.ModelAPIV1? Type501 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type502 { get; set; } + public global::Baseten.AnyOf? Type502 { get; set; } /// /// /// - public global::Baseten.RateLimitV1? Type503 { get; set; } + public global::System.Collections.Generic.IList? Type503 { get; set; } /// /// /// - public global::Baseten.RateLimitUnitV1? Type504 { get; set; } + public global::Baseten.RateLimitV1? Type504 { get; set; } /// /// /// - public global::Baseten.ModelAPIsResponseV1? Type505 { get; set; } + public global::Baseten.RateLimitUnitV1? Type505 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type506 { get; set; } + public global::Baseten.ModelAPIsResponseV1? Type506 { get; set; } /// /// /// - public global::Baseten.ModelAPIsRequestV1? Type507 { get; set; } + public global::System.Collections.Generic.IList? Type507 { get; set; } /// /// /// - public global::Baseten.ModelApisUsageBucketV1? Type508 { get; set; } + public global::Baseten.ModelAPIsRequestV1? Type508 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type509 { get; set; } + public global::Baseten.ModelApisUsageBucketV1? Type509 { get; set; } /// /// /// - public global::Baseten.ModelApisUsageResultV1? Type510 { get; set; } + public global::System.Collections.Generic.IList? Type510 { get; set; } /// /// /// - public global::Baseten.ModelApisUsageResponseV1? Type511 { get; set; } + public global::Baseten.ModelApisUsageResultV1? Type511 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type512 { get; set; } + public global::Baseten.ModelApisUsageResponseV1? Type512 { get; set; } /// /// /// - public global::Baseten.BucketWidth? Type513 { get; set; } + public global::System.Collections.Generic.IList? Type513 { get; set; } /// /// /// - public global::Baseten.UsageDimensionV1? Type514 { get; set; } + public global::Baseten.BucketWidth? Type514 { get; set; } /// /// /// - public global::Baseten.ModelApisUsageRequestV1? Type515 { get; set; } + public global::Baseten.UsageDimensionV1? Type515 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type516 { get; set; } + public global::Baseten.ModelApisUsageRequestV1? Type516 { get; set; } /// /// /// - public global::Baseten.CreateLLMModelRequestV1? Type517 { get; set; } + public global::System.Collections.Generic.IList? Type517 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type518 { get; set; } + public global::Baseten.EgressRestrictionsV1? Type518 { get; set; } /// /// /// - public global::Baseten.LLMModelHandleV1? Type519 { get; set; } + public global::Baseten.CreateLLMModelRequestV1? Type519 { get; set; } /// /// /// - public global::Baseten.CreateLLMModelVersionRequestV1? Type520 { get; set; } + public global::System.Collections.Generic.IList? Type520 { get; set; } /// /// /// - public global::Baseten.LibraryListingMetadataV1? Type521 { get; set; } + public global::Baseten.LLMModelHandleV1? Type521 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type522 { get; set; } + public global::Baseten.CreateLLMModelVersionRequestV1? Type522 { get; set; } /// /// /// - public global::Baseten.LibraryListingModality? Type523 { get; set; } + public global::Baseten.LibraryListingMetadataV1? Type523 { get; set; } /// /// /// - public global::Baseten.LibraryListingV1? Type524 { get; set; } + public global::System.Collections.Generic.IList? Type524 { get; set; } /// /// /// - public global::Baseten.LibraryListingsV1? Type525 { get; set; } + public global::Baseten.LibraryListingModality? Type525 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type526 { get; set; } + public global::Baseten.LibraryListingV1? Type526 { get; set; } /// /// /// - public global::Baseten.CreateLibraryListingRequestV1? Type527 { get; set; } + public global::Baseten.LibraryListingsV1? Type527 { get; set; } /// /// /// - public global::Baseten.LibraryListingTombstoneV1? Type528 { get; set; } + public global::System.Collections.Generic.IList? Type528 { get; set; } /// /// /// - public global::Baseten.UpdateLibraryListingRequestV1? Type529 { get; set; } + public global::Baseten.CreateLibraryListingRequestV1? Type529 { get; set; } /// /// /// - public global::Baseten.BenchmarkSnapshotV1? Type530 { get; set; } + public global::Baseten.LibraryListingTombstoneV1? Type530 { get; set; } /// /// /// - public global::Baseten.LLMBenchmarkMetricsV1? Type531 { get; set; } + public global::Baseten.UpdateLibraryListingRequestV1? Type531 { get; set; } /// /// /// - public global::Baseten.TTSBenchmarkMetricsV1? Type532 { get; set; } + public global::Baseten.BenchmarkSnapshotV1? Type532 { get; set; } /// /// /// - public global::Baseten.EmbeddingBenchmarkMetricsV1? Type533 { get; set; } + public global::Baseten.LLMBenchmarkMetricsV1? Type533 { get; set; } /// /// /// - public global::Baseten.LibraryListingVersionV1? Type534 { get; set; } + public global::Baseten.TTSBenchmarkMetricsV1? Type534 { get; set; } /// /// /// - public global::Baseten.LibraryListingVersionsV1? Type535 { get; set; } + public global::Baseten.EmbeddingBenchmarkMetricsV1? Type535 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type536 { get; set; } + public global::Baseten.LibraryListingVersionV1? Type536 { get; set; } /// /// /// - public global::Baseten.CreateLibraryListingVersionRequestV1? Type537 { get; set; } + public global::Baseten.LibraryListingVersionsV1? Type537 { get; set; } /// /// /// - public global::Baseten.LibraryListingVersionTombstoneV1? Type538 { get; set; } + public global::System.Collections.Generic.IList? Type538 { get; set; } /// /// /// - public global::Baseten.UpdateLibraryListingVersionRequestV1? Type539 { get; set; } + public global::Baseten.CreateLibraryListingVersionRequestV1? Type539 { get; set; } /// /// /// - public global::Baseten.ModelApisCostBucketV1? Type540 { get; set; } + public global::Baseten.LibraryListingVersionTombstoneV1? Type540 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type541 { get; set; } + public global::Baseten.UpdateLibraryListingVersionRequestV1? Type541 { get; set; } /// /// /// - public global::Baseten.ModelApisCostResultV1? Type542 { get; set; } + public global::Baseten.ModelApisCostBucketV1? Type542 { get; set; } /// /// /// - public global::Baseten.ModelApisCostsResponseV1? Type543 { get; set; } + public global::System.Collections.Generic.IList? Type543 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type544 { get; set; } + public global::Baseten.ModelApisCostResultV1? Type544 { get; set; } /// /// /// - public global::Baseten.ModelApiCostDimensionV1? Type545 { get; set; } + public global::Baseten.ModelApisCostsResponseV1? Type545 { get; set; } /// /// /// - public global::Baseten.ModelApisCostsRequestV1? Type546 { get; set; } + public global::System.Collections.Generic.IList? Type546 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type547 { get; set; } + public global::Baseten.ModelApiCostDimensionV1? Type547 { get; set; } /// /// /// - public global::Baseten.BillableResourceV1? Type548 { get; set; } + public global::Baseten.ModelApisCostsRequestV1? Type548 { get; set; } /// /// /// - public global::Baseten.ResourceKind? Type549 { get; set; } + public global::System.Collections.Generic.IList? Type549 { get; set; } /// /// /// - public global::Baseten.ChainMetadataV1? Type550 { get; set; } + public global::Baseten.BillableResourceV1? Type550 { get; set; } /// /// /// - public global::Baseten.DailyDedicatedUsageV1? Type551 { get; set; } + public global::Baseten.ResourceKind? Type551 { get; set; } /// /// /// - public global::Baseten.DailyModelApiUsageV1? Type552 { get; set; } + public global::Baseten.ChainMetadataV1? Type552 { get; set; } /// /// /// - public global::Baseten.DailyTrainingUsageV1? Type553 { get; set; } + public global::Baseten.DailyDedicatedUsageV1? Type553 { get; set; } /// /// /// - public global::Baseten.DedicatedItemV1? Type554 { get; set; } + public global::Baseten.DailyModelApiUsageV1? Type554 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type555 { get; set; } + public global::Baseten.DailyTrainingUsageV1? Type555 { get; set; } /// /// /// - public global::Baseten.DedicatedUsageV1? Type556 { get; set; } + public global::Baseten.DedicatedItemV1? Type556 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type557 { get; set; } + public global::System.Collections.Generic.IList? Type557 { get; set; } /// /// /// - public global::Baseten.ModelApiItemV1? Type558 { get; set; } + public global::Baseten.DedicatedUsageV1? Type558 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type559 { get; set; } + public global::System.Collections.Generic.IList? Type559 { get; set; } /// /// /// - public global::Baseten.ModelApisUsageV1? Type560 { get; set; } + public global::Baseten.ModelApiItemV1? Type560 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type561 { get; set; } + public global::System.Collections.Generic.IList? Type561 { get; set; } /// /// /// - public global::Baseten.TrainingItemV1? Type562 { get; set; } + public global::Baseten.ModelApisUsageV1? Type562 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type563 { get; set; } + public global::System.Collections.Generic.IList? Type563 { get; set; } /// /// /// - public global::Baseten.TrainingUsageV1? Type564 { get; set; } + public global::Baseten.TrainingItemV1? Type564 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type565 { get; set; } + public global::System.Collections.Generic.IList? Type565 { get; set; } /// /// /// - public global::Baseten.UsageSummaryV1? Type566 { get; set; } + public global::Baseten.TrainingUsageV1? Type566 { get; set; } /// /// /// - public global::Baseten.UsageSummaryRequestV1? Type567 { get; set; } + public global::System.Collections.Generic.IList? Type567 { get; set; } /// /// /// - public global::Baseten.ToolCallUsageBucketV1? Type568 { get; set; } + public global::Baseten.UsageSummaryV1? Type568 { get; set; } /// /// /// - public global::Baseten.ToolCallUsageResponseV1? Type569 { get; set; } + public global::Baseten.UsageSummaryRequestV1? Type569 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type570 { get; set; } + public global::Baseten.ToolCallUsageBucketV1? Type570 { get; set; } /// /// /// - public global::Baseten.ToolCallUsageRequestV1? Type571 { get; set; } + public global::Baseten.ToolCallUsageResponseV1? Type571 { get; set; } /// /// /// - public global::Baseten.UserInfoV1? Type572 { get; set; } + public global::System.Collections.Generic.IList? Type572 { get; set; } /// /// /// - public global::Baseten.UsersResponseV1? Type573 { get; set; } + public global::Baseten.ToolCallUsageRequestV1? Type573 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type574 { get; set; } + public global::Baseten.UserInfoV1? Type574 { get; set; } /// /// /// - public global::Baseten.UsersRequestV1? Type575 { get; set; } + public global::Baseten.UsersResponseV1? Type575 { get; set; } /// /// /// - public global::Baseten.AwsAssumeRoleV1? Type576 { get; set; } + public global::System.Collections.Generic.IList? Type576 { get; set; } /// /// /// - public global::Baseten.OrganizationInfoV1? Type577 { get; set; } + public global::Baseten.UsersRequestV1? Type577 { get; set; } /// /// /// - public global::Baseten.GatewayEventTokensV1? Type578 { get; set; } + public global::Baseten.AwsAssumeRoleV1? Type578 { get; set; } /// /// /// - public global::Baseten.GatewayEventV1? Type579 { get; set; } + public global::Baseten.OrganizationInfoV1? Type579 { get; set; } /// /// /// - public global::Baseten.GatewayEventsResponseV1? Type580 { get; set; } + public global::Baseten.GatewayEventTokensV1? Type580 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type581 { get; set; } + public global::Baseten.GatewayEventV1? Type581 { get; set; } /// /// /// - public global::Baseten.GatewayEventsRequestV1? Type582 { get; set; } + public global::Baseten.GatewayEventsResponseV1? Type582 { get; set; } /// /// /// - public global::Baseten.ExploreCostV1? Type583 { get; set; } + public global::System.Collections.Generic.IList? Type583 { get; set; } /// /// /// - public global::Baseten.ExploreCostValuesV1? Type584 { get; set; } + public global::Baseten.GatewayEventsRequestV1? Type584 { get; set; } /// /// /// - public global::Baseten.ExploreMetadataAPIFormatsV1? Type585 { get; set; } + public global::Baseten.ExploreCostV1? Type585 { get; set; } /// /// /// - public global::Baseten.ExploreMetadataV1? Type586 { get; set; } + public global::Baseten.ExploreCostValuesV1? Type586 { get; set; } /// /// /// - public global::Baseten.ExploreMetadataResponseV1? Type587 { get; set; } + public global::Baseten.ExploreMetadataAPIFormatsV1? Type587 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type588 { get; set; } + public global::Baseten.ExploreMetadataV1? Type588 { get; set; } /// /// /// - public global::Baseten.ExploreMetadataRequestV1? Type589 { get; set; } + public global::Baseten.ExploreMetadataResponseV1? Type589 { get; set; } /// /// /// - public global::Baseten.RouteRefV1? Type590 { get; set; } + public global::System.Collections.Generic.IList? Type590 { get; set; } /// /// /// - public global::Baseten.RouteTargetAnthropicV1? Type591 { get; set; } + public global::Baseten.ExploreMetadataRequestV1? Type591 { get; set; } /// /// /// - public global::Baseten.RouteTargetBasetenModelAPIV1? Type592 { get; set; } + public global::Baseten.RouteRefV1? Type592 { get; set; } /// /// /// - public global::Baseten.RouteTargetClassifierModelBasedV1? Type593 { get; set; } + public global::Baseten.RouteTargetAnthropicV1? Type593 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type594 { get; set; } + public global::Baseten.RouteTargetBasetenModelAPIV1? Type594 { get; set; } /// /// /// - public global::Baseten.RouteTargetOpenAIV1? Type595 { get; set; } + public global::Baseten.RouteTargetClassifierModelBasedV1? Type595 { get; set; } /// /// /// - public global::Baseten.RouteTargetXAIV1? Type596 { get; set; } + public global::System.Collections.Generic.IList? Type596 { get; set; } /// /// /// - public global::Baseten.RouteV1? Type597 { get; set; } + public global::Baseten.RouteTargetOpenAIV1? Type597 { get; set; } /// /// /// - public global::Baseten.Target? Type598 { get; set; } + public global::Baseten.RouteTargetXAIV1? Type598 { get; set; } /// /// /// - public global::Baseten.RouteV1TargetDiscriminator? Type599 { get; set; } + public global::Baseten.RouteV1? Type599 { get; set; } /// /// /// - public global::Baseten.RouteV1TargetDiscriminatorType? Type600 { get; set; } + public global::Baseten.Target? Type600 { get; set; } /// /// /// - public global::Baseten.RoutesResponseV1? Type601 { get; set; } + public global::Baseten.RouteV1TargetDiscriminator? Type601 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type602 { get; set; } + public global::Baseten.RouteV1TargetDiscriminatorType? Type602 { get; set; } /// /// /// - public global::Baseten.RoutesRequestV1? Type603 { get; set; } + public global::Baseten.RoutesResponseV1? Type603 { get; set; } /// /// /// - public global::Baseten.RouteTargetConfigAnthropicV1? Type604 { get; set; } + public global::System.Collections.Generic.IList? Type604 { get; set; } /// /// /// - public global::Baseten.RouteTargetConfigBasetenModelAPIV1? Type605 { get; set; } + public global::Baseten.RoutesRequestV1? Type605 { get; set; } /// /// /// - public global::Baseten.RouteTargetConfigClassifierModelBasedV1? Type606 { get; set; } + public global::Baseten.RouteTargetConfigAnthropicV1? Type606 { get; set; } /// /// /// - public global::Baseten.RouteTargetConfigOpenAIV1? Type607 { get; set; } + public global::Baseten.RouteTargetConfigBasetenModelAPIV1? Type607 { get; set; } /// /// /// - public global::Baseten.RouteTargetConfigXAIV1? Type608 { get; set; } + public global::Baseten.RouteTargetConfigClassifierModelBasedV1? Type608 { get; set; } /// /// /// - public global::Baseten.CreateRouteRequestV1? Type609 { get; set; } + public global::Baseten.RouteTargetConfigOpenAIV1? Type609 { get; set; } /// /// /// - public global::Baseten.Target2? Type610 { get; set; } + public global::Baseten.RouteTargetConfigXAIV1? Type610 { get; set; } /// /// /// - public global::Baseten.CreateRouteRequestV1TargetDiscriminator? Type611 { get; set; } + public global::Baseten.CreateRouteRequestV1? Type611 { get; set; } /// /// /// - public global::Baseten.CreateRouteRequestV1TargetDiscriminatorType? Type612 { get; set; } + public global::Baseten.Target2? Type612 { get; set; } /// /// /// - public global::Baseten.RouteProviderV1? Type613 { get; set; } + public global::Baseten.CreateRouteRequestV1TargetDiscriminator? Type613 { get; set; } /// /// /// - public global::Baseten.RoutesUsageBucketV1? Type614 { get; set; } + public global::Baseten.CreateRouteRequestV1TargetDiscriminatorType? Type614 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type615 { get; set; } + public global::Baseten.RouteProviderV1? Type615 { get; set; } /// /// /// - public global::Baseten.RoutesUsageResultV1? Type616 { get; set; } + public global::Baseten.RoutesUsageBucketV1? Type616 { get; set; } /// /// /// - public global::Baseten.RoutesUsageResponseV1? Type617 { get; set; } + public global::System.Collections.Generic.IList? Type617 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type618 { get; set; } + public global::Baseten.RoutesUsageResultV1? Type618 { get; set; } /// /// /// - public global::Baseten.RouteUsageDimensionV1? Type619 { get; set; } + public global::Baseten.RoutesUsageResponseV1? Type619 { get; set; } /// /// /// - public global::Baseten.RoutesUsageRequestV1? Type620 { get; set; } + public global::System.Collections.Generic.IList? Type620 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type621 { get; set; } + public global::Baseten.RouteUsageDimensionV1? Type621 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type622 { get; set; } + public global::Baseten.RoutesUsageRequestV1? Type622 { get; set; } /// /// /// - public global::Baseten.RouteEffectiveSpendLimitV1? Type623 { get; set; } + public global::System.Collections.Generic.IList? Type623 { get; set; } /// /// /// - public global::Baseten.RouteSettingSourceV1? Type624 { get; set; } + public global::System.Collections.Generic.IList? Type624 { get; set; } /// /// /// - public global::Baseten.RouteSpendLimitSettingV1? Type625 { get; set; } + public global::Baseten.RouteEffectiveSpendLimitV1? Type625 { get; set; } /// /// /// - public global::Baseten.RouteSpendLimitTeamDefaultV1? Type626 { get; set; } + public global::Baseten.RouteSettingSourceV1? Type626 { get; set; } /// /// /// - public global::Baseten.RouteUserSettingsV1? Type627 { get; set; } + public global::Baseten.RouteSpendLimitSettingV1? Type627 { get; set; } /// /// /// - public global::Baseten.UpdateRouteSpendLimitSettingV1? Type628 { get; set; } + public global::Baseten.RouteSpendLimitTeamDefaultV1? Type628 { get; set; } /// /// /// - public global::Baseten.UpdateRouteUserSettingsRequestV1? Type629 { get; set; } + public global::Baseten.RouteUserSettingsV1? Type629 { get; set; } /// /// /// - public global::Baseten.BackgroundHarnessDefaultsV1? Type630 { get; set; } + public global::Baseten.UpdateRouteSpendLimitSettingV1? Type630 { get; set; } /// /// /// - public global::Baseten.RouteHarnessModelV1? Type631 { get; set; } + public global::Baseten.UpdateRouteUserSettingsRequestV1? Type631 { get; set; } /// /// /// - public global::Baseten.PrimaryHarnessDefaultsV1? Type632 { get; set; } + public global::Baseten.BackgroundHarnessDefaultsV1? Type632 { get; set; } /// /// /// - public global::Baseten.RouteHarnessDefaultsV1? Type633 { get; set; } + public global::Baseten.RouteHarnessModelV1? Type633 { get; set; } /// /// /// - public global::Baseten.RouteTeamSpendLimitSettingV1? Type634 { get; set; } + public global::Baseten.PrimaryHarnessDefaultsV1? Type634 { get; set; } /// /// /// - public global::Baseten.RouteTeamSettingsV1? Type635 { get; set; } + public global::Baseten.RouteHarnessDefaultsV1? Type635 { get; set; } /// /// /// - public global::Baseten.UpdateBackgroundHarnessModelsV1? Type636 { get; set; } + public global::Baseten.RouteTeamSpendLimitSettingV1? Type636 { get; set; } /// /// /// - public global::Baseten.UpdatePrimaryHarnessModelsV1? Type637 { get; set; } + public global::Baseten.RouteTeamSettingsV1? Type637 { get; set; } /// /// /// - public global::Baseten.UpdateRouteHarnessDefaultsV1? Type638 { get; set; } + public global::Baseten.UpdateBackgroundHarnessModelsV1? Type638 { get; set; } /// /// /// - public global::Baseten.UpdateRouteTeamSpendLimitSettingV1? Type639 { get; set; } + public global::Baseten.UpdatePrimaryHarnessModelsV1? Type639 { get; set; } /// /// /// - public global::Baseten.UpdateRouteTeamSettingsRequestV1? Type640 { get; set; } + public global::Baseten.UpdateRouteHarnessDefaultsV1? Type640 { get; set; } /// /// /// - public global::Baseten.RouteConnectionAnthropicV1? Type641 { get; set; } + public global::Baseten.UpdateRouteTeamSpendLimitSettingV1? Type641 { get; set; } /// /// /// - public global::Baseten.RouteConnectionOpenAIV1? Type642 { get; set; } + public global::Baseten.UpdateRouteTeamSettingsRequestV1? Type642 { get; set; } /// /// /// - public global::Baseten.RouteConnectionV1? Type643 { get; set; } + public global::Baseten.RouteConnectionAnthropicV1? Type643 { get; set; } /// /// /// - public global::Baseten.Config? Type644 { get; set; } + public global::Baseten.RouteConnectionOpenAIV1? Type644 { get; set; } /// /// /// - public global::Baseten.RouteConnectionXAIV1? Type645 { get; set; } + public global::Baseten.RouteConnectionV1? Type645 { get; set; } /// /// /// - public global::Baseten.RouteConnectionV1ConfigDiscriminator? Type646 { get; set; } + public global::Baseten.Config? Type646 { get; set; } /// /// /// - public global::Baseten.RouteConnectionV1ConfigDiscriminatorProvider? Type647 { get; set; } + public global::Baseten.RouteConnectionXAIV1? Type647 { get; set; } /// /// /// - public global::Baseten.RouteConnectionsResponseV1? Type648 { get; set; } + public global::Baseten.RouteConnectionV1ConfigDiscriminator? Type648 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type649 { get; set; } + public global::Baseten.RouteConnectionV1ConfigDiscriminatorProvider? Type649 { get; set; } /// /// /// - public global::Baseten.RouteConnectionsRequestV1? Type650 { get; set; } + public global::Baseten.RouteConnectionsResponseV1? Type650 { get; set; } /// /// /// - public global::Baseten.RouteConnectionConfigAnthropicV1? Type651 { get; set; } + public global::System.Collections.Generic.IList? Type651 { get; set; } /// /// /// - public global::Baseten.RouteConnectionConfigOpenAIV1? Type652 { get; set; } + public global::Baseten.RouteConnectionsRequestV1? Type652 { get; set; } /// /// /// - public global::Baseten.RouteConnectionConfigXAIV1? Type653 { get; set; } + public global::Baseten.RouteConnectionConfigAnthropicV1? Type653 { get; set; } /// /// /// - public global::Baseten.CreateRouteConnectionRequestV1? Type654 { get; set; } + public global::Baseten.RouteConnectionConfigOpenAIV1? Type654 { get; set; } /// /// /// - public global::Baseten.Config2? Type655 { get; set; } + public global::Baseten.RouteConnectionConfigXAIV1? Type655 { get; set; } /// /// /// - public global::Baseten.CreateRouteConnectionRequestV1ConfigDiscriminator? Type656 { get; set; } + public global::Baseten.CreateRouteConnectionRequestV1? Type656 { get; set; } /// /// /// - public global::Baseten.CreateRouteConnectionRequestV1ConfigDiscriminatorProvider? Type657 { get; set; } + public global::Baseten.Config2? Type657 { get; set; } /// /// /// - public global::Baseten.RouteConnectionTombstoneV1? Type658 { get; set; } + public global::Baseten.CreateRouteConnectionRequestV1ConfigDiscriminator? Type658 { get; set; } /// /// /// - public global::Baseten.UpdateRouteConnectionConfigAnthropicV1? Type659 { get; set; } + public global::Baseten.CreateRouteConnectionRequestV1ConfigDiscriminatorProvider? Type659 { get; set; } /// /// /// - public global::Baseten.UpdateRouteConnectionConfigOpenAIV1? Type660 { get; set; } + public global::Baseten.RouteConnectionTombstoneV1? Type660 { get; set; } /// /// /// - public global::Baseten.UpdateRouteConnectionConfigXAIV1? Type661 { get; set; } + public global::Baseten.UpdateRouteConnectionConfigAnthropicV1? Type661 { get; set; } /// /// /// - public global::Baseten.UpdateRouteConnectionRequestV1? Type662 { get; set; } + public global::Baseten.UpdateRouteConnectionConfigOpenAIV1? Type662 { get; set; } /// /// /// - public global::Baseten.Config3? Type663 { get; set; } + public global::Baseten.UpdateRouteConnectionConfigXAIV1? Type663 { get; set; } /// /// /// - public global::Baseten.UpdateRouteConnectionRequestV1ConfigDiscriminator? Type664 { get; set; } + public global::Baseten.UpdateRouteConnectionRequestV1? Type664 { get; set; } /// /// /// - public global::Baseten.UpdateRouteConnectionRequestV1ConfigDiscriminatorProvider? Type665 { get; set; } + public global::Baseten.Config3? Type665 { get; set; } /// /// /// - public global::Baseten.RouteTombstoneV1? Type666 { get; set; } + public global::Baseten.UpdateRouteConnectionRequestV1ConfigDiscriminator? Type666 { get; set; } /// /// /// - public global::Baseten.UpdateRouteRequestV1? Type667 { get; set; } + public global::Baseten.UpdateRouteConnectionRequestV1ConfigDiscriminatorProvider? Type667 { get; set; } /// /// /// - public global::Baseten.TargetVariant1? Type668 { get; set; } + public global::Baseten.RouteTombstoneV1? Type668 { get; set; } /// /// /// - public global::Baseten.UpdateRouteRequestV1TargetVariant1Discriminator? Type669 { get; set; } + public global::Baseten.UpdateRouteRequestV1? Type669 { get; set; } /// /// /// - public global::Baseten.UpdateRouteRequestV1TargetVariant1DiscriminatorType? Type670 { get; set; } + public global::Baseten.TargetVariant1? Type670 { get; set; } /// /// /// - public global::Baseten.EndpointTargetV1? Type671 { get; set; } + public global::Baseten.UpdateRouteRequestV1TargetVariant1Discriminator? Type671 { get; set; } /// /// /// - public global::Baseten.GatewayProvider? Type672 { get; set; } + public global::Baseten.UpdateRouteRequestV1TargetVariant1DiscriminatorType? Type672 { get; set; } /// /// /// - public global::Baseten.VertexTargetConfigV1? Type673 { get; set; } + public global::Baseten.EndpointTargetV1? Type673 { get; set; } /// /// /// - public global::Baseten.EndpointV1? Type674 { get; set; } + public global::Baseten.GatewayProvider? Type674 { get; set; } /// /// /// - public global::Baseten.SharedEndpointRegionV1? Type675 { get; set; } + public global::Baseten.VertexTargetConfigV1? Type675 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type676 { get; set; } + public global::Baseten.EndpointV1? Type676 { get; set; } /// /// /// - public global::Baseten.EndpointsResponseV1? Type677 { get; set; } + public global::Baseten.SharedEndpointRegionV1? Type677 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type678 { get; set; } + public global::System.Collections.Generic.IList? Type678 { get; set; } /// /// /// - public global::Baseten.EndpointTargetRequestV1? Type679 { get; set; } + public global::Baseten.EndpointsResponseV1? Type679 { get; set; } /// /// /// - public global::Baseten.CreateEndpointRequestV1? Type680 { get; set; } + public global::System.Collections.Generic.IList? Type680 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type681 { get; set; } + public global::Baseten.EndpointTargetRequestV1? Type681 { get; set; } /// /// /// - public global::Baseten.EndpointTombstoneV1? Type682 { get; set; } + public global::Baseten.CreateEndpointRequestV1? Type682 { get; set; } /// /// /// - public global::Baseten.UpdateEndpointRequestV1? Type683 { get; set; } + public global::System.Collections.Generic.IList? Type683 { get; set; } /// /// /// - public global::Baseten.EffectiveModelConfigV1? Type684 { get; set; } + public global::Baseten.EndpointTombstoneV1? Type684 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type685 { get; set; } + public global::Baseten.UpdateEndpointRequestV1? Type685 { get; set; } /// /// /// - public global::Baseten.EffectiveRateLimitV1? Type686 { get; set; } + public global::Baseten.EffectiveModelConfigV1? Type686 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type687 { get; set; } + public global::System.Collections.Generic.IList? Type687 { get; set; } /// /// /// - public global::Baseten.EffectiveUsageLimitV1? Type688 { get; set; } + public global::Baseten.EffectiveRateLimitV1? Type688 { get; set; } /// /// /// - public global::Baseten.UsageLimitUnitV1? Type689 { get; set; } + public global::System.Collections.Generic.IList? Type689 { get; set; } /// /// /// - public global::Baseten.GroupHierarchyV1? Type690 { get; set; } + public global::Baseten.EffectiveUsageLimitV1? Type690 { get; set; } /// /// /// - public global::Baseten.LimitEnforcementV1? Type691 { get; set; } + public global::Baseten.UsageLimitUnitV1? Type691 { get; set; } /// /// /// - public global::Baseten.GroupMetadataV1? Type692 { get; set; } + public global::Baseten.GroupHierarchyV1? Type692 { get; set; } /// /// /// - public global::Baseten.GroupV1? Type693 { get; set; } + public global::Baseten.LimitEnforcementV1? Type693 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type694 { get; set; } + public global::Baseten.GroupMetadataV1? Type694 { get; set; } /// /// /// - public global::Baseten.ModelConfigV1? Type695 { get; set; } + public global::Baseten.GroupV1? Type695 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type696 { get; set; } + public global::System.Collections.Generic.IList? Type696 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type697 { get; set; } + public global::Baseten.ModelConfigV1? Type697 { get; set; } /// /// /// - public global::Baseten.UsageLimitV1? Type698 { get; set; } + public global::System.Collections.Generic.IList? Type698 { get; set; } /// /// /// - public global::Baseten.GroupsResponseV1? Type699 { get; set; } + public global::System.Collections.Generic.IList? Type699 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type700 { get; set; } + public global::Baseten.UsageLimitV1? Type700 { get; set; } /// /// /// - public global::Baseten.CreateGroupHierarchyV1? Type701 { get; set; } + public global::Baseten.GroupsResponseV1? Type701 { get; set; } /// /// /// - public global::Baseten.CreateGroupRequestV1? Type702 { get; set; } + public global::System.Collections.Generic.IList? Type702 { get; set; } /// /// /// - public global::Baseten.UpdateGroupMetadataV1? Type703 { get; set; } + public global::Baseten.CreateGroupHierarchyV1? Type703 { get; set; } /// /// /// - public global::Baseten.UpdateGroupRequestV1? Type704 { get; set; } + public global::Baseten.CreateGroupRequestV1? Type704 { get; set; } /// /// /// - public global::Baseten.GatewayKeyInfoV1? Type705 { get; set; } + public global::Baseten.UpdateGroupMetadataV1? Type705 { get; set; } /// /// /// - public global::Baseten.KeysForGroupResponseV1? Type706 { get; set; } + public global::Baseten.UpdateGroupRequestV1? Type706 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type707 { get; set; } + public global::Baseten.GatewayKeyInfoV1? Type707 { get; set; } /// /// /// - public global::Baseten.CreateApiKeyForGroupRequestV1? Type708 { get; set; } + public global::Baseten.KeysForGroupResponseV1? Type708 { get; set; } /// /// /// - public global::Baseten.CreateApiKeyForGroupResponseV1? Type709 { get; set; } + public global::System.Collections.Generic.IList? Type709 { get; set; } /// /// /// - public global::Baseten.RegisterAPIKeyRequestV1? Type710 { get; set; } + public global::Baseten.CreateApiKeyForGroupRequestV1? Type710 { get; set; } /// /// /// - public global::Baseten.RegisterAPIKeyResponseV1? Type711 { get; set; } + public global::Baseten.CreateApiKeyForGroupResponseV1? Type711 { get; set; } /// /// /// - public global::Baseten.SandboxLifecycleV1? Type712 { get; set; } + public global::Baseten.RegisterAPIKeyRequestV1? Type712 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type713 { get; set; } + public global::Baseten.RegisterAPIKeyResponseV1? Type713 { get; set; } /// /// /// - public global::Baseten.SandboxExpirationPolicyV1? Type714 { get; set; } + public global::Baseten.GetSandboxConfigurationResponseV1? Type714 { get; set; } /// /// /// - public global::Baseten.SandboxTTLIdleExpirationPolicyV1? Type715 { get; set; } + public global::System.Collections.Generic.IList? Type715 { get; set; } /// /// /// - public global::Baseten.SandboxTTLMaxAgeExpirationPolicyV1? Type716 { get; set; } + public global::Baseten.SandboxRegionV1? Type716 { get; set; } /// /// /// - public global::Baseten.SandboxDateExpirationPolicyV1? Type717 { get; set; } + public global::Baseten.SandboxRegionV1InfoGeneration? Type717 { get; set; } /// /// /// - public global::Baseten.SandboxExpirationPolicyV1Discriminator? Type718 { get; set; } + public global::Baseten.SandboxLogsV1? Type718 { get; set; } /// /// /// - public global::Baseten.SandboxExpirationPolicyV1DiscriminatorType? Type719 { get; set; } + public global::System.Collections.Generic.IList? Type719 { get; set; } /// /// /// - public global::Baseten.SandboxTTLIdleExpirationPolicyV1Action? Type720 { get; set; } + public global::Baseten.SandboxLogEntryV1? Type720 { get; set; } /// /// /// - public global::Baseten.SandboxTTLIdleExpirationPolicyV1Type? Type721 { get; set; } + public global::Baseten.SandboxMetricsV1? Type721 { get; set; } /// /// /// - public global::Baseten.SandboxTTLMaxAgeExpirationPolicyV1Action? Type722 { get; set; } + public global::System.Collections.Generic.IList? Type722 { get; set; } /// /// /// - public global::Baseten.SandboxTTLMaxAgeExpirationPolicyV1Type? Type723 { get; set; } + public global::Baseten.SandboxMetricsPointV1? Type723 { get; set; } /// /// /// - public global::Baseten.SandboxDateExpirationPolicyV1Action? Type724 { get; set; } + public global::Baseten.SandboxImageBuildLogV1? Type724 { get; set; } /// /// /// - public global::Baseten.SandboxDateExpirationPolicyV1Type? Type725 { get; set; } + public global::Baseten.SandboxImageBuildLogsResponseV1? Type725 { get; set; } /// /// /// - public global::Baseten.SandboxNetworkV1? Type726 { get; set; } + public global::System.Collections.Generic.IList? Type726 { get; set; } /// /// /// - public global::Baseten.SandboxProxyConfigV1? Type727 { get; set; } + public global::Baseten.SandboxLifecycleV1? Type727 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type728 { get; set; } + public global::System.Collections.Generic.IList? Type728 { get; set; } /// /// /// - public global::Baseten.SandboxProxyTargetV1? Type729 { get; set; } + public global::Baseten.SandboxExpirationPolicyV1? Type729 { get; set; } /// /// /// - public global::Baseten.SandboxEnvV1? Type730 { get; set; } + public global::Baseten.SandboxTTLIdleExpirationPolicyV1? Type730 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type731 { get; set; } + public global::Baseten.SandboxTTLMaxAgeExpirationPolicyV1? Type731 { get; set; } /// /// /// - public global::Baseten.SandboxPortV1? Type732 { get; set; } + public global::Baseten.SandboxDateExpirationPolicyV1? Type732 { get; set; } /// /// /// - public global::Baseten.SandboxPortV1Protocol? Type733 { get; set; } + public global::Baseten.SandboxExpirationPolicyV1Discriminator? Type733 { get; set; } /// /// /// - public global::Baseten.SandboxConfigurationV1? Type734 { get; set; } + public global::Baseten.SandboxExpirationPolicyV1DiscriminatorType? Type734 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type735 { get; set; } + public global::Baseten.SandboxTTLIdleExpirationPolicyV1Action? Type735 { get; set; } /// /// /// - public global::Baseten.CreateSandboxRequestV1? Type736 { get; set; } + public global::Baseten.SandboxTTLIdleExpirationPolicyV1Type? Type736 { get; set; } /// /// /// - public global::Baseten.UpdateSandboxRequestV1? Type737 { get; set; } + public global::Baseten.SandboxTTLMaxAgeExpirationPolicyV1Action? Type737 { get; set; } /// /// /// - public global::Baseten.SandboxV1? Type738 { get; set; } + public global::Baseten.SandboxTTLMaxAgeExpirationPolicyV1Type? Type738 { get; set; } /// /// /// - public global::Baseten.SandboxV1Variant2? Type739 { get; set; } + public global::Baseten.SandboxDateExpirationPolicyV1Action? Type739 { get; set; } /// /// /// - public global::Baseten.SandboxStatusV1? Type740 { get; set; } + public global::Baseten.SandboxDateExpirationPolicyV1Type? Type740 { get; set; } /// /// /// - public global::Baseten.SandboxV1Variant2State? Type741 { get; set; } + public global::Baseten.SandboxNetworkV1? Type741 { get; set; } /// /// /// - public global::Baseten.SandboxApiPaginationV1? Type742 { get; set; } + public global::Baseten.SandboxProxyConfigV1? Type742 { get; set; } /// /// /// - public global::Baseten.ListSandboxesResponseV1? Type743 { get; set; } + public global::System.Collections.Generic.IList? Type743 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type744 { get; set; } + public global::Baseten.SandboxProxyTargetV1? Type744 { get; set; } /// /// /// - public global::Baseten.ListImagesResponseV1? Type745 { get; set; } + public global::Baseten.SandboxEnvV1? Type745 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type746 { get; set; } + public global::System.Collections.Generic.IList? Type746 { get; set; } /// /// /// - public global::Baseten.ImageV1? Type747 { get; set; } + public global::Baseten.SandboxPortV1? Type747 { get; set; } /// /// /// - public global::Baseten.ListImageTagsResponseV1? Type748 { get; set; } + public global::Baseten.SandboxPortV1Protocol? Type748 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type749 { get; set; } + public global::Baseten.SandboxConfigurationV1? Type749 { get; set; } /// /// /// - public global::Baseten.ImageTagV1? Type750 { get; set; } + public global::System.Collections.Generic.IList? Type750 { get; set; } /// /// /// - public global::Baseten.ImageStatusV1? Type751 { get; set; } + public global::Baseten.CreateSandboxRequestV1? Type751 { get; set; } /// /// /// - public global::Baseten.PushImageRequestV1? Type752 { get; set; } + public global::Baseten.UpdateSandboxRequestV1? Type752 { get; set; } /// /// /// - public global::Baseten.PushImageResponseV1? Type753 { get; set; } + public global::Baseten.SandboxV1? Type753 { get; set; } /// /// /// - public global::Baseten.CleanupImagesResponseV1? Type754 { get; set; } + public global::Baseten.SandboxV1Variant2? Type754 { get; set; } + /// + /// + /// + public global::Baseten.SandboxStatusV1? Type755 { get; set; } + /// + /// + /// + public global::Baseten.SandboxApiPaginationV1? Type756 { get; set; } + /// + /// + /// + public global::Baseten.ListSandboxesResponseV1? Type757 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type758 { get; set; } + /// + /// + /// + public global::Baseten.ListSandboxImagesResponseV1? Type759 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type760 { get; set; } + /// + /// + /// + public global::Baseten.SandboxImageSummaryV1? Type761 { get; set; } + /// + /// + /// + public global::Baseten.ListSandboxImageTagsResponseV1? Type762 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type763 { get; set; } + /// + /// + /// + public global::Baseten.SandboxImageTagV1? Type764 { get; set; } + /// + /// + /// + public global::Baseten.SandboxImageStatusV1? Type765 { get; set; } + /// + /// + /// + public global::Baseten.SandboxImageV1? Type766 { get; set; } + /// + /// + /// + public global::Baseten.SandboxImageV1Variant2? Type767 { get; set; } + /// + /// + /// + public global::Baseten.PushSandboxImageRequestV1? Type768 { get; set; } + /// + /// + /// + public global::Baseten.PushSandboxImageResponseV1? Type769 { get; set; } + /// + /// + /// + public global::Baseten.SandboxLibraryImageVolumeV1? Type770 { get; set; } + /// + /// + /// + public global::Baseten.SandboxLibraryImageCreationOptionsV1? Type771 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type772 { get; set; } + /// + /// + /// + public global::Baseten.SandboxLibraryImageV1? Type773 { get; set; } + /// + /// + /// + public global::Baseten.ListSandboxLibraryImagesResponseV1? Type774 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type775 { get; set; } + /// + /// + /// + public global::Baseten.CleanupSandboxImagesResponseV1? Type776 { get; set; } /// /// @@ -3470,30 +3558,54 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::System.Collections.Generic.List? ListType104 { get; set; } + public global::System.Collections.Generic.List? ListType104 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType105 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType106 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType107 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType108 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType109 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType110 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType105 { get; set; } + public global::System.Collections.Generic.List? ListType111 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType106 { get; set; } + public global::System.Collections.Generic.List? ListType112 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType107 { get; set; } + public global::System.Collections.Generic.List? ListType113 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType108 { get; set; } + public global::System.Collections.Generic.List? ListType114 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType109 { get; set; } + public global::System.Collections.Generic.List? ListType115 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType110 { get; set; } + public global::System.Collections.Generic.List? ListType116 { get; set; } } } \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.CleanupImagesResponseV1.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.CleanupSandboxImagesResponseV1.Json.g.cs similarity index 87% rename from src/libs/Baseten/Generated/Baseten.Models.CleanupImagesResponseV1.Json.g.cs rename to src/libs/Baseten/Generated/Baseten.Models.CleanupSandboxImagesResponseV1.Json.g.cs index eb2ffd70..007d23d9 100644 --- a/src/libs/Baseten/Generated/Baseten.Models.CleanupImagesResponseV1.Json.g.cs +++ b/src/libs/Baseten/Generated/Baseten.Models.CleanupSandboxImagesResponseV1.Json.g.cs @@ -2,7 +2,7 @@ namespace Baseten { - public sealed partial class CleanupImagesResponseV1 + public sealed partial class CleanupSandboxImagesResponseV1 { /// /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. @@ -47,20 +47,20 @@ public string ToJson( /// /// Deserializes a JSON string using the provided JsonSerializerContext. /// - public static global::Baseten.CleanupImagesResponseV1? FromJson( + public static global::Baseten.CleanupSandboxImagesResponseV1? FromJson( string json, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return global::System.Text.Json.JsonSerializer.Deserialize( json, - typeof(global::Baseten.CleanupImagesResponseV1), - jsonSerializerContext) as global::Baseten.CleanupImagesResponseV1; + typeof(global::Baseten.CleanupSandboxImagesResponseV1), + jsonSerializerContext) as global::Baseten.CleanupSandboxImagesResponseV1; } /// /// Deserializes a JSON string using the generated default JsonSerializerContext. /// - public static global::Baseten.CleanupImagesResponseV1? FromJson( + public static global::Baseten.CleanupSandboxImagesResponseV1? FromJson( string json) { return FromJson( @@ -75,7 +75,7 @@ public string ToJson( [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.CleanupImagesResponseV1? FromJson( + public static global::Baseten.CleanupSandboxImagesResponseV1? FromJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { @@ -86,7 +86,7 @@ public string ToJson( global::Baseten.SourceGenerationContext.Default); } - return global::System.Text.Json.JsonSerializer.Deserialize( + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); } @@ -94,20 +94,20 @@ public string ToJson( /// /// Deserializes a JSON stream using the provided JsonSerializerContext. /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + 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.CleanupImagesResponseV1), - jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.CleanupImagesResponseV1; + typeof(global::Baseten.CleanupSandboxImagesResponseV1), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.CleanupSandboxImagesResponseV1; } /// /// Deserializes a JSON stream using the generated default JsonSerializerContext. /// - public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream) { return FromJsonStreamAsync( @@ -122,7 +122,7 @@ public string ToJson( [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( + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { @@ -133,7 +133,7 @@ public string ToJson( global::Baseten.SourceGenerationContext.Default); } - return global::System.Text.Json.JsonSerializer.DeserializeAsync( + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); } diff --git a/src/libs/Baseten/Generated/Baseten.Models.CleanupImagesResponseV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.CleanupSandboxImagesResponseV1.g.cs similarity index 91% rename from src/libs/Baseten/Generated/Baseten.Models.CleanupImagesResponseV1.g.cs rename to src/libs/Baseten/Generated/Baseten.Models.CleanupSandboxImagesResponseV1.g.cs index c5260b67..a5bcb98a 100644 --- a/src/libs/Baseten/Generated/Baseten.Models.CleanupImagesResponseV1.g.cs +++ b/src/libs/Baseten/Generated/Baseten.Models.CleanupSandboxImagesResponseV1.g.cs @@ -7,7 +7,7 @@ namespace Baseten /// Result of cleaning up unused sandbox images.
/// Example: {"deleted":3,"message":"Removed 3 unused image versions. Image versions used by active sandboxes were retained."} ///
- public sealed partial class CleanupImagesResponseV1 + public sealed partial class CleanupSandboxImagesResponseV1 { /// /// Number of image versions removed.
@@ -34,7 +34,7 @@ public sealed partial class CleanupImagesResponseV1 public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// /// Number of image versions removed.
@@ -47,7 +47,7 @@ public sealed partial class CleanupImagesResponseV1 #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif - public CleanupImagesResponseV1( + public CleanupSandboxImagesResponseV1( int deleted, string message) { @@ -56,9 +56,9 @@ public CleanupImagesResponseV1( } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - public CleanupImagesResponseV1() + public CleanupSandboxImagesResponseV1() { } diff --git a/src/libs/Baseten/Generated/Baseten.Models.CreateLLMModelRequestV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.CreateLLMModelRequestV1.g.cs index 8b692967..e91696d5 100644 --- a/src/libs/Baseten/Generated/Baseten.Models.CreateLLMModelRequestV1.g.cs +++ b/src/libs/Baseten/Generated/Baseten.Models.CreateLLMModelRequestV1.g.cs @@ -76,6 +76,13 @@ public sealed partial class CreateLLMModelRequestV1 [global::System.Text.Json.Serialization.JsonPropertyName("weights")] public global::System.Collections.Generic.IList? Weights { get; set; } + /// + /// Restricts this deployment's egress to the specified FQDNs and IP addresses; an empty block allows none. Requires the organization to have egress restrictions enabled.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("egress_restrictions")] + public global::Baseten.EgressRestrictionsV1? EgressRestrictions { get; set; } + /// /// Name of the model /// @@ -132,6 +139,10 @@ public sealed partial class CreateLLMModelRequestV1 /// Weight configurations for BDN model weight distribution
/// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 /// + /// + /// Restricts this deployment's egress to the specified FQDNs and IP addresses; an empty block allows none. Requires the organization to have egress restrictions enabled.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif @@ -146,7 +157,8 @@ public CreateLLMModelRequestV1( global::Baseten.UpdateAutoscalingSettingsV1? autoscalingSettings, object? additionalAutoscalingConfig, object? metadata, - global::System.Collections.Generic.IList? weights) + global::System.Collections.Generic.IList? weights, + global::Baseten.EgressRestrictionsV1? egressRestrictions) { this.Resources = resources ?? throw new global::System.ArgumentNullException(nameof(resources)); this.Region = region; @@ -158,6 +170,7 @@ public CreateLLMModelRequestV1( this.AdditionalAutoscalingConfig = additionalAutoscalingConfig; this.Metadata = metadata; this.Weights = weights; + this.EgressRestrictions = egressRestrictions; this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); } diff --git a/src/libs/Baseten/Generated/Baseten.Models.CreateLLMModelVersionRequestV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.CreateLLMModelVersionRequestV1.g.cs index a6bb4b00..4de874b9 100644 --- a/src/libs/Baseten/Generated/Baseten.Models.CreateLLMModelVersionRequestV1.g.cs +++ b/src/libs/Baseten/Generated/Baseten.Models.CreateLLMModelVersionRequestV1.g.cs @@ -76,6 +76,13 @@ public sealed partial class CreateLLMModelVersionRequestV1 [global::System.Text.Json.Serialization.JsonPropertyName("weights")] public global::System.Collections.Generic.IList? Weights { get; set; } + /// + /// Restricts this deployment's egress to the specified FQDNs and IP addresses; an empty block allows none. Requires the organization to have egress restrictions enabled.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("egress_restrictions")] + public global::Baseten.EgressRestrictionsV1? EgressRestrictions { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -122,6 +129,10 @@ public sealed partial class CreateLLMModelVersionRequestV1 /// Weight configurations for BDN model weight distribution
/// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 /// + /// + /// Restricts this deployment's egress to the specified FQDNs and IP addresses; an empty block allows none. Requires the organization to have egress restrictions enabled.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif @@ -135,7 +146,8 @@ public CreateLLMModelVersionRequestV1( global::Baseten.UpdateAutoscalingSettingsV1? autoscalingSettings, object? additionalAutoscalingConfig, object? metadata, - global::System.Collections.Generic.IList? weights) + global::System.Collections.Generic.IList? weights, + global::Baseten.EgressRestrictionsV1? egressRestrictions) { this.Resources = resources ?? throw new global::System.ArgumentNullException(nameof(resources)); this.Region = region; @@ -147,6 +159,7 @@ public CreateLLMModelVersionRequestV1( this.AdditionalAutoscalingConfig = additionalAutoscalingConfig; this.Metadata = metadata; this.Weights = weights; + this.EgressRestrictions = egressRestrictions; } /// diff --git a/src/libs/Baseten/Generated/Baseten.Models.CreateLoopsRunRequestV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.CreateLoopsRunRequestV1.g.cs index 09bb1c39..3c6fae2b 100644 --- a/src/libs/Baseten/Generated/Baseten.Models.CreateLoopsRunRequestV1.g.cs +++ b/src/libs/Baseten/Generated/Baseten.Models.CreateLoopsRunRequestV1.g.cs @@ -4,7 +4,7 @@ namespace Baseten { /// - /// + /// Request to create a Loops run together with its paired sampler. /// public sealed partial class CreateLoopsRunRequestV1 { @@ -93,6 +93,13 @@ public sealed partial class CreateLoopsRunRequestV1 [global::System.Text.Json.Serialization.JsonPropertyName("reuse_from_session_id")] public string? ReuseFromSessionId { get; set; } + /// + /// Number of replicas the run's sampler runs, applied as both its minimum and maximum. Must be at least 1. If omitted, a new sampler uses the platform defaults and a sampler reused from an earlier run keeps its settings. A run that already has a sampler keeps it unchanged. When the run ends, its sampler is scaled down.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("sampler_num_replicas")] + public int? SamplerNumReplicas { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -148,6 +155,10 @@ public sealed partial class CreateLoopsRunRequestV1 /// Optional ID of a prior Loops session whose trainer and/or sampler should be reused for this run. Deprecated in favor of reuse_from_run_id.
/// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 /// + /// + /// Number of replicas the run's sampler runs, applied as both its minimum and maximum. Must be at least 1. If omitted, a new sampler uses the platform defaults and a sampler reused from an earlier run keeps its settings. A run that already has a sampler keeps it unchanged. When the run ends, its sampler is scaled down.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif @@ -163,7 +174,8 @@ public CreateLoopsRunRequestV1( int? replicas, string? path, string? reuseFromRunId, - string? reuseFromSessionId) + string? reuseFromSessionId, + int? samplerNumReplicas) { this.SessionId = sessionId ?? throw new global::System.ArgumentNullException(nameof(sessionId)); this.BaseModel = baseModel ?? throw new global::System.ArgumentNullException(nameof(baseModel)); @@ -177,6 +189,7 @@ public CreateLoopsRunRequestV1( this.Path = path; this.ReuseFromRunId = reuseFromRunId; this.ReuseFromSessionId = reuseFromSessionId; + this.SamplerNumReplicas = samplerNumReplicas; } /// diff --git a/src/libs/Baseten/Generated/Baseten.Models.CreateLoopsSamplerRequestV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.CreateLoopsSamplerRequestV1.g.cs index 09e76ece..1d74e7cc 100644 --- a/src/libs/Baseten/Generated/Baseten.Models.CreateLoopsSamplerRequestV1.g.cs +++ b/src/libs/Baseten/Generated/Baseten.Models.CreateLoopsSamplerRequestV1.g.cs @@ -57,6 +57,13 @@ public sealed partial class CreateLoopsSamplerRequestV1 [global::System.Text.Json.Serialization.JsonPropertyName("reuse_from_session_id")] public string? ReuseFromSessionId { get; set; } + /// + /// Number of replicas the sampler runs, applied as both its minimum and maximum. Must be at least 1. If omitted, a new sampler uses the platform defaults and a paired sampler reused from an earlier run keeps its settings. A run that already has a sampler keeps it unchanged, and when a run ends, its sampler is scaled down.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("num_replicas")] + public int? NumReplicas { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -93,6 +100,10 @@ public sealed partial class CreateLoopsSamplerRequestV1 /// Optional ID of a prior Loops session to reuse a trainer and/or sampler from. Deprecated.
/// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 /// + /// + /// Number of replicas the sampler runs, applied as both its minimum and maximum. Must be at least 1. If omitted, a new sampler uses the platform defaults and a paired sampler reused from an earlier run keeps its settings. A run that already has a sampler keeps it unchanged, and when a run ends, its sampler is scaled down.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif @@ -103,7 +114,8 @@ public CreateLoopsSamplerRequestV1( string? runId, int? maxSeqLength, string? modelPath, - string? reuseFromSessionId) + string? reuseFromSessionId, + int? numReplicas) { this.AvailabilityModel = availabilityModel; this.SessionId = sessionId ?? throw new global::System.ArgumentNullException(nameof(sessionId)); @@ -112,6 +124,7 @@ public CreateLoopsSamplerRequestV1( this.MaxSeqLength = maxSeqLength; this.ModelPath = modelPath; this.ReuseFromSessionId = reuseFromSessionId; + this.NumReplicas = numReplicas; } /// diff --git a/src/libs/Baseten/Generated/Baseten.Models.CreateLoopsTrainerRequestV1.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.CreateLoopsTrainerRequestV1.Json.g.cs new file mode 100644 index 00000000..40e03b97 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.CreateLoopsTrainerRequestV1.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class CreateLoopsTrainerRequestV1 + { + /// + /// 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 generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::Baseten.SourceGenerationContext.Default); + } + + /// + /// 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) + { + if (jsonSerializerOptions is null) + { + return ToJson(global::Baseten.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Baseten.CreateLoopsTrainerRequestV1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.CreateLoopsTrainerRequestV1), + jsonSerializerContext) as global::Baseten.CreateLoopsTrainerRequestV1; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Baseten.CreateLoopsTrainerRequestV1? FromJson( + string json) + { + return FromJson( + json, + global::Baseten.SourceGenerationContext.Default); + } + + /// + /// 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.CreateLoopsTrainerRequestV1? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Baseten.SourceGenerationContext.Default); + } + + 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.CreateLoopsTrainerRequestV1), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.CreateLoopsTrainerRequestV1; + } + + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::Baseten.SourceGenerationContext.Default); + } + + /// + /// 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) + { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::Baseten.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.Models.CreateLoopsTrainerRequestV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.CreateLoopsTrainerRequestV1.g.cs new file mode 100644 index 00000000..17c984c4 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.CreateLoopsTrainerRequestV1.g.cs @@ -0,0 +1,190 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// + /// + public sealed partial class CreateLoopsTrainerRequestV1 + { + /// + /// ID of the Loops session this run belongs to. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("session_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string SessionId { get; set; } + + /// + /// Base model ID (e.g. 'Qwen/Qwen3-8B'). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("base_model")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string BaseModel { get; set; } + + /// + /// Optional display name for the run. Defaults to the base model name when omitted.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("name")] + public string? Name { get; set; } + + /// + /// Maximum prompt length (in tokens) the run must handle. Set this to the longest training example you plan to send. Defaults to the maximum supported by the model configuration.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("max_seq_len")] + public int? MaxSeqLen { get; set; } + + /// + /// LoRA rank.
+ /// Default Value: 64 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("lora_rank")] + public int? LoraRank { get; set; } + + /// + /// Random seed for reproducibility.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("seed")] + public int? Seed { get; set; } + + /// + /// Seconds of inactivity before the run scales to zero. Must be between 1 and 3600 (1 hour). Defaults to 900 (15 minutes).
+ /// Default Value: 900 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("scale_down_delay_seconds")] + public int? ScaleDownDelaySeconds { get; set; } + + /// + /// Capacity the trainer runs on. 'dedicated' is not preempted. 'spot' runs below inference and reaches idle reserved capacity, but the run is stopped if its GPUs are reclaimed and cannot be resumed.
+ /// Default Value: dedicated + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("availability_model")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Baseten.JsonConverters.V1AvailabilityModelJsonConverter))] + public global::Baseten.V1AvailabilityModel? AvailabilityModel { get; set; } + + /// + /// Number of data-parallel trainer replicas. Each replica is one full copy of the model's preset node group, so the trainer deployment runs (preset node_count * replicas) nodes (e.g. replicas=4 on a 4-node preset → 16 nodes, 4 DP workers). Must be a positive integer. Defaults to 1.
+ /// Default Value: 1 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("replicas")] + public int? Replicas { get; set; } + + /// + /// Optional bt:// URI of an existing checkpoint to load weights from on startup. Form: bt://loops:<run_id>/weights/<checkpoint_name>.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("path")] + public string? Path { get; set; } + + /// + /// Optional ID of a prior Loops run whose trainer and/or sampler should be reused for this run instead of provisioning fresh. The prior run must use the same base model and belong to the same team.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("reuse_from_run_id")] + public string? ReuseFromRunId { get; set; } + + /// + /// Optional ID of a prior Loops session whose trainer and/or sampler should be reused for this run. Deprecated in favor of reuse_from_run_id.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("reuse_from_session_id")] + public string? ReuseFromSessionId { 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. + /// + /// + /// ID of the Loops session this run belongs to. + /// + /// + /// Base model ID (e.g. 'Qwen/Qwen3-8B'). + /// + /// + /// Optional display name for the run. Defaults to the base model name when omitted.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// + /// + /// Maximum prompt length (in tokens) the run must handle. Set this to the longest training example you plan to send. Defaults to the maximum supported by the model configuration.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// + /// + /// LoRA rank.
+ /// Default Value: 64 + /// + /// + /// Random seed for reproducibility.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// + /// + /// Seconds of inactivity before the run scales to zero. Must be between 1 and 3600 (1 hour). Defaults to 900 (15 minutes).
+ /// Default Value: 900 + /// + /// + /// Capacity the trainer runs on. 'dedicated' is not preempted. 'spot' runs below inference and reaches idle reserved capacity, but the run is stopped if its GPUs are reclaimed and cannot be resumed.
+ /// Default Value: dedicated + /// + /// + /// Number of data-parallel trainer replicas. Each replica is one full copy of the model's preset node group, so the trainer deployment runs (preset node_count * replicas) nodes (e.g. replicas=4 on a 4-node preset → 16 nodes, 4 DP workers). Must be a positive integer. Defaults to 1.
+ /// Default Value: 1 + /// + /// + /// Optional bt:// URI of an existing checkpoint to load weights from on startup. Form: bt://loops:<run_id>/weights/<checkpoint_name>.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// + /// + /// Optional ID of a prior Loops run whose trainer and/or sampler should be reused for this run instead of provisioning fresh. The prior run must use the same base model and belong to the same team.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// + /// + /// Optional ID of a prior Loops session whose trainer and/or sampler should be reused for this run. Deprecated in favor of reuse_from_run_id.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreateLoopsTrainerRequestV1( + string sessionId, + string baseModel, + string? name, + int? maxSeqLen, + int? loraRank, + int? seed, + int? scaleDownDelaySeconds, + global::Baseten.V1AvailabilityModel? availabilityModel, + int? replicas, + string? path, + string? reuseFromRunId, + string? reuseFromSessionId) + { + this.SessionId = sessionId ?? throw new global::System.ArgumentNullException(nameof(sessionId)); + this.BaseModel = baseModel ?? throw new global::System.ArgumentNullException(nameof(baseModel)); + this.Name = name; + this.MaxSeqLen = maxSeqLen; + this.LoraRank = loraRank; + this.Seed = seed; + this.ScaleDownDelaySeconds = scaleDownDelaySeconds; + this.AvailabilityModel = availabilityModel; + this.Replicas = replicas; + this.Path = path; + this.ReuseFromRunId = reuseFromRunId; + this.ReuseFromSessionId = reuseFromSessionId; + } + + /// + /// Initializes a new instance of the class. + /// + public CreateLoopsTrainerRequestV1() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.CreateSandboxRequestV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.CreateSandboxRequestV1.g.cs index d9b8646a..12d9cb73 100644 --- a/src/libs/Baseten/Generated/Baseten.Models.CreateSandboxRequestV1.g.cs +++ b/src/libs/Baseten/Generated/Baseten.Models.CreateSandboxRequestV1.g.cs @@ -5,10 +5,16 @@ namespace Baseten { /// /// Configuration for a new sandbox. The client may provide a name; otherwise the server generates one. The name is immutable after creation.
- /// Example: {"name":"baseten-api-review-0916","lifecycle":{"expiration_policies":[{"action":"DELETE","type":"TTL_IDLE","value":"24h"},{"action":"DELETE","type":"TTL_MAX_AGE","value":"7d"},{"action":"DELETE","type":"DATE","value":"2026-09-23T21:26:58Z"}],"terminated_retention":"24h"},"network":{"proxy":{"allowed_domains":["api.openai.com","pypi.org","files.pythonhosted.org","registry.npmjs.org"],"bypass":["registry.npmjs.org"],"forbidden_domains":["facebook.com","*.facebook.com"],"routing":[{"destinations":["api.openai.com"],"headers":{"Authorization":"Bearer {{SECRET:openai-key}}"},"body":{"user":"baseten-api-review-0916"},"secrets":{"openai-key":"sk-proj-demo-not-a-valid-api-key"}}]},"subnet":"default"},"region":"us-pdx-1","envs":[{"name":"NODE_ENV","secret":false,"value":"production"},{"name":"PORT","secret":false,"value":"3000"}],"image":"blaxel/base-image:latest","memory":4096,"ports":[{"name":"http","protocol":"HTTP","target":3000}],"display_name":"Baseten API review","external_id":"api-review-20260916-001","labels":{"env":"development","project":"api-review","team":"engineering"}} + /// Example: {"name":"baseten-api-review-0916","lifecycle":{"expiration_policies":[{"action":"DELETE","type":"TTL_IDLE","value":"24h"},{"action":"DELETE","type":"TTL_MAX_AGE","value":"7d"},{"action":"DELETE","type":"DATE","value":"2026-09-23T21:26:58Z"}],"terminated_retention":"24h"},"network":{"proxy":{"allowed_domains":["api.openai.com","pypi.org","files.pythonhosted.org","registry.npmjs.org"],"bypass":["registry.npmjs.org"],"forbidden_domains":["facebook.com","*.facebook.com"],"routing":[{"destinations":["api.openai.com"],"headers":{"Authorization":"Bearer {{SECRET:openai-key}}"},"body":{"user":"baseten-api-review-0916"},"secrets":{"openai-key":"sk-proj-demo-not-a-valid-api-key"}}]},"subnet":"default"},"region":"us-pdx-1","envs":[{"name":"NODE_ENV","secret":false,"value":"production"},{"name":"PORT","secret":false,"value":"3000"}],"image":"baseten/base-image:latest","memory":4096,"ports":[{"name":"http","protocol":"HTTP","target":3000}],"external_id":"api-review-20260916-001","labels":{"env":"development","project":"api-review","team":"engineering"}} ///
public sealed partial class CreateSandboxRequestV1 { + /// + /// When true, return the existing live sandbox with this name or recreate it if it is failed, terminated, or being deleted. The server handles concurrent creation and deletion races with a bounded wait; persistent contention returns a conflict. Requires name. Existing configuration is preserved. Defaults to false when omitted. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("create_if_not_exists")] + public bool? CreateIfNotExists { get; set; } + /// /// Optional unique sandbox name. Generated by the server when omitted; immutable after creation.
/// Example: baseten-api-review-0916 @@ -50,15 +56,17 @@ public sealed partial class CreateSandboxRequestV1 public global::System.Collections.Generic.IList? Envs { get; set; } /// - /// Image reference including its tag. Use blaxel/base-image:latest to get started with the built-in sandbox execution API. This image is available directly without building, pushing, or listing images through GET /v1/sandboxes/images.
- /// Example: blaxel/base-image:latest + /// Image reference including its tag. Defaults to baseten/base-image:latest, the built-in sandbox execution API. This image is available directly without building, pushing, or listing images through GET /v1/sandboxes/images.
+ /// Default Value: baseten/base-image:latest
+ /// Example: baseten/base-image:latest ///
- /// blaxel/base-image:latest + /// baseten/base-image:latest [global::System.Text.Json.Serialization.JsonPropertyName("image")] public string? Image { get; set; } /// - /// Memory allocation in megabytes. Also determines CPU allocation (CPU cores = memory in MB / 2048, e.g., 4096MB = 2 CPUs).
+ /// Memory allocation in megabytes. Also determines CPU allocation (CPU cores = memory in MB / 2048, e.g., 4096MB = 2 CPUs). Defaults to 4096.
+ /// Default Value: 4096
/// Example: 4096 ///
/// 4096 @@ -73,14 +81,6 @@ public sealed partial class CreateSandboxRequestV1 [global::System.Text.Json.Serialization.JsonPropertyName("ports")] public global::System.Collections.Generic.IList? Ports { get; set; } - /// - /// Human-readable name for display in the UI. Can contain spaces and special characters, max 63 characters.
- /// Example: Baseten API review - ///
- /// Baseten API review - [global::System.Text.Json.Serialization.JsonPropertyName("display_name")] - public string? DisplayName { get; set; } - /// /// Caller-owned identifier for external lookups. Max 64 chars, alphanumeric + dash.
/// Example: api-review-20260916-001 @@ -106,6 +106,9 @@ public sealed partial class CreateSandboxRequestV1 /// /// Initializes a new instance of the class. /// + /// + /// When true, return the existing live sandbox with this name or recreate it if it is failed, terminated, or being deleted. The server handles concurrent creation and deletion races with a bounded wait; persistent contention returns a conflict. Requires name. Existing configuration is preserved. Defaults to false when omitted. + /// /// /// Optional unique sandbox name. Generated by the server when omitted; immutable after creation.
/// Example: baseten-api-review-0916 @@ -127,21 +130,19 @@ public sealed partial class CreateSandboxRequestV1 /// Example: [{"name":"NODE_ENV","secret":false,"value":"production"}, {"name":"PORT","secret":false,"value":"3000"}] /// /// - /// Image reference including its tag. Use blaxel/base-image:latest to get started with the built-in sandbox execution API. This image is available directly without building, pushing, or listing images through GET /v1/sandboxes/images.
- /// Example: blaxel/base-image:latest + /// Image reference including its tag. Defaults to baseten/base-image:latest, the built-in sandbox execution API. This image is available directly without building, pushing, or listing images through GET /v1/sandboxes/images.
+ /// Default Value: baseten/base-image:latest
+ /// Example: baseten/base-image:latest /// /// - /// Memory allocation in megabytes. Also determines CPU allocation (CPU cores = memory in MB / 2048, e.g., 4096MB = 2 CPUs).
+ /// Memory allocation in megabytes. Also determines CPU allocation (CPU cores = memory in MB / 2048, e.g., 4096MB = 2 CPUs). Defaults to 4096.
+ /// Default Value: 4096
/// Example: 4096 /// /// /// Set of ports for a resource
/// Example: [{"name":"http","protocol":"HTTP","target":3000}] /// - /// - /// Human-readable name for display in the UI. Can contain spaces and special characters, max 63 characters.
- /// Example: Baseten API review - /// /// /// Caller-owned identifier for external lookups. Max 64 chars, alphanumeric + dash.
/// Example: api-review-20260916-001 @@ -154,6 +155,7 @@ public sealed partial class CreateSandboxRequestV1 [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public CreateSandboxRequestV1( + bool? createIfNotExists, string? name, global::Baseten.SandboxLifecycleV1? lifecycle, global::Baseten.SandboxNetworkV1? network, @@ -162,10 +164,10 @@ public CreateSandboxRequestV1( string? image, long? memory, global::System.Collections.Generic.IList? ports, - string? displayName, string? externalId, global::System.Collections.Generic.Dictionary? labels) { + this.CreateIfNotExists = createIfNotExists; this.Name = name; this.Lifecycle = lifecycle; this.Network = network; @@ -174,7 +176,6 @@ public CreateSandboxRequestV1( this.Image = image; this.Memory = memory; this.Ports = ports; - this.DisplayName = displayName; this.ExternalId = externalId; this.Labels = labels; } diff --git a/src/libs/Baseten/Generated/Baseten.Models.ListImagesResponseV1.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.EgressRestrictionsV1.Json.g.cs similarity index 88% rename from src/libs/Baseten/Generated/Baseten.Models.ListImagesResponseV1.Json.g.cs rename to src/libs/Baseten/Generated/Baseten.Models.EgressRestrictionsV1.Json.g.cs index 1025d678..36bb4ff8 100644 --- a/src/libs/Baseten/Generated/Baseten.Models.ListImagesResponseV1.Json.g.cs +++ b/src/libs/Baseten/Generated/Baseten.Models.EgressRestrictionsV1.Json.g.cs @@ -2,7 +2,7 @@ namespace Baseten { - public sealed partial class ListImagesResponseV1 + public sealed partial class EgressRestrictionsV1 { /// /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. @@ -47,20 +47,20 @@ public string ToJson( /// /// Deserializes a JSON string using the provided JsonSerializerContext. /// - public static global::Baseten.ListImagesResponseV1? FromJson( + public static global::Baseten.EgressRestrictionsV1? FromJson( string json, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return global::System.Text.Json.JsonSerializer.Deserialize( json, - typeof(global::Baseten.ListImagesResponseV1), - jsonSerializerContext) as global::Baseten.ListImagesResponseV1; + typeof(global::Baseten.EgressRestrictionsV1), + jsonSerializerContext) as global::Baseten.EgressRestrictionsV1; } /// /// Deserializes a JSON string using the generated default JsonSerializerContext. /// - public static global::Baseten.ListImagesResponseV1? FromJson( + public static global::Baseten.EgressRestrictionsV1? FromJson( string json) { return FromJson( @@ -75,7 +75,7 @@ public string ToJson( [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.ListImagesResponseV1? FromJson( + public static global::Baseten.EgressRestrictionsV1? FromJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { @@ -86,7 +86,7 @@ public string ToJson( global::Baseten.SourceGenerationContext.Default); } - return global::System.Text.Json.JsonSerializer.Deserialize( + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); } @@ -94,20 +94,20 @@ public string ToJson( /// /// Deserializes a JSON stream using the provided JsonSerializerContext. /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + 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.ListImagesResponseV1), - jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.ListImagesResponseV1; + typeof(global::Baseten.EgressRestrictionsV1), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.EgressRestrictionsV1; } /// /// Deserializes a JSON stream using the generated default JsonSerializerContext. /// - public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream) { return FromJsonStreamAsync( @@ -122,7 +122,7 @@ public string ToJson( [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( + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { @@ -133,7 +133,7 @@ public string ToJson( global::Baseten.SourceGenerationContext.Default); } - return global::System.Text.Json.JsonSerializer.DeserializeAsync( + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); } diff --git a/src/libs/Baseten/Generated/Baseten.Models.EgressRestrictionsV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.EgressRestrictionsV1.g.cs new file mode 100644 index 00000000..fdd29304 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.EgressRestrictionsV1.g.cs @@ -0,0 +1,61 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// + /// + public sealed partial class EgressRestrictionsV1 + { + /// + /// Allowed outbound FQDNs; '*' wildcards are supported.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("fqdn_allow_list")] + public global::System.Collections.Generic.IList? FqdnAllowList { get; set; } + + /// + /// Allowed outbound IPv4 addresses or CIDR ranges.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("ip_allow_list")] + public global::System.Collections.Generic.IList? IpAllowList { 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. + /// + /// + /// Allowed outbound FQDNs; '*' wildcards are supported.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// + /// + /// Allowed outbound IPv4 addresses or CIDR ranges.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public EgressRestrictionsV1( + global::System.Collections.Generic.IList? fqdnAllowList, + global::System.Collections.Generic.IList? ipAllowList) + { + this.FqdnAllowList = fqdnAllowList; + this.IpAllowList = ipAllowList; + } + + /// + /// Initializes a new instance of the class. + /// + public EgressRestrictionsV1() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.GetSandboxConfigurationResponseV1.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.GetSandboxConfigurationResponseV1.Json.g.cs new file mode 100644 index 00000000..276eb999 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.GetSandboxConfigurationResponseV1.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class GetSandboxConfigurationResponseV1 + { + /// + /// 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 generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::Baseten.SourceGenerationContext.Default); + } + + /// + /// 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) + { + if (jsonSerializerOptions is null) + { + return ToJson(global::Baseten.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Baseten.GetSandboxConfigurationResponseV1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.GetSandboxConfigurationResponseV1), + jsonSerializerContext) as global::Baseten.GetSandboxConfigurationResponseV1; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Baseten.GetSandboxConfigurationResponseV1? FromJson( + string json) + { + return FromJson( + json, + global::Baseten.SourceGenerationContext.Default); + } + + /// + /// 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.GetSandboxConfigurationResponseV1? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Baseten.SourceGenerationContext.Default); + } + + 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.GetSandboxConfigurationResponseV1), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.GetSandboxConfigurationResponseV1; + } + + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::Baseten.SourceGenerationContext.Default); + } + + /// + /// 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) + { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::Baseten.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.Models.GetSandboxConfigurationResponseV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.GetSandboxConfigurationResponseV1.g.cs new file mode 100644 index 00000000..fd763afe --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.GetSandboxConfigurationResponseV1.g.cs @@ -0,0 +1,47 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// + /// + public sealed partial class GetSandboxConfigurationResponseV1 + { + /// + /// Available Carbon-compatible regions, sorted by name. Empty when none are available. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("regions")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Regions { 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. + /// + /// + /// Available Carbon-compatible regions, sorted by name. Empty when none are available. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public GetSandboxConfigurationResponseV1( + global::System.Collections.Generic.IList regions) + { + this.Regions = regions ?? throw new global::System.ArgumentNullException(nameof(regions)); + } + + /// + /// Initializes a new instance of the class. + /// + public GetSandboxConfigurationResponseV1() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.ListSandboxImageTagsResponseV1.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.ListSandboxImageTagsResponseV1.Json.g.cs new file mode 100644 index 00000000..15bfdb37 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.ListSandboxImageTagsResponseV1.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class ListSandboxImageTagsResponseV1 + { + /// + /// 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 generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::Baseten.SourceGenerationContext.Default); + } + + /// + /// 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) + { + if (jsonSerializerOptions is null) + { + return ToJson(global::Baseten.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Baseten.ListSandboxImageTagsResponseV1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.ListSandboxImageTagsResponseV1), + jsonSerializerContext) as global::Baseten.ListSandboxImageTagsResponseV1; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Baseten.ListSandboxImageTagsResponseV1? FromJson( + string json) + { + return FromJson( + json, + global::Baseten.SourceGenerationContext.Default); + } + + /// + /// 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.ListSandboxImageTagsResponseV1? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Baseten.SourceGenerationContext.Default); + } + + 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.ListSandboxImageTagsResponseV1), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.ListSandboxImageTagsResponseV1; + } + + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::Baseten.SourceGenerationContext.Default); + } + + /// + /// 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) + { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::Baseten.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.Models.ListImageTagsResponseV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.ListSandboxImageTagsResponseV1.g.cs similarity index 83% rename from src/libs/Baseten/Generated/Baseten.Models.ListImageTagsResponseV1.g.cs rename to src/libs/Baseten/Generated/Baseten.Models.ListSandboxImageTagsResponseV1.g.cs index e12ad919..b00518ca 100644 --- a/src/libs/Baseten/Generated/Baseten.Models.ListImageTagsResponseV1.g.cs +++ b/src/libs/Baseten/Generated/Baseten.Models.ListSandboxImageTagsResponseV1.g.cs @@ -6,14 +6,14 @@ namespace Baseten /// /// One page of image tags. /// - public sealed partial class ListImageTagsResponseV1 + public sealed partial class ListSandboxImageTagsResponseV1 { /// /// /// [global::System.Text.Json.Serialization.JsonPropertyName("items")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Items { get; set; } + public required global::System.Collections.Generic.IList Items { get; set; } /// /// Cursor pagination information. The cursor is present only when another page is available.
@@ -31,7 +31,7 @@ public sealed partial class ListImageTagsResponseV1 public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// /// @@ -41,8 +41,8 @@ public sealed partial class ListImageTagsResponseV1 #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif - public ListImageTagsResponseV1( - global::System.Collections.Generic.IList items, + public ListSandboxImageTagsResponseV1( + global::System.Collections.Generic.IList items, global::Baseten.SandboxApiPaginationV1 pagination) { this.Items = items ?? throw new global::System.ArgumentNullException(nameof(items)); @@ -50,9 +50,9 @@ public ListImageTagsResponseV1( } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - public ListImageTagsResponseV1() + public ListSandboxImageTagsResponseV1() { } diff --git a/src/libs/Baseten/Generated/Baseten.Models.ListSandboxImagesResponseV1.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.ListSandboxImagesResponseV1.Json.g.cs new file mode 100644 index 00000000..e9de19c1 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.ListSandboxImagesResponseV1.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class ListSandboxImagesResponseV1 + { + /// + /// 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 generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::Baseten.SourceGenerationContext.Default); + } + + /// + /// 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) + { + if (jsonSerializerOptions is null) + { + return ToJson(global::Baseten.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Baseten.ListSandboxImagesResponseV1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.ListSandboxImagesResponseV1), + jsonSerializerContext) as global::Baseten.ListSandboxImagesResponseV1; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Baseten.ListSandboxImagesResponseV1? FromJson( + string json) + { + return FromJson( + json, + global::Baseten.SourceGenerationContext.Default); + } + + /// + /// 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.ListSandboxImagesResponseV1? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Baseten.SourceGenerationContext.Default); + } + + 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.ListSandboxImagesResponseV1), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.ListSandboxImagesResponseV1; + } + + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::Baseten.SourceGenerationContext.Default); + } + + /// + /// 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) + { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::Baseten.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.Models.ListImagesResponseV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.ListSandboxImagesResponseV1.g.cs similarity index 85% rename from src/libs/Baseten/Generated/Baseten.Models.ListImagesResponseV1.g.cs rename to src/libs/Baseten/Generated/Baseten.Models.ListSandboxImagesResponseV1.g.cs index d75c4302..30831ba7 100644 --- a/src/libs/Baseten/Generated/Baseten.Models.ListImagesResponseV1.g.cs +++ b/src/libs/Baseten/Generated/Baseten.Models.ListSandboxImagesResponseV1.g.cs @@ -6,14 +6,14 @@ namespace Baseten /// /// One page of image repository summaries. Fetch tags through the separate tag listing endpoint. /// - public sealed partial class ListImagesResponseV1 + public sealed partial class ListSandboxImagesResponseV1 { /// /// Image repositories on this page. /// [global::System.Text.Json.Serialization.JsonPropertyName("items")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Items { get; set; } + public required global::System.Collections.Generic.IList Items { get; set; } /// /// Cursor pagination information. The cursor is present only when another page is available.
@@ -31,7 +31,7 @@ public sealed partial class ListImagesResponseV1 public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// /// Image repositories on this page. @@ -43,8 +43,8 @@ public sealed partial class ListImagesResponseV1 #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif - public ListImagesResponseV1( - global::System.Collections.Generic.IList items, + public ListSandboxImagesResponseV1( + global::System.Collections.Generic.IList items, global::Baseten.SandboxApiPaginationV1 pagination) { this.Items = items ?? throw new global::System.ArgumentNullException(nameof(items)); @@ -52,9 +52,9 @@ public ListImagesResponseV1( } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - public ListImagesResponseV1() + public ListSandboxImagesResponseV1() { } diff --git a/src/libs/Baseten/Generated/Baseten.Models.ListSandboxLibraryImagesResponseV1.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.ListSandboxLibraryImagesResponseV1.Json.g.cs new file mode 100644 index 00000000..8d7869ea --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.ListSandboxLibraryImagesResponseV1.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class ListSandboxLibraryImagesResponseV1 + { + /// + /// 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 generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::Baseten.SourceGenerationContext.Default); + } + + /// + /// 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) + { + if (jsonSerializerOptions is null) + { + return ToJson(global::Baseten.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Baseten.ListSandboxLibraryImagesResponseV1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.ListSandboxLibraryImagesResponseV1), + jsonSerializerContext) as global::Baseten.ListSandboxLibraryImagesResponseV1; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Baseten.ListSandboxLibraryImagesResponseV1? FromJson( + string json) + { + return FromJson( + json, + global::Baseten.SourceGenerationContext.Default); + } + + /// + /// 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.ListSandboxLibraryImagesResponseV1? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Baseten.SourceGenerationContext.Default); + } + + 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.ListSandboxLibraryImagesResponseV1), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.ListSandboxLibraryImagesResponseV1; + } + + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::Baseten.SourceGenerationContext.Default); + } + + /// + /// 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) + { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::Baseten.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.Models.ListSandboxLibraryImagesResponseV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.ListSandboxLibraryImagesResponseV1.g.cs new file mode 100644 index 00000000..231c1769 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.ListSandboxLibraryImagesResponseV1.g.cs @@ -0,0 +1,47 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// Built-in sandbox images. + /// + public sealed partial class ListSandboxLibraryImagesResponseV1 + { + /// + /// Built-in images. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("items")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Items { 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. + /// + /// + /// Built-in images. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ListSandboxLibraryImagesResponseV1( + global::System.Collections.Generic.IList items) + { + this.Items = items ?? throw new global::System.ArgumentNullException(nameof(items)); + } + + /// + /// Initializes a new instance of the class. + /// + public ListSandboxLibraryImagesResponseV1() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.ListSandboxesResponseV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.ListSandboxesResponseV1.g.cs index 0cfc114b..fbf36db6 100644 --- a/src/libs/Baseten/Generated/Baseten.Models.ListSandboxesResponseV1.g.cs +++ b/src/libs/Baseten/Generated/Baseten.Models.ListSandboxesResponseV1.g.cs @@ -5,15 +5,15 @@ namespace Baseten { /// /// One page of sandboxes.
- /// Example: {"items":[{"enabled":true,"lifecycle":{"expiration_policies":[{"action":"DELETE","type":"TTL_IDLE","value":"24h"},{"action":"DELETE","type":"TTL_MAX_AGE","value":"7d"},{"action":"DELETE","type":"DATE","value":"2026-09-23T21:26:58Z"}],"terminated_retention":"24h"},"network":{"proxy":{"allowed_domains":["api.openai.com","pypi.org","files.pythonhosted.org","registry.npmjs.org"],"bypass":["registry.npmjs.org"],"forbidden_domains":["facebook.com","*.facebook.com"],"routing":[{"destinations":["api.openai.com"],"headers":{"Authorization":"Bearer {{SECRET:openai-key}}"},"body":{"user":"baseten-api-review-0916"}}]},"subnet":"default"},"region":"us-pdx-1","envs":[{"name":"NODE_ENV","secret":false,"value":"production"},{"name":"PORT","secret":false,"value":"3000"}],"image":"blaxel/base-image:latest","memory":4096,"ports":[{"name":"http","protocol":"HTTP","target":3000}],"display_name":"Baseten API review","external_id":"api-review-20260916-001","labels":{"env":"development","project":"api-review","team":"engineering"},"name":"baseten-api-review-0916","url":"https://sbx-baseten-api-review-0916-esb1qo.us-pdx-1.b10.run","status":"DEPLOYED","state":"RUNNING","created_at":"2026-09-16T21:26:58.545765901Z","updated_at":"2026-09-16T21:31:13Z","created_by":"sandbox-automation","updated_by":"sandbox-automation","last_used_at":"2026-09-16T21:31:13Z","expires_in":86400}],"pagination":{"has_more":true,"cursor":"eyJ2IjoxLCJsYXN0X2tleSI6ImJhc2V0ZW4tYXBpLXJldmlldy0wOTE2Iiwic29ydCI6ImRlc2MifQ"}} + /// Example: {"items":[{"lifecycle":{"expiration_policies":[{"action":"DELETE","type":"TTL_IDLE","value":"24h"},{"action":"DELETE","type":"TTL_MAX_AGE","value":"7d"},{"action":"DELETE","type":"DATE","value":"2026-09-23T21:26:58Z"}],"terminated_retention":"24h"},"network":{"proxy":{"allowed_domains":["api.openai.com","pypi.org","files.pythonhosted.org","registry.npmjs.org"],"bypass":["registry.npmjs.org"],"forbidden_domains":["facebook.com","*.facebook.com"],"routing":[{"destinations":["api.openai.com"],"headers":{"Authorization":"Bearer {{SECRET:openai-key}}"},"body":{"user":"baseten-api-review-0916"}}]},"subnet":"default"},"region":"us-pdx-1","envs":[{"name":"NODE_ENV","secret":false,"value":"production"},{"name":"PORT","secret":false,"value":"3000"}],"image":"baseten/base-image:latest","memory":4096,"ports":[{"name":"http","protocol":"HTTP","target":3000}],"external_id":"api-review-20260916-001","labels":{"env":"development","project":"api-review","team":"engineering"},"name":"baseten-api-review-0916","url":"https://sbx-baseten-api-review-0916-esb1qo.us-pdx-1.b10.run","status":"DEPLOYED","created_at":"2026-09-16T21:26:58.545765901Z","updated_at":"2026-09-16T21:31:13Z","created_by":"sandbox-automation","updated_by":"sandbox-automation","last_used_at":"2026-09-16T21:31:13Z","expires_in":86400}],"pagination":{"has_more":true,"cursor":"eyJ2IjoxLCJsYXN0X2tleSI6ImJhc2V0ZW4tYXBpLXJldmlldy0wOTE2Iiwic29ydCI6ImRlc2MifQ"}} ///
public sealed partial class ListSandboxesResponseV1 { /// /// Resources on this page.
- /// Example: [{"enabled":true,"lifecycle":{"expiration_policies":[{"action":"DELETE","type":"TTL_IDLE","value":"24h"},{"action":"DELETE","type":"TTL_MAX_AGE","value":"7d"},{"action":"DELETE","type":"DATE","value":"2026-09-23T21:26:58Z"}],"terminated_retention":"24h"},"network":{"proxy":{"allowed_domains":["api.openai.com","pypi.org","files.pythonhosted.org","registry.npmjs.org"],"bypass":["registry.npmjs.org"],"forbidden_domains":["facebook.com","*.facebook.com"],"routing":[{"destinations":["api.openai.com"],"headers":{"Authorization":"Bearer {{SECRET:openai-key}}"},"body":{"user":"baseten-api-review-0916"}}]},"subnet":"default"},"region":"us-pdx-1","envs":[{"name":"NODE_ENV","secret":false,"value":"production"},{"name":"PORT","secret":false,"value":"3000"}],"image":"blaxel/base-image:latest","memory":4096,"ports":[{"name":"http","protocol":"HTTP","target":3000}],"display_name":"Baseten API review","external_id":"api-review-20260916-001","labels":{"env":"development","project":"api-review","team":"engineering"},"name":"baseten-api-review-0916","url":"https://sbx-baseten-api-review-0916-esb1qo.us-pdx-1.b10.run","status":"DEPLOYED","state":"RUNNING","created_at":"2026-09-16T21:26:58.545765901Z","updated_at":"2026-09-16T21:31:13Z","created_by":"sandbox-automation","updated_by":"sandbox-automation","last_used_at":"2026-09-16T21:31:13Z","expires_in":86400}] + /// Example: [{"lifecycle":{"expiration_policies":[{"action":"DELETE","type":"TTL_IDLE","value":"24h"},{"action":"DELETE","type":"TTL_MAX_AGE","value":"7d"},{"action":"DELETE","type":"DATE","value":"2026-09-23T21:26:58Z"}],"terminated_retention":"24h"},"network":{"proxy":{"allowed_domains":["api.openai.com","pypi.org","files.pythonhosted.org","registry.npmjs.org"],"bypass":["registry.npmjs.org"],"forbidden_domains":["facebook.com","*.facebook.com"],"routing":[{"destinations":["api.openai.com"],"headers":{"Authorization":"Bearer {{SECRET:openai-key}}"},"body":{"user":"baseten-api-review-0916"}}]},"subnet":"default"},"region":"us-pdx-1","envs":[{"name":"NODE_ENV","secret":false,"value":"production"},{"name":"PORT","secret":false,"value":"3000"}],"image":"baseten/base-image:latest","memory":4096,"ports":[{"name":"http","protocol":"HTTP","target":3000}],"external_id":"api-review-20260916-001","labels":{"env":"development","project":"api-review","team":"engineering"},"name":"baseten-api-review-0916","url":"https://sbx-baseten-api-review-0916-esb1qo.us-pdx-1.b10.run","status":"DEPLOYED","created_at":"2026-09-16T21:26:58.545765901Z","updated_at":"2026-09-16T21:31:13Z","created_by":"sandbox-automation","updated_by":"sandbox-automation","last_used_at":"2026-09-16T21:31:13Z","expires_in":86400}] ///
- /// [{"enabled":true,"lifecycle":{"expiration_policies":[{"action":"DELETE","type":"TTL_IDLE","value":"24h"},{"action":"DELETE","type":"TTL_MAX_AGE","value":"7d"},{"action":"DELETE","type":"DATE","value":"2026-09-23T21:26:58Z"}],"terminated_retention":"24h"},"network":{"proxy":{"allowed_domains":["api.openai.com","pypi.org","files.pythonhosted.org","registry.npmjs.org"],"bypass":["registry.npmjs.org"],"forbidden_domains":["facebook.com","*.facebook.com"],"routing":[{"destinations":["api.openai.com"],"headers":{"Authorization":"Bearer {{SECRET:openai-key}}"},"body":{"user":"baseten-api-review-0916"}}]},"subnet":"default"},"region":"us-pdx-1","envs":[{"name":"NODE_ENV","secret":false,"value":"production"},{"name":"PORT","secret":false,"value":"3000"}],"image":"blaxel/base-image:latest","memory":4096,"ports":[{"name":"http","protocol":"HTTP","target":3000}],"display_name":"Baseten API review","external_id":"api-review-20260916-001","labels":{"env":"development","project":"api-review","team":"engineering"},"name":"baseten-api-review-0916","url":"https://sbx-baseten-api-review-0916-esb1qo.us-pdx-1.b10.run","status":"DEPLOYED","state":"RUNNING","created_at":"2026-09-16T21:26:58.545765901Z","updated_at":"2026-09-16T21:31:13Z","created_by":"sandbox-automation","updated_by":"sandbox-automation","last_used_at":"2026-09-16T21:31:13Z","expires_in":86400}] + /// [{"lifecycle":{"expiration_policies":[{"action":"DELETE","type":"TTL_IDLE","value":"24h"},{"action":"DELETE","type":"TTL_MAX_AGE","value":"7d"},{"action":"DELETE","type":"DATE","value":"2026-09-23T21:26:58Z"}],"terminated_retention":"24h"},"network":{"proxy":{"allowed_domains":["api.openai.com","pypi.org","files.pythonhosted.org","registry.npmjs.org"],"bypass":["registry.npmjs.org"],"forbidden_domains":["facebook.com","*.facebook.com"],"routing":[{"destinations":["api.openai.com"],"headers":{"Authorization":"Bearer {{SECRET:openai-key}}"},"body":{"user":"baseten-api-review-0916"}}]},"subnet":"default"},"region":"us-pdx-1","envs":[{"name":"NODE_ENV","secret":false,"value":"production"},{"name":"PORT","secret":false,"value":"3000"}],"image":"baseten/base-image:latest","memory":4096,"ports":[{"name":"http","protocol":"HTTP","target":3000}],"external_id":"api-review-20260916-001","labels":{"env":"development","project":"api-review","team":"engineering"},"name":"baseten-api-review-0916","url":"https://sbx-baseten-api-review-0916-esb1qo.us-pdx-1.b10.run","status":"DEPLOYED","created_at":"2026-09-16T21:26:58.545765901Z","updated_at":"2026-09-16T21:31:13Z","created_by":"sandbox-automation","updated_by":"sandbox-automation","last_used_at":"2026-09-16T21:31:13Z","expires_in":86400}] [global::System.Text.Json.Serialization.JsonPropertyName("items")] [global::System.Text.Json.Serialization.JsonRequired] public required global::System.Collections.Generic.IList Items { get; set; } @@ -38,7 +38,7 @@ public sealed partial class ListSandboxesResponseV1 ///
/// /// Resources on this page.
- /// Example: [{"enabled":true,"lifecycle":{"expiration_policies":[{"action":"DELETE","type":"TTL_IDLE","value":"24h"},{"action":"DELETE","type":"TTL_MAX_AGE","value":"7d"},{"action":"DELETE","type":"DATE","value":"2026-09-23T21:26:58Z"}],"terminated_retention":"24h"},"network":{"proxy":{"allowed_domains":["api.openai.com","pypi.org","files.pythonhosted.org","registry.npmjs.org"],"bypass":["registry.npmjs.org"],"forbidden_domains":["facebook.com","*.facebook.com"],"routing":[{"destinations":["api.openai.com"],"headers":{"Authorization":"Bearer {{SECRET:openai-key}}"},"body":{"user":"baseten-api-review-0916"}}]},"subnet":"default"},"region":"us-pdx-1","envs":[{"name":"NODE_ENV","secret":false,"value":"production"},{"name":"PORT","secret":false,"value":"3000"}],"image":"blaxel/base-image:latest","memory":4096,"ports":[{"name":"http","protocol":"HTTP","target":3000}],"display_name":"Baseten API review","external_id":"api-review-20260916-001","labels":{"env":"development","project":"api-review","team":"engineering"},"name":"baseten-api-review-0916","url":"https://sbx-baseten-api-review-0916-esb1qo.us-pdx-1.b10.run","status":"DEPLOYED","state":"RUNNING","created_at":"2026-09-16T21:26:58.545765901Z","updated_at":"2026-09-16T21:31:13Z","created_by":"sandbox-automation","updated_by":"sandbox-automation","last_used_at":"2026-09-16T21:31:13Z","expires_in":86400}] + /// Example: [{"lifecycle":{"expiration_policies":[{"action":"DELETE","type":"TTL_IDLE","value":"24h"},{"action":"DELETE","type":"TTL_MAX_AGE","value":"7d"},{"action":"DELETE","type":"DATE","value":"2026-09-23T21:26:58Z"}],"terminated_retention":"24h"},"network":{"proxy":{"allowed_domains":["api.openai.com","pypi.org","files.pythonhosted.org","registry.npmjs.org"],"bypass":["registry.npmjs.org"],"forbidden_domains":["facebook.com","*.facebook.com"],"routing":[{"destinations":["api.openai.com"],"headers":{"Authorization":"Bearer {{SECRET:openai-key}}"},"body":{"user":"baseten-api-review-0916"}}]},"subnet":"default"},"region":"us-pdx-1","envs":[{"name":"NODE_ENV","secret":false,"value":"production"},{"name":"PORT","secret":false,"value":"3000"}],"image":"baseten/base-image:latest","memory":4096,"ports":[{"name":"http","protocol":"HTTP","target":3000}],"external_id":"api-review-20260916-001","labels":{"env":"development","project":"api-review","team":"engineering"},"name":"baseten-api-review-0916","url":"https://sbx-baseten-api-review-0916-esb1qo.us-pdx-1.b10.run","status":"DEPLOYED","created_at":"2026-09-16T21:26:58.545765901Z","updated_at":"2026-09-16T21:31:13Z","created_by":"sandbox-automation","updated_by":"sandbox-automation","last_used_at":"2026-09-16T21:31:13Z","expires_in":86400}] /// /// /// Cursor pagination information. The cursor is present only when another page is available.
diff --git a/src/libs/Baseten/Generated/Baseten.Models.ListImageTagsResponseV1.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.PushSandboxImageRequestV1.Json.g.cs similarity index 87% rename from src/libs/Baseten/Generated/Baseten.Models.ListImageTagsResponseV1.Json.g.cs rename to src/libs/Baseten/Generated/Baseten.Models.PushSandboxImageRequestV1.Json.g.cs index f39a2120..5fdd37a8 100644 --- a/src/libs/Baseten/Generated/Baseten.Models.ListImageTagsResponseV1.Json.g.cs +++ b/src/libs/Baseten/Generated/Baseten.Models.PushSandboxImageRequestV1.Json.g.cs @@ -2,7 +2,7 @@ namespace Baseten { - public sealed partial class ListImageTagsResponseV1 + public sealed partial class PushSandboxImageRequestV1 { /// /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. @@ -47,20 +47,20 @@ public string ToJson( /// /// Deserializes a JSON string using the provided JsonSerializerContext. /// - public static global::Baseten.ListImageTagsResponseV1? FromJson( + public static global::Baseten.PushSandboxImageRequestV1? FromJson( string json, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return global::System.Text.Json.JsonSerializer.Deserialize( json, - typeof(global::Baseten.ListImageTagsResponseV1), - jsonSerializerContext) as global::Baseten.ListImageTagsResponseV1; + typeof(global::Baseten.PushSandboxImageRequestV1), + jsonSerializerContext) as global::Baseten.PushSandboxImageRequestV1; } /// /// Deserializes a JSON string using the generated default JsonSerializerContext. /// - public static global::Baseten.ListImageTagsResponseV1? FromJson( + public static global::Baseten.PushSandboxImageRequestV1? FromJson( string json) { return FromJson( @@ -75,7 +75,7 @@ public string ToJson( [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.ListImageTagsResponseV1? FromJson( + public static global::Baseten.PushSandboxImageRequestV1? FromJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { @@ -86,7 +86,7 @@ public string ToJson( global::Baseten.SourceGenerationContext.Default); } - return global::System.Text.Json.JsonSerializer.Deserialize( + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); } @@ -94,20 +94,20 @@ public string ToJson( /// /// Deserializes a JSON stream using the provided JsonSerializerContext. /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + 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.ListImageTagsResponseV1), - jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.ListImageTagsResponseV1; + typeof(global::Baseten.PushSandboxImageRequestV1), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.PushSandboxImageRequestV1; } /// /// Deserializes a JSON stream using the generated default JsonSerializerContext. /// - public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream) { return FromJsonStreamAsync( @@ -122,7 +122,7 @@ public string ToJson( [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( + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { @@ -133,7 +133,7 @@ public string ToJson( global::Baseten.SourceGenerationContext.Default); } - return global::System.Text.Json.JsonSerializer.DeserializeAsync( + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); } diff --git a/src/libs/Baseten/Generated/Baseten.Models.PushImageRequestV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.PushSandboxImageRequestV1.g.cs similarity index 88% rename from src/libs/Baseten/Generated/Baseten.Models.PushImageRequestV1.g.cs rename to src/libs/Baseten/Generated/Baseten.Models.PushSandboxImageRequestV1.g.cs index 549987eb..5ce1c45a 100644 --- a/src/libs/Baseten/Generated/Baseten.Models.PushImageRequestV1.g.cs +++ b/src/libs/Baseten/Generated/Baseten.Models.PushSandboxImageRequestV1.g.cs @@ -7,7 +7,7 @@ namespace Baseten /// Push a sandbox image from a source archive or an existing registry image.
/// Example: {"name":"base-image","image":"docker.io/b10/base-image:latest","docker_config":"{\u0022auths\u0022:{\u0022https://index.docker.io/v1/\u0022:{\u0022auth\u0022:\u0022YjEwLXJldmlldzpkZW1vLW5vdC1hLXZhbGlkLXJlZ2lzdHJ5LXRva2Vu\u0022}}}"} ///
- public sealed partial class PushImageRequestV1 + public sealed partial class PushSandboxImageRequestV1 { /// /// Target image repository name. Reusing a name pushes a new version to the existing repository.
@@ -19,7 +19,7 @@ public sealed partial class PushImageRequestV1 public required string Name { get; set; } /// - /// Optional source registry image reference including a registry hostname. When omitted, the response provides an archive upload URL.
+ /// Optional source registry image reference including a registry hostname. When omitted, the response provides an archive upload URL. The uploaded ZIP archive must not exceed 5 GB.
/// Example: docker.io/b10/base-image:latest ///
/// docker.io/b10/base-image:latest @@ -42,14 +42,14 @@ public sealed partial class PushImageRequestV1 public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// /// Target image repository name. Reusing a name pushes a new version to the existing repository.
/// Example: base-image /// /// - /// Optional source registry image reference including a registry hostname. When omitted, the response provides an archive upload URL.
+ /// Optional source registry image reference including a registry hostname. When omitted, the response provides an archive upload URL. The uploaded ZIP archive must not exceed 5 GB.
/// Example: docker.io/b10/base-image:latest /// /// @@ -60,7 +60,7 @@ public sealed partial class PushImageRequestV1 #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif - public PushImageRequestV1( + public PushSandboxImageRequestV1( string name, string? image, string? dockerConfig) @@ -71,9 +71,9 @@ public PushImageRequestV1( } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - public PushImageRequestV1() + public PushSandboxImageRequestV1() { } diff --git a/src/libs/Baseten/Generated/Baseten.Models.PushSandboxImageResponseV1.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.PushSandboxImageResponseV1.Json.g.cs new file mode 100644 index 00000000..b5376bab --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.PushSandboxImageResponseV1.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class PushSandboxImageResponseV1 + { + /// + /// 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 generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::Baseten.SourceGenerationContext.Default); + } + + /// + /// 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) + { + if (jsonSerializerOptions is null) + { + return ToJson(global::Baseten.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Baseten.PushSandboxImageResponseV1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.PushSandboxImageResponseV1), + jsonSerializerContext) as global::Baseten.PushSandboxImageResponseV1; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Baseten.PushSandboxImageResponseV1? FromJson( + string json) + { + return FromJson( + json, + global::Baseten.SourceGenerationContext.Default); + } + + /// + /// 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.PushSandboxImageResponseV1? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Baseten.SourceGenerationContext.Default); + } + + 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.PushSandboxImageResponseV1), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.PushSandboxImageResponseV1; + } + + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::Baseten.SourceGenerationContext.Default); + } + + /// + /// 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) + { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::Baseten.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.Models.PushImageResponseV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.PushSandboxImageResponseV1.g.cs similarity index 82% rename from src/libs/Baseten/Generated/Baseten.Models.PushImageResponseV1.g.cs rename to src/libs/Baseten/Generated/Baseten.Models.PushSandboxImageResponseV1.g.cs index cb0a3573..6efe7338 100644 --- a/src/libs/Baseten/Generated/Baseten.Models.PushImageResponseV1.g.cs +++ b/src/libs/Baseten/Generated/Baseten.Models.PushSandboxImageResponseV1.g.cs @@ -7,7 +7,7 @@ namespace Baseten /// Accepted image push. Acceptance does not imply readiness; poll GET /sandboxes/images/{image_name} until status is BUILT or FAILED.
/// Example: {"name":"base-image","status":"BUILDING","image":"b10/base-image:latest"} ///
- public sealed partial class PushImageResponseV1 + public sealed partial class PushSandboxImageResponseV1 { /// /// Target image repository name.
@@ -24,12 +24,12 @@ public sealed partial class PushImageResponseV1 ///
/// BUILDING [global::System.Text.Json.Serialization.JsonPropertyName("status")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Baseten.JsonConverters.ImageStatusV1JsonConverter))] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Baseten.JsonConverters.SandboxImageStatusV1JsonConverter))] [global::System.Text.Json.Serialization.JsonRequired] - public required global::Baseten.ImageStatusV1 Status { get; set; } + public required global::Baseten.SandboxImageStatusV1 Status { get; set; } /// - /// Temporary signed URL for uploading the source ZIP archive with HTTP PUT. Present only when no source image was supplied. Uploading starts asynchronous processing. This storage upload is separate from the API endpoints.
+ /// Temporary signed URL for uploading the source ZIP archive with HTTP PUT. Present only when no source image was supplied. The uploaded ZIP archive must not exceed 5 GB. Uploading starts asynchronous processing. This storage upload is separate from the API endpoints.
/// Example: https://uploads.b10.run/images/base-image/20260916212658/source.zip?expires=2026-09-16T22%3A26%3A58Z&signature=demo-not-a-valid-upload-signature ///
/// https://uploads.b10.run/images/base-image/20260916212658/source.zip?expires=2026-09-16T22%3A26%3A58Z&signature=demo-not-a-valid-upload-signature @@ -51,7 +51,7 @@ public sealed partial class PushImageResponseV1 public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// /// Target image repository name.
@@ -62,7 +62,7 @@ public sealed partial class PushImageResponseV1 /// Example: BUILDING /// /// - /// Temporary signed URL for uploading the source ZIP archive with HTTP PUT. Present only when no source image was supplied. Uploading starts asynchronous processing. This storage upload is separate from the API endpoints.
+ /// Temporary signed URL for uploading the source ZIP archive with HTTP PUT. Present only when no source image was supplied. The uploaded ZIP archive must not exceed 5 GB. Uploading starts asynchronous processing. This storage upload is separate from the API endpoints.
/// Example: https://uploads.b10.run/images/base-image/20260916212658/source.zip?expires=2026-09-16T22%3A26%3A58Z&signature=demo-not-a-valid-upload-signature /// /// @@ -72,9 +72,9 @@ public sealed partial class PushImageResponseV1 #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif - public PushImageResponseV1( + public PushSandboxImageResponseV1( string name, - global::Baseten.ImageStatusV1 status, + global::Baseten.SandboxImageStatusV1 status, string? uploadUrl, string? image) { @@ -85,9 +85,9 @@ public PushImageResponseV1( } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - public PushImageResponseV1() + public PushSandboxImageResponseV1() { } diff --git a/src/libs/Baseten/Generated/Baseten.Models.SandboxConfigurationV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.SandboxConfigurationV1.g.cs index 36f14d2b..09383996 100644 --- a/src/libs/Baseten/Generated/Baseten.Models.SandboxConfigurationV1.g.cs +++ b/src/libs/Baseten/Generated/Baseten.Models.SandboxConfigurationV1.g.cs @@ -5,19 +5,10 @@ namespace Baseten { /// /// Writable sandbox configuration. Fields are serialized at the root of the request or resource.
- /// Example: {"enabled":true,"lifecycle":{"expiration_policies":[{"action":"DELETE","type":"TTL_IDLE","value":"24h"},{"action":"DELETE","type":"TTL_MAX_AGE","value":"7d"},{"action":"DELETE","type":"DATE","value":"2026-09-23T21:26:58Z"}],"terminated_retention":"24h"},"network":{"proxy":{"allowed_domains":["api.openai.com","pypi.org","files.pythonhosted.org","registry.npmjs.org"],"bypass":["registry.npmjs.org"],"forbidden_domains":["facebook.com","*.facebook.com"],"routing":[{"destinations":["api.openai.com"],"headers":{"Authorization":"Bearer {{SECRET:openai-key}}"},"body":{"user":"baseten-api-review-0916"},"secrets":{"openai-key":"sk-proj-demo-not-a-valid-api-key"}}]},"subnet":"default"},"region":"us-pdx-1","envs":[{"name":"NODE_ENV","secret":false,"value":"production"},{"name":"PORT","secret":false,"value":"3000"}],"image":"blaxel/base-image:latest","memory":4096,"ports":[{"name":"http","protocol":"HTTP","target":3000}],"display_name":"Baseten API review","external_id":"api-review-20260916-001","labels":{"env":"development","project":"api-review","team":"engineering"}} + /// Example: {"lifecycle":{"expiration_policies":[{"action":"DELETE","type":"TTL_IDLE","value":"24h"},{"action":"DELETE","type":"TTL_MAX_AGE","value":"7d"},{"action":"DELETE","type":"DATE","value":"2026-09-23T21:26:58Z"}],"terminated_retention":"24h"},"network":{"proxy":{"allowed_domains":["api.openai.com","pypi.org","files.pythonhosted.org","registry.npmjs.org"],"bypass":["registry.npmjs.org"],"forbidden_domains":["facebook.com","*.facebook.com"],"routing":[{"destinations":["api.openai.com"],"headers":{"Authorization":"Bearer {{SECRET:openai-key}}"},"body":{"user":"baseten-api-review-0916"},"secrets":{"openai-key":"sk-proj-demo-not-a-valid-api-key"}}]},"subnet":"default"},"region":"us-pdx-1","envs":[{"name":"NODE_ENV","secret":false,"value":"production"},{"name":"PORT","secret":false,"value":"3000"}],"image":"baseten/base-image:latest","memory":4096,"ports":[{"name":"http","protocol":"HTTP","target":3000}],"external_id":"api-review-20260916-001","labels":{"env":"development","project":"api-review","team":"engineering"}} ///
public sealed partial class SandboxConfigurationV1 { - /// - /// When false, the sandbox is disabled and will not accept connections
- /// Default Value: true
- /// Example: true - ///
- /// true - [global::System.Text.Json.Serialization.JsonPropertyName("enabled")] - public bool? Enabled { get; set; } - /// /// Lifecycle configuration controlling automatic sandbox deletion based on idle time, max age, or specific dates
/// Example: {"expiration_policies":[{"action":"DELETE","type":"TTL_IDLE","value":"24h"},{"action":"DELETE","type":"TTL_MAX_AGE","value":"7d"},{"action":"DELETE","type":"DATE","value":"2026-09-23T21:26:58Z"}],"terminated_retention":"24h"} @@ -51,10 +42,10 @@ public sealed partial class SandboxConfigurationV1 public global::System.Collections.Generic.IList? Envs { get; set; } /// - /// Image reference including its tag. Use blaxel/base-image:latest to get started with the built-in sandbox execution API. This image is available directly without building, pushing, or listing images through GET /v1/sandboxes/images.
- /// Example: blaxel/base-image:latest + /// Image reference including its tag. Built-in image references are returned in the canonical baseten/ namespace. Use baseten/base-image:latest to get started with the built-in sandbox execution API. This image is available directly without building, pushing, or listing images through GET /v1/sandboxes/images.
+ /// Example: baseten/base-image:latest ///
- /// blaxel/base-image:latest + /// baseten/base-image:latest [global::System.Text.Json.Serialization.JsonPropertyName("image")] public string? Image { get; set; } @@ -74,14 +65,6 @@ public sealed partial class SandboxConfigurationV1 [global::System.Text.Json.Serialization.JsonPropertyName("ports")] public global::System.Collections.Generic.IList? Ports { get; set; } - /// - /// Human-readable name for display in the UI. Can contain spaces and special characters, max 63 characters.
- /// Example: Baseten API review - ///
- /// Baseten API review - [global::System.Text.Json.Serialization.JsonPropertyName("display_name")] - public string? DisplayName { get; set; } - /// /// Caller-owned identifier for external lookups. Max 64 chars, alphanumeric + dash.
/// Example: api-review-20260916-001 @@ -107,11 +90,6 @@ public sealed partial class SandboxConfigurationV1 /// /// Initializes a new instance of the class. /// - /// - /// When false, the sandbox is disabled and will not accept connections
- /// Default Value: true
- /// Example: true - /// /// /// Lifecycle configuration controlling automatic sandbox deletion based on idle time, max age, or specific dates
/// Example: {"expiration_policies":[{"action":"DELETE","type":"TTL_IDLE","value":"24h"},{"action":"DELETE","type":"TTL_MAX_AGE","value":"7d"},{"action":"DELETE","type":"DATE","value":"2026-09-23T21:26:58Z"}],"terminated_retention":"24h"} @@ -129,8 +107,8 @@ public sealed partial class SandboxConfigurationV1 /// Example: [{"name":"NODE_ENV","secret":false,"value":"production"}, {"name":"PORT","secret":false,"value":"3000"}] /// /// - /// Image reference including its tag. Use blaxel/base-image:latest to get started with the built-in sandbox execution API. This image is available directly without building, pushing, or listing images through GET /v1/sandboxes/images.
- /// Example: blaxel/base-image:latest + /// Image reference including its tag. Built-in image references are returned in the canonical baseten/ namespace. Use baseten/base-image:latest to get started with the built-in sandbox execution API. This image is available directly without building, pushing, or listing images through GET /v1/sandboxes/images.
+ /// Example: baseten/base-image:latest /// /// /// Memory allocation in megabytes. Also determines CPU allocation (CPU cores = memory in MB / 2048, e.g., 4096MB = 2 CPUs).
@@ -140,10 +118,6 @@ public sealed partial class SandboxConfigurationV1 /// Set of ports for a resource
/// Example: [{"name":"http","protocol":"HTTP","target":3000}] /// - /// - /// Human-readable name for display in the UI. Can contain spaces and special characters, max 63 characters.
- /// Example: Baseten API review - /// /// /// Caller-owned identifier for external lookups. Max 64 chars, alphanumeric + dash.
/// Example: api-review-20260916-001 @@ -156,7 +130,6 @@ public sealed partial class SandboxConfigurationV1 [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public SandboxConfigurationV1( - bool? enabled, global::Baseten.SandboxLifecycleV1? lifecycle, global::Baseten.SandboxNetworkV1? network, string? region, @@ -164,11 +137,9 @@ public SandboxConfigurationV1( string? image, long? memory, global::System.Collections.Generic.IList? ports, - string? displayName, string? externalId, global::System.Collections.Generic.Dictionary? labels) { - this.Enabled = enabled; this.Lifecycle = lifecycle; this.Network = network; this.Region = region; @@ -176,7 +147,6 @@ public SandboxConfigurationV1( this.Image = image; this.Memory = memory; this.Ports = ports; - this.DisplayName = displayName; this.ExternalId = externalId; this.Labels = labels; } diff --git a/src/libs/Baseten/Generated/Baseten.Models.SandboxEnvV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.SandboxEnvV1.g.cs index 451539db..c2c1e8e9 100644 --- a/src/libs/Baseten/Generated/Baseten.Models.SandboxEnvV1.g.cs +++ b/src/libs/Baseten/Generated/Baseten.Models.SandboxEnvV1.g.cs @@ -18,7 +18,8 @@ public sealed partial class SandboxEnvV1 public string? Name { get; set; } /// - /// Whether the value is a secret
+ /// Whether the value is a secret. Defaults to true; secret values are returned as "****". Set false explicitly to return the original value.
+ /// Default Value: true
/// Example: false ///
/// false @@ -47,7 +48,8 @@ public sealed partial class SandboxEnvV1 /// Example: NODE_ENV /// /// - /// Whether the value is a secret
+ /// Whether the value is a secret. Defaults to true; secret values are returned as "****". Set false explicitly to return the original value.
+ /// Default Value: true
/// Example: false /// /// diff --git a/src/libs/Baseten/Generated/Baseten.Models.SandboxImageBuildLogV1.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.SandboxImageBuildLogV1.Json.g.cs new file mode 100644 index 00000000..e42bbf55 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.SandboxImageBuildLogV1.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class SandboxImageBuildLogV1 + { + /// + /// 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 generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::Baseten.SourceGenerationContext.Default); + } + + /// + /// 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) + { + if (jsonSerializerOptions is null) + { + return ToJson(global::Baseten.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Baseten.SandboxImageBuildLogV1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.SandboxImageBuildLogV1), + jsonSerializerContext) as global::Baseten.SandboxImageBuildLogV1; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Baseten.SandboxImageBuildLogV1? FromJson( + string json) + { + return FromJson( + json, + global::Baseten.SourceGenerationContext.Default); + } + + /// + /// 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.SandboxImageBuildLogV1? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Baseten.SourceGenerationContext.Default); + } + + 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.SandboxImageBuildLogV1), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.SandboxImageBuildLogV1; + } + + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::Baseten.SourceGenerationContext.Default); + } + + /// + /// 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) + { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::Baseten.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.Models.SandboxImageBuildLogV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.SandboxImageBuildLogV1.g.cs new file mode 100644 index 00000000..e79ef2c7 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.SandboxImageBuildLogV1.g.cs @@ -0,0 +1,67 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// + /// + public sealed partial class SandboxImageBuildLogV1 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("timestamp")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTime Timestamp { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("message")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Message { get; set; } + + /// + /// Numeric OpenTelemetry severity level. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("severity")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int Severity { 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. + /// + /// + /// + /// + /// Numeric OpenTelemetry severity level. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public SandboxImageBuildLogV1( + global::System.DateTime timestamp, + string message, + int severity) + { + this.Timestamp = timestamp; + this.Message = message ?? throw new global::System.ArgumentNullException(nameof(message)); + this.Severity = severity; + } + + /// + /// Initializes a new instance of the class. + /// + public SandboxImageBuildLogV1() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.SandboxImageBuildLogsResponseV1.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.SandboxImageBuildLogsResponseV1.Json.g.cs new file mode 100644 index 00000000..3897615c --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.SandboxImageBuildLogsResponseV1.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class SandboxImageBuildLogsResponseV1 + { + /// + /// 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 generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::Baseten.SourceGenerationContext.Default); + } + + /// + /// 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) + { + if (jsonSerializerOptions is null) + { + return ToJson(global::Baseten.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Baseten.SandboxImageBuildLogsResponseV1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.SandboxImageBuildLogsResponseV1), + jsonSerializerContext) as global::Baseten.SandboxImageBuildLogsResponseV1; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Baseten.SandboxImageBuildLogsResponseV1? FromJson( + string json) + { + return FromJson( + json, + global::Baseten.SourceGenerationContext.Default); + } + + /// + /// 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.SandboxImageBuildLogsResponseV1? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Baseten.SourceGenerationContext.Default); + } + + 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.SandboxImageBuildLogsResponseV1), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.SandboxImageBuildLogsResponseV1; + } + + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::Baseten.SourceGenerationContext.Default); + } + + /// + /// 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) + { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::Baseten.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.Models.SandboxImageBuildLogsResponseV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.SandboxImageBuildLogsResponseV1.g.cs new file mode 100644 index 00000000..7d31efa4 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.SandboxImageBuildLogsResponseV1.g.cs @@ -0,0 +1,57 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// + /// + public sealed partial class SandboxImageBuildLogsResponseV1 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("logs")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Logs { get; set; } + + /// + /// Number of matching log entries in the requested time range. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("total_count")] + [global::System.Text.Json.Serialization.JsonRequired] + public required long TotalCount { 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. + /// + /// + /// + /// Number of matching log entries in the requested time range. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public SandboxImageBuildLogsResponseV1( + global::System.Collections.Generic.IList logs, + long totalCount) + { + this.Logs = logs ?? throw new global::System.ArgumentNullException(nameof(logs)); + this.TotalCount = totalCount; + } + + /// + /// Initializes a new instance of the class. + /// + public SandboxImageBuildLogsResponseV1() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.ImageStatusV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.SandboxImageStatusV1.g.cs similarity index 61% rename from src/libs/Baseten/Generated/Baseten.Models.ImageStatusV1.g.cs rename to src/libs/Baseten/Generated/Baseten.Models.SandboxImageStatusV1.g.cs index e44d308f..28f5060f 100644 --- a/src/libs/Baseten/Generated/Baseten.Models.ImageStatusV1.g.cs +++ b/src/libs/Baseten/Generated/Baseten.Models.SandboxImageStatusV1.g.cs @@ -8,7 +8,7 @@ namespace Baseten /// Included only in responses
/// Example: BUILT ///
- public enum ImageStatusV1 + public enum SandboxImageStatusV1 { /// /// @@ -31,33 +31,33 @@ public enum ImageStatusV1 /// /// Enum extensions to do fast conversions without the reflection. /// - public static class ImageStatusV1Extensions + public static class SandboxImageStatusV1Extensions { /// /// Converts an enum to a string. /// - public static string ToValueString(this ImageStatusV1 value) + public static string ToValueString(this SandboxImageStatusV1 value) { return value switch { - ImageStatusV1.Building => "BUILDING", - ImageStatusV1.Built => "BUILT", - ImageStatusV1.Failed => "FAILED", - ImageStatusV1.Uploading => "UPLOADING", + SandboxImageStatusV1.Building => "BUILDING", + SandboxImageStatusV1.Built => "BUILT", + SandboxImageStatusV1.Failed => "FAILED", + SandboxImageStatusV1.Uploading => "UPLOADING", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } /// /// Converts an string to a enum. /// - public static ImageStatusV1? ToEnum(string value) + public static SandboxImageStatusV1? ToEnum(string value) { return value switch { - "BUILDING" => ImageStatusV1.Building, - "BUILT" => ImageStatusV1.Built, - "FAILED" => ImageStatusV1.Failed, - "UPLOADING" => ImageStatusV1.Uploading, + "BUILDING" => SandboxImageStatusV1.Building, + "BUILT" => SandboxImageStatusV1.Built, + "FAILED" => SandboxImageStatusV1.Failed, + "UPLOADING" => SandboxImageStatusV1.Uploading, _ => null, }; } diff --git a/src/libs/Baseten/Generated/Baseten.Models.SandboxImageSummaryV1.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.SandboxImageSummaryV1.Json.g.cs new file mode 100644 index 00000000..bc00a07e --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.SandboxImageSummaryV1.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class SandboxImageSummaryV1 + { + /// + /// 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 generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::Baseten.SourceGenerationContext.Default); + } + + /// + /// 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) + { + if (jsonSerializerOptions is null) + { + return ToJson(global::Baseten.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Baseten.SandboxImageSummaryV1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.SandboxImageSummaryV1), + jsonSerializerContext) as global::Baseten.SandboxImageSummaryV1; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Baseten.SandboxImageSummaryV1? FromJson( + string json) + { + return FromJson( + json, + global::Baseten.SourceGenerationContext.Default); + } + + /// + /// 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.SandboxImageSummaryV1? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Baseten.SourceGenerationContext.Default); + } + + 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.SandboxImageSummaryV1), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.SandboxImageSummaryV1; + } + + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::Baseten.SourceGenerationContext.Default); + } + + /// + /// 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) + { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::Baseten.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.Models.ImageV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.SandboxImageSummaryV1.g.cs similarity index 62% rename from src/libs/Baseten/Generated/Baseten.Models.ImageV1.g.cs rename to src/libs/Baseten/Generated/Baseten.Models.SandboxImageSummaryV1.g.cs index 231a6626..3e68c75f 100644 --- a/src/libs/Baseten/Generated/Baseten.Models.ImageV1.g.cs +++ b/src/libs/Baseten/Generated/Baseten.Models.SandboxImageSummaryV1.g.cs @@ -4,10 +4,10 @@ namespace Baseten { /// - /// Sandbox image repository. List and get operations return a summary without embedded tags.
- /// Example: {"name":"base-image","display_name":"b10/base-image","status":"BUILT","created_at":"2026-09-15T21:20:00Z","updated_at":"2026-09-16T21:25:00Z","last_deployed_at":"2026-09-16T21:26:58.545765901Z","size":260046848,"tags":[{"name":"latest","created_at":"2026-09-16T21:20:00Z","updated_at":"2026-09-16T21:25:00Z","size":134217728},{"name":"20260915212000","created_at":"2026-09-15T21:20:00Z","updated_at":"2026-09-15T21:25:00Z","size":125829120}]} + /// Sandbox image repository summary. Fetch tags through GET /sandboxes/images/{image_name}/tags.
+ /// Example: {"name":"base-image","status":"BUILT","created_at":"2026-09-15T21:20:00Z","updated_at":"2026-09-16T21:25:00Z","last_deployed_at":"2026-09-16T21:26:58.545765901Z","size":260046848,"tag_count":2} ///
- public sealed partial class ImageV1 + public sealed partial class SandboxImageSummaryV1 { /// /// Stable repository name supplied when pushing the image.
@@ -18,23 +18,15 @@ public sealed partial class ImageV1 [global::System.Text.Json.Serialization.JsonRequired] public required string Name { get; set; } - /// - /// Human-readable image repository name.
- /// Example: b10/base-image - ///
- /// b10/base-image - [global::System.Text.Json.Serialization.JsonPropertyName("display_name")] - public string? DisplayName { get; set; } - /// /// Image processing status. Only BUILT images are ready to use.
/// Example: BUILT ///
/// BUILT [global::System.Text.Json.Serialization.JsonPropertyName("status")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Baseten.JsonConverters.ImageStatusV1JsonConverter))] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Baseten.JsonConverters.SandboxImageStatusV1JsonConverter))] [global::System.Text.Json.Serialization.JsonRequired] - public required global::Baseten.ImageStatusV1 Status { get; set; } + public required global::Baseten.SandboxImageStatusV1 Status { get; set; } /// /// Time the image was created.
@@ -81,15 +73,6 @@ public sealed partial class ImageV1 [global::System.Text.Json.Serialization.JsonPropertyName("tag_count")] public long? TagCount { get; set; } - /// - /// Empty for list and get summary responses. Use GET /sandboxes/images/{image_name}/tags to retrieve paginated image versions.
- /// Example: [{"name":"latest","created_at":"2026-09-16T21:20:00Z","updated_at":"2026-09-16T21:25:00Z","size":134217728}, {"name":"20260915212000","created_at":"2026-09-15T21:20:00Z","updated_at":"2026-09-15T21:25:00Z","size":125829120}] - ///
- /// [{"name":"latest","created_at":"2026-09-16T21:20:00Z","updated_at":"2026-09-16T21:25:00Z","size":134217728}, {"name":"20260915212000","created_at":"2026-09-15T21:20:00Z","updated_at":"2026-09-15T21:25:00Z","size":125829120}] - [global::System.Text.Json.Serialization.JsonPropertyName("tags")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Tags { get; set; } - /// /// Additional properties that are not explicitly defined in the schema /// @@ -97,7 +80,7 @@ public sealed partial class ImageV1 public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// /// Stable repository name supplied when pushing the image.
@@ -107,14 +90,6 @@ public sealed partial class ImageV1 /// Image processing status. Only BUILT images are ready to use.
/// Example: BUILT /// - /// - /// Empty for list and get summary responses. Use GET /sandboxes/images/{image_name}/tags to retrieve paginated image versions.
- /// Example: [{"name":"latest","created_at":"2026-09-16T21:20:00Z","updated_at":"2026-09-16T21:25:00Z","size":134217728}, {"name":"20260915212000","created_at":"2026-09-15T21:20:00Z","updated_at":"2026-09-15T21:25:00Z","size":125829120}] - /// - /// - /// Human-readable image repository name.
- /// Example: b10/base-image - /// /// /// Time the image was created.
/// Included only in responses
@@ -143,11 +118,9 @@ public sealed partial class ImageV1 #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif - public ImageV1( + public SandboxImageSummaryV1( string name, - global::Baseten.ImageStatusV1 status, - global::System.Collections.Generic.IList tags, - string? displayName, + global::Baseten.SandboxImageStatusV1 status, global::System.DateTime? createdAt, global::System.DateTime? updatedAt, global::System.DateTime? lastDeployedAt, @@ -155,20 +128,18 @@ public ImageV1( long? tagCount) { this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); - this.DisplayName = displayName; this.Status = status; this.CreatedAt = createdAt; this.UpdatedAt = updatedAt; this.LastDeployedAt = lastDeployedAt; this.Size = size; this.TagCount = tagCount; - this.Tags = tags ?? throw new global::System.ArgumentNullException(nameof(tags)); } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - public ImageV1() + public SandboxImageSummaryV1() { } diff --git a/src/libs/Baseten/Generated/Baseten.Models.PushImageRequestV1.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.SandboxImageTagV1.Json.g.cs similarity index 88% rename from src/libs/Baseten/Generated/Baseten.Models.PushImageRequestV1.Json.g.cs rename to src/libs/Baseten/Generated/Baseten.Models.SandboxImageTagV1.Json.g.cs index 69d11998..f19bbb4d 100644 --- a/src/libs/Baseten/Generated/Baseten.Models.PushImageRequestV1.Json.g.cs +++ b/src/libs/Baseten/Generated/Baseten.Models.SandboxImageTagV1.Json.g.cs @@ -2,7 +2,7 @@ namespace Baseten { - public sealed partial class PushImageRequestV1 + public sealed partial class SandboxImageTagV1 { /// /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. @@ -47,20 +47,20 @@ public string ToJson( /// /// Deserializes a JSON string using the provided JsonSerializerContext. /// - public static global::Baseten.PushImageRequestV1? FromJson( + public static global::Baseten.SandboxImageTagV1? FromJson( string json, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return global::System.Text.Json.JsonSerializer.Deserialize( json, - typeof(global::Baseten.PushImageRequestV1), - jsonSerializerContext) as global::Baseten.PushImageRequestV1; + typeof(global::Baseten.SandboxImageTagV1), + jsonSerializerContext) as global::Baseten.SandboxImageTagV1; } /// /// Deserializes a JSON string using the generated default JsonSerializerContext. /// - public static global::Baseten.PushImageRequestV1? FromJson( + public static global::Baseten.SandboxImageTagV1? FromJson( string json) { return FromJson( @@ -75,7 +75,7 @@ public string ToJson( [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.PushImageRequestV1? FromJson( + public static global::Baseten.SandboxImageTagV1? FromJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { @@ -86,7 +86,7 @@ public string ToJson( global::Baseten.SourceGenerationContext.Default); } - return global::System.Text.Json.JsonSerializer.Deserialize( + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); } @@ -94,20 +94,20 @@ public string ToJson( /// /// Deserializes a JSON stream using the provided JsonSerializerContext. /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + 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.PushImageRequestV1), - jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.PushImageRequestV1; + typeof(global::Baseten.SandboxImageTagV1), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.SandboxImageTagV1; } /// /// Deserializes a JSON stream using the generated default JsonSerializerContext. /// - public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream) { return FromJsonStreamAsync( @@ -122,7 +122,7 @@ public string ToJson( [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( + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { @@ -133,7 +133,7 @@ public string ToJson( global::Baseten.SourceGenerationContext.Default); } - return global::System.Text.Json.JsonSerializer.DeserializeAsync( + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); } diff --git a/src/libs/Baseten/Generated/Baseten.Models.ImageTagV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.SandboxImageTagV1.g.cs similarity index 91% rename from src/libs/Baseten/Generated/Baseten.Models.ImageTagV1.g.cs rename to src/libs/Baseten/Generated/Baseten.Models.SandboxImageTagV1.g.cs index 81930832..7df8f204 100644 --- a/src/libs/Baseten/Generated/Baseten.Models.ImageTagV1.g.cs +++ b/src/libs/Baseten/Generated/Baseten.Models.SandboxImageTagV1.g.cs @@ -7,7 +7,7 @@ namespace Baseten /// A tag identifying a version of a sandbox image.
/// Example: {"name":"latest","created_at":"2026-09-16T21:20:00Z","updated_at":"2026-09-16T21:25:00Z","size":134217728} ///
- public sealed partial class ImageTagV1 + public sealed partial class SandboxImageTagV1 { /// /// Image tag name.
@@ -52,7 +52,7 @@ public sealed partial class ImageTagV1 public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// /// Image tag name.
@@ -76,7 +76,7 @@ public sealed partial class ImageTagV1 #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif - public ImageTagV1( + public SandboxImageTagV1( string name, global::System.DateTime? createdAt, global::System.DateTime? updatedAt, @@ -89,9 +89,9 @@ public ImageTagV1( } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - public ImageTagV1() + public SandboxImageTagV1() { } diff --git a/src/libs/Baseten/Generated/Baseten.Models.ImageV1.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.SandboxImageV1.Json.g.cs similarity index 89% rename from src/libs/Baseten/Generated/Baseten.Models.ImageV1.Json.g.cs rename to src/libs/Baseten/Generated/Baseten.Models.SandboxImageV1.Json.g.cs index 571e50ed..a0a1b61b 100644 --- a/src/libs/Baseten/Generated/Baseten.Models.ImageV1.Json.g.cs +++ b/src/libs/Baseten/Generated/Baseten.Models.SandboxImageV1.Json.g.cs @@ -2,7 +2,7 @@ namespace Baseten { - public sealed partial class ImageV1 + public readonly partial struct SandboxImageV1 { /// /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. @@ -47,20 +47,20 @@ public string ToJson( /// /// Deserializes a JSON string using the provided JsonSerializerContext. /// - public static global::Baseten.ImageV1? FromJson( + public static global::Baseten.SandboxImageV1? FromJson( string json, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return global::System.Text.Json.JsonSerializer.Deserialize( json, - typeof(global::Baseten.ImageV1), - jsonSerializerContext) as global::Baseten.ImageV1; + typeof(global::Baseten.SandboxImageV1), + jsonSerializerContext) as global::Baseten.SandboxImageV1?; } /// /// Deserializes a JSON string using the generated default JsonSerializerContext. /// - public static global::Baseten.ImageV1? FromJson( + public static global::Baseten.SandboxImageV1? FromJson( string json) { return FromJson( @@ -75,7 +75,7 @@ public string ToJson( [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.ImageV1? FromJson( + public static global::Baseten.SandboxImageV1? FromJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { @@ -86,7 +86,7 @@ public string ToJson( global::Baseten.SourceGenerationContext.Default); } - return global::System.Text.Json.JsonSerializer.Deserialize( + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); } @@ -94,20 +94,20 @@ public string ToJson( /// /// Deserializes a JSON stream using the provided JsonSerializerContext. /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + 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.ImageV1), - jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.ImageV1; + typeof(global::Baseten.SandboxImageV1), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.SandboxImageV1?; } /// /// Deserializes a JSON stream using the generated default JsonSerializerContext. /// - public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream) { return FromJsonStreamAsync( @@ -122,7 +122,7 @@ public string ToJson( [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( + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { @@ -133,7 +133,7 @@ public string ToJson( global::Baseten.SourceGenerationContext.Default); } - return global::System.Text.Json.JsonSerializer.DeserializeAsync( + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); } diff --git a/src/libs/Baseten/Generated/Baseten.Models.SandboxImageV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.SandboxImageV1.g.cs new file mode 100644 index 00000000..e766c85b --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.SandboxImageV1.g.cs @@ -0,0 +1,297 @@ +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace Baseten +{ + /// + /// Sandbox image repository. Get operations return a summary with an empty tags array.
+ /// Example: {"name":"base-image","status":"BUILT","created_at":"2026-09-15T21:20:00Z","updated_at":"2026-09-16T21:25:00Z","last_deployed_at":"2026-09-16T21:26:58.545765901Z","size":260046848,"tag_count":2,"tags":[]} + ///
+ public readonly partial struct SandboxImageV1 : global::System.IEquatable + { + /// + /// Sandbox image repository summary. Fetch tags through GET /sandboxes/images/{image_name}/tags.
+ /// Example: {"name":"base-image","status":"BUILT","created_at":"2026-09-15T21:20:00Z","updated_at":"2026-09-16T21:25:00Z","last_deployed_at":"2026-09-16T21:26:58.545765901Z","size":260046848,"tag_count":2} + ///
+#if NET6_0_OR_GREATER + public global::Baseten.SandboxImageSummaryV1? Summary { get; init; } +#else + public global::Baseten.SandboxImageSummaryV1? Summary { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Summary))] +#endif + public bool IsSummary => Summary != null; + + /// + /// + /// + public bool TryPickSummary( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Baseten.SandboxImageSummaryV1? value) + { + value = Summary; + return IsSummary; + } + + /// + /// + /// + public global::Baseten.SandboxImageSummaryV1 PickSummary() => Summary is { } value + ? value + : throw new global::System.InvalidOperationException($"Expected union variant 'Summary' but the value was {ToString()}."); + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::Baseten.SandboxImageV1Variant2? SandboxImageV1Variant2 { get; init; } +#else + public global::Baseten.SandboxImageV1Variant2? SandboxImageV1Variant2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(SandboxImageV1Variant2))] +#endif + public bool IsSandboxImageV1Variant2 => SandboxImageV1Variant2 != null; + + /// + /// + /// + public bool TryPickSandboxImageV1Variant2( +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out global::Baseten.SandboxImageV1Variant2? value) + { + value = SandboxImageV1Variant2; + return IsSandboxImageV1Variant2; + } + + /// + /// + /// + public global::Baseten.SandboxImageV1Variant2 PickSandboxImageV1Variant2() => SandboxImageV1Variant2 is { } value + ? value + : throw new global::System.InvalidOperationException($"Expected union variant 'SandboxImageV1Variant2' but the value was {ToString()}."); + /// + /// + /// + public static implicit operator SandboxImageV1(global::Baseten.SandboxImageSummaryV1 value) => new SandboxImageV1((global::Baseten.SandboxImageSummaryV1?)value); + + /// + /// + /// + public static implicit operator global::Baseten.SandboxImageSummaryV1?(SandboxImageV1 @this) => @this.Summary; + + /// + /// + /// + public SandboxImageV1(global::Baseten.SandboxImageSummaryV1? value) + { + Summary = value; + } + + /// + /// + /// + public static SandboxImageV1 FromSummary(global::Baseten.SandboxImageSummaryV1? value) => new SandboxImageV1(value); + + /// + /// + /// + public static implicit operator SandboxImageV1(global::Baseten.SandboxImageV1Variant2 value) => new SandboxImageV1((global::Baseten.SandboxImageV1Variant2?)value); + + /// + /// + /// + public static implicit operator global::Baseten.SandboxImageV1Variant2?(SandboxImageV1 @this) => @this.SandboxImageV1Variant2; + + /// + /// + /// + public SandboxImageV1(global::Baseten.SandboxImageV1Variant2? value) + { + SandboxImageV1Variant2 = value; + } + + /// + /// + /// + public static SandboxImageV1 FromSandboxImageV1Variant2(global::Baseten.SandboxImageV1Variant2? value) => new SandboxImageV1(value); + + /// + /// + /// + public SandboxImageV1( + global::Baseten.SandboxImageSummaryV1? summary, + global::Baseten.SandboxImageV1Variant2? sandboxImageV1Variant2 + ) + { + Summary = summary; + SandboxImageV1Variant2 = sandboxImageV1Variant2; + } + + /// + /// + /// + public object? Object => + SandboxImageV1Variant2 as object ?? + Summary as object + ; + + /// + /// + /// + public override string? ToString() => + Summary?.ToString() ?? + SandboxImageV1Variant2?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsSummary && IsSandboxImageV1Variant2; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? summary = null, + global::System.Func? sandboxImageV1Variant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (Summary is { } __value0 && summary != null) + { + return summary(__value0); + } + else if (SandboxImageV1Variant2 is { } __value1 && sandboxImageV1Variant2 != null) + { + return sandboxImageV1Variant2(__value1); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? summary = null, + + global::System.Action? sandboxImageV1Variant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (Summary is { } __value0) + { + summary?.Invoke(__value0); + } + else if (SandboxImageV1Variant2 is { } __value1) + { + sandboxImageV1Variant2?.Invoke(__value1); + } + } + + /// + /// + /// + public void Switch( + global::System.Action? summary = null, + global::System.Action? sandboxImageV1Variant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (Summary is { } __value0) + { + summary?.Invoke(__value0); + } + else if (SandboxImageV1Variant2 is { } __value1) + { + sandboxImageV1Variant2?.Invoke(__value1); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Summary, + typeof(global::Baseten.SandboxImageSummaryV1), + SandboxImageV1Variant2, + typeof(global::Baseten.SandboxImageV1Variant2), + }; + 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(SandboxImageV1 other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Summary, other.Summary) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(SandboxImageV1Variant2, other.SandboxImageV1Variant2) + ; + } + + /// + /// + /// + public static bool operator ==(SandboxImageV1 obj1, SandboxImageV1 obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(SandboxImageV1 obj1, SandboxImageV1 obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is SandboxImageV1 o && Equals(o); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.Models.SandboxImageV1Variant2.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.SandboxImageV1Variant2.Json.g.cs new file mode 100644 index 00000000..a266f976 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.SandboxImageV1Variant2.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class SandboxImageV1Variant2 + { + /// + /// 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 generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::Baseten.SourceGenerationContext.Default); + } + + /// + /// 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) + { + if (jsonSerializerOptions is null) + { + return ToJson(global::Baseten.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Baseten.SandboxImageV1Variant2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.SandboxImageV1Variant2), + jsonSerializerContext) as global::Baseten.SandboxImageV1Variant2; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Baseten.SandboxImageV1Variant2? FromJson( + string json) + { + return FromJson( + json, + global::Baseten.SourceGenerationContext.Default); + } + + /// + /// 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.SandboxImageV1Variant2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Baseten.SourceGenerationContext.Default); + } + + 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.SandboxImageV1Variant2), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.SandboxImageV1Variant2; + } + + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::Baseten.SourceGenerationContext.Default); + } + + /// + /// 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) + { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::Baseten.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.Models.SandboxImageV1Variant2.g.cs b/src/libs/Baseten/Generated/Baseten.Models.SandboxImageV1Variant2.g.cs new file mode 100644 index 00000000..7e0a921c --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.SandboxImageV1Variant2.g.cs @@ -0,0 +1,50 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// + /// + public sealed partial class SandboxImageV1Variant2 + { + /// + /// Empty for get summary responses. Use GET /sandboxes/images/{image_name}/tags to retrieve paginated image versions.
+ /// Example: [] + ///
+ /// [] + [global::System.Text.Json.Serialization.JsonPropertyName("tags")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Tags { 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. + /// + /// + /// Empty for get summary responses. Use GET /sandboxes/images/{image_name}/tags to retrieve paginated image versions.
+ /// Example: [] + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public SandboxImageV1Variant2( + global::System.Collections.Generic.IList tags) + { + this.Tags = tags ?? throw new global::System.ArgumentNullException(nameof(tags)); + } + + /// + /// Initializes a new instance of the class. + /// + public SandboxImageV1Variant2() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.SandboxLibraryImageCreationOptionsV1.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.SandboxLibraryImageCreationOptionsV1.Json.g.cs new file mode 100644 index 00000000..f1defb17 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.SandboxLibraryImageCreationOptionsV1.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class SandboxLibraryImageCreationOptionsV1 + { + /// + /// 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 generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::Baseten.SourceGenerationContext.Default); + } + + /// + /// 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) + { + if (jsonSerializerOptions is null) + { + return ToJson(global::Baseten.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Baseten.SandboxLibraryImageCreationOptionsV1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.SandboxLibraryImageCreationOptionsV1), + jsonSerializerContext) as global::Baseten.SandboxLibraryImageCreationOptionsV1; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Baseten.SandboxLibraryImageCreationOptionsV1? FromJson( + string json) + { + return FromJson( + json, + global::Baseten.SourceGenerationContext.Default); + } + + /// + /// 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.SandboxLibraryImageCreationOptionsV1? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Baseten.SourceGenerationContext.Default); + } + + 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.SandboxLibraryImageCreationOptionsV1), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.SandboxLibraryImageCreationOptionsV1; + } + + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::Baseten.SourceGenerationContext.Default); + } + + /// + /// 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) + { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::Baseten.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.Models.SandboxLibraryImageCreationOptionsV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.SandboxLibraryImageCreationOptionsV1.g.cs new file mode 100644 index 00000000..2fac022b --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.SandboxLibraryImageCreationOptionsV1.g.cs @@ -0,0 +1,57 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// Optional settings suggested when creating a sandbox from this image. + /// + public sealed partial class SandboxLibraryImageCreationOptionsV1 + { + /// + /// Kernel selection arguments. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("extra_args")] + public global::System.Collections.Generic.Dictionary? ExtraArgs { get; set; } + + /// + /// Volume attachments. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("volumes")] + public global::System.Collections.Generic.IList? Volumes { 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. + /// + /// + /// Kernel selection arguments. + /// + /// + /// Volume attachments. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public SandboxLibraryImageCreationOptionsV1( + global::System.Collections.Generic.Dictionary? extraArgs, + global::System.Collections.Generic.IList? volumes) + { + this.ExtraArgs = extraArgs; + this.Volumes = volumes; + } + + /// + /// Initializes a new instance of the class. + /// + public SandboxLibraryImageCreationOptionsV1() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.SandboxLibraryImageCreationOptionsV1ExtraArgs.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.SandboxLibraryImageCreationOptionsV1ExtraArgs.Json.g.cs new file mode 100644 index 00000000..48944480 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.SandboxLibraryImageCreationOptionsV1ExtraArgs.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class SandboxLibraryImageCreationOptionsV1ExtraArgs + { + /// + /// 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 generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::Baseten.SourceGenerationContext.Default); + } + + /// + /// 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) + { + if (jsonSerializerOptions is null) + { + return ToJson(global::Baseten.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Baseten.SandboxLibraryImageCreationOptionsV1ExtraArgs? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.SandboxLibraryImageCreationOptionsV1ExtraArgs), + jsonSerializerContext) as global::Baseten.SandboxLibraryImageCreationOptionsV1ExtraArgs; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Baseten.SandboxLibraryImageCreationOptionsV1ExtraArgs? FromJson( + string json) + { + return FromJson( + json, + global::Baseten.SourceGenerationContext.Default); + } + + /// + /// 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.SandboxLibraryImageCreationOptionsV1ExtraArgs? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Baseten.SourceGenerationContext.Default); + } + + 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.SandboxLibraryImageCreationOptionsV1ExtraArgs), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.SandboxLibraryImageCreationOptionsV1ExtraArgs; + } + + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::Baseten.SourceGenerationContext.Default); + } + + /// + /// 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) + { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::Baseten.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.Models.SandboxLibraryImageCreationOptionsV1ExtraArgs.g.cs b/src/libs/Baseten/Generated/Baseten.Models.SandboxLibraryImageCreationOptionsV1ExtraArgs.g.cs new file mode 100644 index 00000000..92da43d9 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.SandboxLibraryImageCreationOptionsV1ExtraArgs.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// Kernel selection arguments. + /// + public sealed partial class SandboxLibraryImageCreationOptionsV1ExtraArgs + { + + /// + /// 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.SandboxLibraryImageV1.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.SandboxLibraryImageV1.Json.g.cs new file mode 100644 index 00000000..5c4ee8da --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.SandboxLibraryImageV1.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class SandboxLibraryImageV1 + { + /// + /// 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 generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::Baseten.SourceGenerationContext.Default); + } + + /// + /// 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) + { + if (jsonSerializerOptions is null) + { + return ToJson(global::Baseten.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Baseten.SandboxLibraryImageV1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.SandboxLibraryImageV1), + jsonSerializerContext) as global::Baseten.SandboxLibraryImageV1; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Baseten.SandboxLibraryImageV1? FromJson( + string json) + { + return FromJson( + json, + global::Baseten.SourceGenerationContext.Default); + } + + /// + /// 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.SandboxLibraryImageV1? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Baseten.SourceGenerationContext.Default); + } + + 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.SandboxLibraryImageV1), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.SandboxLibraryImageV1; + } + + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::Baseten.SourceGenerationContext.Default); + } + + /// + /// 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) + { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::Baseten.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.Models.SandboxLibraryImageV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.SandboxLibraryImageV1.g.cs new file mode 100644 index 00000000..70417fd1 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.SandboxLibraryImageV1.g.cs @@ -0,0 +1,251 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// Built-in sandbox image usable directly as a sandbox image. + /// + public sealed partial class SandboxLibraryImageV1 + { + /// + /// Stable identifier of the built-in image.
+ /// Example: base-image + ///
+ /// base-image + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Name { get; set; } + + /// + /// Human-readable name.
+ /// Example: Base Image + ///
+ /// Base Image + [global::System.Text.Json.Serialization.JsonPropertyName("display_name")] + public string? DisplayName { get; set; } + + /// + /// Short description.
+ /// Example: A minimal sandbox environment with the sandbox execution API. + ///
+ /// A minimal sandbox environment with the sandbox execution API. + [global::System.Text.Json.Serialization.JsonPropertyName("description")] + public string? Description { get; set; } + + /// + /// Detailed description. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("long_description")] + public string? LongDescription { get; set; } + + /// + /// Image reference including its tag, usable as the image of a sandbox.
+ /// Example: baseten/base-image:latest + ///
+ /// baseten/base-image:latest + [global::System.Text.Json.Serialization.JsonPropertyName("image")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Image { get; set; } + + /// + /// Recommended memory allocation in megabytes.
+ /// Example: 4096 + ///
+ /// 4096 + [global::System.Text.Json.Serialization.JsonPropertyName("memory")] + public long? Memory { get; set; } + + /// + /// Set of ports for a resource
+ /// Example: [{"name":"http","protocol":"HTTP","target":3000}] + ///
+ /// [{"name":"http","protocol":"HTTP","target":3000}] + [global::System.Text.Json.Serialization.JsonPropertyName("ports")] + public global::System.Collections.Generic.IList? Ports { get; set; } + + /// + /// Categories of the image. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("categories")] + public global::System.Collections.Generic.IList? Categories { get; set; } + + /// + /// Tags of the image. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("tags")] + public global::System.Collections.Generic.IList? Tags { get; set; } + + /// + /// Documentation URL. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("url")] + public string? Url { get; set; } + + /// + /// Icon URL. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("icon")] + public string? Icon { get; set; } + + /// + /// Light-mode icon URL. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("icon_light")] + public string? IconLight { get; set; } + + /// + /// Dark-mode icon URL. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("icon_dark")] + public string? IconDark { get; set; } + + /// + /// Whether the image requires an enterprise plan.
+ /// Example: false + ///
+ /// false + [global::System.Text.Json.Serialization.JsonPropertyName("enterprise")] + public bool? Enterprise { get; set; } + + /// + /// Whether the image is hidden. Always false in listings.
+ /// Example: false + ///
+ /// false + [global::System.Text.Json.Serialization.JsonPropertyName("hidden")] + public bool? Hidden { get; set; } + + /// + /// Whether the image is not yet available. Always false in listings.
+ /// Example: false + ///
+ /// false + [global::System.Text.Json.Serialization.JsonPropertyName("coming_soon")] + public bool? ComingSoon { get; set; } + + /// + /// Optional settings suggested when creating a sandbox from this image. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("creation_options")] + public global::Baseten.SandboxLibraryImageCreationOptionsV1? CreationOptions { 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. + /// + /// + /// Stable identifier of the built-in image.
+ /// Example: base-image + /// + /// + /// Image reference including its tag, usable as the image of a sandbox.
+ /// Example: baseten/base-image:latest + /// + /// + /// Human-readable name.
+ /// Example: Base Image + /// + /// + /// Short description.
+ /// Example: A minimal sandbox environment with the sandbox execution API. + /// + /// + /// Detailed description. + /// + /// + /// Recommended memory allocation in megabytes.
+ /// Example: 4096 + /// + /// + /// Set of ports for a resource
+ /// Example: [{"name":"http","protocol":"HTTP","target":3000}] + /// + /// + /// Categories of the image. + /// + /// + /// Tags of the image. + /// + /// + /// Documentation URL. + /// + /// + /// Icon URL. + /// + /// + /// Light-mode icon URL. + /// + /// + /// Dark-mode icon URL. + /// + /// + /// Whether the image requires an enterprise plan.
+ /// Example: false + /// + /// + /// Whether the image is hidden. Always false in listings.
+ /// Example: false + /// + /// + /// Whether the image is not yet available. Always false in listings.
+ /// Example: false + /// + /// + /// Optional settings suggested when creating a sandbox from this image. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public SandboxLibraryImageV1( + string name, + string image, + string? displayName, + string? description, + string? longDescription, + long? memory, + global::System.Collections.Generic.IList? ports, + global::System.Collections.Generic.IList? categories, + global::System.Collections.Generic.IList? tags, + string? url, + string? icon, + string? iconLight, + string? iconDark, + bool? enterprise, + bool? hidden, + bool? comingSoon, + global::Baseten.SandboxLibraryImageCreationOptionsV1? creationOptions) + { + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.DisplayName = displayName; + this.Description = description; + this.LongDescription = longDescription; + this.Image = image ?? throw new global::System.ArgumentNullException(nameof(image)); + this.Memory = memory; + this.Ports = ports; + this.Categories = categories; + this.Tags = tags; + this.Url = url; + this.Icon = icon; + this.IconLight = iconLight; + this.IconDark = iconDark; + this.Enterprise = enterprise; + this.Hidden = hidden; + this.ComingSoon = comingSoon; + this.CreationOptions = creationOptions; + } + + /// + /// Initializes a new instance of the class. + /// + public SandboxLibraryImageV1() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.SandboxLibraryImageVolumeV1.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.SandboxLibraryImageVolumeV1.Json.g.cs new file mode 100644 index 00000000..f083e03d --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.SandboxLibraryImageVolumeV1.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class SandboxLibraryImageVolumeV1 + { + /// + /// 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 generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::Baseten.SourceGenerationContext.Default); + } + + /// + /// 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) + { + if (jsonSerializerOptions is null) + { + return ToJson(global::Baseten.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Baseten.SandboxLibraryImageVolumeV1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.SandboxLibraryImageVolumeV1), + jsonSerializerContext) as global::Baseten.SandboxLibraryImageVolumeV1; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Baseten.SandboxLibraryImageVolumeV1? FromJson( + string json) + { + return FromJson( + json, + global::Baseten.SourceGenerationContext.Default); + } + + /// + /// 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.SandboxLibraryImageVolumeV1? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Baseten.SourceGenerationContext.Default); + } + + 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.SandboxLibraryImageVolumeV1), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.SandboxLibraryImageVolumeV1; + } + + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::Baseten.SourceGenerationContext.Default); + } + + /// + /// 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) + { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::Baseten.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.Models.SandboxLibraryImageVolumeV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.SandboxLibraryImageVolumeV1.g.cs new file mode 100644 index 00000000..f339dd48 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.SandboxLibraryImageVolumeV1.g.cs @@ -0,0 +1,107 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// Volume attachment suggested by a built-in image. + /// + public sealed partial class SandboxLibraryImageVolumeV1 + { + /// + /// Volume name, or an internal identifier for ephemeral volumes.
+ /// Example: scratch + ///
+ /// scratch + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Name { get; set; } + + /// + /// Absolute filesystem path where the volume is mounted.
+ /// Example: /mnt/data + ///
+ /// /mnt/data + [global::System.Text.Json.Serialization.JsonPropertyName("mount_path")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string MountPath { get; set; } + + /// + /// Volume type, persistent when empty.
+ /// Example: ephemeral + ///
+ /// ephemeral + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + public string? Type { get; set; } + + /// + /// Storage capacity in megabytes for ephemeral volumes.
+ /// Example: 10240 + ///
+ /// 10240 + [global::System.Text.Json.Serialization.JsonPropertyName("size_mb")] + public long? SizeMb { get; set; } + + /// + /// Whether the volume is mounted read-only.
+ /// Example: false + ///
+ /// false + [global::System.Text.Json.Serialization.JsonPropertyName("read_only")] + public bool? ReadOnly { 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. + /// + /// + /// Volume name, or an internal identifier for ephemeral volumes.
+ /// Example: scratch + /// + /// + /// Absolute filesystem path where the volume is mounted.
+ /// Example: /mnt/data + /// + /// + /// Volume type, persistent when empty.
+ /// Example: ephemeral + /// + /// + /// Storage capacity in megabytes for ephemeral volumes.
+ /// Example: 10240 + /// + /// + /// Whether the volume is mounted read-only.
+ /// Example: false + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public SandboxLibraryImageVolumeV1( + string name, + string mountPath, + string? type, + long? sizeMb, + bool? readOnly) + { + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.MountPath = mountPath ?? throw new global::System.ArgumentNullException(nameof(mountPath)); + this.Type = type; + this.SizeMb = sizeMb; + this.ReadOnly = readOnly; + } + + /// + /// Initializes a new instance of the class. + /// + public SandboxLibraryImageVolumeV1() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.PushImageResponseV1.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.SandboxLogEntryV1.Json.g.cs similarity index 88% rename from src/libs/Baseten/Generated/Baseten.Models.PushImageResponseV1.Json.g.cs rename to src/libs/Baseten/Generated/Baseten.Models.SandboxLogEntryV1.Json.g.cs index 80858e25..992555f4 100644 --- a/src/libs/Baseten/Generated/Baseten.Models.PushImageResponseV1.Json.g.cs +++ b/src/libs/Baseten/Generated/Baseten.Models.SandboxLogEntryV1.Json.g.cs @@ -2,7 +2,7 @@ namespace Baseten { - public sealed partial class PushImageResponseV1 + public sealed partial class SandboxLogEntryV1 { /// /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. @@ -47,20 +47,20 @@ public string ToJson( /// /// Deserializes a JSON string using the provided JsonSerializerContext. /// - public static global::Baseten.PushImageResponseV1? FromJson( + public static global::Baseten.SandboxLogEntryV1? FromJson( string json, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return global::System.Text.Json.JsonSerializer.Deserialize( json, - typeof(global::Baseten.PushImageResponseV1), - jsonSerializerContext) as global::Baseten.PushImageResponseV1; + typeof(global::Baseten.SandboxLogEntryV1), + jsonSerializerContext) as global::Baseten.SandboxLogEntryV1; } /// /// Deserializes a JSON string using the generated default JsonSerializerContext. /// - public static global::Baseten.PushImageResponseV1? FromJson( + public static global::Baseten.SandboxLogEntryV1? FromJson( string json) { return FromJson( @@ -75,7 +75,7 @@ public string ToJson( [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.PushImageResponseV1? FromJson( + public static global::Baseten.SandboxLogEntryV1? FromJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { @@ -86,7 +86,7 @@ public string ToJson( global::Baseten.SourceGenerationContext.Default); } - return global::System.Text.Json.JsonSerializer.Deserialize( + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); } @@ -94,20 +94,20 @@ public string ToJson( /// /// Deserializes a JSON stream using the provided JsonSerializerContext. /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + 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.PushImageResponseV1), - jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.PushImageResponseV1; + typeof(global::Baseten.SandboxLogEntryV1), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.SandboxLogEntryV1; } /// /// Deserializes a JSON stream using the generated default JsonSerializerContext. /// - public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream) { return FromJsonStreamAsync( @@ -122,7 +122,7 @@ public string ToJson( [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( + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { @@ -133,7 +133,7 @@ public string ToJson( global::Baseten.SourceGenerationContext.Default); } - return global::System.Text.Json.JsonSerializer.DeserializeAsync( + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); } diff --git a/src/libs/Baseten/Generated/Baseten.Models.SandboxLogEntryV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.SandboxLogEntryV1.g.cs new file mode 100644 index 00000000..68b88e92 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.SandboxLogEntryV1.g.cs @@ -0,0 +1,90 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// + /// + public sealed partial class SandboxLogEntryV1 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("timestamp")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTime Timestamp { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("message")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Message { get; set; } + + /// + /// Numeric log severity. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("severity")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int Severity { get; set; } + + /// + /// Associated trace identifier, or an empty string when unavailable. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("trace_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string TraceId { get; set; } + + /// + /// Action or command when present on the log entry. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("action")] + public string? Action { 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. + /// + /// + /// + /// + /// Numeric log severity. + /// + /// + /// Associated trace identifier, or an empty string when unavailable. + /// + /// + /// Action or command when present on the log entry. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public SandboxLogEntryV1( + global::System.DateTime timestamp, + string message, + int severity, + string traceId, + string? action) + { + this.Timestamp = timestamp; + this.Message = message ?? throw new global::System.ArgumentNullException(nameof(message)); + this.Severity = severity; + this.TraceId = traceId ?? throw new global::System.ArgumentNullException(nameof(traceId)); + this.Action = action; + } + + /// + /// Initializes a new instance of the class. + /// + public SandboxLogEntryV1() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.ImageTagV1.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.SandboxLogsV1.Json.g.cs similarity index 89% rename from src/libs/Baseten/Generated/Baseten.Models.ImageTagV1.Json.g.cs rename to src/libs/Baseten/Generated/Baseten.Models.SandboxLogsV1.Json.g.cs index 918d093f..c5925ab7 100644 --- a/src/libs/Baseten/Generated/Baseten.Models.ImageTagV1.Json.g.cs +++ b/src/libs/Baseten/Generated/Baseten.Models.SandboxLogsV1.Json.g.cs @@ -2,7 +2,7 @@ namespace Baseten { - public sealed partial class ImageTagV1 + public sealed partial class SandboxLogsV1 { /// /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. @@ -47,20 +47,20 @@ public string ToJson( /// /// Deserializes a JSON string using the provided JsonSerializerContext. /// - public static global::Baseten.ImageTagV1? FromJson( + public static global::Baseten.SandboxLogsV1? FromJson( string json, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return global::System.Text.Json.JsonSerializer.Deserialize( json, - typeof(global::Baseten.ImageTagV1), - jsonSerializerContext) as global::Baseten.ImageTagV1; + typeof(global::Baseten.SandboxLogsV1), + jsonSerializerContext) as global::Baseten.SandboxLogsV1; } /// /// Deserializes a JSON string using the generated default JsonSerializerContext. /// - public static global::Baseten.ImageTagV1? FromJson( + public static global::Baseten.SandboxLogsV1? FromJson( string json) { return FromJson( @@ -75,7 +75,7 @@ public string ToJson( [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.ImageTagV1? FromJson( + public static global::Baseten.SandboxLogsV1? FromJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { @@ -86,7 +86,7 @@ public string ToJson( global::Baseten.SourceGenerationContext.Default); } - return global::System.Text.Json.JsonSerializer.Deserialize( + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); } @@ -94,20 +94,20 @@ public string ToJson( /// /// Deserializes a JSON stream using the provided JsonSerializerContext. /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + 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.ImageTagV1), - jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.ImageTagV1; + typeof(global::Baseten.SandboxLogsV1), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.SandboxLogsV1; } /// /// Deserializes a JSON stream using the generated default JsonSerializerContext. /// - public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream) { return FromJsonStreamAsync( @@ -122,7 +122,7 @@ public string ToJson( [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( + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { @@ -133,7 +133,7 @@ public string ToJson( global::Baseten.SourceGenerationContext.Default); } - return global::System.Text.Json.JsonSerializer.DeserializeAsync( + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); } diff --git a/src/libs/Baseten/Generated/Baseten.Models.SandboxLogsV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.SandboxLogsV1.g.cs new file mode 100644 index 00000000..9f3a26dd --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.SandboxLogsV1.g.cs @@ -0,0 +1,86 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// + /// + public sealed partial class SandboxLogsV1 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("sandbox_name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string SandboxName { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("start_time")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTime StartTime { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("end_time")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTime EndTime { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("logs")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Logs { get; set; } + + /// + /// Opaque cursor for the next page; null when there are no more entries. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("next_cursor")] + public string? NextCursor { 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. + /// + /// + /// + /// + /// + /// + /// Opaque cursor for the next page; null when there are no more entries. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public SandboxLogsV1( + string sandboxName, + global::System.DateTime startTime, + global::System.DateTime endTime, + global::System.Collections.Generic.IList logs, + string? nextCursor) + { + this.SandboxName = sandboxName ?? throw new global::System.ArgumentNullException(nameof(sandboxName)); + this.StartTime = startTime; + this.EndTime = endTime; + this.Logs = logs ?? throw new global::System.ArgumentNullException(nameof(logs)); + this.NextCursor = nextCursor; + } + + /// + /// Initializes a new instance of the class. + /// + public SandboxLogsV1() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.SandboxMetricsPointV1.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.SandboxMetricsPointV1.Json.g.cs new file mode 100644 index 00000000..c2b83b0f --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.SandboxMetricsPointV1.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class SandboxMetricsPointV1 + { + /// + /// 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 generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::Baseten.SourceGenerationContext.Default); + } + + /// + /// 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) + { + if (jsonSerializerOptions is null) + { + return ToJson(global::Baseten.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Baseten.SandboxMetricsPointV1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.SandboxMetricsPointV1), + jsonSerializerContext) as global::Baseten.SandboxMetricsPointV1; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Baseten.SandboxMetricsPointV1? FromJson( + string json) + { + return FromJson( + json, + global::Baseten.SourceGenerationContext.Default); + } + + /// + /// 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.SandboxMetricsPointV1? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Baseten.SourceGenerationContext.Default); + } + + 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.SandboxMetricsPointV1), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.SandboxMetricsPointV1; + } + + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::Baseten.SourceGenerationContext.Default); + } + + /// + /// 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) + { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::Baseten.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.Models.SandboxMetricsPointV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.SandboxMetricsPointV1.g.cs new file mode 100644 index 00000000..d21fdfa6 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.SandboxMetricsPointV1.g.cs @@ -0,0 +1,91 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// + /// + public sealed partial class SandboxMetricsPointV1 + { + /// + /// Start of this interval. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("timestamp")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTime Timestamp { get; set; } + + /// + /// Request count. Zero without traffic; null for intervals entirely before creation. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("requests")] + public double? Requests { get; set; } + + /// + /// Peak CPU usage in this interval, where 100 is one full CPU core. Null without a sample. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("cpu_percent")] + public double? CpuPercent { get; set; } + + /// + /// Memory usage in bytes, averaged per series then maximum across series. Null without a sample. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("memory_bytes")] + public double? MemoryBytes { get; set; } + + /// + /// Fraction of requests returning 4xx or 5xx. Null when there are no requests. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("error_rate")] + public double? ErrorRate { 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. + /// + /// + /// Start of this interval. + /// + /// + /// Request count. Zero without traffic; null for intervals entirely before creation. + /// + /// + /// Peak CPU usage in this interval, where 100 is one full CPU core. Null without a sample. + /// + /// + /// Memory usage in bytes, averaged per series then maximum across series. Null without a sample. + /// + /// + /// Fraction of requests returning 4xx or 5xx. Null when there are no requests. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public SandboxMetricsPointV1( + global::System.DateTime timestamp, + double? requests, + double? cpuPercent, + double? memoryBytes, + double? errorRate) + { + this.Timestamp = timestamp; + this.Requests = requests; + this.CpuPercent = cpuPercent; + this.MemoryBytes = memoryBytes; + this.ErrorRate = errorRate; + } + + /// + /// Initializes a new instance of the class. + /// + public SandboxMetricsPointV1() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.SandboxMetricsV1.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.SandboxMetricsV1.Json.g.cs new file mode 100644 index 00000000..a47a294b --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.SandboxMetricsV1.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class SandboxMetricsV1 + { + /// + /// 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 generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::Baseten.SourceGenerationContext.Default); + } + + /// + /// 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) + { + if (jsonSerializerOptions is null) + { + return ToJson(global::Baseten.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Baseten.SandboxMetricsV1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.SandboxMetricsV1), + jsonSerializerContext) as global::Baseten.SandboxMetricsV1; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Baseten.SandboxMetricsV1? FromJson( + string json) + { + return FromJson( + json, + global::Baseten.SourceGenerationContext.Default); + } + + /// + /// 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.SandboxMetricsV1? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Baseten.SourceGenerationContext.Default); + } + + 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.SandboxMetricsV1), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.SandboxMetricsV1; + } + + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::Baseten.SourceGenerationContext.Default); + } + + /// + /// 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) + { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::Baseten.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.Models.SandboxMetricsV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.SandboxMetricsV1.g.cs new file mode 100644 index 00000000..9d9596a9 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.SandboxMetricsV1.g.cs @@ -0,0 +1,85 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// + /// + public sealed partial class SandboxMetricsV1 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("sandbox_name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string SandboxName { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("start_time")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTime StartTime { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("end_time")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTime EndTime { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("interval_seconds")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int IntervalSeconds { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Data { 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 SandboxMetricsV1( + string sandboxName, + global::System.DateTime startTime, + global::System.DateTime endTime, + int intervalSeconds, + global::System.Collections.Generic.IList data) + { + this.SandboxName = sandboxName ?? throw new global::System.ArgumentNullException(nameof(sandboxName)); + this.StartTime = startTime; + this.EndTime = endTime; + this.IntervalSeconds = intervalSeconds; + this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); + } + + /// + /// Initializes a new instance of the class. + /// + public SandboxMetricsV1() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.SandboxRegionV1.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.SandboxRegionV1.Json.g.cs new file mode 100644 index 00000000..6ba2e836 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.SandboxRegionV1.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class SandboxRegionV1 + { + /// + /// 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 generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::Baseten.SourceGenerationContext.Default); + } + + /// + /// 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) + { + if (jsonSerializerOptions is null) + { + return ToJson(global::Baseten.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Baseten.SandboxRegionV1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.SandboxRegionV1), + jsonSerializerContext) as global::Baseten.SandboxRegionV1; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Baseten.SandboxRegionV1? FromJson( + string json) + { + return FromJson( + json, + global::Baseten.SourceGenerationContext.Default); + } + + /// + /// 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.SandboxRegionV1? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Baseten.SourceGenerationContext.Default); + } + + 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.SandboxRegionV1), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.SandboxRegionV1; + } + + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::Baseten.SourceGenerationContext.Default); + } + + /// + /// 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) + { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::Baseten.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.Models.SandboxRegionV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.SandboxRegionV1.g.cs new file mode 100644 index 00000000..b55f0e19 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.SandboxRegionV1.g.cs @@ -0,0 +1,107 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// + /// + public sealed partial class SandboxRegionV1 + { + /// + /// Public region identifier to use when creating a sandbox.
+ /// Example: us-was-1 + ///
+ /// us-was-1 + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Name { get; set; } + + /// + /// Country code.
+ /// Example: us + ///
+ /// us + [global::System.Text.Json.Serialization.JsonPropertyName("country")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Country { get; set; } + + /// + /// Continent code.
+ /// Example: na + ///
+ /// na + [global::System.Text.Json.Serialization.JsonPropertyName("continent")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Continent { get; set; } + + /// + /// Region location.
+ /// Example: Washington + ///
+ /// Washington + [global::System.Text.Json.Serialization.JsonPropertyName("location")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Location { get; set; } + + /// + /// Runtime generation supported by this region, using the public name CARBON. Actual runtime selection depends on the team and sandbox configuration. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("info_generation")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Baseten.JsonConverters.SandboxRegionV1InfoGenerationJsonConverter))] + public global::Baseten.SandboxRegionV1InfoGeneration InfoGeneration { 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. + /// + /// + /// Public region identifier to use when creating a sandbox.
+ /// Example: us-was-1 + /// + /// + /// Country code.
+ /// Example: us + /// + /// + /// Continent code.
+ /// Example: na + /// + /// + /// Region location.
+ /// Example: Washington + /// + /// + /// Runtime generation supported by this region, using the public name CARBON. Actual runtime selection depends on the team and sandbox configuration. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public SandboxRegionV1( + string name, + string country, + string continent, + string location, + global::Baseten.SandboxRegionV1InfoGeneration infoGeneration) + { + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.Country = country ?? throw new global::System.ArgumentNullException(nameof(country)); + this.Continent = continent ?? throw new global::System.ArgumentNullException(nameof(continent)); + this.Location = location ?? throw new global::System.ArgumentNullException(nameof(location)); + this.InfoGeneration = infoGeneration; + } + + /// + /// Initializes a new instance of the class. + /// + public SandboxRegionV1() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.SandboxV1Variant2State.g.cs b/src/libs/Baseten/Generated/Baseten.Models.SandboxRegionV1InfoGeneration.g.cs similarity index 51% rename from src/libs/Baseten/Generated/Baseten.Models.SandboxV1Variant2State.g.cs rename to src/libs/Baseten/Generated/Baseten.Models.SandboxRegionV1InfoGeneration.g.cs index d4854c96..10e224b7 100644 --- a/src/libs/Baseten/Generated/Baseten.Models.SandboxV1Variant2State.g.cs +++ b/src/libs/Baseten/Generated/Baseten.Models.SandboxRegionV1InfoGeneration.g.cs @@ -4,48 +4,40 @@ namespace Baseten { /// - /// Current execution state when available.
- /// Included only in responses
- /// Example: RUNNING + /// Runtime generation supported by this region, using the public name CARBON. Actual runtime selection depends on the team and sandbox configuration. ///
- public enum SandboxV1Variant2State + public enum SandboxRegionV1InfoGeneration { /// /// /// - Running, - /// - /// - /// - Standby, + Carbon, } /// /// Enum extensions to do fast conversions without the reflection. /// - public static class SandboxV1Variant2StateExtensions + public static class SandboxRegionV1InfoGenerationExtensions { /// /// Converts an enum to a string. /// - public static string ToValueString(this SandboxV1Variant2State value) + public static string ToValueString(this SandboxRegionV1InfoGeneration value) { return value switch { - SandboxV1Variant2State.Running => "RUNNING", - SandboxV1Variant2State.Standby => "STANDBY", + SandboxRegionV1InfoGeneration.Carbon => "CARBON", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } /// /// Converts an string to a enum. /// - public static SandboxV1Variant2State? ToEnum(string value) + public static SandboxRegionV1InfoGeneration? ToEnum(string value) { return value switch { - "RUNNING" => SandboxV1Variant2State.Running, - "STANDBY" => SandboxV1Variant2State.Standby, + "CARBON" => SandboxRegionV1InfoGeneration.Carbon, _ => null, }; } diff --git a/src/libs/Baseten/Generated/Baseten.Models.SandboxStatusV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.SandboxStatusV1.g.cs index 198bb4c5..5b1e8642 100644 --- a/src/libs/Baseten/Generated/Baseten.Models.SandboxStatusV1.g.cs +++ b/src/libs/Baseten/Generated/Baseten.Models.SandboxStatusV1.g.cs @@ -4,7 +4,7 @@ namespace Baseten { /// - /// Sandbox deployment status.
+ /// Sandbox deployment status, always uppercase. This tracks provisioning and differs from the execution API state, whose values such as running are lowercase.
/// Included only in responses
/// Example: DEPLOYED ///
diff --git a/src/libs/Baseten/Generated/Baseten.Models.SandboxTTLIdleExpirationPolicyV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.SandboxTTLIdleExpirationPolicyV1.g.cs index 76177e75..f74cda24 100644 --- a/src/libs/Baseten/Generated/Baseten.Models.SandboxTTLIdleExpirationPolicyV1.g.cs +++ b/src/libs/Baseten/Generated/Baseten.Models.SandboxTTLIdleExpirationPolicyV1.g.cs @@ -23,7 +23,7 @@ public sealed partial class SandboxTTLIdleExpirationPolicyV1 public global::Baseten.SandboxTTLIdleExpirationPolicyV1Type Type { get; set; } /// - /// Duration using seconds, minutes, hours, or composite durations such as 1h30m. Whole days and weeks are also supported, for example 7d or 2w.
+ /// Duration using seconds, minutes, hours, or composite durations such as 1h30m. Whole days and weeks are also supported, for example 7d or 2w, where d is 24h and w is 7 × 24h. Days and weeks cannot be combined with other units, so 1d12h is rejected; use 36h instead. Values are returned exactly as sent, without normalization.
/// Example: 24h ///
/// 24h @@ -41,7 +41,7 @@ public sealed partial class SandboxTTLIdleExpirationPolicyV1 /// Initializes a new instance of the class. ///
/// - /// Duration using seconds, minutes, hours, or composite durations such as 1h30m. Whole days and weeks are also supported, for example 7d or 2w.
+ /// Duration using seconds, minutes, hours, or composite durations such as 1h30m. Whole days and weeks are also supported, for example 7d or 2w, where d is 24h and w is 7 × 24h. Days and weeks cannot be combined with other units, so 1d12h is rejected; use 36h instead. Values are returned exactly as sent, without normalization.
/// Example: 24h /// /// diff --git a/src/libs/Baseten/Generated/Baseten.Models.SandboxTTLMaxAgeExpirationPolicyV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.SandboxTTLMaxAgeExpirationPolicyV1.g.cs index 130a17c7..5c03b9d7 100644 --- a/src/libs/Baseten/Generated/Baseten.Models.SandboxTTLMaxAgeExpirationPolicyV1.g.cs +++ b/src/libs/Baseten/Generated/Baseten.Models.SandboxTTLMaxAgeExpirationPolicyV1.g.cs @@ -23,7 +23,7 @@ public sealed partial class SandboxTTLMaxAgeExpirationPolicyV1 public global::Baseten.SandboxTTLMaxAgeExpirationPolicyV1Type Type { get; set; } /// - /// Duration using seconds, minutes, hours, or composite durations such as 1h30m. Whole days and weeks are also supported, for example 7d or 2w.
+ /// Duration using seconds, minutes, hours, or composite durations such as 1h30m. Whole days and weeks are also supported, for example 7d or 2w, where d is 24h and w is 7 × 24h. Days and weeks cannot be combined with other units, so 1d12h is rejected; use 36h instead. Values are returned exactly as sent, without normalization.
/// Example: 24h ///
/// 24h @@ -41,7 +41,7 @@ public sealed partial class SandboxTTLMaxAgeExpirationPolicyV1 /// Initializes a new instance of the class. ///
/// - /// Duration using seconds, minutes, hours, or composite durations such as 1h30m. Whole days and weeks are also supported, for example 7d or 2w.
+ /// Duration using seconds, minutes, hours, or composite durations such as 1h30m. Whole days and weeks are also supported, for example 7d or 2w, where d is 24h and w is 7 × 24h. Days and weeks cannot be combined with other units, so 1d12h is rejected; use 36h instead. Values are returned exactly as sent, without normalization.
/// Example: 24h /// /// diff --git a/src/libs/Baseten/Generated/Baseten.Models.SandboxV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.SandboxV1.g.cs index 472345f4..09d2fac8 100644 --- a/src/libs/Baseten/Generated/Baseten.Models.SandboxV1.g.cs +++ b/src/libs/Baseten/Generated/Baseten.Models.SandboxV1.g.cs @@ -6,13 +6,13 @@ namespace Baseten { /// /// Sandbox resource with configuration and server-managed fields at the root. No metadata, spec, or runtime wrapper.
- /// Example: {"enabled":true,"lifecycle":{"expiration_policies":[{"action":"DELETE","type":"TTL_IDLE","value":"24h"},{"action":"DELETE","type":"TTL_MAX_AGE","value":"7d"},{"action":"DELETE","type":"DATE","value":"2026-09-23T21:26:58Z"}],"terminated_retention":"24h"},"network":{"proxy":{"allowed_domains":["api.openai.com","pypi.org","files.pythonhosted.org","registry.npmjs.org"],"bypass":["registry.npmjs.org"],"forbidden_domains":["facebook.com","*.facebook.com"],"routing":[{"destinations":["api.openai.com"],"headers":{"Authorization":"Bearer {{SECRET:openai-key}}"},"body":{"user":"baseten-api-review-0916"}}]},"subnet":"default"},"region":"us-pdx-1","envs":[{"name":"NODE_ENV","secret":false,"value":"production"},{"name":"PORT","secret":false,"value":"3000"}],"image":"blaxel/base-image:latest","memory":4096,"ports":[{"name":"http","protocol":"HTTP","target":3000}],"display_name":"Baseten API review","external_id":"api-review-20260916-001","labels":{"env":"development","project":"api-review","team":"engineering"},"name":"baseten-api-review-0916","url":"https://sbx-baseten-api-review-0916-esb1qo.us-pdx-1.b10.run","status":"DEPLOYED","state":"RUNNING","created_at":"2026-09-16T21:26:58.545765901Z","updated_at":"2026-09-16T21:31:13Z","created_by":"sandbox-automation","updated_by":"sandbox-automation","last_used_at":"2026-09-16T21:31:13Z","expires_in":86400} + /// Example: {"lifecycle":{"expiration_policies":[{"action":"DELETE","type":"TTL_IDLE","value":"24h"},{"action":"DELETE","type":"TTL_MAX_AGE","value":"7d"},{"action":"DELETE","type":"DATE","value":"2026-09-23T21:26:58Z"}],"terminated_retention":"24h"},"network":{"proxy":{"allowed_domains":["api.openai.com","pypi.org","files.pythonhosted.org","registry.npmjs.org"],"bypass":["registry.npmjs.org"],"forbidden_domains":["facebook.com","*.facebook.com"],"routing":[{"destinations":["api.openai.com"],"headers":{"Authorization":"Bearer {{SECRET:openai-key}}"},"body":{"user":"baseten-api-review-0916"}}]},"subnet":"default"},"region":"us-pdx-1","envs":[{"name":"NODE_ENV","secret":false,"value":"production"},{"name":"PORT","secret":false,"value":"3000"}],"image":"baseten/base-image:latest","memory":4096,"ports":[{"name":"http","protocol":"HTTP","target":3000}],"external_id":"api-review-20260916-001","labels":{"env":"development","project":"api-review","team":"engineering"},"name":"baseten-api-review-0916","url":"https://sbx-baseten-api-review-0916-esb1qo.us-pdx-1.b10.run","status":"DEPLOYED","created_at":"2026-09-16T21:26:58.545765901Z","updated_at":"2026-09-16T21:31:13Z","created_by":"sandbox-automation","updated_by":"sandbox-automation","last_used_at":"2026-09-16T21:31:13Z","expires_in":86400} ///
public readonly partial struct SandboxV1 : global::System.IEquatable { /// /// Writable sandbox configuration. Fields are serialized at the root of the request or resource.
- /// Example: {"enabled":true,"lifecycle":{"expiration_policies":[{"action":"DELETE","type":"TTL_IDLE","value":"24h"},{"action":"DELETE","type":"TTL_MAX_AGE","value":"7d"},{"action":"DELETE","type":"DATE","value":"2026-09-23T21:26:58Z"}],"terminated_retention":"24h"},"network":{"proxy":{"allowed_domains":["api.openai.com","pypi.org","files.pythonhosted.org","registry.npmjs.org"],"bypass":["registry.npmjs.org"],"forbidden_domains":["facebook.com","*.facebook.com"],"routing":[{"destinations":["api.openai.com"],"headers":{"Authorization":"Bearer {{SECRET:openai-key}}"},"body":{"user":"baseten-api-review-0916"},"secrets":{"openai-key":"sk-proj-demo-not-a-valid-api-key"}}]},"subnet":"default"},"region":"us-pdx-1","envs":[{"name":"NODE_ENV","secret":false,"value":"production"},{"name":"PORT","secret":false,"value":"3000"}],"image":"blaxel/base-image:latest","memory":4096,"ports":[{"name":"http","protocol":"HTTP","target":3000}],"display_name":"Baseten API review","external_id":"api-review-20260916-001","labels":{"env":"development","project":"api-review","team":"engineering"}} + /// Example: {"lifecycle":{"expiration_policies":[{"action":"DELETE","type":"TTL_IDLE","value":"24h"},{"action":"DELETE","type":"TTL_MAX_AGE","value":"7d"},{"action":"DELETE","type":"DATE","value":"2026-09-23T21:26:58Z"}],"terminated_retention":"24h"},"network":{"proxy":{"allowed_domains":["api.openai.com","pypi.org","files.pythonhosted.org","registry.npmjs.org"],"bypass":["registry.npmjs.org"],"forbidden_domains":["facebook.com","*.facebook.com"],"routing":[{"destinations":["api.openai.com"],"headers":{"Authorization":"Bearer {{SECRET:openai-key}}"},"body":{"user":"baseten-api-review-0916"},"secrets":{"openai-key":"sk-proj-demo-not-a-valid-api-key"}}]},"subnet":"default"},"region":"us-pdx-1","envs":[{"name":"NODE_ENV","secret":false,"value":"production"},{"name":"PORT","secret":false,"value":"3000"}],"image":"baseten/base-image:latest","memory":4096,"ports":[{"name":"http","protocol":"HTTP","target":3000}],"external_id":"api-review-20260916-001","labels":{"env":"development","project":"api-review","team":"engineering"}} ///
#if NET6_0_OR_GREATER public global::Baseten.SandboxConfigurationV1? Configuration { get; init; } @@ -50,7 +50,7 @@ public bool TryPickConfiguration( /// /// Server-managed sandbox fields.
- /// Example: {"name":"baseten-api-review-0916","url":"https://sbx-baseten-api-review-0916-esb1qo.us-pdx-1.b10.run","status":"DEPLOYED","state":"RUNNING","created_at":"2026-09-16T21:26:58.545765901Z","updated_at":"2026-09-16T21:31:13Z","created_by":"sandbox-automation","updated_by":"sandbox-automation","last_used_at":"2026-09-16T21:31:13Z","expires_in":86400} + /// Example: {"name":"baseten-api-review-0916","url":"https://sbx-baseten-api-review-0916-esb1qo.us-pdx-1.b10.run","status":"DEPLOYED","created_at":"2026-09-16T21:26:58.545765901Z","updated_at":"2026-09-16T21:31:13Z","created_by":"sandbox-automation","updated_by":"sandbox-automation","last_used_at":"2026-09-16T21:31:13Z","expires_in":86400} ///
#if NET6_0_OR_GREATER public global::Baseten.SandboxV1Variant2? SandboxV1Variant2 { get; init; } diff --git a/src/libs/Baseten/Generated/Baseten.Models.SandboxV1Variant2.g.cs b/src/libs/Baseten/Generated/Baseten.Models.SandboxV1Variant2.g.cs index 7d4289a1..a1ce6e2c 100644 --- a/src/libs/Baseten/Generated/Baseten.Models.SandboxV1Variant2.g.cs +++ b/src/libs/Baseten/Generated/Baseten.Models.SandboxV1Variant2.g.cs @@ -5,7 +5,7 @@ namespace Baseten { /// /// Server-managed sandbox fields.
- /// Example: {"name":"baseten-api-review-0916","url":"https://sbx-baseten-api-review-0916-esb1qo.us-pdx-1.b10.run","status":"DEPLOYED","state":"RUNNING","created_at":"2026-09-16T21:26:58.545765901Z","updated_at":"2026-09-16T21:31:13Z","created_by":"sandbox-automation","updated_by":"sandbox-automation","last_used_at":"2026-09-16T21:31:13Z","expires_in":86400} + /// Example: {"name":"baseten-api-review-0916","url":"https://sbx-baseten-api-review-0916-esb1qo.us-pdx-1.b10.run","status":"DEPLOYED","created_at":"2026-09-16T21:26:58.545765901Z","updated_at":"2026-09-16T21:31:13Z","created_by":"sandbox-automation","updated_by":"sandbox-automation","last_used_at":"2026-09-16T21:31:13Z","expires_in":86400} ///
public sealed partial class SandboxV1Variant2 { @@ -20,13 +20,14 @@ public sealed partial class SandboxV1Variant2 public string Name { get; set; } = default!; /// - /// Base URL of this sandbox's execution API. Use this exact returned URL; do not reconstruct its hostname. Authenticate requests with the same Authorization: Bearer <api_key> header used to create the sandbox. No additional routing headers are required. Fetch GET {url}/swagger/doc.json with that header for the API reference served by this sandbox. For example, POST {url}/process with Content-Type: application/json and {"command":"echo hello","waitForCompletion":true} executes a command and waits for its result. Execution API fields use camelCase, independently of this API's snake_case fields.
+ /// Base URL of this sandbox's execution API, always present on successful creation. The URL is assigned before deployment completes; inspect status for readiness. Use this exact returned URL; do not reconstruct its hostname. Authenticate requests with your authentication token using Authorization: Bearer <token>. Do not send the Baseten API key directly. No additional routing headers are required. Fetch GET {url}/swagger/doc.json with that header for the API reference served by this sandbox. For example, POST {url}/process with Content-Type: application/json and {"command":"echo hello","waitForCompletion":true} executes a command and waits for its result. Execution API fields use camelCase, independently of this API's snake_case fields.
/// Included only in responses
/// Example: https://sbx-baseten-api-review-0916-esb1qo.us-pdx-1.b10.run ///
+ /// default! /// https://sbx-baseten-api-review-0916-esb1qo.us-pdx-1.b10.run [global::System.Text.Json.Serialization.JsonPropertyName("url")] - public string? Url { get; set; } + public string Url { get; set; } = default!; /// /// Sandbox deployment status.
@@ -38,16 +39,6 @@ public sealed partial class SandboxV1Variant2 [global::System.Text.Json.Serialization.JsonRequired] public required global::Baseten.SandboxStatusV1 Status { get; set; } - /// - /// Current execution state when available.
- /// Included only in responses
- /// Example: RUNNING - ///
- /// RUNNING - [global::System.Text.Json.Serialization.JsonPropertyName("state")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Baseten.JsonConverters.SandboxV1Variant2StateJsonConverter))] - public global::Baseten.SandboxV1Variant2State? State { get; set; } - /// /// Time the sandbox was created.
/// Included only in responses
@@ -116,16 +107,6 @@ public sealed partial class SandboxV1Variant2 /// Sandbox deployment status.
/// Example: DEPLOYED /// - /// - /// Base URL of this sandbox's execution API. Use this exact returned URL; do not reconstruct its hostname. Authenticate requests with the same Authorization: Bearer <api_key> header used to create the sandbox. No additional routing headers are required. Fetch GET {url}/swagger/doc.json with that header for the API reference served by this sandbox. For example, POST {url}/process with Content-Type: application/json and {"command":"echo hello","waitForCompletion":true} executes a command and waits for its result. Execution API fields use camelCase, independently of this API's snake_case fields.
- /// Included only in responses
- /// Example: https://sbx-baseten-api-review-0916-esb1qo.us-pdx-1.b10.run - /// - /// - /// Current execution state when available.
- /// Included only in responses
- /// Example: RUNNING - /// /// /// Time the sandbox was last updated.
/// Included only in responses
@@ -156,6 +137,11 @@ public sealed partial class SandboxV1Variant2 /// Included only in responses
/// Example: baseten-api-review-0916 /// + /// + /// Base URL of this sandbox's execution API, always present on successful creation. The URL is assigned before deployment completes; inspect status for readiness. Use this exact returned URL; do not reconstruct its hostname. Authenticate requests with your authentication token using Authorization: Bearer <token>. Do not send the Baseten API key directly. No additional routing headers are required. Fetch GET {url}/swagger/doc.json with that header for the API reference served by this sandbox. For example, POST {url}/process with Content-Type: application/json and {"command":"echo hello","waitForCompletion":true} executes a command and waits for its result. Execution API fields use camelCase, independently of this API's snake_case fields.
+ /// Included only in responses
+ /// Example: https://sbx-baseten-api-review-0916-esb1qo.us-pdx-1.b10.run + /// /// /// Time the sandbox was created.
/// Included only in responses
@@ -166,20 +152,18 @@ public sealed partial class SandboxV1Variant2 #endif public SandboxV1Variant2( global::Baseten.SandboxStatusV1 status, - string? url, - global::Baseten.SandboxV1Variant2State? state, global::System.DateTime? updatedAt, string? createdBy, string? updatedBy, global::System.DateTime? lastUsedAt, int? expiresIn, string name = default!, + string url = default!, global::System.DateTime createdAt = default!) { this.Name = name; this.Url = url; this.Status = status; - this.State = state; this.CreatedAt = createdAt; this.UpdatedAt = updatedAt; this.CreatedBy = createdBy; diff --git a/src/libs/Baseten/Generated/Baseten.Models.UpdateSandboxRequestV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.UpdateSandboxRequestV1.g.cs index 44fdc364..0c187f40 100644 --- a/src/libs/Baseten/Generated/Baseten.Models.UpdateSandboxRequestV1.g.cs +++ b/src/libs/Baseten/Generated/Baseten.Models.UpdateSandboxRequestV1.g.cs @@ -4,19 +4,11 @@ namespace Baseten { /// - /// Partial sandbox update. Omitted fields remain unchanged. Supplied arrays and maps (including labels) replace their previous values; supplied structured objects update only their supplied fields. Null is not accepted. The name, memory, and network configuration are immutable after creation. Supplying memory or network returns 400, including unchanged, empty, or null values.
- /// Example: {"enabled":true,"lifecycle":{"expiration_policies":[{"action":"DELETE","type":"TTL_IDLE","value":"24h"},{"action":"DELETE","type":"TTL_MAX_AGE","value":"7d"},{"action":"DELETE","type":"DATE","value":"2026-09-23T21:26:58Z"}],"terminated_retention":"24h"},"region":"us-pdx-1","envs":[{"name":"NODE_ENV","secret":false,"value":"production"},{"name":"PORT","secret":false,"value":"3000"}],"image":"blaxel/base-image:latest","ports":[{"name":"http","protocol":"HTTP","target":3000}],"display_name":"Baseten API review - revised","external_id":"api-review-20260916-001","labels":{"env":"development","project":"api-review","team":"engineering","revision":"2"}} + /// Partial sandbox update. Omitted fields remain unchanged. Supplied arrays and maps (including labels) replace their previous values; supplied structured objects update only their supplied fields. Null is not accepted. The name, memory, network, region, image, and ports are immutable after creation. Supplying any of these fields returns 400, including unchanged, empty, or null values.
+ /// Example: {"lifecycle":{"expiration_policies":[{"action":"DELETE","type":"TTL_IDLE","value":"24h"},{"action":"DELETE","type":"TTL_MAX_AGE","value":"7d"},{"action":"DELETE","type":"DATE","value":"2026-09-23T21:26:58Z"}],"terminated_retention":"24h"},"envs":[{"name":"NODE_ENV","secret":false,"value":"production"},{"name":"PORT","secret":false,"value":"3000"}],"external_id":"api-review-20260916-001","labels":{"env":"development","project":"api-review","team":"engineering","revision":"2"}} ///
public sealed partial class UpdateSandboxRequestV1 { - /// - /// When false, the sandbox is disabled and will not accept connections
- /// Example: true - ///
- /// true - [global::System.Text.Json.Serialization.JsonPropertyName("enabled")] - public bool? Enabled { get; set; } - /// /// Lifecycle configuration controlling automatic sandbox deletion based on idle time, max age, or specific dates
/// Example: {"expiration_policies":[{"action":"DELETE","type":"TTL_IDLE","value":"24h"},{"action":"DELETE","type":"TTL_MAX_AGE","value":"7d"},{"action":"DELETE","type":"DATE","value":"2026-09-23T21:26:58Z"}],"terminated_retention":"24h"} @@ -25,14 +17,6 @@ public sealed partial class UpdateSandboxRequestV1 [global::System.Text.Json.Serialization.JsonPropertyName("lifecycle")] public global::Baseten.SandboxLifecycleV1? Lifecycle { get; set; } - /// - /// Region where the sandbox runs (for example us-pdx-1 or eu-lon-1). When omitted at creation, the closest region is selected.
- /// Example: us-pdx-1 - ///
- /// us-pdx-1 - [global::System.Text.Json.Serialization.JsonPropertyName("region")] - public string? Region { get; set; } - /// /// Environment variables injected into the sandbox.
/// Example: [{"name":"NODE_ENV","secret":false,"value":"production"}, {"name":"PORT","secret":false,"value":"3000"}] @@ -41,30 +25,6 @@ public sealed partial class UpdateSandboxRequestV1 [global::System.Text.Json.Serialization.JsonPropertyName("envs")] public global::System.Collections.Generic.IList? Envs { get; set; } - /// - /// Image reference including its tag. Use blaxel/base-image:latest to get started with the built-in sandbox execution API. This image is available directly without building, pushing, or listing images through GET /v1/sandboxes/images.
- /// Example: blaxel/base-image:latest - ///
- /// blaxel/base-image:latest - [global::System.Text.Json.Serialization.JsonPropertyName("image")] - public string? Image { get; set; } - - /// - /// Set of ports for a resource
- /// Example: [{"name":"http","protocol":"HTTP","target":3000}] - ///
- /// [{"name":"http","protocol":"HTTP","target":3000}] - [global::System.Text.Json.Serialization.JsonPropertyName("ports")] - public global::System.Collections.Generic.IList? Ports { get; set; } - - /// - /// Human-readable name for display in the UI. Can contain spaces and special characters, max 63 characters.
- /// Example: Baseten API review - revised - ///
- /// Baseten API review - revised - [global::System.Text.Json.Serialization.JsonPropertyName("display_name")] - public string? DisplayName { get; set; } - /// /// Caller-owned identifier for external lookups. Max 64 chars, alphanumeric + dash.
/// Example: api-review-20260916-001 @@ -90,34 +50,14 @@ public sealed partial class UpdateSandboxRequestV1 /// /// Initializes a new instance of the class. /// - /// - /// When false, the sandbox is disabled and will not accept connections
- /// Example: true - /// /// /// Lifecycle configuration controlling automatic sandbox deletion based on idle time, max age, or specific dates
/// Example: {"expiration_policies":[{"action":"DELETE","type":"TTL_IDLE","value":"24h"},{"action":"DELETE","type":"TTL_MAX_AGE","value":"7d"},{"action":"DELETE","type":"DATE","value":"2026-09-23T21:26:58Z"}],"terminated_retention":"24h"} /// - /// - /// Region where the sandbox runs (for example us-pdx-1 or eu-lon-1). When omitted at creation, the closest region is selected.
- /// Example: us-pdx-1 - /// /// /// Environment variables injected into the sandbox.
/// Example: [{"name":"NODE_ENV","secret":false,"value":"production"}, {"name":"PORT","secret":false,"value":"3000"}] /// - /// - /// Image reference including its tag. Use blaxel/base-image:latest to get started with the built-in sandbox execution API. This image is available directly without building, pushing, or listing images through GET /v1/sandboxes/images.
- /// Example: blaxel/base-image:latest - /// - /// - /// Set of ports for a resource
- /// Example: [{"name":"http","protocol":"HTTP","target":3000}] - /// - /// - /// Human-readable name for display in the UI. Can contain spaces and special characters, max 63 characters.
- /// Example: Baseten API review - revised - /// /// /// Caller-owned identifier for external lookups. Max 64 chars, alphanumeric + dash.
/// Example: api-review-20260916-001 @@ -130,23 +70,13 @@ public sealed partial class UpdateSandboxRequestV1 [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public UpdateSandboxRequestV1( - bool? enabled, global::Baseten.SandboxLifecycleV1? lifecycle, - string? region, global::System.Collections.Generic.IList? envs, - string? image, - global::System.Collections.Generic.IList? ports, - string? displayName, string? externalId, global::System.Collections.Generic.Dictionary? labels) { - this.Enabled = enabled; this.Lifecycle = lifecycle; - this.Region = region; this.Envs = envs; - this.Image = image; - this.Ports = ports; - this.DisplayName = displayName; this.ExternalId = externalId; this.Labels = labels; } diff --git a/src/libs/Baseten/Generated/Baseten.Sandboxes.JsonSerializerContext.g.cs b/src/libs/Baseten/Generated/Baseten.Sandboxes.JsonSerializerContext.g.cs index 42fe5043..db702826 100644 --- a/src/libs/Baseten/Generated/Baseten.Sandboxes.JsonSerializerContext.g.cs +++ b/src/libs/Baseten/Generated/Baseten.Sandboxes.JsonSerializerContext.g.cs @@ -15,10 +15,22 @@ namespace Baseten [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Text.Json.JsonElement?))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(object))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.DateTime))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(int))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(long))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(double))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.GetSandboxConfigurationResponseV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxRegionV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxRegionV1InfoGeneration), TypeInfoPropertyName = "SandboxRegionV1InfoGeneration2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxLogsV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxLogEntryV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxMetricsV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxMetricsPointV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxLifecycleV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxExpirationPolicyV1), TypeInfoPropertyName = "SandboxExpirationPolicyV12")] @@ -48,13 +60,14 @@ namespace Baseten [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxV1), TypeInfoPropertyName = "SandboxV12")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxV1Variant2))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxStatusV1), TypeInfoPropertyName = "SandboxStatusV12")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxV1Variant2State), TypeInfoPropertyName = "SandboxV1Variant2State2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxApiPaginationV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.ListSandboxesResponseV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool?))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(int?))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(long?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(double?))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxRegionV1InfoGeneration?), TypeInfoPropertyName = "NullableSandboxRegionV1InfoGeneration2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxExpirationPolicyV1?), TypeInfoPropertyName = "NullableSandboxExpirationPolicyV12")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxExpirationPolicyV1DiscriminatorType?), TypeInfoPropertyName = "NullableSandboxExpirationPolicyV1DiscriminatorType2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxTTLIdleExpirationPolicyV1Action?), TypeInfoPropertyName = "NullableSandboxTTLIdleExpirationPolicyV1Action2")] @@ -66,8 +79,10 @@ namespace Baseten [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxPortV1Protocol?), TypeInfoPropertyName = "NullableSandboxPortV1Protocol2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxV1?), TypeInfoPropertyName = "NullableSandboxV12")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxStatusV1?), TypeInfoPropertyName = "NullableSandboxStatusV12")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxV1Variant2State?), TypeInfoPropertyName = "NullableSandboxV1Variant2State2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] @@ -165,7 +180,11 @@ private sealed class LazyEnumJsonConverterFactory : global::System.Text.Json.Ser public override bool CanConvert(global::System.Type typeToConvert) { return - typeToConvert == typeof(global::Baseten.SandboxExpirationPolicyV1DiscriminatorType) + typeToConvert == typeof(global::Baseten.SandboxRegionV1InfoGeneration) + + || typeToConvert == typeof(global::Baseten.SandboxRegionV1InfoGeneration?) + + || typeToConvert == typeof(global::Baseten.SandboxExpirationPolicyV1DiscriminatorType) || typeToConvert == typeof(global::Baseten.SandboxExpirationPolicyV1DiscriminatorType?) @@ -197,10 +216,6 @@ public override bool CanConvert(global::System.Type typeToConvert) || typeToConvert == typeof(global::Baseten.SandboxPortV1Protocol?) - || typeToConvert == typeof(global::Baseten.SandboxV1Variant2State) - - || typeToConvert == typeof(global::Baseten.SandboxV1Variant2State?) - || typeToConvert == typeof(global::Baseten.SandboxStatusV1) || typeToConvert == typeof(global::Baseten.SandboxStatusV1?); @@ -210,6 +225,16 @@ public override bool CanConvert(global::System.Type typeToConvert) global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) { + if (typeToConvert == typeof(global::Baseten.SandboxRegionV1InfoGeneration)) + { + return new global::Baseten.JsonConverters.SandboxRegionV1InfoGenerationJsonConverter(); + } + + if (typeToConvert == typeof(global::Baseten.SandboxRegionV1InfoGeneration?)) + { + return new global::Baseten.JsonConverters.SandboxRegionV1InfoGenerationNullableJsonConverter(); + } + if (typeToConvert == typeof(global::Baseten.SandboxExpirationPolicyV1DiscriminatorType)) { return new global::Baseten.JsonConverters.SandboxExpirationPolicyV1DiscriminatorTypeJsonConverter(); @@ -290,16 +315,6 @@ public override bool CanConvert(global::System.Type typeToConvert) return new global::Baseten.JsonConverters.SandboxPortV1ProtocolNullableJsonConverter(); } - if (typeToConvert == typeof(global::Baseten.SandboxV1Variant2State)) - { - return new global::Baseten.JsonConverters.SandboxV1Variant2StateJsonConverter(); - } - - if (typeToConvert == typeof(global::Baseten.SandboxV1Variant2State?)) - { - return new global::Baseten.JsonConverters.SandboxV1Variant2StateNullableJsonConverter(); - } - if (typeToConvert == typeof(global::Baseten.SandboxStatusV1)) { return new global::Baseten.JsonConverters.SandboxStatusV1JsonConverter(); diff --git a/src/libs/Baseten/Generated/Baseten.SandboxesClient.CreateSandbox.g.cs b/src/libs/Baseten/Generated/Baseten.SandboxesClient.CreateSandbox.g.cs index 8673f603..93e3fe16 100644 --- a/src/libs/Baseten/Generated/Baseten.SandboxesClient.CreateSandbox.g.cs +++ b/src/libs/Baseten/Generated/Baseten.SandboxesClient.CreateSandbox.g.cs @@ -47,7 +47,7 @@ partial void ProcessCreateSandboxResponseContent( /// /// Create a sandbox
- /// Create a sandbox with an optional client-provided name, generated by the server when omitted. The request waits briefly for deployment, then returns the created resource. Deployment may continue after the response; inspect status to determine readiness. Names belonging to failed or terminated sandboxes can be reused; an active sandbox reserves its name. To get started, set image to blaxel/base-image:latest, the built-in image with the sandbox execution API ready to use. It is available directly; no image build, push, or GET /v1/sandboxes/images is needed. Use the returned url to execute commands with the same Bearer API key. + /// Create a sandbox with an optional client-provided name, generated by the server when omitted. The request waits briefly for deployment, then returns the created resource. Deployment may continue after the response; inspect status to determine readiness. Names belonging to failed or terminated sandboxes can be reused; an active sandbox reserves its name. Every field is optional. The server applies image and memory defaults; SDKs should omit fields the caller did not set. A request with no body creates a sandbox from baseten/base-image:latest, the built-in image with the sandbox execution API ready to use, with 4096 MB of memory. It is available directly; no image build, push, or GET /v1/sandboxes/images is needed. Use the returned url to execute commands with your authentication token as a Bearer token, not your Baseten API key. ///
/// /// @@ -76,7 +76,7 @@ partial void ProcessCreateSandboxResponseContent( } /// /// Create a sandbox
- /// Create a sandbox with an optional client-provided name, generated by the server when omitted. The request waits briefly for deployment, then returns the created resource. Deployment may continue after the response; inspect status to determine readiness. Names belonging to failed or terminated sandboxes can be reused; an active sandbox reserves its name. To get started, set image to blaxel/base-image:latest, the built-in image with the sandbox execution API ready to use. It is available directly; no image build, push, or GET /v1/sandboxes/images is needed. Use the returned url to execute commands with the same Bearer API key. + /// Create a sandbox with an optional client-provided name, generated by the server when omitted. The request waits briefly for deployment, then returns the created resource. Deployment may continue after the response; inspect status to determine readiness. Names belonging to failed or terminated sandboxes can be reused; an active sandbox reserves its name. Every field is optional. The server applies image and memory defaults; SDKs should omit fields the caller did not set. A request with no body creates a sandbox from baseten/base-image:latest, the built-in image with the sandbox execution API ready to use, with 4096 MB of memory. It is available directly; no image build, push, or GET /v1/sandboxes/images is needed. Use the returned url to execute commands with your authentication token as a Bearer token, not your Baseten API key. ///
/// /// @@ -654,10 +654,13 @@ partial void ProcessCreateSandboxResponseContent( } /// /// Create a sandbox
- /// Create a sandbox with an optional client-provided name, generated by the server when omitted. The request waits briefly for deployment, then returns the created resource. Deployment may continue after the response; inspect status to determine readiness. Names belonging to failed or terminated sandboxes can be reused; an active sandbox reserves its name. To get started, set image to blaxel/base-image:latest, the built-in image with the sandbox execution API ready to use. It is available directly; no image build, push, or GET /v1/sandboxes/images is needed. Use the returned url to execute commands with the same Bearer API key. + /// Create a sandbox with an optional client-provided name, generated by the server when omitted. The request waits briefly for deployment, then returns the created resource. Deployment may continue after the response; inspect status to determine readiness. Names belonging to failed or terminated sandboxes can be reused; an active sandbox reserves its name. Every field is optional. The server applies image and memory defaults; SDKs should omit fields the caller did not set. A request with no body creates a sandbox from baseten/base-image:latest, the built-in image with the sandbox execution API ready to use, with 4096 MB of memory. It is available directly; no image build, push, or GET /v1/sandboxes/images is needed. Use the returned url to execute commands with your authentication token as a Bearer token, not your Baseten API key. ///
/// /// + /// + /// When true, return the existing live sandbox with this name or recreate it if it is failed, terminated, or being deleted. The server handles concurrent creation and deletion races with a bounded wait; persistent contention returns a conflict. Requires name. Existing configuration is preserved. Defaults to false when omitted. + /// /// /// Optional unique sandbox name. Generated by the server when omitted; immutable after creation.
/// Example: baseten-api-review-0916 @@ -679,21 +682,19 @@ partial void ProcessCreateSandboxResponseContent( /// Example: [{"name":"NODE_ENV","secret":false,"value":"production"}, {"name":"PORT","secret":false,"value":"3000"}] /// /// - /// Image reference including its tag. Use blaxel/base-image:latest to get started with the built-in sandbox execution API. This image is available directly without building, pushing, or listing images through GET /v1/sandboxes/images.
- /// Example: blaxel/base-image:latest + /// Image reference including its tag. Defaults to baseten/base-image:latest, the built-in sandbox execution API. This image is available directly without building, pushing, or listing images through GET /v1/sandboxes/images.
+ /// Default Value: baseten/base-image:latest
+ /// Example: baseten/base-image:latest /// /// - /// Memory allocation in megabytes. Also determines CPU allocation (CPU cores = memory in MB / 2048, e.g., 4096MB = 2 CPUs).
+ /// Memory allocation in megabytes. Also determines CPU allocation (CPU cores = memory in MB / 2048, e.g., 4096MB = 2 CPUs). Defaults to 4096.
+ /// Default Value: 4096
/// Example: 4096 /// /// /// Set of ports for a resource
/// Example: [{"name":"http","protocol":"HTTP","target":3000}] /// - /// - /// Human-readable name for display in the UI. Can contain spaces and special characters, max 63 characters.
- /// Example: Baseten API review - /// /// /// Caller-owned identifier for external lookups. Max 64 chars, alphanumeric + dash.
/// Example: api-review-20260916-001 @@ -708,6 +709,7 @@ partial void ProcessCreateSandboxResponseContent( public async global::System.Threading.Tasks.Task CreateSandboxAsync( string? teamId = default, string? xTeamId = default, + bool? createIfNotExists = default, string? name = default, global::Baseten.SandboxLifecycleV1? lifecycle = default, global::Baseten.SandboxNetworkV1? network = default, @@ -716,7 +718,6 @@ partial void ProcessCreateSandboxResponseContent( string? image = default, long? memory = default, global::System.Collections.Generic.IList? ports = default, - string? displayName = default, string? externalId = default, global::System.Collections.Generic.Dictionary? labels = default, global::Baseten.AutoSDKRequestOptions? requestOptions = default, @@ -724,6 +725,7 @@ partial void ProcessCreateSandboxResponseContent( { var __request = new global::Baseten.CreateSandboxRequestV1 { + CreateIfNotExists = createIfNotExists, Name = name, Lifecycle = lifecycle, Network = network, @@ -732,7 +734,6 @@ partial void ProcessCreateSandboxResponseContent( Image = image, Memory = memory, Ports = ports, - DisplayName = displayName, ExternalId = externalId, Labels = labels, }; diff --git a/src/libs/Baseten/Generated/Baseten.SandboxesClient.GetSandbox.g.cs b/src/libs/Baseten/Generated/Baseten.SandboxesClient.GetSandbox.g.cs index 5fb22d2b..c822f8a8 100644 --- a/src/libs/Baseten/Generated/Baseten.SandboxesClient.GetSandbox.g.cs +++ b/src/libs/Baseten/Generated/Baseten.SandboxesClient.GetSandbox.g.cs @@ -29,12 +29,14 @@ partial void PrepareGetSandboxArguments( global::System.Net.Http.HttpClient httpClient, ref string? teamId, ref string? xTeamId, + ref bool? showSecrets, ref string sandboxName); partial void PrepareGetSandboxRequest( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpRequestMessage httpRequestMessage, string? teamId, string? xTeamId, + bool? showSecrets, string sandboxName); partial void ProcessGetSandboxResponse( global::System.Net.Http.HttpClient httpClient, @@ -47,10 +49,13 @@ partial void ProcessGetSandboxResponseContent( /// /// Get a sandbox
- /// Return the sandbox configuration and current state. + /// Return the sandbox configuration and status. ///
/// /// + /// + /// Default Value: false + /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with @@ -59,6 +64,7 @@ partial void ProcessGetSandboxResponseContent( string sandboxName, string? teamId = default, string? xTeamId = default, + bool? showSecrets = default, global::Baseten.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) { @@ -66,6 +72,7 @@ partial void ProcessGetSandboxResponseContent( sandboxName: sandboxName, teamId: teamId, xTeamId: xTeamId, + showSecrets: showSecrets, requestOptions: requestOptions, cancellationToken: cancellationToken ).ConfigureAwait(false); @@ -74,10 +81,13 @@ partial void ProcessGetSandboxResponseContent( } /// /// Get a sandbox
- /// Return the sandbox configuration and current state. + /// Return the sandbox configuration and status. ///
/// /// + /// + /// Default Value: false + /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with @@ -86,6 +96,7 @@ partial void ProcessGetSandboxResponseContent( string sandboxName, string? teamId = default, string? xTeamId = default, + bool? showSecrets = default, global::Baseten.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) { @@ -95,6 +106,7 @@ partial void ProcessGetSandboxResponseContent( httpClient: HttpClient, teamId: ref teamId, xTeamId: ref xTeamId, + showSecrets: ref showSecrets, sandboxName: ref sandboxName); @@ -125,6 +137,7 @@ partial void ProcessGetSandboxResponseContent( baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("team_id", teamId) + .AddOptionalParameter("show_secrets", showSecrets?.ToString().ToLowerInvariant()) ; var __path = __pathBuilder.ToString(); __path = global::Baseten.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -174,6 +187,7 @@ partial void ProcessGetSandboxResponseContent( httpRequestMessage: __httpRequest, teamId: teamId, xTeamId: xTeamId, + showSecrets: showSecrets, sandboxName: sandboxName); return __httpRequest; diff --git a/src/libs/Baseten/Generated/Baseten.SandboxesClient.GetSandboxConfiguration.g.cs b/src/libs/Baseten/Generated/Baseten.SandboxesClient.GetSandboxConfiguration.g.cs new file mode 100644 index 00000000..04212b51 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.SandboxesClient.GetSandboxConfiguration.g.cs @@ -0,0 +1,577 @@ + +#nullable enable + +namespace Baseten +{ + public partial class SandboxesClient + { + + + private static readonly global::Baseten.EndPointSecurityRequirement s_GetSandboxConfigurationSecurityRequirement0 = + 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_GetSandboxConfigurationSecurityRequirements = + new global::Baseten.EndPointSecurityRequirement[] + { s_GetSandboxConfigurationSecurityRequirement0, + }; + partial void PrepareGetSandboxConfigurationArguments( + global::System.Net.Http.HttpClient httpClient); + partial void PrepareGetSandboxConfigurationRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage); + partial void ProcessGetSandboxConfigurationResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessGetSandboxConfigurationResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Get sandbox configuration
+ /// Return available Carbon-compatible sandbox regions. Configuration is the same for every team, so no team is selected. Only enabled regions supporting Carbon are returned. This describes regional capability, not the runtime selected for a particular team or sandbox. Region configuration is cached for up to 30 seconds. + ///
+ /// 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 GetSandboxConfigurationAsync( + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetSandboxConfigurationAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get sandbox configuration
+ /// Return available Carbon-compatible sandbox regions. Configuration is the same for every team, so no team is selected. Only enabled regions supporting Carbon are returned. This describes regional capability, not the runtime selected for a particular team or sandbox. Region configuration is cached for up to 30 seconds. + ///
+ /// 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> GetSandboxConfigurationAsResponseAsync( + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareGetSandboxConfigurationArguments( + httpClient: HttpClient); + + + var __authorizations = global::Baseten.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_GetSandboxConfigurationSecurityRequirements, + operationName: "GetSandboxConfigurationAsync"); + + 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/sandboxes/configuration", + 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.Get, + 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); + PrepareGetSandboxConfigurationRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest); + + 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: "GetSandboxConfiguration", + methodName: "GetSandboxConfigurationAsync", + pathTemplate: "\"/v1/sandboxes/configuration\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), + 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: "GetSandboxConfiguration", + methodName: "GetSandboxConfigurationAsync", + pathTemplate: "\"/v1/sandboxes/configuration\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), + 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: "GetSandboxConfiguration", + methodName: "GetSandboxConfigurationAsync", + pathTemplate: "\"/v1/sandboxes/configuration\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), + 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); + ProcessGetSandboxConfigurationResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Baseten.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Baseten.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "GetSandboxConfiguration", + methodName: "GetSandboxConfigurationAsync", + pathTemplate: "\"/v1/sandboxes/configuration\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), + 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: "GetSandboxConfiguration", + methodName: "GetSandboxConfigurationAsync", + pathTemplate: "\"/v1/sandboxes/configuration\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), + 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); + } + // Invalid request. Returns a JSON error with code, message, and optional details. + if ((int)__response.StatusCode == 400) + { + string? __content_400 = null; + global::System.Exception? __exception_400 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + else + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + } + catch (global::System.Exception __ex) + { + __exception_400 = __ex; + } + + + throw global::Baseten.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_400, + responseBody: __content_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Missing or invalid authentication. Returns a JSON error with code, message, and optional details. + if ((int)__response.StatusCode == 401) + { + string? __content_401 = null; + global::System.Exception? __exception_401 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + else + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + } + catch (global::System.Exception __ex) + { + __exception_401 = __ex; + } + + + throw global::Baseten.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_401, + responseBody: __content_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Insufficient permissions. Returns a JSON error with code, message, and optional details. + if ((int)__response.StatusCode == 403) + { + string? __content_403 = null; + global::System.Exception? __exception_403 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + else + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + } + catch (global::System.Exception __ex) + { + __exception_403 = __ex; + } + + + throw global::Baseten.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_403, + responseBody: __content_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Request limit exceeded. Returns a JSON error with code, message, and optional details. + if ((int)__response.StatusCode == 429) + { + string? __content_429 = null; + global::System.Exception? __exception_429 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_429 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + else + { + __content_429 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + } + catch (global::System.Exception __ex) + { + __exception_429 = __ex; + } + + + throw global::Baseten.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_429 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_429, + responseBody: __content_429, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Internal server error. Returns a JSON error with code, message, and optional details. + if ((int)__response.StatusCode == 500) + { + string? __content_500 = null; + global::System.Exception? __exception_500 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + else + { + __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + } + catch (global::System.Exception __ex) + { + __exception_500 = __ex; + } + + + throw global::Baseten.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_500, + responseBody: __content_500, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessGetSandboxConfigurationResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Baseten.GetSandboxConfigurationResponseV1.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 global::Baseten.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + 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.GetSandboxConfigurationResponseV1.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 global::Baseten.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + 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.SandboxesClient.GetSandboxLogs.g.cs b/src/libs/Baseten/Generated/Baseten.SandboxesClient.GetSandboxLogs.g.cs new file mode 100644 index 00000000..ba83be2d --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.SandboxesClient.GetSandboxLogs.g.cs @@ -0,0 +1,699 @@ + +#nullable enable + +namespace Baseten +{ + public partial class SandboxesClient + { + + + private static readonly global::Baseten.EndPointSecurityRequirement s_GetSandboxLogsSecurityRequirement0 = + 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_GetSandboxLogsSecurityRequirements = + new global::Baseten.EndPointSecurityRequirement[] + { s_GetSandboxLogsSecurityRequirement0, + }; + partial void PrepareGetSandboxLogsArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? teamId, + ref string? xTeamId, + ref string sandboxName, + ref global::System.DateTime startTime, + ref global::System.DateTime endTime, + ref int? limit, + ref string? cursor); + partial void PrepareGetSandboxLogsRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? teamId, + string? xTeamId, + string sandboxName, + global::System.DateTime startTime, + global::System.DateTime endTime, + int? limit, + string? cursor); + partial void ProcessGetSandboxLogsResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessGetSandboxLogsResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Get sandbox logs
+ /// Returns sandbox runtime logs, newest first, within the half-open range
+ /// [start_time, end_time). Ranges are limited to 7 days. Follow next_cursor
+ /// until it is null to retrieve all pages, keeping the same range and limit.
+ /// Logs before sandbox creation are excluded. Unavailable telemetry returns an error. + ///
+ /// + /// + /// + /// Example: baseten-api-review-0916 + /// + /// + /// + /// + /// Default Value: 100 + /// + /// + /// 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 GetSandboxLogsAsync( + string sandboxName, + global::System.DateTime startTime, + global::System.DateTime endTime, + string? teamId = default, + string? xTeamId = default, + int? limit = default, + string? cursor = default, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetSandboxLogsAsResponseAsync( + sandboxName: sandboxName, + startTime: startTime, + endTime: endTime, + teamId: teamId, + xTeamId: xTeamId, + limit: limit, + cursor: cursor, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get sandbox logs
+ /// Returns sandbox runtime logs, newest first, within the half-open range
+ /// [start_time, end_time). Ranges are limited to 7 days. Follow next_cursor
+ /// until it is null to retrieve all pages, keeping the same range and limit.
+ /// Logs before sandbox creation are excluded. Unavailable telemetry returns an error. + ///
+ /// + /// + /// + /// Example: baseten-api-review-0916 + /// + /// + /// + /// + /// Default Value: 100 + /// + /// + /// 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> GetSandboxLogsAsResponseAsync( + string sandboxName, + global::System.DateTime startTime, + global::System.DateTime endTime, + string? teamId = default, + string? xTeamId = default, + int? limit = default, + string? cursor = default, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareGetSandboxLogsArguments( + httpClient: HttpClient, + teamId: ref teamId, + xTeamId: ref xTeamId, + sandboxName: ref sandboxName, + startTime: ref startTime, + endTime: ref endTime, + limit: ref limit, + cursor: ref cursor); + + + var __authorizations = global::Baseten.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_GetSandboxLogsSecurityRequirements, + operationName: "GetSandboxLogsAsync"); + + 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/sandboxes/instances/{sandboxName}/logs", + baseUri: HttpClient.BaseAddress); + __pathBuilder + .AddOptionalParameter("team_id", teamId) + .AddRequiredParameter("start_time", startTime.ToString("yyyy-MM-ddTHH:mm:ssZ")) + .AddRequiredParameter("end_time", endTime.ToString("yyyy-MM-ddTHH:mm:ssZ")) + .AddOptionalParameter("limit", limit?.ToString()) + .AddOptionalParameter("cursor", cursor) + ; + 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.Get, + 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); + } + } + + if (xTeamId != default) + { + __httpRequest.Headers.TryAddWithoutValidation("X-Team-Id", xTeamId.ToString()); + } + + global::Baseten.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareGetSandboxLogsRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + teamId: teamId, + xTeamId: xTeamId, + sandboxName: sandboxName, + startTime: startTime, + endTime: endTime, + limit: limit, + cursor: cursor); + + 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: "GetSandboxLogs", + methodName: "GetSandboxLogsAsync", + pathTemplate: "$\"/v1/sandboxes/instances/{sandboxName}/logs\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), + 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: "GetSandboxLogs", + methodName: "GetSandboxLogsAsync", + pathTemplate: "$\"/v1/sandboxes/instances/{sandboxName}/logs\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), + 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: "GetSandboxLogs", + methodName: "GetSandboxLogsAsync", + pathTemplate: "$\"/v1/sandboxes/instances/{sandboxName}/logs\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), + 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); + ProcessGetSandboxLogsResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Baseten.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Baseten.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "GetSandboxLogs", + methodName: "GetSandboxLogsAsync", + pathTemplate: "$\"/v1/sandboxes/instances/{sandboxName}/logs\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), + 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: "GetSandboxLogs", + methodName: "GetSandboxLogsAsync", + pathTemplate: "$\"/v1/sandboxes/instances/{sandboxName}/logs\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), + 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 ((int)__response.StatusCode == 400) + { + string? __content_400 = null; + global::System.Exception? __exception_400 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + else + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + } + catch (global::System.Exception __ex) + { + __exception_400 = __ex; + } + + + throw global::Baseten.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_400, + responseBody: __content_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // + if ((int)__response.StatusCode == 401) + { + string? __content_401 = null; + global::System.Exception? __exception_401 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + else + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + } + catch (global::System.Exception __ex) + { + __exception_401 = __ex; + } + + + throw global::Baseten.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_401, + responseBody: __content_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // + if ((int)__response.StatusCode == 403) + { + string? __content_403 = null; + global::System.Exception? __exception_403 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + else + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + } + catch (global::System.Exception __ex) + { + __exception_403 = __ex; + } + + + throw global::Baseten.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_403, + responseBody: __content_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::System.Exception? __exception_404 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + else + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + } + catch (global::System.Exception __ex) + { + __exception_404 = __ex; + } + + + throw global::Baseten.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_404, + responseBody: __content_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // + if ((int)__response.StatusCode == 502) + { + string? __content_502 = null; + global::System.Exception? __exception_502 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_502 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + else + { + __content_502 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + } + catch (global::System.Exception __ex) + { + __exception_502 = __ex; + } + + + throw global::Baseten.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_502 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_502, + responseBody: __content_502, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // + if ((int)__response.StatusCode == 503) + { + string? __content_503 = null; + global::System.Exception? __exception_503 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_503 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + else + { + __content_503 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + } + catch (global::System.Exception __ex) + { + __exception_503 = __ex; + } + + + throw global::Baseten.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_503 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_503, + responseBody: __content_503, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessGetSandboxLogsResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Baseten.SandboxLogsV1.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 global::Baseten.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + 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.SandboxLogsV1.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 global::Baseten.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + 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.SandboxesClient.GetSandboxMetrics.g.cs b/src/libs/Baseten/Generated/Baseten.SandboxesClient.GetSandboxMetrics.g.cs new file mode 100644 index 00000000..4eeb3742 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.SandboxesClient.GetSandboxMetrics.g.cs @@ -0,0 +1,691 @@ + +#nullable enable + +namespace Baseten +{ + public partial class SandboxesClient + { + + + private static readonly global::Baseten.EndPointSecurityRequirement s_GetSandboxMetricsSecurityRequirement0 = + 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_GetSandboxMetricsSecurityRequirements = + new global::Baseten.EndPointSecurityRequirement[] + { s_GetSandboxMetricsSecurityRequirement0, + }; + partial void PrepareGetSandboxMetricsArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? teamId, + ref string? xTeamId, + ref string sandboxName, + ref global::System.DateTime startTime, + ref global::System.DateTime endTime, + ref int intervalSeconds); + partial void PrepareGetSandboxMetricsRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? teamId, + string? xTeamId, + string sandboxName, + global::System.DateTime startTime, + global::System.DateTime endTime, + int intervalSeconds); + partial void ProcessGetSandboxMetricsResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessGetSandboxMetricsResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Get sandbox metrics
+ /// Returns every interval in the requested half-open range [start_time, end_time).
+ /// Buckets align to UTC interval boundaries; partial boundary buckets include only samples
+ /// within the requested range. The first bucket may start before start_time. Ranges are limited to 31 days
+ /// and 10000 buckets. Request counts are zero when there is no traffic, and null
+ /// for buckets entirely before sandbox creation. CPU and memory are null without
+ /// samples, including standby. Error rate is the fraction of requests returning
+ /// 4xx or 5xx, null when there are no requests. Telemetry failures return an error. + ///
+ /// + /// + /// + /// Example: baseten-api-review-0916 + /// + /// + /// + /// + /// 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 GetSandboxMetricsAsync( + string sandboxName, + global::System.DateTime startTime, + global::System.DateTime endTime, + int intervalSeconds, + string? teamId = default, + string? xTeamId = default, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetSandboxMetricsAsResponseAsync( + sandboxName: sandboxName, + startTime: startTime, + endTime: endTime, + intervalSeconds: intervalSeconds, + teamId: teamId, + xTeamId: xTeamId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get sandbox metrics
+ /// Returns every interval in the requested half-open range [start_time, end_time).
+ /// Buckets align to UTC interval boundaries; partial boundary buckets include only samples
+ /// within the requested range. The first bucket may start before start_time. Ranges are limited to 31 days
+ /// and 10000 buckets. Request counts are zero when there is no traffic, and null
+ /// for buckets entirely before sandbox creation. CPU and memory are null without
+ /// samples, including standby. Error rate is the fraction of requests returning
+ /// 4xx or 5xx, null when there are no requests. Telemetry failures return an error. + ///
+ /// + /// + /// + /// Example: baseten-api-review-0916 + /// + /// + /// + /// + /// 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> GetSandboxMetricsAsResponseAsync( + string sandboxName, + global::System.DateTime startTime, + global::System.DateTime endTime, + int intervalSeconds, + string? teamId = default, + string? xTeamId = default, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareGetSandboxMetricsArguments( + httpClient: HttpClient, + teamId: ref teamId, + xTeamId: ref xTeamId, + sandboxName: ref sandboxName, + startTime: ref startTime, + endTime: ref endTime, + intervalSeconds: ref intervalSeconds); + + + var __authorizations = global::Baseten.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_GetSandboxMetricsSecurityRequirements, + operationName: "GetSandboxMetricsAsync"); + + 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/sandboxes/instances/{sandboxName}/metrics", + baseUri: HttpClient.BaseAddress); + __pathBuilder + .AddOptionalParameter("team_id", teamId) + .AddRequiredParameter("start_time", startTime.ToString("yyyy-MM-ddTHH:mm:ssZ")) + .AddRequiredParameter("end_time", endTime.ToString("yyyy-MM-ddTHH:mm:ssZ")) + .AddRequiredParameter("interval_seconds", intervalSeconds.ToString() ?? throw new global::System.InvalidOperationException("A required query parameter returned null from ToString().")) + ; + 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.Get, + 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); + } + } + + if (xTeamId != default) + { + __httpRequest.Headers.TryAddWithoutValidation("X-Team-Id", xTeamId.ToString()); + } + + global::Baseten.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareGetSandboxMetricsRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + teamId: teamId, + xTeamId: xTeamId, + sandboxName: sandboxName, + startTime: startTime, + endTime: endTime, + intervalSeconds: intervalSeconds); + + 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: "GetSandboxMetrics", + methodName: "GetSandboxMetricsAsync", + pathTemplate: "$\"/v1/sandboxes/instances/{sandboxName}/metrics\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), + 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: "GetSandboxMetrics", + methodName: "GetSandboxMetricsAsync", + pathTemplate: "$\"/v1/sandboxes/instances/{sandboxName}/metrics\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), + 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: "GetSandboxMetrics", + methodName: "GetSandboxMetricsAsync", + pathTemplate: "$\"/v1/sandboxes/instances/{sandboxName}/metrics\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), + 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); + ProcessGetSandboxMetricsResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Baseten.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Baseten.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "GetSandboxMetrics", + methodName: "GetSandboxMetricsAsync", + pathTemplate: "$\"/v1/sandboxes/instances/{sandboxName}/metrics\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), + 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: "GetSandboxMetrics", + methodName: "GetSandboxMetricsAsync", + pathTemplate: "$\"/v1/sandboxes/instances/{sandboxName}/metrics\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), + 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 ((int)__response.StatusCode == 400) + { + string? __content_400 = null; + global::System.Exception? __exception_400 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + else + { + __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + } + catch (global::System.Exception __ex) + { + __exception_400 = __ex; + } + + + throw global::Baseten.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_400, + responseBody: __content_400, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // + if ((int)__response.StatusCode == 401) + { + string? __content_401 = null; + global::System.Exception? __exception_401 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + else + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + } + catch (global::System.Exception __ex) + { + __exception_401 = __ex; + } + + + throw global::Baseten.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_401, + responseBody: __content_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // + if ((int)__response.StatusCode == 403) + { + string? __content_403 = null; + global::System.Exception? __exception_403 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + else + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + } + catch (global::System.Exception __ex) + { + __exception_403 = __ex; + } + + + throw global::Baseten.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_403, + responseBody: __content_403, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::System.Exception? __exception_404 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + else + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + } + catch (global::System.Exception __ex) + { + __exception_404 = __ex; + } + + + throw global::Baseten.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_404, + responseBody: __content_404, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // + if ((int)__response.StatusCode == 502) + { + string? __content_502 = null; + global::System.Exception? __exception_502 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_502 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + else + { + __content_502 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + } + catch (global::System.Exception __ex) + { + __exception_502 = __ex; + } + + + throw global::Baseten.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_502 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_502, + responseBody: __content_502, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // + if ((int)__response.StatusCode == 503) + { + string? __content_503 = null; + global::System.Exception? __exception_503 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_503 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + else + { + __content_503 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + } + } + catch (global::System.Exception __ex) + { + __exception_503 = __ex; + } + + + throw global::Baseten.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_503 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_503, + responseBody: __content_503, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessGetSandboxMetricsResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Baseten.SandboxMetricsV1.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 global::Baseten.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + 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.SandboxMetricsV1.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 global::Baseten.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + 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.SandboxesClient.UpdateSandbox.g.cs b/src/libs/Baseten/Generated/Baseten.SandboxesClient.UpdateSandbox.g.cs index 326b5da1..5ea9a553 100644 --- a/src/libs/Baseten/Generated/Baseten.SandboxesClient.UpdateSandbox.g.cs +++ b/src/libs/Baseten/Generated/Baseten.SandboxesClient.UpdateSandbox.g.cs @@ -49,7 +49,7 @@ partial void ProcessUpdateSandboxResponseContent( /// /// Update a sandbox
- /// Partially update configuration. Omitted fields remain unchanged; supplied arrays and maps replace their previous values. Structured objects update only supplied fields. Changes to image may reset running state. The name, memory, and network configuration are immutable after creation. Supplying memory or network returns 400, including unchanged, empty, or null values. + /// Partially update configuration. Omitted fields remain unchanged; supplied arrays and maps replace their previous values. Structured objects update only supplied fields. The name, memory, network, region, image, and ports are immutable after creation. Supplying any of these fields returns 400, including unchanged, empty, or null values. ///
/// /// @@ -81,7 +81,7 @@ partial void ProcessUpdateSandboxResponseContent( } /// /// Update a sandbox
- /// Partially update configuration. Omitted fields remain unchanged; supplied arrays and maps replace their previous values. Structured objects update only supplied fields. Changes to image may reset running state. The name, memory, and network configuration are immutable after creation. Supplying memory or network returns 400, including unchanged, empty, or null values. + /// Partially update configuration. Omitted fields remain unchanged; supplied arrays and maps replace their previous values. Structured objects update only supplied fields. The name, memory, network, region, image, and ports are immutable after creation. Supplying any of these fields returns 400, including unchanged, empty, or null values. ///
/// /// @@ -695,39 +695,19 @@ partial void ProcessUpdateSandboxResponseContent( } /// /// Update a sandbox
- /// Partially update configuration. Omitted fields remain unchanged; supplied arrays and maps replace their previous values. Structured objects update only supplied fields. Changes to image may reset running state. The name, memory, and network configuration are immutable after creation. Supplying memory or network returns 400, including unchanged, empty, or null values. + /// Partially update configuration. Omitted fields remain unchanged; supplied arrays and maps replace their previous values. Structured objects update only supplied fields. The name, memory, network, region, image, and ports are immutable after creation. Supplying any of these fields returns 400, including unchanged, empty, or null values. ///
/// /// /// - /// - /// When false, the sandbox is disabled and will not accept connections
- /// Example: true - /// /// /// Lifecycle configuration controlling automatic sandbox deletion based on idle time, max age, or specific dates
/// Example: {"expiration_policies":[{"action":"DELETE","type":"TTL_IDLE","value":"24h"},{"action":"DELETE","type":"TTL_MAX_AGE","value":"7d"},{"action":"DELETE","type":"DATE","value":"2026-09-23T21:26:58Z"}],"terminated_retention":"24h"} /// - /// - /// Region where the sandbox runs (for example us-pdx-1 or eu-lon-1). When omitted at creation, the closest region is selected.
- /// Example: us-pdx-1 - /// /// /// Environment variables injected into the sandbox.
/// Example: [{"name":"NODE_ENV","secret":false,"value":"production"}, {"name":"PORT","secret":false,"value":"3000"}] /// - /// - /// Image reference including its tag. Use blaxel/base-image:latest to get started with the built-in sandbox execution API. This image is available directly without building, pushing, or listing images through GET /v1/sandboxes/images.
- /// Example: blaxel/base-image:latest - /// - /// - /// Set of ports for a resource
- /// Example: [{"name":"http","protocol":"HTTP","target":3000}] - /// - /// - /// Human-readable name for display in the UI. Can contain spaces and special characters, max 63 characters.
- /// Example: Baseten API review - revised - /// /// /// Caller-owned identifier for external lookups. Max 64 chars, alphanumeric + dash.
/// Example: api-review-20260916-001 @@ -743,13 +723,8 @@ partial void ProcessUpdateSandboxResponseContent( string sandboxName, string? teamId = default, string? xTeamId = default, - bool? enabled = default, global::Baseten.SandboxLifecycleV1? lifecycle = default, - string? region = default, global::System.Collections.Generic.IList? envs = default, - string? image = default, - global::System.Collections.Generic.IList? ports = default, - string? displayName = default, string? externalId = default, global::System.Collections.Generic.Dictionary? labels = default, global::Baseten.AutoSDKRequestOptions? requestOptions = default, @@ -757,13 +732,8 @@ partial void ProcessUpdateSandboxResponseContent( { var __request = new global::Baseten.UpdateSandboxRequestV1 { - Enabled = enabled, Lifecycle = lifecycle, - Region = region, Envs = envs, - Image = image, - Ports = ports, - DisplayName = displayName, ExternalId = externalId, Labels = labels, }; diff --git a/src/libs/Baseten/Generated/autosdk.generated-examples.json b/src/libs/Baseten/Generated/autosdk.generated-examples.json index d53a286d..e5fd8a09 100644 --- a/src/libs/Baseten/Generated/autosdk.generated-examples.json +++ b/src/libs/Baseten/Generated/autosdk.generated-examples.json @@ -46,6 +46,17 @@ }, { "Order": 5, + "Title": "Get image build logs", + "Slug": "getimagebuildlogs", + "Description": "Return one page of logs from the latest recorded build of this image, including failed builds, newest first. Logs may take a short time to appear. Defaults to the last 24 hours; the requested time range must not exceed 7 days. Keep start_time and end_time fixed when paging with offset. A new build changes the log source; this endpoint does not retrieve a historical build by ID. While a new upload is waiting to start, logs may still refer to the preceding build. Older builds without a recorded environment use image-level build logs within the requested time range.", + "Language": "http", + "Code": "### Get image build logs\n# @name GetImageBuildLogs\nGET {{host}}/v1/sandboxes/images/{{image_name}}/logs?team_id={{team_id}}\u0026start_time={{start_time}}\u0026end_time={{end_time}}\u0026limit=100\u0026offset=0\nAuthorization: Bearer {{token}}\nX-Team-Id: {{X-Team-Id}}\nAccept: application/json\n\n## Responses\n# 200\n# Description: Build logs in the requested time range. An empty array means no logs are available in that range.\n# Content-Type: application/json\n# 400\n# Description: Invalid request. Returns a JSON error with code, message, and optional details.\n# Content-Type: application/json\n# 401\n# Description: Missing or invalid authentication. Returns a JSON error with code, message, and optional details.\n# Content-Type: application/json\n# 403\n# Description: Insufficient permissions. Returns a JSON error with code, message, and optional details.\n# Content-Type: application/json\n# 404\n# Description: Resource not found. Returns a JSON error with code, message, and optional details.\n# Content-Type: application/json\n# 429\n# Description: Request limit exceeded. Returns a JSON error with code, message, and optional details.\n# Content-Type: application/json\n# 500\n# Description: Internal server error. Returns a JSON error with code, message, and optional details.\n# Content-Type: application/json\n# 503\n# Description: Build log service is temporarily unavailable. Returns a JSON error with code and message.", + "Format": "http", + "OperationId": "GetImageBuildLogs", + "Setup": null + }, + { + "Order": 6, "Title": "List image tags", "Slug": "listimagetags", "Description": "Return one cursor-paginated page of image versions.", @@ -56,40 +67,51 @@ "Setup": null }, { - "Order": 6, + "Order": 7, "Title": "List sandbox images", "Slug": "listimages", "Description": "Return one cursor-paginated page of image repository summaries. Tags are listed separately. Pages can be empty when non-sandbox repositories are excluded; follow pagination.cursor while pagination.has_more is true. Prefix search forces ascending name order.", "Language": "csharp", - "Code": "using var client = new BasetenClient(apiKey);\nvar response = await client.Images.ListImagesAsync();\n\n// Example response:\n// {\n// \u0022items\u0022: [\n// {\n// \u0022name\u0022: \u0022base-image\u0022,\n// \u0022display_name\u0022: \u0022b10/base-image\u0022,\n// \u0022status\u0022: \u0022BUILT\u0022,\n// \u0022created_at\u0022: \u00222026-09-15T21:20:00Z\u0022,\n// \u0022updated_at\u0022: \u00222026-09-16T21:25:00Z\u0022,\n// \u0022last_deployed_at\u0022: \u00222026-09-16T21:26:58.545765901Z\u0022,\n// \u0022size\u0022: 260046848,\n// \u0022tag_count\u0022: 2,\n// \u0022tags\u0022: []\n// }\n// ],\n// \u0022pagination\u0022: {\n// \u0022has_more\u0022: false\n// }\n// }", + "Code": "using var client = new BasetenClient(apiKey);\nvar response = await client.Images.ListImagesAsync();\n\n// Example response:\n// {\n// \u0022items\u0022: [\n// {\n// \u0022name\u0022: \u0022base-image\u0022,\n// \u0022status\u0022: \u0022BUILT\u0022,\n// \u0022created_at\u0022: \u00222026-09-15T21:20:00Z\u0022,\n// \u0022updated_at\u0022: \u00222026-09-16T21:25:00Z\u0022,\n// \u0022last_deployed_at\u0022: \u00222026-09-16T21:26:58.545765901Z\u0022,\n// \u0022size\u0022: 260046848,\n// \u0022tag_count\u0022: 2\n// }\n// ],\n// \u0022pagination\u0022: {\n// \u0022has_more\u0022: false\n// }\n// }", "Format": "sdk", "OperationId": "ListImages", "Setup": "This example assumes \u0060using Baseten;\u0060 is in scope and \u0060apiKey\u0060 contains the required credential." }, { - "Order": 7, + "Order": 8, + "Title": "List built-in sandbox images", + "Slug": "listsandboxlibraryimages", + "Description": "Return the built-in sandbox images, the same for every team, so no team is selected. Use the image field directly as the image of a sandbox, without building or pushing it. Hidden and upcoming images are excluded.", + "Language": "csharp", + "Code": "using var client = new BasetenClient(apiKey);\nvar response = await client.Images.ListSandboxLibraryImagesAsync();\n\n// Example response:\n// {\n// \u0022items\u0022: [\n// {\n// \u0022name\u0022: \u0022base-image\u0022,\n// \u0022display_name\u0022: \u0022Base Image\u0022,\n// \u0022description\u0022: \u0022A minimal sandbox environment with the sandbox execution API.\u0022,\n// \u0022long_description\u0022: \u0022\u0022,\n// \u0022image\u0022: \u0022baseten/base-image:latest\u0022,\n// \u0022memory\u0022: 4096,\n// \u0022ports\u0022: [\n// {\n// \u0022name\u0022: \u0022sandbox-api\u0022,\n// \u0022protocol\u0022: \u0022HTTP\u0022,\n// \u0022target\u0022: 8080\n// }\n// ],\n// \u0022categories\u0022: [],\n// \u0022tags\u0022: [],\n// \u0022url\u0022: \u0022\u0022,\n// \u0022icon\u0022: \u0022https://example.com/base-image.png\u0022,\n// \u0022icon_light\u0022: \u0022https://example.com/base-image.png\u0022,\n// \u0022icon_dark\u0022: \u0022https://example.com/base-image.png\u0022,\n// \u0022enterprise\u0022: false,\n// \u0022hidden\u0022: false,\n// \u0022coming_soon\u0022: false\n// }\n// ]\n// }", + "Format": "sdk", + "OperationId": "ListSandboxLibraryImages", + "Setup": "This example assumes \u0060using Baseten;\u0060 is in scope and \u0060apiKey\u0060 contains the required credential." + }, + { + "Order": 9, "Title": "Push a sandbox image", "Slug": "pushimage", - "Description": "With image supplied, import the registry image asynchronously. Otherwise return an upload URL for a ZIP source archive containing its Dockerfile and build context. Processing starts after upload. No sandbox is created. Poll the image until BUILT or FAILED.", + "Description": "With image supplied, import the registry image asynchronously. Otherwise return an upload URL for a ZIP source archive containing its Dockerfile and build context. The uploaded ZIP archive must not exceed 5 GB. Processing starts after upload. No sandbox is created. Poll the image until BUILT or FAILED.", "Language": "csharp", - "Code": "using var client = new BasetenClient(apiKey);\n\nvar request = global::System.Text.Json.JsonSerializer.Deserialize\u003Cglobal::Baseten.PushImageRequestV1\u003E(\n @\u0022{\n \u0022\u0022name\u0022\u0022: \u0022\u0022base-image\u0022\u0022\n}\u0022)!;\n\nvar response = await client.Images.PushImageAsync(\n request: request\n);\n\n// Example response:\n// {\n// \u0022name\u0022: \u0022base-image\u0022,\n// \u0022status\u0022: \u0022UPLOADING\u0022,\n// \u0022upload_url\u0022: \u0022https://uploads.b10.run/images/base-image/20260916212658/source.zip?expires=2026-09-16T22%3A26%3A58Z\\u0026signature=demo-not-a-valid-upload-signature\u0022\n// }", + "Code": "using var client = new BasetenClient(apiKey);\n\nvar request = global::System.Text.Json.JsonSerializer.Deserialize\u003Cglobal::Baseten.PushSandboxImageRequestV1\u003E(\n @\u0022{\n \u0022\u0022name\u0022\u0022: \u0022\u0022base-image\u0022\u0022\n}\u0022)!;\n\nvar response = await client.Images.PushImageAsync(\n request: request\n);\n\n// Example response:\n// {\n// \u0022name\u0022: \u0022base-image\u0022,\n// \u0022status\u0022: \u0022UPLOADING\u0022,\n// \u0022upload_url\u0022: \u0022https://uploads.b10.run/images/base-image/20260916212658/source.zip?expires=2026-09-16T22%3A26%3A58Z\\u0026signature=demo-not-a-valid-upload-signature\u0022\n// }", "Format": "sdk", "OperationId": "PushImage", "Setup": "This example assumes \u0060using Baseten;\u0060 is in scope and \u0060apiKey\u0060 contains the required credential." }, { - "Order": 8, + "Order": 10, "Title": "Create a sandbox", "Slug": "createsandbox", - "Description": "Create a sandbox with an optional client-provided name, generated by the server when omitted. The request waits briefly for deployment, then returns the created resource. Deployment may continue after the response; inspect status to determine readiness. Names belonging to failed or terminated sandboxes can be reused; an active sandbox reserves its name. To get started, set image to blaxel/base-image:latest, the built-in image with the sandbox execution API ready to use. It is available directly; no image build, push, or GET /v1/sandboxes/images is needed. Use the returned url to execute commands with the same Bearer API key.", + "Description": "Create a sandbox with an optional client-provided name, generated by the server when omitted. The request waits briefly for deployment, then returns the created resource. Deployment may continue after the response; inspect status to determine readiness. Names belonging to failed or terminated sandboxes can be reused; an active sandbox reserves its name. Every field is optional. The server applies image and memory defaults; SDKs should omit fields the caller did not set. A request with no body creates a sandbox from baseten/base-image:latest, the built-in image with the sandbox execution API ready to use, with 4096 MB of memory. It is available directly; no image build, push, or GET /v1/sandboxes/images is needed. Use the returned url to execute commands with your authentication token as a Bearer token, not your Baseten API key.", "Language": "csharp", - "Code": "using var client = new BasetenClient(apiKey);\n\nvar request = global::System.Text.Json.JsonSerializer.Deserialize\u003Cglobal::Baseten.CreateSandboxRequestV1\u003E(\n @\u0022{\n \u0022\u0022name\u0022\u0022: \u0022\u0022baseten-api-review-0916\u0022\u0022,\n \u0022\u0022lifecycle\u0022\u0022: {\n \u0022\u0022expiration_policies\u0022\u0022: [\n {\n \u0022\u0022action\u0022\u0022: \u0022\u0022DELETE\u0022\u0022,\n \u0022\u0022type\u0022\u0022: \u0022\u0022TTL_IDLE\u0022\u0022,\n \u0022\u0022value\u0022\u0022: \u0022\u002224h\u0022\u0022\n },\n {\n \u0022\u0022action\u0022\u0022: \u0022\u0022DELETE\u0022\u0022,\n \u0022\u0022type\u0022\u0022: \u0022\u0022TTL_MAX_AGE\u0022\u0022,\n \u0022\u0022value\u0022\u0022: \u0022\u00227d\u0022\u0022\n },\n {\n \u0022\u0022action\u0022\u0022: \u0022\u0022DELETE\u0022\u0022,\n \u0022\u0022type\u0022\u0022: \u0022\u0022DATE\u0022\u0022,\n \u0022\u0022value\u0022\u0022: \u0022\u00222026-09-23T21:26:58Z\u0022\u0022\n }\n ],\n \u0022\u0022terminated_retention\u0022\u0022: \u0022\u002224h\u0022\u0022\n },\n \u0022\u0022network\u0022\u0022: {\n \u0022\u0022proxy\u0022\u0022: {\n \u0022\u0022allowed_domains\u0022\u0022: [\n \u0022\u0022api.openai.com\u0022\u0022,\n \u0022\u0022pypi.org\u0022\u0022,\n \u0022\u0022files.pythonhosted.org\u0022\u0022,\n \u0022\u0022registry.npmjs.org\u0022\u0022\n ],\n \u0022\u0022bypass\u0022\u0022: [\n \u0022\u0022registry.npmjs.org\u0022\u0022\n ],\n \u0022\u0022forbidden_domains\u0022\u0022: [\n \u0022\u0022facebook.com\u0022\u0022,\n \u0022\u0022*.facebook.com\u0022\u0022\n ],\n \u0022\u0022routing\u0022\u0022: [\n {\n \u0022\u0022destinations\u0022\u0022: [\n \u0022\u0022api.openai.com\u0022\u0022\n ],\n \u0022\u0022headers\u0022\u0022: {\n \u0022\u0022Authorization\u0022\u0022: \u0022\u0022Bearer {{SECRET:openai-key}}\u0022\u0022\n },\n \u0022\u0022body\u0022\u0022: {\n \u0022\u0022user\u0022\u0022: \u0022\u0022baseten-api-review-0916\u0022\u0022\n },\n \u0022\u0022secrets\u0022\u0022: {\n \u0022\u0022openai-key\u0022\u0022: \u0022\u0022sk-proj-demo-not-a-valid-api-key\u0022\u0022\n }\n }\n ]\n },\n \u0022\u0022subnet\u0022\u0022: \u0022\u0022default\u0022\u0022\n },\n \u0022\u0022region\u0022\u0022: \u0022\u0022us-pdx-1\u0022\u0022,\n \u0022\u0022envs\u0022\u0022: [\n {\n \u0022\u0022name\u0022\u0022: \u0022\u0022NODE_ENV\u0022\u0022,\n \u0022\u0022secret\u0022\u0022: false,\n \u0022\u0022value\u0022\u0022: \u0022\u0022production\u0022\u0022\n },\n {\n \u0022\u0022name\u0022\u0022: \u0022\u0022PORT\u0022\u0022,\n \u0022\u0022secret\u0022\u0022: false,\n \u0022\u0022value\u0022\u0022: \u0022\u00223000\u0022\u0022\n }\n ],\n \u0022\u0022image\u0022\u0022: \u0022\u0022blaxel/base-image:latest\u0022\u0022,\n \u0022\u0022memory\u0022\u0022: 4096,\n \u0022\u0022ports\u0022\u0022: [\n {\n \u0022\u0022name\u0022\u0022: \u0022\u0022http\u0022\u0022,\n \u0022\u0022protocol\u0022\u0022: \u0022\u0022HTTP\u0022\u0022,\n \u0022\u0022target\u0022\u0022: 3000\n }\n ],\n \u0022\u0022display_name\u0022\u0022: \u0022\u0022Baseten API review\u0022\u0022,\n \u0022\u0022external_id\u0022\u0022: \u0022\u0022api-review-20260916-001\u0022\u0022,\n \u0022\u0022labels\u0022\u0022: {\n \u0022\u0022env\u0022\u0022: \u0022\u0022development\u0022\u0022,\n \u0022\u0022project\u0022\u0022: \u0022\u0022api-review\u0022\u0022,\n \u0022\u0022team\u0022\u0022: \u0022\u0022engineering\u0022\u0022\n }\n}\u0022)!;\n\nvar response = await client.Sandboxes.CreateSandboxAsync(\n request: request\n);\n\n// Example response:\n// {\n// \u0022enabled\u0022: true,\n// \u0022lifecycle\u0022: {\n// \u0022expiration_policies\u0022: [\n// {\n// \u0022action\u0022: \u0022DELETE\u0022,\n// \u0022type\u0022: \u0022TTL_IDLE\u0022,\n// \u0022value\u0022: \u002224h\u0022\n// },\n// {\n// \u0022action\u0022: \u0022DELETE\u0022,\n// \u0022type\u0022: \u0022TTL_MAX_AGE\u0022,\n// \u0022value\u0022: \u00227d\u0022\n// },\n// {\n// \u0022action\u0022: \u0022DELETE\u0022,\n// \u0022type\u0022: \u0022DATE\u0022,\n// \u0022value\u0022: \u00222026-09-23T21:26:58Z\u0022\n// }\n// ],\n// \u0022terminated_retention\u0022: \u002224h\u0022\n// },\n// \u0022network\u0022: {\n// \u0022proxy\u0022: {\n// \u0022allowed_domains\u0022: [\n// \u0022api.openai.com\u0022,\n// \u0022pypi.org\u0022,\n// \u0022files.pythonhosted.org\u0022,\n// \u0022registry.npmjs.org\u0022\n// ],\n// \u0022bypass\u0022: [\n// \u0022registry.npmjs.org\u0022\n// ],\n// \u0022forbidden_domains\u0022: [\n// \u0022facebook.com\u0022,\n// \u0022*.facebook.com\u0022\n// ],\n// \u0022routing\u0022: [\n// {\n// \u0022destinations\u0022: [\n// \u0022api.openai.com\u0022\n// ],\n// \u0022headers\u0022: {\n// \u0022Authorization\u0022: \u0022Bearer {{SECRET:openai-key}}\u0022\n// },\n// \u0022body\u0022: {\n// \u0022user\u0022: \u0022baseten-api-review-0916\u0022\n// }\n// }\n// ]\n// },\n// \u0022subnet\u0022: \u0022default\u0022\n// },\n// \u0022region\u0022: \u0022us-pdx-1\u0022,\n// \u0022envs\u0022: [\n// {\n// \u0022name\u0022: \u0022NODE_ENV\u0022,\n// \u0022secret\u0022: false,\n// \u0022value\u0022: \u0022production\u0022\n// },\n// {\n// \u0022name\u0022: \u0022PORT\u0022,\n// \u0022secret\u0022: false,\n// \u0022value\u0022: \u00223000\u0022\n// }\n// ],\n// \u0022image\u0022: \u0022blaxel/base-image:latest\u0022,\n// \u0022memory\u0022: 4096,\n// \u0022ports\u0022: [\n// {\n// \u0022name\u0022: \u0022http\u0022,\n// \u0022protocol\u0022: \u0022HTTP\u0022,\n// \u0022target\u0022: 3000\n// }\n// ],\n// \u0022display_name\u0022: \u0022Baseten API review\u0022,\n// \u0022external_id\u0022: \u0022api-review-20260916-001\u0022,\n// \u0022labels\u0022: {\n// \u0022env\u0022: \u0022development\u0022,\n// \u0022project\u0022: \u0022api-review\u0022,\n// \u0022team\u0022: \u0022engineering\u0022\n// },\n// \u0022name\u0022: \u0022baseten-api-review-0916\u0022,\n// \u0022url\u0022: \u0022https://sbx-baseten-api-review-0916-esb1qo.us-pdx-1.b10.run\u0022,\n// \u0022status\u0022: \u0022DEPLOYED\u0022,\n// \u0022state\u0022: \u0022RUNNING\u0022,\n// \u0022created_at\u0022: \u00222026-09-16T21:26:58.545765901Z\u0022,\n// \u0022updated_at\u0022: \u00222026-09-16T21:31:13Z\u0022,\n// \u0022created_by\u0022: \u0022sandbox-automation\u0022,\n// \u0022updated_by\u0022: \u0022sandbox-automation\u0022,\n// \u0022last_used_at\u0022: \u00222026-09-16T21:31:13Z\u0022,\n// \u0022expires_in\u0022: 86400\n// }", + "Code": "using var client = new BasetenClient(apiKey);\n\nvar request = global::System.Text.Json.JsonSerializer.Deserialize\u003Cglobal::Baseten.CreateSandboxRequestV1\u003E(\n @\u0022{\n \u0022\u0022name\u0022\u0022: \u0022\u0022baseten-api-review-0916\u0022\u0022,\n \u0022\u0022lifecycle\u0022\u0022: {\n \u0022\u0022expiration_policies\u0022\u0022: [\n {\n \u0022\u0022action\u0022\u0022: \u0022\u0022DELETE\u0022\u0022,\n \u0022\u0022type\u0022\u0022: \u0022\u0022TTL_IDLE\u0022\u0022,\n \u0022\u0022value\u0022\u0022: \u0022\u002224h\u0022\u0022\n },\n {\n \u0022\u0022action\u0022\u0022: \u0022\u0022DELETE\u0022\u0022,\n \u0022\u0022type\u0022\u0022: \u0022\u0022TTL_MAX_AGE\u0022\u0022,\n \u0022\u0022value\u0022\u0022: \u0022\u00227d\u0022\u0022\n },\n {\n \u0022\u0022action\u0022\u0022: \u0022\u0022DELETE\u0022\u0022,\n \u0022\u0022type\u0022\u0022: \u0022\u0022DATE\u0022\u0022,\n \u0022\u0022value\u0022\u0022: \u0022\u00222026-09-23T21:26:58Z\u0022\u0022\n }\n ],\n \u0022\u0022terminated_retention\u0022\u0022: \u0022\u002224h\u0022\u0022\n },\n \u0022\u0022network\u0022\u0022: {\n \u0022\u0022proxy\u0022\u0022: {\n \u0022\u0022allowed_domains\u0022\u0022: [\n \u0022\u0022api.openai.com\u0022\u0022,\n \u0022\u0022pypi.org\u0022\u0022,\n \u0022\u0022files.pythonhosted.org\u0022\u0022,\n \u0022\u0022registry.npmjs.org\u0022\u0022\n ],\n \u0022\u0022bypass\u0022\u0022: [\n \u0022\u0022registry.npmjs.org\u0022\u0022\n ],\n \u0022\u0022forbidden_domains\u0022\u0022: [\n \u0022\u0022facebook.com\u0022\u0022,\n \u0022\u0022*.facebook.com\u0022\u0022\n ],\n \u0022\u0022routing\u0022\u0022: [\n {\n \u0022\u0022destinations\u0022\u0022: [\n \u0022\u0022api.openai.com\u0022\u0022\n ],\n \u0022\u0022headers\u0022\u0022: {\n \u0022\u0022Authorization\u0022\u0022: \u0022\u0022Bearer {{SECRET:openai-key}}\u0022\u0022\n },\n \u0022\u0022body\u0022\u0022: {\n \u0022\u0022user\u0022\u0022: \u0022\u0022baseten-api-review-0916\u0022\u0022\n },\n \u0022\u0022secrets\u0022\u0022: {\n \u0022\u0022openai-key\u0022\u0022: \u0022\u0022sk-proj-demo-not-a-valid-api-key\u0022\u0022\n }\n }\n ]\n },\n \u0022\u0022subnet\u0022\u0022: \u0022\u0022default\u0022\u0022\n },\n \u0022\u0022region\u0022\u0022: \u0022\u0022us-pdx-1\u0022\u0022,\n \u0022\u0022envs\u0022\u0022: [\n {\n \u0022\u0022name\u0022\u0022: \u0022\u0022NODE_ENV\u0022\u0022,\n \u0022\u0022secret\u0022\u0022: false,\n \u0022\u0022value\u0022\u0022: \u0022\u0022production\u0022\u0022\n },\n {\n \u0022\u0022name\u0022\u0022: \u0022\u0022PORT\u0022\u0022,\n \u0022\u0022secret\u0022\u0022: false,\n \u0022\u0022value\u0022\u0022: \u0022\u00223000\u0022\u0022\n }\n ],\n \u0022\u0022image\u0022\u0022: \u0022\u0022baseten/base-image:latest\u0022\u0022,\n \u0022\u0022memory\u0022\u0022: 4096,\n \u0022\u0022ports\u0022\u0022: [\n {\n \u0022\u0022name\u0022\u0022: \u0022\u0022http\u0022\u0022,\n \u0022\u0022protocol\u0022\u0022: \u0022\u0022HTTP\u0022\u0022,\n \u0022\u0022target\u0022\u0022: 3000\n }\n ],\n \u0022\u0022external_id\u0022\u0022: \u0022\u0022api-review-20260916-001\u0022\u0022,\n \u0022\u0022labels\u0022\u0022: {\n \u0022\u0022env\u0022\u0022: \u0022\u0022development\u0022\u0022,\n \u0022\u0022project\u0022\u0022: \u0022\u0022api-review\u0022\u0022,\n \u0022\u0022team\u0022\u0022: \u0022\u0022engineering\u0022\u0022\n }\n}\u0022)!;\n\nvar response = await client.Sandboxes.CreateSandboxAsync(\n request: request\n);\n\n// Example response:\n// {\n// \u0022lifecycle\u0022: {\n// \u0022expiration_policies\u0022: [\n// {\n// \u0022action\u0022: \u0022DELETE\u0022,\n// \u0022type\u0022: \u0022TTL_IDLE\u0022,\n// \u0022value\u0022: \u002224h\u0022\n// },\n// {\n// \u0022action\u0022: \u0022DELETE\u0022,\n// \u0022type\u0022: \u0022TTL_MAX_AGE\u0022,\n// \u0022value\u0022: \u00227d\u0022\n// },\n// {\n// \u0022action\u0022: \u0022DELETE\u0022,\n// \u0022type\u0022: \u0022DATE\u0022,\n// \u0022value\u0022: \u00222026-09-23T21:26:58Z\u0022\n// }\n// ],\n// \u0022terminated_retention\u0022: \u002224h\u0022\n// },\n// \u0022network\u0022: {\n// \u0022proxy\u0022: {\n// \u0022allowed_domains\u0022: [\n// \u0022api.openai.com\u0022,\n// \u0022pypi.org\u0022,\n// \u0022files.pythonhosted.org\u0022,\n// \u0022registry.npmjs.org\u0022\n// ],\n// \u0022bypass\u0022: [\n// \u0022registry.npmjs.org\u0022\n// ],\n// \u0022forbidden_domains\u0022: [\n// \u0022facebook.com\u0022,\n// \u0022*.facebook.com\u0022\n// ],\n// \u0022routing\u0022: [\n// {\n// \u0022destinations\u0022: [\n// \u0022api.openai.com\u0022\n// ],\n// \u0022headers\u0022: {\n// \u0022Authorization\u0022: \u0022Bearer {{SECRET:openai-key}}\u0022\n// },\n// \u0022body\u0022: {\n// \u0022user\u0022: \u0022baseten-api-review-0916\u0022\n// }\n// }\n// ]\n// },\n// \u0022subnet\u0022: \u0022default\u0022\n// },\n// \u0022region\u0022: \u0022us-pdx-1\u0022,\n// \u0022envs\u0022: [\n// {\n// \u0022name\u0022: \u0022NODE_ENV\u0022,\n// \u0022secret\u0022: false,\n// \u0022value\u0022: \u0022production\u0022\n// },\n// {\n// \u0022name\u0022: \u0022PORT\u0022,\n// \u0022secret\u0022: false,\n// \u0022value\u0022: \u00223000\u0022\n// }\n// ],\n// \u0022image\u0022: \u0022baseten/base-image:latest\u0022,\n// \u0022memory\u0022: 4096,\n// \u0022ports\u0022: [\n// {\n// \u0022name\u0022: \u0022http\u0022,\n// \u0022protocol\u0022: \u0022HTTP\u0022,\n// \u0022target\u0022: 3000\n// }\n// ],\n// \u0022external_id\u0022: \u0022api-review-20260916-001\u0022,\n// \u0022labels\u0022: {\n// \u0022env\u0022: \u0022development\u0022,\n// \u0022project\u0022: \u0022api-review\u0022,\n// \u0022team\u0022: \u0022engineering\u0022\n// },\n// \u0022name\u0022: \u0022baseten-api-review-0916\u0022,\n// \u0022url\u0022: \u0022https://sbx-baseten-api-review-0916-esb1qo.us-pdx-1.b10.run\u0022,\n// \u0022status\u0022: \u0022DEPLOYED\u0022,\n// \u0022created_at\u0022: \u00222026-09-16T21:26:58.545765901Z\u0022,\n// \u0022updated_at\u0022: \u00222026-09-16T21:31:13Z\u0022,\n// \u0022created_by\u0022: \u0022sandbox-automation\u0022,\n// \u0022updated_by\u0022: \u0022sandbox-automation\u0022,\n// \u0022last_used_at\u0022: \u00222026-09-16T21:31:13Z\u0022,\n// \u0022expires_in\u0022: 86400\n// }", "Format": "sdk", "OperationId": "CreateSandbox", "Setup": "This example assumes \u0060using Baseten;\u0060 is in scope and \u0060apiKey\u0060 contains the required credential." }, { - "Order": 9, + "Order": 11, "Title": "Delete a sandbox", "Slug": "deletesandbox", "Description": "Permanently delete the sandbox and its local data asynchronously. The returned resource has status DELETING.", @@ -100,34 +122,45 @@ "Setup": null }, { - "Order": 10, + "Order": 12, "Title": "Get a sandbox", "Slug": "getsandbox", - "Description": "Return the sandbox configuration and current state.", + "Description": "Return the sandbox configuration and status.", "Language": "http", - "Code": "### Get a sandbox\n# @name GetSandbox\nGET {{host}}/v1/sandboxes/instances/{{sandbox_name}}?team_id={{team_id}}\nAuthorization: Bearer {{token}}\nX-Team-Id: {{X-Team-Id}}\nAccept: application/json\n\n## Responses\n# 200\n# Description: Successful operation.\n# Content-Type: application/json\n# 401\n# Description: Missing or invalid authentication. Returns a JSON error with code, message, and optional details.\n# Content-Type: application/json\n# 403\n# Description: Insufficient permissions. Returns a JSON error with code, message, and optional details.\n# Content-Type: application/json\n# 404\n# Description: Resource not found. Returns a JSON error with code, message, and optional details.\n# Content-Type: application/json\n# 429\n# Description: Request limit exceeded. Returns a JSON error with code, message, and optional details.\n# Content-Type: application/json\n# 500\n# Description: Internal server error. Returns a JSON error with code, message, and optional details.\n# Content-Type: application/json", + "Code": "### Get a sandbox\n# @name GetSandbox\nGET {{host}}/v1/sandboxes/instances/{{sandbox_name}}?team_id={{team_id}}\u0026show_secrets=false\nAuthorization: Bearer {{token}}\nX-Team-Id: {{X-Team-Id}}\nAccept: application/json\n\n## Responses\n# 200\n# Description: Successful operation.\n# Content-Type: application/json\n# 401\n# Description: Missing or invalid authentication. Returns a JSON error with code, message, and optional details.\n# Content-Type: application/json\n# 403\n# Description: Insufficient permissions. Returns a JSON error with code, message, and optional details.\n# Content-Type: application/json\n# 404\n# Description: Resource not found. Returns a JSON error with code, message, and optional details.\n# Content-Type: application/json\n# 429\n# Description: Request limit exceeded. Returns a JSON error with code, message, and optional details.\n# Content-Type: application/json\n# 500\n# Description: Internal server error. Returns a JSON error with code, message, and optional details.\n# Content-Type: application/json", "Format": "http", "OperationId": "GetSandbox", "Setup": null }, { - "Order": 11, + "Order": 13, + "Title": "Get sandbox configuration", + "Slug": "getsandboxconfiguration", + "Description": "Return available Carbon-compatible sandbox regions. Configuration is the same for every team, so no team is selected. Only enabled regions supporting Carbon are returned. This describes regional capability, not the runtime selected for a particular team or sandbox. Region configuration is cached for up to 30 seconds.", + "Language": "csharp", + "Code": "using var client = new BasetenClient(apiKey);\nvar response = await client.Sandboxes.GetSandboxConfigurationAsync();\n\n// Example response:\n// {\n// \u0022regions\u0022: [\n// {\n// \u0022name\u0022: \u0022us-was-1\u0022,\n// \u0022country\u0022: \u0022us\u0022,\n// \u0022continent\u0022: \u0022na\u0022,\n// \u0022location\u0022: \u0022Washington\u0022,\n// \u0022info_generation\u0022: \u0022CARBON\u0022\n// }\n// ]\n// }", + "Format": "sdk", + "OperationId": "GetSandboxConfiguration", + "Setup": "This example assumes \u0060using Baseten;\u0060 is in scope and \u0060apiKey\u0060 contains the required credential." + }, + { + "Order": 14, "Title": "List sandboxes", "Slug": "listsandboxes", "Description": "Return a cursor-paginated page of sandboxes. Terminated sandboxes are hidden by default.", "Language": "csharp", - "Code": "using var client = new BasetenClient(apiKey);\nvar response = await client.Sandboxes.ListSandboxesAsync();\n\n// Example response:\n// {\n// \u0022items\u0022: [\n// {\n// \u0022enabled\u0022: true,\n// \u0022lifecycle\u0022: {\n// \u0022expiration_policies\u0022: [\n// {\n// \u0022action\u0022: \u0022DELETE\u0022,\n// \u0022type\u0022: \u0022TTL_IDLE\u0022,\n// \u0022value\u0022: \u002224h\u0022\n// },\n// {\n// \u0022action\u0022: \u0022DELETE\u0022,\n// \u0022type\u0022: \u0022TTL_MAX_AGE\u0022,\n// \u0022value\u0022: \u00227d\u0022\n// },\n// {\n// \u0022action\u0022: \u0022DELETE\u0022,\n// \u0022type\u0022: \u0022DATE\u0022,\n// \u0022value\u0022: \u00222026-09-23T21:26:58Z\u0022\n// }\n// ],\n// \u0022terminated_retention\u0022: \u002224h\u0022\n// },\n// \u0022network\u0022: {\n// \u0022proxy\u0022: {\n// \u0022allowed_domains\u0022: [\n// \u0022api.openai.com\u0022,\n// \u0022pypi.org\u0022,\n// \u0022files.pythonhosted.org\u0022,\n// \u0022registry.npmjs.org\u0022\n// ],\n// \u0022bypass\u0022: [\n// \u0022registry.npmjs.org\u0022\n// ],\n// \u0022forbidden_domains\u0022: [\n// \u0022facebook.com\u0022,\n// \u0022*.facebook.com\u0022\n// ],\n// \u0022routing\u0022: [\n// {\n// \u0022destinations\u0022: [\n// \u0022api.openai.com\u0022\n// ],\n// \u0022headers\u0022: {\n// \u0022Authorization\u0022: \u0022Bearer {{SECRET:openai-key}}\u0022\n// },\n// \u0022body\u0022: {\n// \u0022user\u0022: \u0022baseten-api-review-0916\u0022\n// }\n// }\n// ]\n// },\n// \u0022subnet\u0022: \u0022default\u0022\n// },\n// \u0022region\u0022: \u0022us-pdx-1\u0022,\n// \u0022envs\u0022: [\n// {\n// \u0022name\u0022: \u0022NODE_ENV\u0022,\n// \u0022secret\u0022: false,\n// \u0022value\u0022: \u0022production\u0022\n// },\n// {\n// \u0022name\u0022: \u0022PORT\u0022,\n// \u0022secret\u0022: false,\n// \u0022value\u0022: \u00223000\u0022\n// }\n// ],\n// \u0022image\u0022: \u0022blaxel/base-image:latest\u0022,\n// \u0022memory\u0022: 4096,\n// \u0022ports\u0022: [\n// {\n// \u0022name\u0022: \u0022http\u0022,\n// \u0022protocol\u0022: \u0022HTTP\u0022,\n// \u0022target\u0022: 3000\n// }\n// ],\n// \u0022display_name\u0022: \u0022Baseten API review\u0022,\n// \u0022external_id\u0022: \u0022api-review-20260916-001\u0022,\n// \u0022labels\u0022: {\n// \u0022env\u0022: \u0022development\u0022,\n// \u0022project\u0022: \u0022api-review\u0022,\n// \u0022team\u0022: \u0022engineering\u0022\n// },\n// \u0022name\u0022: \u0022baseten-api-review-0916\u0022,\n// \u0022url\u0022: \u0022https://sbx-baseten-api-review-0916-esb1qo.us-pdx-1.b10.run\u0022,\n// \u0022status\u0022: \u0022DEPLOYED\u0022,\n// \u0022state\u0022: \u0022RUNNING\u0022,\n// \u0022created_at\u0022: \u00222026-09-16T21:26:58.545765901Z\u0022,\n// \u0022updated_at\u0022: \u00222026-09-16T21:31:13Z\u0022,\n// \u0022created_by\u0022: \u0022sandbox-automation\u0022,\n// \u0022updated_by\u0022: \u0022sandbox-automation\u0022,\n// \u0022last_used_at\u0022: \u00222026-09-16T21:31:13Z\u0022,\n// \u0022expires_in\u0022: 86400\n// }\n// ],\n// \u0022pagination\u0022: {\n// \u0022has_more\u0022: false\n// }\n// }", + "Code": "using var client = new BasetenClient(apiKey);\nvar response = await client.Sandboxes.ListSandboxesAsync();\n\n// Example response:\n// {\n// \u0022items\u0022: [\n// {\n// \u0022lifecycle\u0022: {\n// \u0022expiration_policies\u0022: [\n// {\n// \u0022action\u0022: \u0022DELETE\u0022,\n// \u0022type\u0022: \u0022TTL_IDLE\u0022,\n// \u0022value\u0022: \u002224h\u0022\n// },\n// {\n// \u0022action\u0022: \u0022DELETE\u0022,\n// \u0022type\u0022: \u0022TTL_MAX_AGE\u0022,\n// \u0022value\u0022: \u00227d\u0022\n// },\n// {\n// \u0022action\u0022: \u0022DELETE\u0022,\n// \u0022type\u0022: \u0022DATE\u0022,\n// \u0022value\u0022: \u00222026-09-23T21:26:58Z\u0022\n// }\n// ],\n// \u0022terminated_retention\u0022: \u002224h\u0022\n// },\n// \u0022network\u0022: {\n// \u0022proxy\u0022: {\n// \u0022allowed_domains\u0022: [\n// \u0022api.openai.com\u0022,\n// \u0022pypi.org\u0022,\n// \u0022files.pythonhosted.org\u0022,\n// \u0022registry.npmjs.org\u0022\n// ],\n// \u0022bypass\u0022: [\n// \u0022registry.npmjs.org\u0022\n// ],\n// \u0022forbidden_domains\u0022: [\n// \u0022facebook.com\u0022,\n// \u0022*.facebook.com\u0022\n// ],\n// \u0022routing\u0022: [\n// {\n// \u0022destinations\u0022: [\n// \u0022api.openai.com\u0022\n// ],\n// \u0022headers\u0022: {\n// \u0022Authorization\u0022: \u0022Bearer {{SECRET:openai-key}}\u0022\n// },\n// \u0022body\u0022: {\n// \u0022user\u0022: \u0022baseten-api-review-0916\u0022\n// }\n// }\n// ]\n// },\n// \u0022subnet\u0022: \u0022default\u0022\n// },\n// \u0022region\u0022: \u0022us-pdx-1\u0022,\n// \u0022envs\u0022: [\n// {\n// \u0022name\u0022: \u0022NODE_ENV\u0022,\n// \u0022secret\u0022: false,\n// \u0022value\u0022: \u0022production\u0022\n// },\n// {\n// \u0022name\u0022: \u0022PORT\u0022,\n// \u0022secret\u0022: false,\n// \u0022value\u0022: \u00223000\u0022\n// }\n// ],\n// \u0022image\u0022: \u0022baseten/base-image:latest\u0022,\n// \u0022memory\u0022: 4096,\n// \u0022ports\u0022: [\n// {\n// \u0022name\u0022: \u0022http\u0022,\n// \u0022protocol\u0022: \u0022HTTP\u0022,\n// \u0022target\u0022: 3000\n// }\n// ],\n// \u0022external_id\u0022: \u0022api-review-20260916-001\u0022,\n// \u0022labels\u0022: {\n// \u0022env\u0022: \u0022development\u0022,\n// \u0022project\u0022: \u0022api-review\u0022,\n// \u0022team\u0022: \u0022engineering\u0022\n// },\n// \u0022name\u0022: \u0022baseten-api-review-0916\u0022,\n// \u0022url\u0022: \u0022https://sbx-baseten-api-review-0916-esb1qo.us-pdx-1.b10.run\u0022,\n// \u0022status\u0022: \u0022DEPLOYED\u0022,\n// \u0022created_at\u0022: \u00222026-09-16T21:26:58.545765901Z\u0022,\n// \u0022updated_at\u0022: \u00222026-09-16T21:31:13Z\u0022,\n// \u0022created_by\u0022: \u0022sandbox-automation\u0022,\n// \u0022updated_by\u0022: \u0022sandbox-automation\u0022,\n// \u0022last_used_at\u0022: \u00222026-09-16T21:31:13Z\u0022,\n// \u0022expires_in\u0022: 86400\n// }\n// ],\n// \u0022pagination\u0022: {\n// \u0022has_more\u0022: false\n// }\n// }", "Format": "sdk", "OperationId": "ListSandboxes", "Setup": "This example assumes \u0060using Baseten;\u0060 is in scope and \u0060apiKey\u0060 contains the required credential." }, { - "Order": 12, + "Order": 15, "Title": "Update a sandbox", "Slug": "updatesandbox", - "Description": "Partially update configuration. Omitted fields remain unchanged; supplied arrays and maps replace their previous values. Structured objects update only supplied fields. Changes to image may reset running state. The name, memory, and network configuration are immutable after creation. Supplying memory or network returns 400, including unchanged, empty, or null values.", + "Description": "Partially update configuration. Omitted fields remain unchanged; supplied arrays and maps replace their previous values. Structured objects update only supplied fields. The name, memory, network, region, image, and ports are immutable after creation. Supplying any of these fields returns 400, including unchanged, empty, or null values.", "Language": "http", - "Code": "### Update a sandbox\n# @name UpdateSandbox\nPATCH {{host}}/v1/sandboxes/instances/{{sandbox_name}}?team_id={{team_id}}\nAuthorization: Bearer {{token}}\nX-Team-Id: {{X-Team-Id}}\nContent-Type: application/json\nAccept: application/json\n\n{\n \u0022enabled\u0022: true,\n \u0022lifecycle\u0022: {\n \u0022expiration_policies\u0022: [\n {\n \u0022action\u0022: \u0022DELETE\u0022,\n \u0022type\u0022: \u0022TTL_IDLE\u0022,\n \u0022value\u0022: \u002224h\u0022\n },\n {\n \u0022action\u0022: \u0022DELETE\u0022,\n \u0022type\u0022: \u0022TTL_MAX_AGE\u0022,\n \u0022value\u0022: \u00227d\u0022\n },\n {\n \u0022action\u0022: \u0022DELETE\u0022,\n \u0022type\u0022: \u0022DATE\u0022,\n \u0022value\u0022: \u00222026-09-23T21:26:58Z\u0022\n }\n ],\n \u0022terminated_retention\u0022: \u002224h\u0022\n },\n \u0022region\u0022: \u0022us-pdx-1\u0022,\n \u0022envs\u0022: [\n {\n \u0022name\u0022: \u0022NODE_ENV\u0022,\n \u0022secret\u0022: false,\n \u0022value\u0022: \u0022production\u0022\n },\n {\n \u0022name\u0022: \u0022PORT\u0022,\n \u0022secret\u0022: false,\n \u0022value\u0022: \u00223000\u0022\n }\n ],\n \u0022image\u0022: \u0022blaxel/base-image:latest\u0022,\n \u0022ports\u0022: [\n {\n \u0022name\u0022: \u0022http\u0022,\n \u0022protocol\u0022: \u0022HTTP\u0022,\n \u0022target\u0022: 3000\n }\n ],\n \u0022display_name\u0022: \u0022Baseten API review - revised\u0022,\n \u0022external_id\u0022: \u0022api-review-20260916-001\u0022,\n \u0022labels\u0022: {\n \u0022env\u0022: \u0022development\u0022,\n \u0022project\u0022: \u0022api-review\u0022,\n \u0022team\u0022: \u0022engineering\u0022,\n \u0022revision\u0022: \u00222\u0022\n }\n}\n\n## Responses\n# 200\n# Description: Successful operation.\n# Content-Type: application/json\n# 400\n# Description: Invalid request, including attempts to change memory or network configuration.\n# Content-Type: application/json\n# 401\n# Description: Missing or invalid authentication. Returns a JSON error with code, message, and optional details.\n# Content-Type: application/json\n# 403\n# Description: Insufficient permissions. Returns a JSON error with code, message, and optional details.\n# Content-Type: application/json\n# 404\n# Description: Resource not found. Returns a JSON error with code, message, and optional details.\n# Content-Type: application/json\n# 409\n# Description: Resource is currently in use or conflicts with the requested operation. Returns a JSON error with code, message, and optional details.\n# Content-Type: application/json\n# 429\n# Description: Request limit exceeded. Returns a JSON error with code, message, and optional details.\n# Content-Type: application/json\n# 500\n# Description: Internal server error. Returns a JSON error with code, message, and optional details.\n# Content-Type: application/json", + "Code": "### Update a sandbox\n# @name UpdateSandbox\nPATCH {{host}}/v1/sandboxes/instances/{{sandbox_name}}?team_id={{team_id}}\nAuthorization: Bearer {{token}}\nX-Team-Id: {{X-Team-Id}}\nContent-Type: application/json\nAccept: application/json\n\n{\n \u0022lifecycle\u0022: {\n \u0022expiration_policies\u0022: [\n {\n \u0022action\u0022: \u0022DELETE\u0022,\n \u0022type\u0022: \u0022TTL_IDLE\u0022,\n \u0022value\u0022: \u002224h\u0022\n },\n {\n \u0022action\u0022: \u0022DELETE\u0022,\n \u0022type\u0022: \u0022TTL_MAX_AGE\u0022,\n \u0022value\u0022: \u00227d\u0022\n },\n {\n \u0022action\u0022: \u0022DELETE\u0022,\n \u0022type\u0022: \u0022DATE\u0022,\n \u0022value\u0022: \u00222026-09-23T21:26:58Z\u0022\n }\n ],\n \u0022terminated_retention\u0022: \u002224h\u0022\n },\n \u0022envs\u0022: [\n {\n \u0022name\u0022: \u0022NODE_ENV\u0022,\n \u0022secret\u0022: false,\n \u0022value\u0022: \u0022production\u0022\n },\n {\n \u0022name\u0022: \u0022PORT\u0022,\n \u0022secret\u0022: false,\n \u0022value\u0022: \u00223000\u0022\n }\n ],\n \u0022external_id\u0022: \u0022api-review-20260916-001\u0022,\n \u0022labels\u0022: {\n \u0022env\u0022: \u0022development\u0022,\n \u0022project\u0022: \u0022api-review\u0022,\n \u0022team\u0022: \u0022engineering\u0022,\n \u0022revision\u0022: \u00222\u0022\n }\n}\n\n## Responses\n# 200\n# Description: Successful operation.\n# Content-Type: application/json\n# 400\n# Description: Invalid request, including attempts to change memory or network configuration.\n# Content-Type: application/json\n# 401\n# Description: Missing or invalid authentication. Returns a JSON error with code, message, and optional details.\n# Content-Type: application/json\n# 403\n# Description: Insufficient permissions. Returns a JSON error with code, message, and optional details.\n# Content-Type: application/json\n# 404\n# Description: Resource not found. Returns a JSON error with code, message, and optional details.\n# Content-Type: application/json\n# 409\n# Description: Resource is currently in use or conflicts with the requested operation. Returns a JSON error with code, message, and optional details.\n# Content-Type: application/json\n# 429\n# Description: Request limit exceeded. Returns a JSON error with code, message, and optional details.\n# Content-Type: application/json\n# 500\n# Description: Internal server error. Returns a JSON error with code, message, and optional details.\n# Content-Type: application/json", "Format": "http", "OperationId": "UpdateSandbox", "Setup": null diff --git a/src/libs/Baseten/openapi.yaml b/src/libs/Baseten/openapi.yaml index 8b0c6aaf..9233ae27 100644 --- a/src/libs/Baseten/openapi.yaml +++ b/src/libs/Baseten/openapi.yaml @@ -6549,11 +6549,11 @@ "x-codeSamples": [ { "lang": "bash", - "source": "curl --request POST \\\n--url https://api.baseten.co/v1/loops/runs \\\n--header \"Authorization: Bearer $BASETEN_API_KEY\" \\\n--data '{\n \"session_id\": null,\n \"base_model\": null,\n \"name\": null,\n \"max_seq_len\": null,\n \"seed\": null,\n \"availability_model\": \"spot\",\n \"path\": \"bt://loops:k4q95w5/weights/step-100\",\n \"reuse_from_run_id\": null,\n \"reuse_from_session_id\": null\n}'" + "source": "curl --request POST \\\n--url https://api.baseten.co/v1/loops/runs \\\n--header \"Authorization: Bearer $BASETEN_API_KEY\" \\\n--data '{\n \"session_id\": null,\n \"base_model\": null,\n \"name\": null,\n \"max_seq_len\": null,\n \"seed\": null,\n \"availability_model\": \"spot\",\n \"path\": \"bt://loops:k4q95w5/weights/step-100\",\n \"reuse_from_run_id\": null,\n \"reuse_from_session_id\": null,\n \"sampler_num_replicas\": null\n}'" }, { "lang": "python", - "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"\")\nurl = \"https://api.baseten.co/v1/loops/runs\"\n\nheaders = {\"Authorization\": f\"Bearer {API_KEY}\"}\n\nresponse = requests.request(\n \"POST\",\n url,\n headers=headers,\n json={'session_id': None, 'base_model': None, 'name': None, 'max_seq_len': None, 'seed': None, 'availability_model': 'spot', 'path': 'bt://loops:k4q95w5/weights/step-100', 'reuse_from_run_id': None, 'reuse_from_session_id': None}\n)\n\nprint(response.text)" + "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"\")\nurl = \"https://api.baseten.co/v1/loops/runs\"\n\nheaders = {\"Authorization\": f\"Bearer {API_KEY}\"}\n\nresponse = requests.request(\n \"POST\",\n url,\n headers=headers,\n json={'session_id': None, 'base_model': None, 'name': None, 'max_seq_len': None, 'seed': None, 'availability_model': 'spot', 'path': 'bt://loops:k4q95w5/weights/step-100', 'reuse_from_run_id': None, 'reuse_from_session_id': None, 'sampler_num_replicas': None}\n)\n\nprint(response.text)" } ], "description": "Creates a Loops run with an associated sampler in the given session.", @@ -6665,7 +6665,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateLoopsRunRequestV1" + "$ref": "#/components/schemas/CreateLoopsTrainerRequestV1" } } }, @@ -6740,11 +6740,11 @@ "x-codeSamples": [ { "lang": "bash", - "source": "curl --request POST \\\n--url https://api.baseten.co/v1/loops/samplers \\\n--header \"Authorization: Bearer $BASETEN_API_KEY\" \\\n--data '{\n \"availability_model\": null,\n \"session_id\": null,\n \"base_model\": null,\n \"run_id\": null,\n \"max_seq_length\": null,\n \"model_path\": \"bt://loops:k4q95w5/sampler_weights/step-100\",\n \"reuse_from_session_id\": null\n}'" + "source": "curl --request POST \\\n--url https://api.baseten.co/v1/loops/samplers \\\n--header \"Authorization: Bearer $BASETEN_API_KEY\" \\\n--data '{\n \"availability_model\": null,\n \"session_id\": null,\n \"base_model\": null,\n \"run_id\": null,\n \"max_seq_length\": null,\n \"model_path\": \"bt://loops:k4q95w5/sampler_weights/step-100\",\n \"reuse_from_session_id\": null,\n \"num_replicas\": null\n}'" }, { "lang": "python", - "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"\")\nurl = \"https://api.baseten.co/v1/loops/samplers\"\n\nheaders = {\"Authorization\": f\"Bearer {API_KEY}\"}\n\nresponse = requests.request(\n \"POST\",\n url,\n headers=headers,\n json={'availability_model': None, 'session_id': None, 'base_model': None, 'run_id': None, 'max_seq_length': None, 'model_path': 'bt://loops:k4q95w5/sampler_weights/step-100', 'reuse_from_session_id': None}\n)\n\nprint(response.text)" + "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"\")\nurl = \"https://api.baseten.co/v1/loops/samplers\"\n\nheaders = {\"Authorization\": f\"Bearer {API_KEY}\"}\n\nresponse = requests.request(\n \"POST\",\n url,\n headers=headers,\n json={'availability_model': None, 'session_id': None, 'base_model': None, 'run_id': None, 'max_seq_length': None, 'model_path': 'bt://loops:k4q95w5/sampler_weights/step-100', 'reuse_from_session_id': None, 'num_replicas': None}\n)\n\nprint(response.text)" } ], "description": "Creates a standalone Loops sampler not linked to a run.", @@ -7585,11 +7585,11 @@ "x-codeSamples": [ { "lang": "bash", - "source": "curl --request POST \\\n--url https://api.baseten.co/v1/teams/{team_id}/loops/runs \\\n--header \"Authorization: Bearer $BASETEN_API_KEY\" \\\n--data '{\n \"session_id\": null,\n \"base_model\": null,\n \"name\": null,\n \"max_seq_len\": null,\n \"seed\": null,\n \"availability_model\": \"spot\",\n \"path\": \"bt://loops:k4q95w5/weights/step-100\",\n \"reuse_from_run_id\": null,\n \"reuse_from_session_id\": null\n}'" + "source": "curl --request POST \\\n--url https://api.baseten.co/v1/teams/{team_id}/loops/runs \\\n--header \"Authorization: Bearer $BASETEN_API_KEY\" \\\n--data '{\n \"session_id\": null,\n \"base_model\": null,\n \"name\": null,\n \"max_seq_len\": null,\n \"seed\": null,\n \"availability_model\": \"spot\",\n \"path\": \"bt://loops:k4q95w5/weights/step-100\",\n \"reuse_from_run_id\": null,\n \"reuse_from_session_id\": null,\n \"sampler_num_replicas\": 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}/loops/runs\"\n\nheaders = {\"Authorization\": f\"Bearer {API_KEY}\"}\n\nresponse = requests.request(\n \"POST\",\n url,\n headers=headers,\n json={'session_id': None, 'base_model': None, 'name': None, 'max_seq_len': None, 'seed': None, 'availability_model': 'spot', 'path': 'bt://loops:k4q95w5/weights/step-100', 'reuse_from_run_id': None, 'reuse_from_session_id': None}\n)\n\nprint(response.text)" + "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"\")\nurl = \"https://api.baseten.co/v1/teams/{team_id}/loops/runs\"\n\nheaders = {\"Authorization\": f\"Bearer {API_KEY}\"}\n\nresponse = requests.request(\n \"POST\",\n url,\n headers=headers,\n json={'session_id': None, 'base_model': None, 'name': None, 'max_seq_len': None, 'seed': None, 'availability_model': 'spot', 'path': 'bt://loops:k4q95w5/weights/step-100', 'reuse_from_run_id': None, 'reuse_from_session_id': None, 'sampler_num_replicas': None}\n)\n\nprint(response.text)" } ], "description": "Creates a Loops run with an associated sampler in the given session; the run's infrastructure belongs to the given team.", @@ -7635,7 +7635,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateLoopsRunRequestV1" + "$ref": "#/components/schemas/CreateLoopsTrainerRequestV1" } } }, @@ -7720,11 +7720,11 @@ "x-codeSamples": [ { "lang": "bash", - "source": "curl --request POST \\\n--url https://api.baseten.co/v1/teams/{team_id}/loops/samplers \\\n--header \"Authorization: Bearer $BASETEN_API_KEY\" \\\n--data '{\n \"availability_model\": null,\n \"session_id\": null,\n \"base_model\": null,\n \"run_id\": null,\n \"max_seq_length\": null,\n \"model_path\": \"bt://loops:k4q95w5/sampler_weights/step-100\",\n \"reuse_from_session_id\": null\n}'" + "source": "curl --request POST \\\n--url https://api.baseten.co/v1/teams/{team_id}/loops/samplers \\\n--header \"Authorization: Bearer $BASETEN_API_KEY\" \\\n--data '{\n \"availability_model\": null,\n \"session_id\": null,\n \"base_model\": null,\n \"run_id\": null,\n \"max_seq_length\": null,\n \"model_path\": \"bt://loops:k4q95w5/sampler_weights/step-100\",\n \"reuse_from_session_id\": null,\n \"num_replicas\": 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}/loops/samplers\"\n\nheaders = {\"Authorization\": f\"Bearer {API_KEY}\"}\n\nresponse = requests.request(\n \"POST\",\n url,\n headers=headers,\n json={'availability_model': None, 'session_id': None, 'base_model': None, 'run_id': None, 'max_seq_length': None, 'model_path': 'bt://loops:k4q95w5/sampler_weights/step-100', 'reuse_from_session_id': None}\n)\n\nprint(response.text)" + "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"\")\nurl = \"https://api.baseten.co/v1/teams/{team_id}/loops/samplers\"\n\nheaders = {\"Authorization\": f\"Bearer {API_KEY}\"}\n\nresponse = requests.request(\n \"POST\",\n url,\n headers=headers,\n json={'availability_model': None, 'session_id': None, 'base_model': None, 'run_id': None, 'max_seq_length': None, 'model_path': 'bt://loops:k4q95w5/sampler_weights/step-100', 'reuse_from_session_id': None, 'num_replicas': None}\n)\n\nprint(response.text)" } ], "description": "Creates a standalone Loops sampler not linked to a run; the sampler belongs to the given team.", @@ -8351,11 +8351,11 @@ "x-codeSamples": [ { "lang": "bash", - "source": "curl --request POST \\\n--url https://api.baseten.co/v1/llm_models \\\n--header \"Authorization: Bearer $BASETEN_API_KEY\" \\\n--data '{\n \"resources\": null,\n \"region\": null,\n \"llm_version\": null,\n \"model_metadata\": null,\n \"autoscaling_settings\": {\n \"autoscaling_window\": 600,\n \"concurrency_target\": null,\n \"max_replica\": 5,\n \"max_scale_down_rate\": null,\n \"min_replica\": 1,\n \"scale_down_delay\": 300,\n \"target_in_flight_tokens\": null,\n \"target_utilization_percentage\": null\n },\n \"additional_autoscaling_config\": {\n \"metrics\": [\n {\n \"name\": \"in_flight_tokens\",\n \"target\": 40000\n }\n ]\n },\n \"metadata\": {\n \"environment\": \"production\",\n \"git_sha\": \"abc123\"\n },\n \"weights\": [\n {\n \"mount_location\": \"/models/base\",\n \"source\": \"hf://meta-llama/Llama-3-8B\"\n }\n ],\n \"name\": null\n}'" + "source": "curl --request POST \\\n--url https://api.baseten.co/v1/llm_models \\\n--header \"Authorization: Bearer $BASETEN_API_KEY\" \\\n--data '{\n \"resources\": null,\n \"region\": null,\n \"llm_version\": null,\n \"model_metadata\": null,\n \"autoscaling_settings\": {\n \"autoscaling_window\": 600,\n \"concurrency_target\": null,\n \"max_replica\": 5,\n \"max_scale_down_rate\": null,\n \"min_replica\": 1,\n \"scale_down_delay\": 300,\n \"target_in_flight_tokens\": null,\n \"target_utilization_percentage\": null\n },\n \"additional_autoscaling_config\": {\n \"metrics\": [\n {\n \"name\": \"in_flight_tokens\",\n \"target\": 40000\n }\n ]\n },\n \"metadata\": {\n \"environment\": \"production\",\n \"git_sha\": \"abc123\"\n },\n \"weights\": [\n {\n \"mount_location\": \"/models/base\",\n \"source\": \"hf://meta-llama/Llama-3-8B\"\n }\n ],\n \"egress_restrictions\": null,\n \"name\": null\n}'" }, { "lang": "python", - "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"\")\nurl = \"https://api.baseten.co/v1/llm_models\"\n\nheaders = {\"Authorization\": f\"Bearer {API_KEY}\"}\n\nresponse = requests.request(\n \"POST\",\n url,\n headers=headers,\n json={'resources': None, 'region': None, 'llm_version': None, 'model_metadata': None, 'autoscaling_settings': {'autoscaling_window': 600, 'concurrency_target': None, 'max_replica': 5, 'max_scale_down_rate': None, 'min_replica': 1, 'scale_down_delay': 300, 'target_in_flight_tokens': None, 'target_utilization_percentage': None}, 'additional_autoscaling_config': {'metrics': [{'name': 'in_flight_tokens', 'target': 40000}]}, 'metadata': {'environment': 'production', 'git_sha': 'abc123'}, 'weights': [{'mount_location': '/models/base', 'source': 'hf://meta-llama/Llama-3-8B'}], 'name': None}\n)\n\nprint(response.text)" + "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"\")\nurl = \"https://api.baseten.co/v1/llm_models\"\n\nheaders = {\"Authorization\": f\"Bearer {API_KEY}\"}\n\nresponse = requests.request(\n \"POST\",\n url,\n headers=headers,\n json={'resources': None, 'region': None, 'llm_version': None, 'model_metadata': None, 'autoscaling_settings': {'autoscaling_window': 600, 'concurrency_target': None, 'max_replica': 5, 'max_scale_down_rate': None, 'min_replica': 1, 'scale_down_delay': 300, 'target_in_flight_tokens': None, 'target_utilization_percentage': None}, 'additional_autoscaling_config': {'metrics': [{'name': 'in_flight_tokens', 'target': 40000}]}, 'metadata': {'environment': 'production', 'git_sha': 'abc123'}, 'weights': [{'mount_location': '/models/base', 'source': 'hf://meta-llama/Llama-3-8B'}], 'egress_restrictions': None, 'name': None}\n)\n\nprint(response.text)" } ], "requestBody": { @@ -8388,11 +8388,11 @@ "x-codeSamples": [ { "lang": "bash", - "source": "curl --request POST \\\n--url https://api.baseten.co/v1/teams/{team_id}/llm_models \\\n--header \"Authorization: Bearer $BASETEN_API_KEY\" \\\n--data '{\n \"resources\": null,\n \"region\": null,\n \"llm_version\": null,\n \"model_metadata\": null,\n \"autoscaling_settings\": {\n \"autoscaling_window\": 600,\n \"concurrency_target\": null,\n \"max_replica\": 5,\n \"max_scale_down_rate\": null,\n \"min_replica\": 1,\n \"scale_down_delay\": 300,\n \"target_in_flight_tokens\": null,\n \"target_utilization_percentage\": null\n },\n \"additional_autoscaling_config\": {\n \"metrics\": [\n {\n \"name\": \"in_flight_tokens\",\n \"target\": 40000\n }\n ]\n },\n \"metadata\": {\n \"environment\": \"production\",\n \"git_sha\": \"abc123\"\n },\n \"weights\": [\n {\n \"mount_location\": \"/models/base\",\n \"source\": \"hf://meta-llama/Llama-3-8B\"\n }\n ],\n \"name\": null\n}'" + "source": "curl --request POST \\\n--url https://api.baseten.co/v1/teams/{team_id}/llm_models \\\n--header \"Authorization: Bearer $BASETEN_API_KEY\" \\\n--data '{\n \"resources\": null,\n \"region\": null,\n \"llm_version\": null,\n \"model_metadata\": null,\n \"autoscaling_settings\": {\n \"autoscaling_window\": 600,\n \"concurrency_target\": null,\n \"max_replica\": 5,\n \"max_scale_down_rate\": null,\n \"min_replica\": 1,\n \"scale_down_delay\": 300,\n \"target_in_flight_tokens\": null,\n \"target_utilization_percentage\": null\n },\n \"additional_autoscaling_config\": {\n \"metrics\": [\n {\n \"name\": \"in_flight_tokens\",\n \"target\": 40000\n }\n ]\n },\n \"metadata\": {\n \"environment\": \"production\",\n \"git_sha\": \"abc123\"\n },\n \"weights\": [\n {\n \"mount_location\": \"/models/base\",\n \"source\": \"hf://meta-llama/Llama-3-8B\"\n }\n ],\n \"egress_restrictions\": null,\n \"name\": 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}/llm_models\"\n\nheaders = {\"Authorization\": f\"Bearer {API_KEY}\"}\n\nresponse = requests.request(\n \"POST\",\n url,\n headers=headers,\n json={'resources': None, 'region': None, 'llm_version': None, 'model_metadata': None, 'autoscaling_settings': {'autoscaling_window': 600, 'concurrency_target': None, 'max_replica': 5, 'max_scale_down_rate': None, 'min_replica': 1, 'scale_down_delay': 300, 'target_in_flight_tokens': None, 'target_utilization_percentage': None}, 'additional_autoscaling_config': {'metrics': [{'name': 'in_flight_tokens', 'target': 40000}]}, 'metadata': {'environment': 'production', 'git_sha': 'abc123'}, 'weights': [{'mount_location': '/models/base', 'source': 'hf://meta-llama/Llama-3-8B'}], 'name': None}\n)\n\nprint(response.text)" + "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"\")\nurl = \"https://api.baseten.co/v1/teams/{team_id}/llm_models\"\n\nheaders = {\"Authorization\": f\"Bearer {API_KEY}\"}\n\nresponse = requests.request(\n \"POST\",\n url,\n headers=headers,\n json={'resources': None, 'region': None, 'llm_version': None, 'model_metadata': None, 'autoscaling_settings': {'autoscaling_window': 600, 'concurrency_target': None, 'max_replica': 5, 'max_scale_down_rate': None, 'min_replica': 1, 'scale_down_delay': 300, 'target_in_flight_tokens': None, 'target_utilization_percentage': None}, 'additional_autoscaling_config': {'metrics': [{'name': 'in_flight_tokens', 'target': 40000}]}, 'metadata': {'environment': 'production', 'git_sha': 'abc123'}, 'weights': [{'mount_location': '/models/base', 'source': 'hf://meta-llama/Llama-3-8B'}], 'egress_restrictions': None, 'name': None}\n)\n\nprint(response.text)" } ], "requestBody": { @@ -8430,11 +8430,11 @@ "x-codeSamples": [ { "lang": "bash", - "source": "curl --request POST \\\n--url https://api.baseten.co/v1/llm_models/{model_id}/deployments \\\n--header \"Authorization: Bearer $BASETEN_API_KEY\" \\\n--data '{\n \"resources\": null,\n \"region\": null,\n \"llm_version\": null,\n \"model_metadata\": null,\n \"autoscaling_settings\": {\n \"autoscaling_window\": 600,\n \"concurrency_target\": null,\n \"max_replica\": 5,\n \"max_scale_down_rate\": null,\n \"min_replica\": 1,\n \"scale_down_delay\": 300,\n \"target_in_flight_tokens\": null,\n \"target_utilization_percentage\": null\n },\n \"additional_autoscaling_config\": {\n \"metrics\": [\n {\n \"name\": \"in_flight_tokens\",\n \"target\": 40000\n }\n ]\n },\n \"metadata\": {\n \"environment\": \"production\",\n \"git_sha\": \"abc123\"\n },\n \"weights\": [\n {\n \"mount_location\": \"/models/base\",\n \"source\": \"hf://meta-llama/Llama-3-8B\"\n }\n ]\n}'" + "source": "curl --request POST \\\n--url https://api.baseten.co/v1/llm_models/{model_id}/deployments \\\n--header \"Authorization: Bearer $BASETEN_API_KEY\" \\\n--data '{\n \"resources\": null,\n \"region\": null,\n \"llm_version\": null,\n \"model_metadata\": null,\n \"autoscaling_settings\": {\n \"autoscaling_window\": 600,\n \"concurrency_target\": null,\n \"max_replica\": 5,\n \"max_scale_down_rate\": null,\n \"min_replica\": 1,\n \"scale_down_delay\": 300,\n \"target_in_flight_tokens\": null,\n \"target_utilization_percentage\": null\n },\n \"additional_autoscaling_config\": {\n \"metrics\": [\n {\n \"name\": \"in_flight_tokens\",\n \"target\": 40000\n }\n ]\n },\n \"metadata\": {\n \"environment\": \"production\",\n \"git_sha\": \"abc123\"\n },\n \"weights\": [\n {\n \"mount_location\": \"/models/base\",\n \"source\": \"hf://meta-llama/Llama-3-8B\"\n }\n ],\n \"egress_restrictions\": null\n}'" }, { "lang": "python", - "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"\")\nurl = \"https://api.baseten.co/v1/llm_models/{model_id}/deployments\"\n\nheaders = {\"Authorization\": f\"Bearer {API_KEY}\"}\n\nresponse = requests.request(\n \"POST\",\n url,\n headers=headers,\n json={'resources': None, 'region': None, 'llm_version': None, 'model_metadata': None, 'autoscaling_settings': {'autoscaling_window': 600, 'concurrency_target': None, 'max_replica': 5, 'max_scale_down_rate': None, 'min_replica': 1, 'scale_down_delay': 300, 'target_in_flight_tokens': None, 'target_utilization_percentage': None}, 'additional_autoscaling_config': {'metrics': [{'name': 'in_flight_tokens', 'target': 40000}]}, 'metadata': {'environment': 'production', 'git_sha': 'abc123'}, 'weights': [{'mount_location': '/models/base', 'source': 'hf://meta-llama/Llama-3-8B'}]}\n)\n\nprint(response.text)" + "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"\")\nurl = \"https://api.baseten.co/v1/llm_models/{model_id}/deployments\"\n\nheaders = {\"Authorization\": f\"Bearer {API_KEY}\"}\n\nresponse = requests.request(\n \"POST\",\n url,\n headers=headers,\n json={'resources': None, 'region': None, 'llm_version': None, 'model_metadata': None, 'autoscaling_settings': {'autoscaling_window': 600, 'concurrency_target': None, 'max_replica': 5, 'max_scale_down_rate': None, 'min_replica': 1, 'scale_down_delay': 300, 'target_in_flight_tokens': None, 'target_utilization_percentage': None}, 'additional_autoscaling_config': {'metrics': [{'name': 'in_flight_tokens', 'target': 40000}]}, 'metadata': {'environment': 'production', 'git_sha': 'abc123'}, 'weights': [{'mount_location': '/models/base', 'source': 'hf://meta-llama/Llama-3-8B'}], 'egress_restrictions': None}\n)\n\nprint(response.text)" } ], "requestBody": { @@ -10615,6 +10615,233 @@ } ] }, + "/v1/sandboxes/configuration": { + "get": { + "operationId": "GetSandboxConfiguration", + "summary": "Get sandbox configuration", + "description": "Return available Carbon-compatible sandbox regions. Configuration is the same for every team, so no team is selected. Only enabled regions supporting Carbon are returned. This describes regional capability, not the runtime selected for a particular team or sandbox. Region configuration is cached for up to 30 seconds.", + "tags": [ + "Sandboxes" + ], + "responses": { + "200": { + "description": "Successful operation.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetSandboxConfigurationResponseV1" + }, + "example": { + "regions": [ + { + "name": "us-was-1", + "country": "us", + "continent": "na", + "location": "Washington", + "info_generation": "CARBON" + } + ] + } + } + } + }, + "400": { + "$ref": "#/components/responses/SandboxError400" + }, + "401": { + "$ref": "#/components/responses/SandboxError401" + }, + "403": { + "$ref": "#/components/responses/SandboxError403" + }, + "429": { + "$ref": "#/components/responses/SandboxError429" + }, + "500": { + "$ref": "#/components/responses/SandboxError500" + } + }, + "x-stability": "unstable" + } + }, + "/v1/sandboxes/instances/{sandbox_name}/metrics": { + "get": { + "operationId": "GetSandboxMetrics", + "summary": "Get sandbox metrics", + "description": "Returns every interval in the requested half-open range [start_time, end_time).\nBuckets align to UTC interval boundaries; partial boundary buckets include only samples\nwithin the requested range. The first bucket may start before start_time. Ranges are limited to 31 days\nand 10000 buckets. Request counts are zero when there is no traffic, and null\nfor buckets entirely before sandbox creation. CPU and memory are null without\nsamples, including standby. Error rate is the fraction of requests returning\n4xx or 5xx, null when there are no requests. Telemetry failures return an error.\n", + "tags": [ + "Sandboxes" + ], + "parameters": [ + { + "$ref": "#/components/parameters/TeamId" + }, + { + "$ref": "#/components/parameters/TeamIdHeader" + }, + { + "$ref": "#/components/parameters/SandboxName" + }, + { + "name": "start_time", + "in": "query", + "required": true, + "schema": { + "type": "string", + "format": "date-time" + } + }, + { + "name": "end_time", + "in": "query", + "required": true, + "schema": { + "type": "string", + "format": "date-time" + } + }, + { + "name": "interval_seconds", + "in": "query", + "required": true, + "schema": { + "type": "integer", + "enum": [ + 10, + 30, + 60, + 300, + 900, + 3600 + ] + } + } + ], + "responses": { + "200": { + "description": "Complete sandbox metrics time series.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SandboxMetricsV1" + } + } + } + }, + "400": { + "description": "Invalid range, interval, or query parameter." + }, + "401": { + "description": "Authentication required." + }, + "403": { + "description": "Team access denied." + }, + "404": { + "description": "Sandbox not found." + }, + "502": { + "description": "Metrics query failed." + }, + "503": { + "description": "Metrics are unavailable." + } + }, + "x-stability": "unstable" + } + }, + "/v1/sandboxes/instances/{sandbox_name}/logs": { + "get": { + "operationId": "GetSandboxLogs", + "summary": "Get sandbox logs", + "description": "Returns sandbox runtime logs, newest first, within the half-open range\n[start_time, end_time). Ranges are limited to 7 days. Follow next_cursor\nuntil it is null to retrieve all pages, keeping the same range and limit.\nLogs before sandbox creation are excluded. Unavailable telemetry returns an error.\n", + "tags": [ + "Sandboxes" + ], + "parameters": [ + { + "$ref": "#/components/parameters/TeamId" + }, + { + "$ref": "#/components/parameters/TeamIdHeader" + }, + { + "$ref": "#/components/parameters/SandboxName" + }, + { + "name": "start_time", + "in": "query", + "required": true, + "schema": { + "type": "string", + "format": "date-time" + } + }, + { + "name": "end_time", + "in": "query", + "required": true, + "schema": { + "type": "string", + "format": "date-time" + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 1000, + "default": 100 + } + }, + { + "name": "cursor", + "in": "query", + "required": false, + "description": "Opaque next_cursor from the previous page. Omit for the first page.", + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 4096 + } + } + ], + "responses": { + "200": { + "description": "A page of sandbox logs.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SandboxLogsV1" + } + } + } + }, + "400": { + "description": "Invalid range, limit, cursor, or query parameter." + }, + "401": { + "description": "Authentication required." + }, + "403": { + "description": "Team access denied." + }, + "404": { + "description": "Sandbox not found." + }, + "502": { + "description": "Logs query failed." + }, + "503": { + "description": "Logs are unavailable." + } + }, + "x-stability": "unstable" + } + }, "/v1/sandboxes/instances": { "get": { "operationId": "ListSandboxes", @@ -10725,12 +10952,12 @@ ], "operationId": "CreateSandbox", "summary": "Create a sandbox", - "description": "Create a sandbox with an optional client-provided name, generated by the server when omitted. The request waits briefly for deployment, then returns the created resource. Deployment may continue after the response; inspect status to determine readiness. Names belonging to failed or terminated sandboxes can be reused; an active sandbox reserves its name. To get started, set image to blaxel/base-image:latest, the built-in image with the sandbox execution API ready to use. It is available directly; no image build, push, or GET /v1/sandboxes/images is needed. Use the returned url to execute commands with the same Bearer API key.", + "description": "Create a sandbox with an optional client-provided name, generated by the server when omitted. The request waits briefly for deployment, then returns the created resource. Deployment may continue after the response; inspect status to determine readiness. Names belonging to failed or terminated sandboxes can be reused; an active sandbox reserves its name. Every field is optional. The server applies image and memory defaults; SDKs should omit fields the caller did not set. A request with no body creates a sandbox from baseten/base-image:latest, the built-in image with the sandbox execution API ready to use, with 4096 MB of memory. It is available directly; no image build, push, or GET /v1/sandboxes/images is needed. Use the returned url to execute commands with your authentication token as a Bearer token, not your Baseten API key.", "tags": [ "Sandboxes" ], "requestBody": { - "required": true, + "required": false, "content": { "application/json": { "schema": { @@ -10805,7 +11032,7 @@ "get": { "operationId": "GetSandbox", "summary": "Get a sandbox", - "description": "Return the sandbox configuration and current state.", + "description": "Return the sandbox configuration and status.", "tags": [ "Sandboxes" ], @@ -10815,6 +11042,15 @@ }, { "$ref": "#/components/parameters/TeamIdHeader" + }, + { + "name": "show_secrets", + "in": "query", + "description": "Reveal environment variable values for workspace administrators. Defaults to false. Callers without the admin role receive masked values even when true.", + "schema": { + "type": "boolean", + "default": false + } } ], "responses": { @@ -10862,7 +11098,7 @@ ], "operationId": "UpdateSandbox", "summary": "Update a sandbox", - "description": "Partially update configuration. Omitted fields remain unchanged; supplied arrays and maps replace their previous values. Structured objects update only supplied fields. Changes to image may reset running state. The name, memory, and network configuration are immutable after creation. Supplying memory or network returns 400, including unchanged, empty, or null values.", + "description": "Partially update configuration. Omitted fields remain unchanged; supplied arrays and maps replace their previous values. Structured objects update only supplied fields. The name, memory, network, region, image, and ports are immutable after creation. Supplying any of these fields returns 400, including unchanged, empty, or null values.", "tags": [ "Sandboxes" ], @@ -10982,6 +11218,46 @@ "x-stability": "unstable" } }, + "/v1/sandboxes/library_images": { + "get": { + "operationId": "ListSandboxLibraryImages", + "summary": "List built-in sandbox images", + "description": "Return the built-in sandbox images, the same for every team, so no team is selected. Use the image field directly as the image of a sandbox, without building or pushing it. Hidden and upcoming images are excluded.", + "tags": [ + "Images" + ], + "responses": { + "200": { + "description": "Successful operation.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListSandboxLibraryImagesResponseV1" + }, + "examples": { + "complete": { + "$ref": "#/components/examples/SandboxLibraryImages" + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/SandboxError401" + }, + "403": { + "$ref": "#/components/responses/SandboxError403" + }, + "429": { + "$ref": "#/components/responses/SandboxError429" + }, + "500": { + "$ref": "#/components/responses/SandboxError500" + } + }, + "x-stability": "unstable" + } + }, "/v1/sandboxes/images": { "get": { "operationId": "ListImages", @@ -11027,7 +11303,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ListImagesResponseV1" + "$ref": "#/components/schemas/ListSandboxImagesResponseV1" }, "examples": { "complete": { @@ -11066,7 +11342,7 @@ ], "operationId": "PushImage", "summary": "Push a sandbox image", - "description": "With image supplied, import the registry image asynchronously. Otherwise return an upload URL for a ZIP source archive containing its Dockerfile and build context. Processing starts after upload. No sandbox is created. Poll the image until BUILT or FAILED.", + "description": "With image supplied, import the registry image asynchronously. Otherwise return an upload URL for a ZIP source archive containing its Dockerfile and build context. The uploaded ZIP archive must not exceed 5 GB. Processing starts after upload. No sandbox is created. Poll the image until BUILT or FAILED.", "tags": [ "Images" ], @@ -11075,7 +11351,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PushImageRequestV1" + "$ref": "#/components/schemas/PushSandboxImageRequestV1" }, "examples": { "archive": { @@ -11094,7 +11370,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PushImageResponseV1" + "$ref": "#/components/schemas/PushSandboxImageResponseV1" }, "examples": { "archive": { @@ -11148,7 +11424,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CleanupImagesResponseV1" + "$ref": "#/components/schemas/CleanupSandboxImagesResponseV1" }, "examples": { "complete": { @@ -11180,7 +11456,7 @@ "/v1/sandboxes/images/{image_name}": { "parameters": [ { - "$ref": "#/components/parameters/ImageName" + "$ref": "#/components/parameters/SandboxImageName" } ], "get": { @@ -11204,7 +11480,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ImageV1" + "$ref": "#/components/schemas/SandboxImageV1" }, "examples": { "complete": { @@ -11253,7 +11529,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ImageV1" + "$ref": "#/components/schemas/SandboxImageV1" }, "examples": { "complete": { @@ -11285,16 +11561,16 @@ "x-stability": "unstable" } }, - "/v1/sandboxes/images/{image_name}/tags": { + "/v1/sandboxes/images/{image_name}/logs": { "parameters": [ { - "$ref": "#/components/parameters/ImageName" + "$ref": "#/components/parameters/SandboxImageName" } ], "get": { - "operationId": "ListImageTags", - "summary": "List image tags", - "description": "Return one cursor-paginated page of image versions.", + "operationId": "GetImageBuildLogs", + "summary": "Get image build logs", + "description": "Return one page of logs from the latest recorded build of this image, including failed builds, newest first. Logs may take a short time to appear. Defaults to the last 24 hours; the requested time range must not exceed 7 days. Keep start_time and end_time fixed when paging with offset. A new build changes the log source; this endpoint does not retrieve a historical build by ID. While a new upload is waiting to start, logs may still refer to the preceding build. Older builds without a recorded environment use image-level build logs within the requested time range.", "tags": [ "Images" ], @@ -11306,44 +11582,63 @@ "$ref": "#/components/parameters/TeamIdHeader" }, { - "$ref": "#/components/parameters/Cursor" - }, - { - "$ref": "#/components/parameters/Limit" + "name": "start_time", + "in": "query", + "description": "Inclusive RFC 3339 start time. Defaults to 24 hours before end_time.", + "schema": { + "type": "string", + "format": "date-time" + } }, { - "name": "sort", + "name": "end_time", "in": "query", - "description": "Sort by tag name: name:asc or name:desc. Keep the same sort when following a cursor.", + "description": "RFC 3339 end time. Defaults to the current time.", "schema": { "type": "string", - "default": "name:asc" + "format": "date-time" } }, { - "name": "q", + "name": "limit", "in": "query", - "description": "Case-sensitive tag name prefix. Cannot be combined with name. Forces ascending name order.", + "description": "Maximum number of log entries to return.", "schema": { - "type": "string" + "type": "integer", + "minimum": 1, + "maximum": 1000, + "default": 100 } }, { - "name": "name", + "name": "offset", "in": "query", - "description": "Exact tag name. Cannot be combined with q. Forces ascending name order.", + "description": "Number of log entries to skip. Narrow the time range beyond 10000 entries.", "schema": { - "type": "string" + "type": "integer", + "minimum": 0, + "maximum": 10000, + "default": 0 } } ], "responses": { "200": { - "description": "Successful operation.", + "description": "Build logs in the requested time range. An empty array means no logs are available in that range.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ListImageTagsResponseV1" + "$ref": "#/components/schemas/SandboxImageBuildLogsResponseV1" + }, + "example": { + "logs": [ + { + "timestamp": "2026-09-29T12:00:00Z", + "message": "Step 1/2: loading build context", + "severity": 9 + } + ], + "total_count": 1 } } } @@ -11365,27 +11660,115 @@ }, "500": { "$ref": "#/components/responses/SandboxError500" + }, + "503": { + "description": "Build log service is temporarily unavailable. Returns a JSON error with code and message." } }, "x-stability": "unstable" } }, - "/v1/sandboxes/images/{image_name}/tags/{tag_name}": { + "/v1/sandboxes/images/{image_name}/tags": { "parameters": [ { - "$ref": "#/components/parameters/ImageName" - }, - { - "$ref": "#/components/parameters/TagName" + "$ref": "#/components/parameters/SandboxImageName" } ], - "delete": { - "parameters": [ - { - "$ref": "#/components/parameters/TeamId" - }, - { - "$ref": "#/components/parameters/TeamIdHeader" + "get": { + "operationId": "ListImageTags", + "summary": "List image tags", + "description": "Return one cursor-paginated page of image versions.", + "tags": [ + "Images" + ], + "parameters": [ + { + "$ref": "#/components/parameters/TeamId" + }, + { + "$ref": "#/components/parameters/TeamIdHeader" + }, + { + "$ref": "#/components/parameters/Cursor" + }, + { + "$ref": "#/components/parameters/Limit" + }, + { + "name": "sort", + "in": "query", + "description": "Sort by tag name: name:asc or name:desc. Keep the same sort when following a cursor.", + "schema": { + "type": "string", + "default": "name:asc" + } + }, + { + "name": "q", + "in": "query", + "description": "Case-sensitive tag name prefix. Cannot be combined with name. Forces ascending name order.", + "schema": { + "type": "string" + } + }, + { + "name": "name", + "in": "query", + "description": "Exact tag name. Cannot be combined with q. Forces ascending name order.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Successful operation.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListSandboxImageTagsResponseV1" + } + } + } + }, + "400": { + "$ref": "#/components/responses/SandboxError400" + }, + "401": { + "$ref": "#/components/responses/SandboxError401" + }, + "403": { + "$ref": "#/components/responses/SandboxError403" + }, + "404": { + "$ref": "#/components/responses/SandboxError404" + }, + "429": { + "$ref": "#/components/responses/SandboxError429" + }, + "500": { + "$ref": "#/components/responses/SandboxError500" + } + }, + "x-stability": "unstable" + } + }, + "/v1/sandboxes/images/{image_name}/tags/{tag_name}": { + "parameters": [ + { + "$ref": "#/components/parameters/SandboxImageName" + }, + { + "$ref": "#/components/parameters/TagName" + } + ], + "delete": { + "parameters": [ + { + "$ref": "#/components/parameters/TeamId" + }, + { + "$ref": "#/components/parameters/TeamIdHeader" } ], "operationId": "DeleteImageTag", @@ -11400,7 +11783,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ImageV1" + "$ref": "#/components/schemas/SandboxImageV1" }, "examples": { "complete": { @@ -25654,6 +26037,7 @@ "type": "object" }, "CreateLoopsRunRequestV1": { + "description": "Request to create a Loops run together with its paired sampler.", "properties": { "session_id": { "description": "ID of the Loops session this run belongs to.", @@ -25777,6 +26161,20 @@ "default": null, "description": "Optional ID of a prior Loops session whose trainer and/or sampler should be reused for this run. Deprecated in favor of reuse_from_run_id.", "title": "Reuse From Session Id" + }, + "sampler_num_replicas": { + "anyOf": [ + { + "minimum": 1, + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Number of replicas the run's sampler runs, applied as both its minimum and maximum. Must be at least 1. If omitted, a new sampler uses the platform defaults and a sampler reused from an earlier run keeps its settings. A run that already has a sampler keeps it unchanged. When the run ends, its sampler is scaled down.", + "title": "Sampler Num Replicas" } }, "required": [ @@ -25838,6 +26236,139 @@ "title": "GetLoopsRunResponseV1", "type": "object" }, + "CreateLoopsTrainerRequestV1": { + "properties": { + "session_id": { + "description": "ID of the Loops session this run belongs to.", + "title": "Session Id", + "type": "string" + }, + "base_model": { + "description": "Base model ID (e.g. 'Qwen/Qwen3-8B').", + "title": "Base Model", + "type": "string" + }, + "name": { + "anyOf": [ + { + "maxLength": 255, + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Optional display name for the run. Defaults to the base model name when omitted.", + "title": "Name" + }, + "max_seq_len": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Maximum prompt length (in tokens) the run must handle. Set this to the longest training example you plan to send. Defaults to the maximum supported by the model configuration.", + "title": "Max Seq Len" + }, + "lora_rank": { + "default": 64, + "description": "LoRA rank.", + "minimum": 1, + "title": "Lora Rank", + "type": "integer" + }, + "seed": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Random seed for reproducibility.", + "title": "Seed" + }, + "scale_down_delay_seconds": { + "default": 900, + "description": "Seconds of inactivity before the run scales to zero. Must be between 1 and 3600 (1 hour). Defaults to 900 (15 minutes).", + "exclusiveMinimum": 0, + "maximum": 3600, + "title": "Scale Down Delay Seconds", + "type": "integer" + }, + "availability_model": { + "$ref": "#/components/schemas/V1AvailabilityModel", + "default": "dedicated", + "description": "Capacity the trainer runs on. 'dedicated' is not preempted. 'spot' runs below inference and reaches idle reserved capacity, but the run is stopped if its GPUs are reclaimed and cannot be resumed.", + "examples": [ + "spot" + ] + }, + "replicas": { + "default": 1, + "description": "Number of data-parallel trainer replicas. Each replica is one full copy of the model's preset node group, so the trainer deployment runs (preset node_count * replicas) nodes (e.g. replicas=4 on a 4-node preset \u2192 16 nodes, 4 DP workers). Must be a positive integer. Defaults to 1.", + "minimum": 1, + "title": "Replicas", + "type": "integer" + }, + "path": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Optional bt:// URI of an existing checkpoint to load weights from on startup. Form: bt://loops:/weights/.", + "examples": [ + "bt://loops:k4q95w5/weights/step-100" + ], + "title": "Path" + }, + "reuse_from_run_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Optional ID of a prior Loops run whose trainer and/or sampler should be reused for this run instead of provisioning fresh. The prior run must use the same base model and belong to the same team.", + "title": "Reuse From Run Id" + }, + "reuse_from_session_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Optional ID of a prior Loops session whose trainer and/or sampler should be reused for this run. Deprecated in favor of reuse_from_run_id.", + "title": "Reuse From Session Id" + } + }, + "required": [ + "session_id", + "base_model" + ], + "title": "CreateLoopsTrainerRequestV1", + "type": "object" + }, "ListLoopsSamplersResponseV1": { "description": "Response for ``GET /v1/loops/samplers``.\n\nReturns the caller's samplers, including those paired to runs and\nstandalone samplers. Ordered newest-first.", "properties": { @@ -25965,6 +26496,20 @@ "default": null, "description": "Optional ID of a prior Loops session to reuse a trainer and/or sampler from. Deprecated.", "title": "Reuse From Session Id" + }, + "num_replicas": { + "anyOf": [ + { + "minimum": 1, + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Number of replicas the sampler runs, applied as both its minimum and maximum. Must be at least 1. If omitted, a new sampler uses the platform defaults and a paired sampler reused from an earlier run keeps its settings. A run that already has a sampler keeps it unchanged, and when a run ends, its sampler is scaled down.", + "title": "Num Replicas" } }, "required": [ @@ -28462,19 +29007,67 @@ "title": "ModelApisUsageRequestV1", "type": "object" }, - "CreateLLMModelRequestV1": { - "description": "A request to create a BIS-LLM model", + "EgressRestrictionsV1": { "properties": { - "resources": { - "additionalProperties": true, - "description": "Resources allocated to the model", - "title": "Resources", - "type": "object" - }, - "region": { + "fqdn_allow_list": { "anyOf": [ { - "type": "string" + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Allowed outbound FQDNs; '*' wildcards are supported.", + "examples": [ + [ + "*.example.com" + ] + ], + "title": "Fqdn Allow List" + }, + "ip_allow_list": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Allowed outbound IPv4 addresses or CIDR ranges.", + "examples": [ + [ + "1.1.1.1/32" + ] + ], + "title": "Ip Allow List" + } + }, + "title": "EgressRestrictionsV1", + "type": "object" + }, + "CreateLLMModelRequestV1": { + "description": "A request to create a BIS-LLM model", + "properties": { + "resources": { + "additionalProperties": true, + "description": "Resources allocated to the model", + "title": "Resources", + "type": "object" + }, + "region": { + "anyOf": [ + { + "type": "string" }, { "type": "null" @@ -28616,6 +29209,18 @@ ], "title": "Weights" }, + "egress_restrictions": { + "anyOf": [ + { + "$ref": "#/components/schemas/EgressRestrictionsV1" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Restricts this deployment's egress to the specified FQDNs and IP addresses; an empty block allows none. Requires the organization to have egress restrictions enabled." + }, "name": { "description": "Name of the model", "title": "Name", @@ -28822,6 +29427,18 @@ ] ], "title": "Weights" + }, + "egress_restrictions": { + "anyOf": [ + { + "$ref": "#/components/schemas/EgressRestrictionsV1" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Restricts this deployment's egress to the specified FQDNs and IP addresses; an empty block allows none. Requires the organization to have egress restrictions enabled." } }, "required": [ @@ -34495,6 +35112,268 @@ "title": "RegisterAPIKeyResponseV1", "type": "object" }, + "GetSandboxConfigurationResponseV1": { + "type": "object", + "required": [ + "regions" + ], + "properties": { + "regions": { + "type": "array", + "description": "Available Carbon-compatible regions, sorted by name. Empty when none are available.", + "items": { + "$ref": "#/components/schemas/SandboxRegionV1" + } + } + } + }, + "SandboxRegionV1": { + "type": "object", + "required": [ + "name", + "country", + "continent", + "location", + "info_generation" + ], + "properties": { + "name": { + "type": "string", + "description": "Public region identifier to use when creating a sandbox.", + "example": "us-was-1" + }, + "country": { + "type": "string", + "description": "Country code.", + "example": "us" + }, + "continent": { + "type": "string", + "description": "Continent code.", + "example": "na" + }, + "location": { + "type": "string", + "description": "Region location.", + "example": "Washington" + }, + "info_generation": { + "type": "string", + "description": "Runtime generation supported by this region, using the public name CARBON. Actual runtime selection depends on the team and sandbox configuration.", + "enum": [ + "CARBON" + ] + } + } + }, + "SandboxLogsV1": { + "type": "object", + "required": [ + "sandbox_name", + "start_time", + "end_time", + "logs", + "next_cursor" + ], + "properties": { + "sandbox_name": { + "type": "string" + }, + "start_time": { + "type": "string", + "format": "date-time" + }, + "end_time": { + "type": "string", + "format": "date-time" + }, + "logs": { + "type": "array", + "maxItems": 1000, + "items": { + "$ref": "#/components/schemas/SandboxLogEntryV1" + } + }, + "next_cursor": { + "description": "Opaque cursor for the next page; null when there are no more entries.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + } + }, + "SandboxLogEntryV1": { + "type": "object", + "required": [ + "timestamp", + "message", + "severity", + "trace_id" + ], + "properties": { + "timestamp": { + "type": "string", + "format": "date-time" + }, + "message": { + "type": "string" + }, + "severity": { + "type": "integer", + "description": "Numeric log severity." + }, + "trace_id": { + "type": "string", + "description": "Associated trace identifier, or an empty string when unavailable." + }, + "action": { + "type": "string", + "description": "Action or command when present on the log entry." + } + } + }, + "SandboxMetricsV1": { + "type": "object", + "required": [ + "sandbox_name", + "start_time", + "end_time", + "interval_seconds", + "data" + ], + "properties": { + "sandbox_name": { + "type": "string" + }, + "start_time": { + "type": "string", + "format": "date-time" + }, + "end_time": { + "type": "string", + "format": "date-time" + }, + "interval_seconds": { + "type": "integer" + }, + "data": { + "type": "array", + "maxItems": 10000, + "items": { + "$ref": "#/components/schemas/SandboxMetricsPointV1" + } + } + } + }, + "SandboxMetricsPointV1": { + "type": "object", + "required": [ + "timestamp", + "requests", + "cpu_percent", + "memory_bytes", + "error_rate" + ], + "properties": { + "timestamp": { + "type": "string", + "format": "date-time", + "description": "Start of this interval." + }, + "requests": { + "description": "Request count. Zero without traffic; null for intervals entirely before creation.", + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ] + }, + "cpu_percent": { + "description": "Peak CPU usage in this interval, where 100 is one full CPU core. Null without a sample.", + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ] + }, + "memory_bytes": { + "description": "Memory usage in bytes, averaged per series then maximum across series. Null without a sample.", + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ] + }, + "error_rate": { + "description": "Fraction of requests returning 4xx or 5xx. Null when there are no requests.", + "anyOf": [ + { + "type": "number", + "minimum": 0, + "maximum": 1 + }, + { + "type": "null" + } + ] + } + } + }, + "SandboxImageBuildLogV1": { + "type": "object", + "required": [ + "timestamp", + "message", + "severity" + ], + "properties": { + "timestamp": { + "type": "string", + "format": "date-time" + }, + "message": { + "type": "string" + }, + "severity": { + "type": "integer", + "description": "Numeric OpenTelemetry severity level." + } + } + }, + "SandboxImageBuildLogsResponseV1": { + "type": "object", + "required": [ + "logs", + "total_count" + ], + "properties": { + "logs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SandboxImageBuildLogV1" + } + }, + "total_count": { + "type": "integer", + "format": "int64", + "description": "Number of matching log entries in the requested time range." + } + } + }, "SandboxLifecycleV1": { "type": "object", "description": "Lifecycle configuration controlling automatic sandbox deletion based on idle time, max age, or specific dates", @@ -34524,7 +35403,11 @@ ] }, "terminated_retention": { - "type": "string", + "allOf": [ + { + "$ref": "#/components/schemas/SandboxDurationV1" + } + ], "description": "Duration to keep the sandbox record after termination for log access (e.g., '1h', '24h', '7d'). Defaults to 5m. Subject to maximum quota limits.", "example": "24h" } @@ -34574,7 +35457,7 @@ }, "SandboxDurationV1": { "type": "string", - "description": "Duration using seconds, minutes, hours, or composite durations such as 1h30m. Whole days and weeks are also supported, for example 7d or 2w.", + "description": "Duration using seconds, minutes, hours, or composite durations such as 1h30m. Whole days and weeks are also supported, for example 7d or 2w, where d is 24h and w is 7 \u00d7 24h. Days and weeks cannot be combined with other units, so 1d12h is rejected; use 36h instead. Values are returned exactly as sent, without normalization.", "pattern": "^[+-]?(0|[0-9]+[dw]|([0-9]+(\\.[0-9]*)?|\\.[0-9]+)(ns|us|\u00b5s|\u03bcs|ms|s|m|h)(([0-9]+(\\.[0-9]*)?|\\.[0-9]+)(ns|us|\u00b5s|\u03bcs|ms|s|m|h))*)$", "example": "24h" }, @@ -34912,7 +35795,8 @@ }, "secret": { "type": "boolean", - "description": "Whether the value is a secret", + "description": "Whether the value is a secret. Defaults to true; secret values are returned as \"****\". Set false explicitly to return the original value.", + "default": true, "example": false }, "value": { @@ -34994,12 +35878,6 @@ "type": "object", "description": "Writable sandbox configuration. Fields are serialized at the root of the request or resource.", "properties": { - "enabled": { - "type": "boolean", - "description": "When false, the sandbox is disabled and will not accept connections", - "example": true, - "default": true - }, "lifecycle": { "description": "Lifecycle configuration controlling automatic sandbox deletion based on idle time, max age, or specific dates", "allOf": [ @@ -35096,8 +35974,8 @@ }, "image": { "type": "string", - "description": "Image reference including its tag. Use blaxel/base-image:latest to get started with the built-in sandbox execution API. This image is available directly without building, pushing, or listing images through GET /v1/sandboxes/images.", - "example": "blaxel/base-image:latest" + "description": "Image reference including its tag. Built-in image references are returned in the canonical baseten/ namespace. Use baseten/base-image:latest to get started with the built-in sandbox execution API. This image is available directly without building, pushing, or listing images through GET /v1/sandboxes/images.", + "example": "baseten/base-image:latest" }, "memory": { "type": "integer", @@ -35120,12 +35998,6 @@ } ] }, - "display_name": { - "type": "string", - "description": "Human-readable name for display in the UI. Can contain spaces and special characters, max 63 characters.", - "example": "Baseten API review", - "maxLength": 63 - }, "external_id": { "type": "string", "description": "Caller-owned identifier for external lookups. Max 64 chars, alphanumeric + dash.", @@ -35148,7 +36020,6 @@ } }, "example": { - "enabled": true, "lifecycle": { "expiration_policies": [ { @@ -35216,7 +36087,7 @@ "value": "3000" } ], - "image": "blaxel/base-image:latest", + "image": "baseten/base-image:latest", "memory": 4096, "ports": [ { @@ -35225,7 +36096,6 @@ "target": 3000 } ], - "display_name": "Baseten API review", "external_id": "api-review-20260916-001", "labels": { "env": "development", @@ -35238,6 +36108,10 @@ "type": "object", "description": "Configuration for a new sandbox. The client may provide a name; otherwise the server generates one. The name is immutable after creation.", "properties": { + "create_if_not_exists": { + "type": "boolean", + "description": "When true, return the existing live sandbox with this name or recreate it if it is failed, terminated, or being deleted. The server handles concurrent creation and deletion races with a bounded wait; persistent contention returns a conflict. Requires name. Existing configuration is preserved. Defaults to false when omitted." + }, "name": { "type": "string", "description": "Optional unique sandbox name. Generated by the server when omitted; immutable after creation.", @@ -35340,12 +36214,14 @@ }, "image": { "type": "string", - "description": "Image reference including its tag. Use blaxel/base-image:latest to get started with the built-in sandbox execution API. This image is available directly without building, pushing, or listing images through GET /v1/sandboxes/images.", - "example": "blaxel/base-image:latest" + "description": "Image reference including its tag. Defaults to baseten/base-image:latest, the built-in sandbox execution API. This image is available directly without building, pushing, or listing images through GET /v1/sandboxes/images.", + "default": "baseten/base-image:latest", + "example": "baseten/base-image:latest" }, "memory": { "type": "integer", - "description": "Memory allocation in megabytes. Also determines CPU allocation (CPU cores = memory in MB / 2048, e.g., 4096MB = 2 CPUs).", + "description": "Memory allocation in megabytes. Also determines CPU allocation (CPU cores = memory in MB / 2048, e.g., 4096MB = 2 CPUs). Defaults to 4096.", + "default": 4096, "example": 4096, "minimum": 1 }, @@ -35364,12 +36240,6 @@ } ] }, - "display_name": { - "type": "string", - "description": "Human-readable name for display in the UI. Can contain spaces and special characters, max 63 characters.", - "example": "Baseten API review", - "maxLength": 63 - }, "external_id": { "type": "string", "description": "Caller-owned identifier for external lookups. Max 64 chars, alphanumeric + dash.", @@ -35460,7 +36330,7 @@ "value": "3000" } ], - "image": "blaxel/base-image:latest", + "image": "baseten/base-image:latest", "memory": 4096, "ports": [ { @@ -35469,7 +36339,6 @@ "target": 3000 } ], - "display_name": "Baseten API review", "external_id": "api-review-20260916-001", "labels": { "env": "development", @@ -35480,13 +36349,8 @@ }, "UpdateSandboxRequestV1": { "type": "object", - "description": "Partial sandbox update. Omitted fields remain unchanged. Supplied arrays and maps (including labels) replace their previous values; supplied structured objects update only their supplied fields. Null is not accepted. The name, memory, and network configuration are immutable after creation. Supplying memory or network returns 400, including unchanged, empty, or null values.", + "description": "Partial sandbox update. Omitted fields remain unchanged. Supplied arrays and maps (including labels) replace their previous values; supplied structured objects update only their supplied fields. Null is not accepted. The name, memory, network, region, image, and ports are immutable after creation. Supplying any of these fields returns 400, including unchanged, empty, or null values.", "properties": { - "enabled": { - "type": "boolean", - "description": "When false, the sandbox is disabled and will not accept connections", - "example": true - }, "lifecycle": { "description": "Lifecycle configuration controlling automatic sandbox deletion based on idle time, max age, or specific dates", "allOf": [ @@ -35515,11 +36379,6 @@ "terminated_retention": "24h" } }, - "region": { - "type": "string", - "description": "Region where the sandbox runs (for example us-pdx-1 or eu-lon-1). When omitted at creation, the closest region is selected.", - "example": "us-pdx-1" - }, "envs": { "type": "array", "description": "Environment variables injected into the sandbox.", @@ -35539,32 +36398,6 @@ } ] }, - "image": { - "type": "string", - "description": "Image reference including its tag. Use blaxel/base-image:latest to get started with the built-in sandbox execution API. This image is available directly without building, pushing, or listing images through GET /v1/sandboxes/images.", - "example": "blaxel/base-image:latest" - }, - "ports": { - "description": "Set of ports for a resource", - "allOf": [ - { - "$ref": "#/components/schemas/SandboxPortsV1" - } - ], - "example": [ - { - "name": "http", - "protocol": "HTTP", - "target": 3000 - } - ] - }, - "display_name": { - "type": "string", - "description": "Human-readable name for display in the UI. Can contain spaces and special characters, max 63 characters.", - "example": "Baseten API review - revised", - "maxLength": 63 - }, "external_id": { "type": "string", "description": "Caller-owned identifier for external lookups. Max 64 chars, alphanumeric + dash.", @@ -35589,7 +36422,6 @@ }, "minProperties": 1, "example": { - "enabled": true, "lifecycle": { "expiration_policies": [ { @@ -35610,7 +36442,6 @@ ], "terminated_retention": "24h" }, - "region": "us-pdx-1", "envs": [ { "name": "NODE_ENV", @@ -35623,15 +36454,6 @@ "value": "3000" } ], - "image": "blaxel/base-image:latest", - "ports": [ - { - "name": "http", - "protocol": "HTTP", - "target": 3000 - } - ], - "display_name": "Baseten API review - revised", "external_id": "api-review-20260916-001", "labels": { "env": "development", @@ -35659,7 +36481,7 @@ }, "url": { "type": "string", - "description": "Base URL of this sandbox's execution API. Use this exact returned URL; do not reconstruct its hostname. Authenticate requests with the same Authorization: Bearer header used to create the sandbox. No additional routing headers are required. Fetch GET {url}/swagger/doc.json with that header for the API reference served by this sandbox. For example, POST {url}/process with Content-Type: application/json and {\"command\":\"echo hello\",\"waitForCompletion\":true} executes a command and waits for its result. Execution API fields use camelCase, independently of this API's snake_case fields.", + "description": "Base URL of this sandbox's execution API, always present on successful creation. The URL is assigned before deployment completes; inspect status for readiness. Use this exact returned URL; do not reconstruct its hostname. Authenticate requests with your authentication token using Authorization: Bearer . Do not send the Baseten API key directly. No additional routing headers are required. Fetch GET {url}/swagger/doc.json with that header for the API reference served by this sandbox. For example, POST {url}/process with Content-Type: application/json and {\"command\":\"echo hello\",\"waitForCompletion\":true} executes a command and waits for its result. Execution API fields use camelCase, independently of this API's snake_case fields.", "format": "uri", "readOnly": true, "example": "https://sbx-baseten-api-review-0916-esb1qo.us-pdx-1.b10.run" @@ -35673,16 +36495,6 @@ ], "example": "DEPLOYED" }, - "state": { - "type": "string", - "description": "Current execution state when available.", - "enum": [ - "RUNNING", - "STANDBY" - ], - "readOnly": true, - "example": "RUNNING" - }, "created_at": { "type": "string", "description": "Time the sandbox was created.", @@ -35726,6 +36538,7 @@ }, "required": [ "name", + "url", "status", "created_at" ], @@ -35733,7 +36546,6 @@ "name": "baseten-api-review-0916", "url": "https://sbx-baseten-api-review-0916-esb1qo.us-pdx-1.b10.run", "status": "DEPLOYED", - "state": "RUNNING", "created_at": "2026-09-16T21:26:58.545765901Z", "updated_at": "2026-09-16T21:31:13Z", "created_by": "sandbox-automation", @@ -35744,7 +36556,6 @@ } ], "example": { - "enabled": true, "lifecycle": { "expiration_policies": [ { @@ -35809,7 +36620,7 @@ "value": "3000" } ], - "image": "blaxel/base-image:latest", + "image": "baseten/base-image:latest", "memory": 4096, "ports": [ { @@ -35818,7 +36629,6 @@ "target": 3000 } ], - "display_name": "Baseten API review", "external_id": "api-review-20260916-001", "labels": { "env": "development", @@ -35828,7 +36638,6 @@ "name": "baseten-api-review-0916", "url": "https://sbx-baseten-api-review-0916-esb1qo.us-pdx-1.b10.run", "status": "DEPLOYED", - "state": "RUNNING", "created_at": "2026-09-16T21:26:58.545765901Z", "updated_at": "2026-09-16T21:31:13Z", "created_by": "sandbox-automation", @@ -35839,7 +36648,7 @@ }, "SandboxStatusV1": { "type": "string", - "description": "Sandbox deployment status.", + "description": "Sandbox deployment status, always uppercase. This tracks provisioning and differs from the execution API state, whose values such as running are lowercase.", "enum": [ "DEPLOYING", "DEPLOYED", @@ -35893,7 +36702,6 @@ }, "example": [ { - "enabled": true, "lifecycle": { "expiration_policies": [ { @@ -35958,7 +36766,7 @@ "value": "3000" } ], - "image": "blaxel/base-image:latest", + "image": "baseten/base-image:latest", "memory": 4096, "ports": [ { @@ -35967,7 +36775,6 @@ "target": 3000 } ], - "display_name": "Baseten API review", "external_id": "api-review-20260916-001", "labels": { "env": "development", @@ -35977,7 +36784,6 @@ "name": "baseten-api-review-0916", "url": "https://sbx-baseten-api-review-0916-esb1qo.us-pdx-1.b10.run", "status": "DEPLOYED", - "state": "RUNNING", "created_at": "2026-09-16T21:26:58.545765901Z", "updated_at": "2026-09-16T21:31:13Z", "created_by": "sandbox-automation", @@ -36007,7 +36813,6 @@ "example": { "items": [ { - "enabled": true, "lifecycle": { "expiration_policies": [ { @@ -36072,7 +36877,7 @@ "value": "3000" } ], - "image": "blaxel/base-image:latest", + "image": "baseten/base-image:latest", "memory": 4096, "ports": [ { @@ -36081,7 +36886,6 @@ "target": 3000 } ], - "display_name": "Baseten API review", "external_id": "api-review-20260916-001", "labels": { "env": "development", @@ -36091,7 +36895,6 @@ "name": "baseten-api-review-0916", "url": "https://sbx-baseten-api-review-0916-esb1qo.us-pdx-1.b10.run", "status": "DEPLOYED", - "state": "RUNNING", "created_at": "2026-09-16T21:26:58.545765901Z", "updated_at": "2026-09-16T21:31:13Z", "created_by": "sandbox-automation", @@ -36106,7 +36909,7 @@ } } }, - "ListImagesResponseV1": { + "ListSandboxImagesResponseV1": { "type": "object", "description": "One page of image repository summaries. Fetch tags through the separate tag listing endpoint.", "properties": { @@ -36114,7 +36917,7 @@ "type": "array", "description": "Image repositories on this page.", "items": { - "$ref": "#/components/schemas/ImageV1" + "$ref": "#/components/schemas/SandboxImageSummaryV1" } }, "pagination": { @@ -36126,14 +36929,14 @@ "pagination" ] }, - "ListImageTagsResponseV1": { + "ListSandboxImageTagsResponseV1": { "type": "object", "description": "One page of image tags.", "properties": { "items": { "type": "array", "items": { - "$ref": "#/components/schemas/ImageTagV1" + "$ref": "#/components/schemas/SandboxImageTagV1" } }, "pagination": { @@ -36145,7 +36948,7 @@ "pagination" ] }, - "ImageStatusV1": { + "SandboxImageStatusV1": { "type": "string", "description": "Image processing status. Only BUILT images are ready to use.", "enum": [ @@ -36157,7 +36960,7 @@ "readOnly": true, "example": "BUILT" }, - "ImageTagV1": { + "SandboxImageTagV1": { "type": "object", "description": "A tag identifying a version of a sandbox image.", "properties": { @@ -36199,25 +37002,20 @@ "size": 134217728 } }, - "ImageV1": { + "SandboxImageSummaryV1": { "type": "object", - "description": "Sandbox image repository. List and get operations return a summary without embedded tags.", + "description": "Sandbox image repository summary. Fetch tags through GET /sandboxes/images/{image_name}/tags.", "properties": { "name": { "type": "string", "description": "Stable repository name supplied when pushing the image.", "example": "base-image" }, - "display_name": { - "type": "string", - "description": "Human-readable image repository name.", - "example": "b10/base-image" - }, "status": { "description": "Image processing status. Only BUILT images are ready to use.", "allOf": [ { - "$ref": "#/components/schemas/ImageStatusV1" + "$ref": "#/components/schemas/SandboxImageStatusV1" } ], "example": "BUILT" @@ -36258,59 +37056,57 @@ "readOnly": true, "description": "Number of image versions in the repository.", "example": 2 - }, - "tags": { - "type": "array", - "description": "Empty for list and get summary responses. Use GET /sandboxes/images/{image_name}/tags to retrieve paginated image versions.", - "items": { - "$ref": "#/components/schemas/ImageTagV1" - }, - "example": [ - { - "name": "latest", - "created_at": "2026-09-16T21:20:00Z", - "updated_at": "2026-09-16T21:25:00Z", - "size": 134217728 - }, - { - "name": "20260915212000", - "created_at": "2026-09-15T21:20:00Z", - "updated_at": "2026-09-15T21:25:00Z", - "size": 125829120 - } - ] } }, "required": [ "name", - "status", - "tags" + "status" ], "example": { "name": "base-image", - "display_name": "b10/base-image", "status": "BUILT", "created_at": "2026-09-15T21:20:00Z", "updated_at": "2026-09-16T21:25:00Z", "last_deployed_at": "2026-09-16T21:26:58.545765901Z", "size": 260046848, - "tags": [ - { - "name": "latest", - "created_at": "2026-09-16T21:20:00Z", - "updated_at": "2026-09-16T21:25:00Z", - "size": 134217728 + "tag_count": 2 + } + }, + "SandboxImageV1": { + "description": "Sandbox image repository. Get operations return a summary with an empty tags array.", + "allOf": [ + { + "$ref": "#/components/schemas/SandboxImageSummaryV1" + }, + { + "type": "object", + "properties": { + "tags": { + "type": "array", + "description": "Empty for get summary responses. Use GET /sandboxes/images/{image_name}/tags to retrieve paginated image versions.", + "items": { + "$ref": "#/components/schemas/SandboxImageTagV1" + }, + "example": [] + } }, - { - "name": "20260915212000", - "created_at": "2026-09-15T21:20:00Z", - "updated_at": "2026-09-15T21:25:00Z", - "size": 125829120 - } - ] + "required": [ + "tags" + ] + } + ], + "example": { + "name": "base-image", + "status": "BUILT", + "created_at": "2026-09-15T21:20:00Z", + "updated_at": "2026-09-16T21:25:00Z", + "last_deployed_at": "2026-09-16T21:26:58.545765901Z", + "size": 260046848, + "tag_count": 2, + "tags": [] } }, - "PushImageRequestV1": { + "PushSandboxImageRequestV1": { "type": "object", "description": "Push a sandbox image from a source archive or an existing registry image.", "properties": { @@ -36322,7 +37118,7 @@ }, "image": { "type": "string", - "description": "Optional source registry image reference including a registry hostname. When omitted, the response provides an archive upload URL.", + "description": "Optional source registry image reference including a registry hostname. When omitted, the response provides an archive upload URL. The uploaded ZIP archive must not exceed 5 GB.", "example": "docker.io/b10/base-image:latest" }, "docker_config": { @@ -36341,7 +37137,7 @@ "docker_config": "{\"auths\":{\"https://index.docker.io/v1/\":{\"auth\":\"YjEwLXJldmlldzpkZW1vLW5vdC1hLXZhbGlkLXJlZ2lzdHJ5LXRva2Vu\"}}}" } }, - "PushImageResponseV1": { + "PushSandboxImageResponseV1": { "type": "object", "description": "Accepted image push. Acceptance does not imply readiness; poll GET /sandboxes/images/{image_name} until status is BUILT or FAILED.", "properties": { @@ -36354,14 +37150,14 @@ "description": "Image processing status. Only BUILT images are ready to use.", "allOf": [ { - "$ref": "#/components/schemas/ImageStatusV1" + "$ref": "#/components/schemas/SandboxImageStatusV1" } ], "example": "BUILDING" }, "upload_url": { "type": "string", - "description": "Temporary signed URL for uploading the source ZIP archive with HTTP PUT. Present only when no source image was supplied. Uploading starts asynchronous processing. This storage upload is separate from the API endpoints.", + "description": "Temporary signed URL for uploading the source ZIP archive with HTTP PUT. Present only when no source image was supplied. The uploaded ZIP archive must not exceed 5 GB. Uploading starts asynchronous processing. This storage upload is separate from the API endpoints.", "format": "uri", "example": "https://uploads.b10.run/images/base-image/20260916212658/source.zip?expires=2026-09-16T22%3A26%3A58Z&signature=demo-not-a-valid-upload-signature" }, @@ -36381,7 +37177,168 @@ "image": "b10/base-image:latest" } }, - "CleanupImagesResponseV1": { + "SandboxLibraryImageVolumeV1": { + "type": "object", + "description": "Volume attachment suggested by a built-in image.", + "properties": { + "name": { + "type": "string", + "description": "Volume name, or an internal identifier for ephemeral volumes.", + "example": "scratch" + }, + "mount_path": { + "type": "string", + "description": "Absolute filesystem path where the volume is mounted.", + "example": "/mnt/data" + }, + "type": { + "type": "string", + "description": "Volume type, persistent when empty.", + "example": "ephemeral" + }, + "size_mb": { + "type": "integer", + "description": "Storage capacity in megabytes for ephemeral volumes.", + "example": 10240 + }, + "read_only": { + "type": "boolean", + "description": "Whether the volume is mounted read-only.", + "example": false + } + }, + "required": [ + "name", + "mount_path" + ] + }, + "SandboxLibraryImageCreationOptionsV1": { + "type": "object", + "description": "Optional settings suggested when creating a sandbox from this image.", + "properties": { + "extra_args": { + "type": "object", + "description": "Kernel selection arguments.", + "additionalProperties": { + "type": "string" + } + }, + "volumes": { + "type": "array", + "description": "Volume attachments.", + "items": { + "$ref": "#/components/schemas/SandboxLibraryImageVolumeV1" + } + } + } + }, + "SandboxLibraryImageV1": { + "type": "object", + "description": "Built-in sandbox image usable directly as a sandbox image.", + "properties": { + "name": { + "type": "string", + "description": "Stable identifier of the built-in image.", + "example": "base-image" + }, + "display_name": { + "type": "string", + "description": "Human-readable name.", + "example": "Base Image" + }, + "description": { + "type": "string", + "description": "Short description.", + "example": "A minimal sandbox environment with the sandbox execution API." + }, + "long_description": { + "type": "string", + "description": "Detailed description." + }, + "image": { + "type": "string", + "description": "Image reference including its tag, usable as the image of a sandbox.", + "example": "baseten/base-image:latest" + }, + "memory": { + "type": "integer", + "description": "Recommended memory allocation in megabytes.", + "example": 4096 + }, + "ports": { + "$ref": "#/components/schemas/SandboxPortsV1" + }, + "categories": { + "type": "array", + "description": "Categories of the image.", + "items": { + "type": "string" + } + }, + "tags": { + "type": "array", + "description": "Tags of the image.", + "items": { + "type": "string" + } + }, + "url": { + "type": "string", + "description": "Documentation URL." + }, + "icon": { + "type": "string", + "description": "Icon URL." + }, + "icon_light": { + "type": "string", + "description": "Light-mode icon URL." + }, + "icon_dark": { + "type": "string", + "description": "Dark-mode icon URL." + }, + "enterprise": { + "type": "boolean", + "description": "Whether the image requires an enterprise plan.", + "example": false + }, + "hidden": { + "type": "boolean", + "description": "Whether the image is hidden. Always false in listings.", + "example": false + }, + "coming_soon": { + "type": "boolean", + "description": "Whether the image is not yet available. Always false in listings.", + "example": false + }, + "creation_options": { + "$ref": "#/components/schemas/SandboxLibraryImageCreationOptionsV1" + } + }, + "required": [ + "name", + "image" + ] + }, + "ListSandboxLibraryImagesResponseV1": { + "type": "object", + "description": "Built-in sandbox images.", + "properties": { + "items": { + "type": "array", + "description": "Built-in images.", + "items": { + "$ref": "#/components/schemas/SandboxLibraryImageV1" + } + } + }, + "required": [ + "items" + ] + }, + "CleanupSandboxImagesResponseV1": { "type": "object", "description": "Result of cleaning up unused sandbox images.", "properties": { @@ -36663,7 +37620,7 @@ "example": "baseten-api-review-0916" } }, - "ImageName": { + "SandboxImageName": { "name": "image_name", "in": "path", "required": true, @@ -36737,7 +37694,7 @@ "application/json": { "example": { "code": "UNAUTHORIZED", - "message": "Provide a valid API key in the Authorization header.", + "message": "Provide a valid authentication token in the Authorization header.", "details": { "header": "Authorization" } @@ -36751,7 +37708,7 @@ "application/json": { "example": { "code": "FORBIDDEN", - "message": "This API key does not have permission to perform this operation.", + "message": "This authentication token does not grant permission to perform this operation.", "details": { "request_id": "a3b7c4d2-91e6-4f08-9b5a-2c6d7e8f1043" } @@ -36819,10 +37776,11 @@ "examples": { "CreateSandboxQuickstart": { "summary": "Run code with the built-in image", - "description": "Create directly with the built-in image; no image discovery, build, or push is needed. Use the returned url to call the sandbox execution API with the same Bearer API key.", + "description": "Create directly with the built-in image; no image discovery, build, or push is needed. Use the returned url to call the sandbox execution API with your authentication token as a Bearer token, not your Baseten API key.", "value": { - "image": "blaxel/base-image:latest", - "memory": 2048 + "image": "baseten/base-image:latest", + "memory": 2048, + "region": "us-was-1" } }, "CreateSandbox": { @@ -36896,7 +37854,7 @@ "value": "3000" } ], - "image": "blaxel/base-image:latest", + "image": "baseten/base-image:latest", "memory": 4096, "ports": [ { @@ -36905,7 +37863,6 @@ "target": 3000 } ], - "display_name": "Baseten API review", "external_id": "api-review-20260916-001", "labels": { "env": "development", @@ -36918,7 +37875,6 @@ "UpdateSandbox": { "summary": "Update every mutable field", "value": { - "enabled": true, "lifecycle": { "expiration_policies": [ { @@ -36939,7 +37895,6 @@ ], "terminated_retention": "24h" }, - "region": "us-pdx-1", "envs": [ { "name": "NODE_ENV", @@ -36952,15 +37907,6 @@ "value": "3000" } ], - "image": "blaxel/base-image:latest", - "ports": [ - { - "name": "http", - "protocol": "HTTP", - "target": 3000 - } - ], - "display_name": "Baseten API review - revised", "external_id": "api-review-20260916-001", "labels": { "env": "development", @@ -36974,7 +37920,6 @@ "SandboxReady": { "summary": "Running sandbox with complete configuration", "value": { - "enabled": true, "lifecycle": { "expiration_policies": [ { @@ -37039,7 +37984,7 @@ "value": "3000" } ], - "image": "blaxel/base-image:latest", + "image": "baseten/base-image:latest", "memory": 4096, "ports": [ { @@ -37048,7 +37993,6 @@ "target": 3000 } ], - "display_name": "Baseten API review", "external_id": "api-review-20260916-001", "labels": { "env": "development", @@ -37058,7 +38002,6 @@ "name": "baseten-api-review-0916", "url": "https://sbx-baseten-api-review-0916-esb1qo.us-pdx-1.b10.run", "status": "DEPLOYED", - "state": "RUNNING", "created_at": "2026-09-16T21:26:58.545765901Z", "updated_at": "2026-09-16T21:31:13Z", "created_by": "sandbox-automation", @@ -37071,7 +38014,6 @@ "SandboxUpdated": { "summary": "Updated sandbox with complete configuration", "value": { - "enabled": true, "lifecycle": { "expiration_policies": [ { @@ -37136,7 +38078,7 @@ "value": "3000" } ], - "image": "blaxel/base-image:latest", + "image": "baseten/base-image:latest", "memory": 4096, "ports": [ { @@ -37145,7 +38087,6 @@ "target": 3000 } ], - "display_name": "Baseten API review - revised", "external_id": "api-review-20260916-001", "labels": { "env": "development", @@ -37156,7 +38097,6 @@ "name": "baseten-api-review-0916", "url": "https://sbx-baseten-api-review-0916-esb1qo.us-pdx-1.b10.run", "status": "DEPLOYED", - "state": "RUNNING", "created_at": "2026-09-16T21:26:58.545765901Z", "updated_at": "2026-09-16T21:36:13Z", "created_by": "sandbox-automation", @@ -37168,7 +38108,6 @@ "SandboxDeleting": { "summary": "Sandbox deletion accepted", "value": { - "enabled": true, "lifecycle": { "expiration_policies": [ { @@ -37233,7 +38172,7 @@ "value": "3000" } ], - "image": "blaxel/base-image:latest", + "image": "baseten/base-image:latest", "memory": 4096, "ports": [ { @@ -37242,7 +38181,6 @@ "target": 3000 } ], - "display_name": "Baseten API review", "external_id": "api-review-20260916-001", "labels": { "env": "development", @@ -37252,7 +38190,6 @@ "name": "baseten-api-review-0916", "url": "https://sbx-baseten-api-review-0916-esb1qo.us-pdx-1.b10.run", "status": "DELETING", - "state": "RUNNING", "created_at": "2026-09-16T21:26:58.545765901Z", "updated_at": "2026-09-16T21:41:13Z", "created_by": "sandbox-automation", @@ -37266,7 +38203,6 @@ "value": { "items": [ { - "enabled": true, "lifecycle": { "expiration_policies": [ { @@ -37331,7 +38267,7 @@ "value": "3000" } ], - "image": "blaxel/base-image:latest", + "image": "baseten/base-image:latest", "memory": 4096, "ports": [ { @@ -37340,7 +38276,6 @@ "target": 3000 } ], - "display_name": "Baseten API review", "external_id": "api-review-20260916-001", "labels": { "env": "development", @@ -37350,7 +38285,6 @@ "name": "baseten-api-review-0916", "url": "https://sbx-baseten-api-review-0916-esb1qo.us-pdx-1.b10.run", "status": "DEPLOYED", - "state": "RUNNING", "created_at": "2026-09-16T21:26:58.545765901Z", "updated_at": "2026-09-16T21:31:13Z", "created_by": "sandbox-automation", @@ -37371,7 +38305,6 @@ "value": { "items": [ { - "enabled": true, "lifecycle": { "expiration_policies": [ { @@ -37436,7 +38369,7 @@ "value": "3000" } ], - "image": "blaxel/base-image:latest", + "image": "baseten/base-image:latest", "memory": 4096, "ports": [ { @@ -37445,7 +38378,6 @@ "target": 3000 } ], - "display_name": "Baseten API review", "external_id": "api-review-20260916-001", "labels": { "env": "development", @@ -37455,7 +38387,6 @@ "name": "baseten-api-review-0916", "url": "https://sbx-baseten-api-review-0916-esb1qo.us-pdx-1.b10.run", "status": "DEPLOYED", - "state": "RUNNING", "created_at": "2026-09-16T21:26:58.545765901Z", "updated_at": "2026-09-16T21:31:13Z", "created_by": "sandbox-automation", @@ -37473,7 +38404,6 @@ "summary": "Built image with all metadata and tags", "value": { "name": "base-image", - "display_name": "b10/base-image", "status": "BUILT", "created_at": "2026-09-15T21:20:00Z", "updated_at": "2026-09-16T21:25:00Z", @@ -37500,7 +38430,6 @@ "summary": "Image after deleting its older tag", "value": { "name": "base-image", - "display_name": "b10/base-image", "status": "BUILT", "created_at": "2026-09-15T21:20:00Z", "updated_at": "2026-09-16T21:41:13Z", @@ -37520,7 +38449,6 @@ "summary": "Image repository summary", "value": { "name": "base-image", - "display_name": "b10/base-image", "status": "BUILT", "created_at": "2026-09-15T21:20:00Z", "size": 260046848, @@ -37534,14 +38462,12 @@ "items": [ { "name": "base-image", - "display_name": "b10/base-image", "status": "BUILT", "created_at": "2026-09-15T21:20:00Z", "updated_at": "2026-09-16T21:25:00Z", "last_deployed_at": "2026-09-16T21:26:58.545765901Z", "size": 260046848, - "tag_count": 2, - "tags": [] + "tag_count": 2 } ], "pagination": { @@ -37583,6 +38509,37 @@ }, "description": "No upload_url is returned for registry imports." }, + "SandboxLibraryImages": { + "summary": "Built-in sandbox images", + "value": { + "items": [ + { + "name": "base-image", + "display_name": "Base Image", + "description": "A minimal sandbox environment with the sandbox execution API.", + "long_description": "", + "image": "baseten/base-image:latest", + "memory": 4096, + "ports": [ + { + "name": "sandbox-api", + "protocol": "HTTP", + "target": 8080 + } + ], + "categories": [], + "tags": [], + "url": "", + "icon": "https://example.com/base-image.png", + "icon_light": "https://example.com/base-image.png", + "icon_dark": "https://example.com/base-image.png", + "enterprise": false, + "hidden": false, + "coming_soon": false + } + ] + } + }, "CleanupImages": { "summary": "Unused image versions removed", "value": {