From 901f82f7cf8c063714eabfaf89d5a7336ed026ef Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 15 Oct 2026 04:10:14 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- .../Commands/DefaultApiGroupCommand.g.cs | 2 - ...yTeamIdUsersByUserIdCommandApiCommand.g.cs | 25 +- ...ettingsUsersByUserIdCommandApiCommand.g.cs | 119 --- ...gsTeamsByTeamIdUsersCommandApiCommand.g.cs | 2 +- ...ettingsUsersByUserIdCommandApiCommand.g.cs | 76 -- ...gsUsersByUserIdTeamsCommandApiCommand.g.cs | 2 +- ...ImagesDeleteImageTagCommandApiCommand.g.cs | 2 +- .../ImagesPushImageCommandApiCommand.g.cs | 20 +- ...ndboxesCreateSandboxCommandApiCommand.g.cs | 2 +- ...xesGetSandboxMetricsCommandApiCommand.g.cs | 73 +- ...dateRouteSpendLimitSettingV1OptionSet.g.cs | 27 - ...lient.EditRoutesSettingsUsersByUserId.g.cs | 491 --------- ...t.GetRoutesSettingsTeamsByTeamIdUsers.g.cs | 4 +- ...Client.GetRoutesSettingsUsersByUserId.g.cs | 452 --------- ...t.GetRoutesSettingsUsersByUserIdTeams.g.cs | 4 +- ...lient.EditRoutesSettingsUsersByUserId.g.cs | 71 -- ...t.GetRoutesSettingsTeamsByTeamIdUsers.g.cs | 4 +- ...Client.GetRoutesSettingsUsersByUserId.g.cs | 50 - ...t.GetRoutesSettingsUsersByUserIdTeams.g.cs | 4 +- .../Baseten.IImagesClient.DeleteImageTag.g.cs | 4 +- .../Baseten.IImagesClient.PushImage.g.cs | 16 +- ...aseten.ISandboxesClient.CreateSandbox.g.cs | 2 +- ...en.ISandboxesClient.GetSandboxMetrics.g.cs | 70 +- .../Baseten.Images.JsonSerializerContext.g.cs | 10 +- .../Baseten.ImagesClient.DeleteImageTag.g.cs | 4 +- .../Baseten.ImagesClient.PushImage.g.cs | 18 +- ...Baseten.JsonConverters.SandboxImageV1.g.cs | 108 -- ...verters.SandboxMetricDescriptorV1Kind.g.cs | 53 + ...SandboxMetricDescriptorV1KindNullable.g.cs | 60 ++ ...ers.SandboxMetricDescriptorV1UnitHint.g.cs | 53 + ...boxMetricDescriptorV1UnitHintNullable.g.cs | 60 ++ ...en.JsonConverters.SandboxMetricModeV1.g.cs | 53 + ...onverters.SandboxMetricModeV1Nullable.g.cs | 60 ++ ...en.JsonConverters.SandboxMetricNameV1.g.cs | 53 + ...onverters.SandboxMetricNameV1Nullable.g.cs | 60 ++ .../Baseten.JsonSerializerContext.g.cs | 115 ++- .../Baseten.JsonSerializerContextTypes.g.cs | 352 ++++--- ...Baseten.Models.CreateSandboxRequestV1.g.cs | 4 +- ...en.Models.ListSandboxImagesResponseV1.g.cs | 4 +- .../Baseten.Models.LoopsSamplerV1.g.cs | 34 +- ...eten.Models.PushSandboxImageRequestV1.g.cs | 32 +- ...ten.Models.PushSandboxImageResponseV1.g.cs | 15 +- ...boxImageResponseV1UploadHeaders.Json.g.cs} | 26 +- ...shSandboxImageResponseV1UploadHeaders.g.cs | 19 + ...ten.Models.RouteUserSettingsRequestV1.g.cs | 48 - ...seten.Models.RouteUserSettingsV1.Json.g.cs | 141 --- .../Baseten.Models.RouteUserSettingsV1.g.cs | 70 -- ...Baseten.Models.SandboxConfigurationV1.g.cs | 4 +- .../Baseten.Models.SandboxEnvV1.g.cs | 4 +- .../Baseten.Models.SandboxImageSummaryV1.g.cs | 147 --- .../Baseten.Models.SandboxImageV1.Json.g.cs | 6 +- .../Baseten.Models.SandboxImageV1.g.cs | 402 +++----- ...Baseten.Models.SandboxImageV1Variant2.g.cs | 50 - ...odels.SandboxMetricDescriptorV1.Json.g.cs} | 26 +- ...eten.Models.SandboxMetricDescriptorV1.g.cs | 82 ++ ....Models.SandboxMetricDescriptorV1Kind.g.cs | 51 + ...ndboxMetricDescriptorV1LabelSet.Json.g.cs} | 26 +- ...els.SandboxMetricDescriptorV1LabelSet.g.cs | 19 + ...els.SandboxMetricDescriptorV1UnitHint.g.cs | 57 ++ .../Baseten.Models.SandboxMetricModeV1.g.cs | 57 ++ .../Baseten.Models.SandboxMetricNameV1.g.cs | 57 ++ ....Models.SandboxMetricValueSetV1.Json.g.cs} | 26 +- ...aseten.Models.SandboxMetricValueSetV1.g.cs | 59 ++ .../Baseten.Models.SandboxMetricsPointV1.g.cs | 91 -- .../Baseten.Models.SandboxMetricsV1.g.cs | 70 +- ...seten.Sandboxes.JsonSerializerContext.g.cs | 94 +- ...Baseten.SandboxesClient.CreateSandbox.g.cs | 2 +- ...ten.SandboxesClient.GetSandboxMetrics.g.cs | 120 ++- .../Generated/autosdk.generated-examples.json | 4 +- src/libs/Baseten/openapi.yaml | 948 ++++++++---------- 70 files changed, 2153 insertions(+), 3223 deletions(-) delete mode 100644 src/cli/Baseten.CLI/Commands/EditRoutesSettingsUsersByUserIdCommandApiCommand.g.cs delete mode 100644 src/cli/Baseten.CLI/Commands/GetRoutesSettingsUsersByUserIdCommandApiCommand.g.cs delete mode 100644 src/cli/Baseten.CLI/Commands/UpdateRouteSpendLimitSettingV1OptionSet.g.cs delete mode 100644 src/libs/Baseten/Generated/Baseten.BasetenClient.EditRoutesSettingsUsersByUserId.g.cs delete mode 100644 src/libs/Baseten/Generated/Baseten.BasetenClient.GetRoutesSettingsUsersByUserId.g.cs delete mode 100644 src/libs/Baseten/Generated/Baseten.IBasetenClient.EditRoutesSettingsUsersByUserId.g.cs delete mode 100644 src/libs/Baseten/Generated/Baseten.IBasetenClient.GetRoutesSettingsUsersByUserId.g.cs delete mode 100644 src/libs/Baseten/Generated/Baseten.JsonConverters.SandboxImageV1.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.JsonConverters.SandboxMetricDescriptorV1Kind.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.JsonConverters.SandboxMetricDescriptorV1KindNullable.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.JsonConverters.SandboxMetricDescriptorV1UnitHint.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.JsonConverters.SandboxMetricDescriptorV1UnitHintNullable.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.JsonConverters.SandboxMetricModeV1.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.JsonConverters.SandboxMetricModeV1Nullable.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.JsonConverters.SandboxMetricNameV1.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.JsonConverters.SandboxMetricNameV1Nullable.g.cs rename src/libs/Baseten/Generated/{Baseten.Models.RouteUserSettingsRequestV1.Json.g.cs => Baseten.Models.PushSandboxImageResponseV1UploadHeaders.Json.g.cs} (85%) create mode 100644 src/libs/Baseten/Generated/Baseten.Models.PushSandboxImageResponseV1UploadHeaders.g.cs delete mode 100644 src/libs/Baseten/Generated/Baseten.Models.RouteUserSettingsRequestV1.g.cs delete mode 100644 src/libs/Baseten/Generated/Baseten.Models.RouteUserSettingsV1.Json.g.cs delete mode 100644 src/libs/Baseten/Generated/Baseten.Models.RouteUserSettingsV1.g.cs delete mode 100644 src/libs/Baseten/Generated/Baseten.Models.SandboxImageSummaryV1.g.cs delete mode 100644 src/libs/Baseten/Generated/Baseten.Models.SandboxImageV1Variant2.g.cs rename src/libs/Baseten/Generated/{Baseten.Models.SandboxImageV1Variant2.Json.g.cs => Baseten.Models.SandboxMetricDescriptorV1.Json.g.cs} (88%) create mode 100644 src/libs/Baseten/Generated/Baseten.Models.SandboxMetricDescriptorV1.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.SandboxMetricDescriptorV1Kind.g.cs rename src/libs/Baseten/Generated/{Baseten.Models.SandboxImageSummaryV1.Json.g.cs => Baseten.Models.SandboxMetricDescriptorV1LabelSet.Json.g.cs} (87%) create mode 100644 src/libs/Baseten/Generated/Baseten.Models.SandboxMetricDescriptorV1LabelSet.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.SandboxMetricDescriptorV1UnitHint.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.SandboxMetricModeV1.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.SandboxMetricNameV1.g.cs rename src/libs/Baseten/Generated/{Baseten.Models.SandboxMetricsPointV1.Json.g.cs => Baseten.Models.SandboxMetricValueSetV1.Json.g.cs} (88%) create mode 100644 src/libs/Baseten/Generated/Baseten.Models.SandboxMetricValueSetV1.g.cs delete mode 100644 src/libs/Baseten/Generated/Baseten.Models.SandboxMetricsPointV1.g.cs diff --git a/src/cli/Baseten.CLI/Commands/DefaultApiGroupCommand.g.cs b/src/cli/Baseten.CLI/Commands/DefaultApiGroupCommand.g.cs index 29f97a61..bea658c5 100644 --- a/src/cli/Baseten.CLI/Commands/DefaultApiGroupCommand.g.cs +++ b/src/cli/Baseten.CLI/Commands/DefaultApiGroupCommand.g.cs @@ -122,7 +122,6 @@ public static Command Create() command.Subcommands.Add(EditRoutesConnectionsByConnectionIdCommandApiCommand.Create()); command.Subcommands.Add(EditRoutesSettingsTeamsByTeamIdCommandApiCommand.Create()); command.Subcommands.Add(EditRoutesSettingsTeamsByTeamIdUsersByUserIdCommandApiCommand.Create()); - command.Subcommands.Add(EditRoutesSettingsUsersByUserIdCommandApiCommand.Create()); command.Subcommands.Add(EditTeamsByTeamIdEnvironmentGroupsByEnvNameCommandApiCommand.Create()); command.Subcommands.Add(EditTrainingCapacityCommandApiCommand.Create()); command.Subcommands.Add(EditTrainingProjectsByTrainingProjectIdJobsByTrainingJobIdCommandApiCommand.Create()); @@ -204,7 +203,6 @@ public static Command Create() command.Subcommands.Add(GetRoutesSettingsTeamsByTeamIdCommandApiCommand.Create()); command.Subcommands.Add(GetRoutesSettingsTeamsByTeamIdUsersCommandApiCommand.Create()); command.Subcommands.Add(GetRoutesSettingsTeamsByTeamIdUsersByUserIdCommandApiCommand.Create()); - command.Subcommands.Add(GetRoutesSettingsUsersByUserIdCommandApiCommand.Create()); command.Subcommands.Add(GetRoutesSettingsUsersByUserIdTeamsCommandApiCommand.Create()); command.Subcommands.Add(GetRoutesUsageCommandApiCommand.Create()); command.Subcommands.Add(GetSecretsCommandApiCommand.Create()); diff --git a/src/cli/Baseten.CLI/Commands/EditRoutesSettingsTeamsByTeamIdUsersByUserIdCommandApiCommand.g.cs b/src/cli/Baseten.CLI/Commands/EditRoutesSettingsTeamsByTeamIdUsersByUserIdCommandApiCommand.g.cs index ca78529d..14aec0bf 100644 --- a/src/cli/Baseten.CLI/Commands/EditRoutesSettingsTeamsByTeamIdUsersByUserIdCommandApiCommand.g.cs +++ b/src/cli/Baseten.CLI/Commands/EditRoutesSettingsTeamsByTeamIdUsersByUserIdCommandApiCommand.g.cs @@ -18,7 +18,12 @@ internal static partial class EditRoutesSettingsTeamsByTeamIdUsersByUserIdComman { Description = @"This is a missing parameter that was added automatically. Please check the OpenAPI spec.", }; - private static readonly UpdateRouteSpendLimitSettingV1OptionSet SpendLimitOptions = UpdateRouteSpendLimitSettingV1OptionSet.Create(@"spend-limit"); + + private static Option SpendLimit { get; } = new( + name: @"--spend-limit") + { + Description = @"Spend limit fields to change. Pass null to remove the user's limit; omit to leave it unchanged.", + }; private static Option Input { get; } = new(@"--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", @@ -63,8 +68,8 @@ public static Command Create(string? commandName = null) var command = new Command(commandName ?? @"edit-routes-settings-teams-by-team-id-users-by-user-id", @"Updates a user's route settings in a team Changes only the fields in the request. Once the user's metered spend in the team in a month reaches the spend limit, requests with Routes keys they created in the team are rejected until the limit is raised or the next month starts. Spend is metered every 15 minutes and can lag, so a user can go over the limit. Requires team admin for the specified team or organization admin."); command.Arguments.Add(TeamId); - command.Arguments.Add(UserId); command.Options.Add(SpendLimitOptions.UserMonthlyLimitUsd); - command.Options.Add(SpendLimitOptions.MonthOverrideUsd); + command.Arguments.Add(UserId); + command.Options.Add(SpendLimit); command.Options.Add(Input); command.Options.Add(RequestJson); command.Options.Add(RequestFile); @@ -92,19 +97,7 @@ await CliRuntime.RunAsync(async () => cancellationToken).ConfigureAwait(false); var teamId = parseResult.GetRequiredValue(TeamId); var userId = parseResult.GetRequiredValue(UserId); - - var __SpendLimitBase = __requestBase is { } __SpendLimitBaseValue ? __SpendLimitBaseValue.SpendLimit : default; var spendLimitUserMonthlyLimitUsd = CliRuntime.WasSpecified(parseResult, SpendLimitOptions.UserMonthlyLimitUsd) ? parseResult.GetValue(SpendLimitOptions.UserMonthlyLimitUsd) : (__SpendLimitBase is { } __SpendLimituserMonthlyLimitUsdBaseValue ? __SpendLimituserMonthlyLimitUsdBaseValue.UserMonthlyLimitUsd : default); - var spendLimitMonthOverrideUsd = CliRuntime.WasSpecified(parseResult, SpendLimitOptions.MonthOverrideUsd) ? parseResult.GetValue(SpendLimitOptions.MonthOverrideUsd) : (__SpendLimitBase is { } __SpendLimitmonthOverrideUsdBaseValue ? __SpendLimitmonthOverrideUsdBaseValue.MonthOverrideUsd : default); - var __SpendLimitSpecified = CliRuntime.WasSpecified(parseResult, SpendLimitOptions.UserMonthlyLimitUsd) || CliRuntime.WasSpecified(parseResult, SpendLimitOptions.MonthOverrideUsd); - var spendLimit = - __SpendLimitSpecified || __SpendLimitBase is not null - ? new global::Baseten.UpdateRouteSpendLimitSettingV1 - { - UserMonthlyLimitUsd = spendLimitUserMonthlyLimitUsd, - MonthOverrideUsd = spendLimitMonthOverrideUsd, - - } - : __SpendLimitBase; + var spendLimit = CliRuntime.WasSpecified(parseResult, SpendLimit) ? parseResult.GetValue(SpendLimit) : (__requestBase is { } __SpendLimitBaseValue ? __SpendLimitBaseValue.SpendLimit : default); using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); diff --git a/src/cli/Baseten.CLI/Commands/EditRoutesSettingsUsersByUserIdCommandApiCommand.g.cs b/src/cli/Baseten.CLI/Commands/EditRoutesSettingsUsersByUserIdCommandApiCommand.g.cs deleted file mode 100644 index 80dfe9fb..00000000 --- a/src/cli/Baseten.CLI/Commands/EditRoutesSettingsUsersByUserIdCommandApiCommand.g.cs +++ /dev/null @@ -1,119 +0,0 @@ -#nullable enable -#pragma warning disable CS0618 - -using System.CommandLine; - -namespace Baseten.CLI.Commands; - -internal static partial class EditRoutesSettingsUsersByUserIdCommandApiCommand -{ - private static Argument UserId { get; } = new( - name: @"user-id") - { - Description = @"This is a missing parameter that was added automatically. Please check the OpenAPI spec.", - }; - private static readonly UpdateRouteSpendLimitSettingV1OptionSet SpendLimitOptions = UpdateRouteSpendLimitSettingV1OptionSet.Create(@"spend-limit"); - private static Option Input { get; } = new(@"--input") - { - Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", - }; - - private static Option RequestJson { get; } = new(@"--request-json") - { - Description = "Request body as JSON.", - Hidden = true, - }; - - private static Option RequestFile { get; } = new(@"--request-file") - { - Description = "Path to a JSON request file, or '-' for stdin.", - Hidden = true, - }; - - private static string FormatResponse(ParseResult parseResult, global::Baseten.RouteUserSettingsV1 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.RouteUserSettingsV1 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 ?? @"edit-routes-settings-users-by-user-id", @"Updates a user's route settings -Changes only the fields in the request. Once the user's metered spend in a team in a month reaches the spend limit, requests with Routes keys they created in that team are rejected until the limit is raised or the next month starts. Spend is metered every 15 minutes and can lag, so a user can go over the limit. The user's own limit supersedes their team's per-member limit. The limit is set in the only team the user has a role in; when they belong to none or several, use `PATCH /v1/routes/settings/teams/{team_id}/users/{user_id}` instead."); - command.Arguments.Add(UserId); command.Options.Add(SpendLimitOptions.UserMonthlyLimitUsd); - command.Options.Add(SpendLimitOptions.MonthOverrideUsd); - command.Options.Add(Input); - command.Options.Add(RequestJson); - command.Options.Add(RequestFile); - command.Validators.Add(result => - { - var hasInput = result.GetResult(Input) is not null; - var hasRequestJson = result.GetResult(RequestJson) is not null; - var hasRequestFile = result.GetResult(RequestFile) is not null; - var specifiedCount = (hasInput ? 1 : 0) + (hasRequestJson ? 1 : 0) + (hasRequestFile ? 1 : 0); - if (specifiedCount > 1) - { - result.AddError(@"Specify at most one of --input, --request-json, or --request-file."); - } - }); - - command.SetAction(async (ParseResult parseResult, CancellationToken cancellationToken) => - await CliRuntime.RunAsync(async () => - { - var __requestBase = await CliRuntime.ReadRequestOrDefaultAsync( - parseResult, - Input, - RequestJson, - RequestFile, - global::Baseten.SourceGenerationContext.Default, - cancellationToken).ConfigureAwait(false); - var userId = parseResult.GetRequiredValue(UserId); - - var __SpendLimitBase = __requestBase is { } __SpendLimitBaseValue ? __SpendLimitBaseValue.SpendLimit : default; var spendLimitUserMonthlyLimitUsd = CliRuntime.WasSpecified(parseResult, SpendLimitOptions.UserMonthlyLimitUsd) ? parseResult.GetValue(SpendLimitOptions.UserMonthlyLimitUsd) : (__SpendLimitBase is { } __SpendLimituserMonthlyLimitUsdBaseValue ? __SpendLimituserMonthlyLimitUsdBaseValue.UserMonthlyLimitUsd : default); - var spendLimitMonthOverrideUsd = CliRuntime.WasSpecified(parseResult, SpendLimitOptions.MonthOverrideUsd) ? parseResult.GetValue(SpendLimitOptions.MonthOverrideUsd) : (__SpendLimitBase is { } __SpendLimitmonthOverrideUsdBaseValue ? __SpendLimitmonthOverrideUsdBaseValue.MonthOverrideUsd : default); - var __SpendLimitSpecified = CliRuntime.WasSpecified(parseResult, SpendLimitOptions.UserMonthlyLimitUsd) || CliRuntime.WasSpecified(parseResult, SpendLimitOptions.MonthOverrideUsd); - var spendLimit = - __SpendLimitSpecified || __SpendLimitBase is not null - ? new global::Baseten.UpdateRouteSpendLimitSettingV1 - { - UserMonthlyLimitUsd = spendLimitUserMonthlyLimitUsd, - MonthOverrideUsd = spendLimitMonthOverrideUsd, - - } - : __SpendLimitBase; - using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); - - - var response = await client.EditRoutesSettingsUsersByUserIdAsync( - userId: userId, - spendLimit: spendLimit, - cancellationToken: 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/GetRoutesSettingsTeamsByTeamIdUsersCommandApiCommand.g.cs b/src/cli/Baseten.CLI/Commands/GetRoutesSettingsTeamsByTeamIdUsersCommandApiCommand.g.cs index d4cc33e8..911ad949 100644 --- a/src/cli/Baseten.CLI/Commands/GetRoutesSettingsTeamsByTeamIdUsersCommandApiCommand.g.cs +++ b/src/cli/Baseten.CLI/Commands/GetRoutesSettingsTeamsByTeamIdUsersCommandApiCommand.g.cs @@ -38,7 +38,7 @@ private static string FormatResponse(ParseResult parseResult, global::Baseten.Ro public static Command Create(string? commandName = null) { var command = new Command(commandName ?? @"get-routes-settings-teams-by-team-id-users", @"Lists users' route settings in a team -Returns the settings in the team of each user with a role in the team and of anyone with Code spend in the team this month. Requires team admin for the specified team or organization admin."); +Returns the settings in the team of each member of the team, including organization admins and Code service accounts. Requires team admin for the specified team or organization admin."); command.Arguments.Add(TeamId); diff --git a/src/cli/Baseten.CLI/Commands/GetRoutesSettingsUsersByUserIdCommandApiCommand.g.cs b/src/cli/Baseten.CLI/Commands/GetRoutesSettingsUsersByUserIdCommandApiCommand.g.cs deleted file mode 100644 index a484d158..00000000 --- a/src/cli/Baseten.CLI/Commands/GetRoutesSettingsUsersByUserIdCommandApiCommand.g.cs +++ /dev/null @@ -1,76 +0,0 @@ -#nullable enable -#pragma warning disable CS0618 - -using System.CommandLine; - -namespace Baseten.CLI.Commands; - -internal static partial class GetRoutesSettingsUsersByUserIdCommandApiCommand -{ - private static Argument UserId { get; } = new( - name: @"user-id") - { - 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 = @"ID of the team to read the user's spend limit in. Defaults to the only team the user has a role in.", - }; - - private static string FormatResponse(ParseResult parseResult, global::Baseten.RouteUserSettingsV1 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.RouteUserSettingsV1 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-routes-settings-users-by-user-id", @"Gets a user's route settings -Returns the settings that apply to the user, including the spend limit that caps what they can spend on Baseten Code each month: the limit set on the user, their team's per-member limit, and the effective limit for this user. The user limit always overrides the team's per-member limit. The limits are read in `team_id` when given, else in the only team the user has a role in; the request fails when they belong to none or several."); - command.Arguments.Add(UserId); - command.Options.Add(TeamId); - - - command.SetAction(async (ParseResult parseResult, CancellationToken cancellationToken) => - await CliRuntime.RunAsync(async () => - { - var userId = parseResult.GetRequiredValue(UserId); - var teamId = parseResult.GetValue(TeamId); - using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); - - - var response = await client.GetRoutesSettingsUsersByUserIdAsync( - userId: userId, - teamId: teamId, - cancellationToken: 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/GetRoutesSettingsUsersByUserIdTeamsCommandApiCommand.g.cs b/src/cli/Baseten.CLI/Commands/GetRoutesSettingsUsersByUserIdTeamsCommandApiCommand.g.cs index 3c40ac0e..ef013f4e 100644 --- a/src/cli/Baseten.CLI/Commands/GetRoutesSettingsUsersByUserIdTeamsCommandApiCommand.g.cs +++ b/src/cli/Baseten.CLI/Commands/GetRoutesSettingsUsersByUserIdTeamsCommandApiCommand.g.cs @@ -38,7 +38,7 @@ private static string FormatResponse(ParseResult parseResult, global::Baseten.Ro public static Command Create(string? commandName = null) { var command = new Command(commandName ?? @"get-routes-settings-users-by-user-id-teams", @"Lists a user's route settings in each of their teams -Returns the user's settings in each team they have a role in and in any team they have Code spend in this month, alphabetical by team name: their spend limit for Baseten Code in the team, their spend in the team this month, and whether that spend reached the limit. Members can read their own settings; organization admins can read anyone's."); +Returns the user's settings in each team they belong to (every team, for organization admins), alphabetical by team name: their spend limit for Baseten Code in the team, their spend in the team this month, and whether that spend reached the limit. Members can read their own settings; organization admins can read anyone's."); command.Arguments.Add(UserId); diff --git a/src/cli/Baseten.CLI/Commands/ImagesDeleteImageTagCommandApiCommand.g.cs b/src/cli/Baseten.CLI/Commands/ImagesDeleteImageTagCommandApiCommand.g.cs index 583740cc..a866a854 100644 --- a/src/cli/Baseten.CLI/Commands/ImagesDeleteImageTagCommandApiCommand.g.cs +++ b/src/cli/Baseten.CLI/Commands/ImagesDeleteImageTagCommandApiCommand.g.cs @@ -56,7 +56,7 @@ private static string FormatResponse(ParseResult parseResult, global::Baseten.Sa public static Command Create(string? commandName = null) { var command = new Command(commandName ?? @"delete-image-tag", @"Delete an image tag -Delete a specific image version. Reject deletion if the version is referenced by an active deployment. Return the updated image with its remaining tags, possibly empty."); +Delete a specific image version. Reject deletion if the version is referenced by an active deployment. Return the updated repository summary. Use the tag listing endpoint for remaining image versions."); command.Arguments.Add(ImageName); command.Arguments.Add(TagName); command.Options.Add(TeamId); diff --git a/src/cli/Baseten.CLI/Commands/ImagesPushImageCommandApiCommand.g.cs b/src/cli/Baseten.CLI/Commands/ImagesPushImageCommandApiCommand.g.cs index 3e7897ac..0cd18046 100644 --- a/src/cli/Baseten.CLI/Commands/ImagesPushImageCommandApiCommand.g.cs +++ b/src/cli/Baseten.CLI/Commands/ImagesPushImageCommandApiCommand.g.cs @@ -36,6 +36,18 @@ internal static partial class ImagesPushImageCommandApiCommand { Description = @"Optional serialized registry authentication configuration for importing a private image. Used only when image is supplied; never returned.", }; + + private static Option Memory { get; } = new( + name: @"--memory") + { + Description = @"Memory in megabytes of the temporary environment that builds the source archive or imports the registry image. Omit it to use the default size. Does not change the memory of sandboxes created from the image.", + }; + + private static Option Volume { get; } = new( + name: @"--volume") + { + Description = @"Scratch disk in megabytes attached to the temporary build environment for intermediate layers. Set it for large images that run out of space while building or importing. 0 builds in memory, which is the default. Teams with HIPAA compliance enabled accept only 0.", + }; private static Option Input { get; } = new(@"--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", @@ -78,12 +90,14 @@ 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. The uploaded ZIP archive must not exceed 5 GB. 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. Set memory and volume to size the temporary environment that builds or imports the image; for a source archive, upload with the returned upload_headers."); command.Arguments.Add(NameOption); command.Options.Add(TeamId); command.Options.Add(XTeamId); command.Options.Add(Image); command.Options.Add(DockerConfig); + command.Options.Add(Memory); + command.Options.Add(Volume); command.Options.Add(Input); command.Options.Add(RequestJson); command.Options.Add(RequestFile); @@ -114,6 +128,8 @@ await CliRuntime.RunAsync(async () => var xTeamId = parseResult.GetValue(XTeamId); var image = CliRuntime.WasSpecified(parseResult, Image) ? parseResult.GetValue(Image) : (__requestBase is { } __ImageBaseValue ? __ImageBaseValue.Image : default); var dockerConfig = CliRuntime.WasSpecified(parseResult, DockerConfig) ? parseResult.GetValue(DockerConfig) : (__requestBase is { } __DockerConfigBaseValue ? __DockerConfigBaseValue.DockerConfig : default); + var memory = CliRuntime.WasSpecified(parseResult, Memory) ? parseResult.GetValue(Memory) : (__requestBase is { } __MemoryBaseValue ? __MemoryBaseValue.Memory : default); + var volume = CliRuntime.WasSpecified(parseResult, Volume) ? parseResult.GetValue(Volume) : (__requestBase is { } __VolumeBaseValue ? __VolumeBaseValue.Volume : default); using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); @@ -123,6 +139,8 @@ await CliRuntime.RunAsync(async () => xTeamId: xTeamId, image: image, dockerConfig: dockerConfig, + memory: memory, + volume: volume, cancellationToken: cancellationToken).ConfigureAwait(false); diff --git a/src/cli/Baseten.CLI/Commands/SandboxesCreateSandboxCommandApiCommand.g.cs b/src/cli/Baseten.CLI/Commands/SandboxesCreateSandboxCommandApiCommand.g.cs index e05fb4d7..afc30c4e 100644 --- a/src/cli/Baseten.CLI/Commands/SandboxesCreateSandboxCommandApiCommand.g.cs +++ b/src/cli/Baseten.CLI/Commands/SandboxesCreateSandboxCommandApiCommand.g.cs @@ -56,7 +56,7 @@ internal static partial class SandboxesCreateSandboxCommandApiCommand 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). Defaults to 4096.", + Description = @"Memory allocation in megabytes. Also determines CPU allocation (CPU cores = memory in MB / 2048, e.g., 4096MB = 2 CPUs). Defaults to 4096. Must be between 1024 and 262144.", }; private static Option?> Ports { get; } = new( diff --git a/src/cli/Baseten.CLI/Commands/SandboxesGetSandboxMetricsCommandApiCommand.g.cs b/src/cli/Baseten.CLI/Commands/SandboxesGetSandboxMetricsCommandApiCommand.g.cs index 553f0767..832de84c 100644 --- a/src/cli/Baseten.CLI/Commands/SandboxesGetSandboxMetricsCommandApiCommand.g.cs +++ b/src/cli/Baseten.CLI/Commands/SandboxesGetSandboxMetricsCommandApiCommand.g.cs @@ -25,25 +25,28 @@ internal static partial class SandboxesGetSandboxMetricsCommandApiCommand 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") + private static Option Mode { get; } = new( + name: @"--mode") { - Description = @"", - Required = true, + Description = @"Defaults to CURRENT, which rejects start_epoch_millis and end_epoch_millis. SERIES uses a server-selected step of 30 seconds up to 2 hours, 60 seconds up to 1 day, 600 seconds up to 3 days, and 3600 seconds beyond 3 days.", }; - private static Option EndTime { get; } = new( - name: @"--end-time") + private static Option StartEpochMillis { get; } = new( + name: @"--start-epoch-millis") { - Description = @"", - Required = true, + Description = @"Unix milliseconds. Defaults to one hour before end; SERIES snaps outward.", }; - private static Option IntervalSeconds { get; } = new( - name: @"--interval-seconds") + private static Option EndEpochMillis { get; } = new( + name: @"--end-epoch-millis") { - Description = @"", - Required = true, + Description = @"Exclusive end in Unix milliseconds, default now. Maximum aligned window is 7 days.", + }; + + private static Option?> Metrics { get; } = new( + name: @"--metrics") + { + Description = @"Metric names in response order. Omit to request all three signals.", }; private static string FormatResponse(ParseResult parseResult, global::Baseten.SandboxMetricsV1 value, global::System.Text.Json.Serialization.JsonSerializerContext context, bool truncateLongStrings) @@ -71,20 +74,24 @@ private static string FormatResponse(ParseResult parseResult, global::Baseten.Sa 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. +Returns every interval with labeled request counts, CPU cores, and RSS memory bytes. CURRENT returns one snapshot at now, with +request counts over the preceding minute and latest gauges. +SUMMARY returns one value set over the window. SERIES snaps the window outward +to UTC step boundaries and echoes those boundaries; each value covers +[start_epoch_millis, start_epoch_millis + step_seconds). +Missing gauge samples remain null. Request counts are zero after +creation without traffic, and null before creation. CPU averages are averages +of valid sampled CPU rates; memory averages are averages of sampled RSS. +Windows default to one hour, are limited to 7 days after alignment, and at most +10000 intervals. 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.Options.Add(Mode); + command.Options.Add(StartEpochMillis); + command.Options.Add(EndEpochMillis); + command.Options.Add(Metrics); command.SetAction(async (ParseResult parseResult, CancellationToken cancellationToken) => @@ -93,9 +100,10 @@ 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); + var mode = parseResult.GetValue(Mode); + var startEpochMillis = parseResult.GetValue(StartEpochMillis); + var endEpochMillis = parseResult.GetValue(EndEpochMillis); + var metrics = parseResult.GetValue(Metrics); using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); @@ -103,26 +111,19 @@ await CliRuntime.RunAsync(async () => sandboxName: sandboxName, teamId: teamId, xTeamId: xTeamId, - startTime: startTime, - endTime: endTime, - intervalSeconds: intervalSeconds, + mode: mode, + startEpochMillis: startEpochMillis, + endEpochMillis: endEpochMillis, + metrics: metrics, 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; diff --git a/src/cli/Baseten.CLI/Commands/UpdateRouteSpendLimitSettingV1OptionSet.g.cs b/src/cli/Baseten.CLI/Commands/UpdateRouteSpendLimitSettingV1OptionSet.g.cs deleted file mode 100644 index 7f5ac636..00000000 --- a/src/cli/Baseten.CLI/Commands/UpdateRouteSpendLimitSettingV1OptionSet.g.cs +++ /dev/null @@ -1,27 +0,0 @@ -#nullable enable - -using System.CommandLine; - -namespace Baseten.CLI.Commands; - -internal sealed record UpdateRouteSpendLimitSettingV1OptionSet( - Option UserMonthlyLimitUsd, - Option MonthOverrideUsd) -{ - public static UpdateRouteSpendLimitSettingV1OptionSet Create(string? prefix = null) - { - var normalizedPrefix = string.IsNullOrWhiteSpace(prefix) - ? string.Empty - : prefix.Trim().Trim('-') + "-"; - return new UpdateRouteSpendLimitSettingV1OptionSet( - UserMonthlyLimitUsd: new Option($"--{normalizedPrefix}user-monthly-limit-usd") - { - Description = @"Standing spend limit in USD for each UTC calendar month. Send null to remove the limit; omit to leave it unchanged.", - }, - MonthOverrideUsd: new Option($"--{normalizedPrefix}month-override-usd") - { - Description = @"Spend limit in USD for the current UTC calendar month, which supersedes the standing limit. Send null to remove it; omit to leave it unchanged.", - } - ); - } -} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.BasetenClient.EditRoutesSettingsUsersByUserId.g.cs b/src/libs/Baseten/Generated/Baseten.BasetenClient.EditRoutesSettingsUsersByUserId.g.cs deleted file mode 100644 index 063ad9ce..00000000 --- a/src/libs/Baseten/Generated/Baseten.BasetenClient.EditRoutesSettingsUsersByUserId.g.cs +++ /dev/null @@ -1,491 +0,0 @@ - -#nullable enable - -namespace Baseten -{ - public partial class BasetenClient - { - - - private static readonly global::Baseten.EndPointSecurityRequirement s_EditRoutesSettingsUsersByUserIdSecurityRequirement0 = - 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_EditRoutesSettingsUsersByUserIdSecurityRequirements = - new global::Baseten.EndPointSecurityRequirement[] - { s_EditRoutesSettingsUsersByUserIdSecurityRequirement0, - }; - partial void PrepareEditRoutesSettingsUsersByUserIdArguments( - global::System.Net.Http.HttpClient httpClient, - ref string userId, - global::Baseten.UpdateRouteUserSettingsRequestV1 request); - partial void PrepareEditRoutesSettingsUsersByUserIdRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string userId, - global::Baseten.UpdateRouteUserSettingsRequestV1 request); - partial void ProcessEditRoutesSettingsUsersByUserIdResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessEditRoutesSettingsUsersByUserIdResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// Updates a user's route settings
- /// Changes only the fields in the request. Once the user's metered spend in a team in a month reaches the spend limit, requests with Routes keys they created in that team are rejected until the limit is raised or the next month starts. Spend is metered every 15 minutes and can lag, so a user can go over the limit. The user's own limit supersedes their team's per-member limit. The limit is set in the only team the user has a role in; when they belong to none or several, use `PATCH /v1/routes/settings/teams/{team_id}/users/{user_id}` instead. - ///
- /// - /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - /// - /// curl --request PATCH \
- /// --url https://api.baseten.co/v1/routes/settings/users/{user_id} \
- /// --header "Authorization: Bearer $BASETEN_API_KEY" \
- /// --data '{
- /// "spend_limit": null
- /// }' - ///
- public async global::System.Threading.Tasks.Task EditRoutesSettingsUsersByUserIdAsync( - string userId, - - global::Baseten.UpdateRouteUserSettingsRequestV1 request, - global::Baseten.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - var __response = await EditRoutesSettingsUsersByUserIdAsResponseAsync( - userId: userId, - - request: request, - requestOptions: requestOptions, - cancellationToken: cancellationToken - ).ConfigureAwait(false); - - return __response.Body; - } - /// - /// Updates a user's route settings
- /// Changes only the fields in the request. Once the user's metered spend in a team in a month reaches the spend limit, requests with Routes keys they created in that team are rejected until the limit is raised or the next month starts. Spend is metered every 15 minutes and can lag, so a user can go over the limit. The user's own limit supersedes their team's per-member limit. The limit is set in the only team the user has a role in; when they belong to none or several, use `PATCH /v1/routes/settings/teams/{team_id}/users/{user_id}` instead. - ///
- /// - /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - /// - /// curl --request PATCH \
- /// --url https://api.baseten.co/v1/routes/settings/users/{user_id} \
- /// --header "Authorization: Bearer $BASETEN_API_KEY" \
- /// --data '{
- /// "spend_limit": null
- /// }' - ///
- public async global::System.Threading.Tasks.Task> EditRoutesSettingsUsersByUserIdAsResponseAsync( - string userId, - - global::Baseten.UpdateRouteUserSettingsRequestV1 request, - global::Baseten.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - request = request ?? throw new global::System.ArgumentNullException(nameof(request)); - - PrepareArguments( - client: HttpClient); - PrepareEditRoutesSettingsUsersByUserIdArguments( - httpClient: HttpClient, - userId: ref userId, - request: request); - - - var __authorizations = global::Baseten.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_EditRoutesSettingsUsersByUserIdSecurityRequirements, - operationName: "EditRoutesSettingsUsersByUserIdAsync"); - - 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/routes/settings/users/{userId}", - 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: new global::System.Net.Http.HttpMethod("PATCH"), - requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); -#if NET6_0_OR_GREATER - __httpRequest.Version = global::System.Net.HttpVersion.Version11; - __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; -#endif - - foreach (var __authorization in __authorizations) - { - if (__authorization.Type == "Http" || - __authorization.Type == "OAuth2" || - __authorization.Type == "OpenIdConnect") - { - __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: __authorization.Name, - parameter: __authorization.Value); - } - else if (__authorization.Type == "ApiKey" && - __authorization.Location == "Header") - { - __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); - } - } - var __httpRequestContentBody = request.ToJson(JsonSerializerContext); - var __httpRequestContent = new global::System.Net.Http.StringContent( - content: __httpRequestContentBody, - encoding: global::System.Text.Encoding.UTF8, - mediaType: "application/json"); - __httpRequest.Content = __httpRequestContent; - global::Baseten.AutoSDKRequestOptionsSupport.ApplyHeaders( - request: __httpRequest, - clientHeaders: Options.Headers, - requestHeaders: requestOptions?.Headers); - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareEditRoutesSettingsUsersByUserIdRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - userId: userId, - request: request); - - return __httpRequest; - } - - global::System.Net.Http.HttpRequestMessage? __httpRequest = null; - global::System.Net.Http.HttpResponseMessage? __response = null; - var __attemptNumber = 0; - try - { - for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) - { - __attemptNumber = __attempt; - __httpRequest = __CreateHttpRequest(); - await global::Baseten.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( - clientOptions: Options, - context: global::Baseten.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "editRoutesSettingsUsersByUserId", - methodName: "EditRoutesSettingsUsersByUserIdAsync", - pathTemplate: "$\"/v1/routes/settings/users/{userId}\"", - httpMethod: "PATCH", - 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: "editRoutesSettingsUsersByUserId", - methodName: "EditRoutesSettingsUsersByUserIdAsync", - pathTemplate: "$\"/v1/routes/settings/users/{userId}\"", - httpMethod: "PATCH", - 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: "editRoutesSettingsUsersByUserId", - methodName: "EditRoutesSettingsUsersByUserIdAsync", - pathTemplate: "$\"/v1/routes/settings/users/{userId}\"", - httpMethod: "PATCH", - 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); - ProcessEditRoutesSettingsUsersByUserIdResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Baseten.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Baseten.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "editRoutesSettingsUsersByUserId", - methodName: "EditRoutesSettingsUsersByUserIdAsync", - pathTemplate: "$\"/v1/routes/settings/users/{userId}\"", - httpMethod: "PATCH", - 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: "editRoutesSettingsUsersByUserId", - methodName: "EditRoutesSettingsUsersByUserIdAsync", - pathTemplate: "$\"/v1/routes/settings/users/{userId}\"", - httpMethod: "PATCH", - 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 (__effectiveReadResponseAsString) - { - var __content = await __response.Content.ReadAsStringAsync( - #if NET5_0_OR_GREATER - __effectiveCancellationToken - #endif - ).ConfigureAwait(false); - - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessEditRoutesSettingsUsersByUserIdResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - var __value = global::Baseten.RouteUserSettingsV1.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.RouteUserSettingsV1.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(); - } - } - /// - /// Updates a user's route settings
- /// Changes only the fields in the request. Once the user's metered spend in a team in a month reaches the spend limit, requests with Routes keys they created in that team are rejected until the limit is raised or the next month starts. Spend is metered every 15 minutes and can lag, so a user can go over the limit. The user's own limit supersedes their team's per-member limit. The limit is set in the only team the user has a role in; when they belong to none or several, use `PATCH /v1/routes/settings/teams/{team_id}/users/{user_id}` instead. - ///
- /// - /// - /// Spend limit fields to change. Pass null to remove the user's limit; omit to leave it unchanged.
- /// 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 - /// - public async global::System.Threading.Tasks.Task EditRoutesSettingsUsersByUserIdAsync( - string userId, - global::Baseten.UpdateRouteSpendLimitSettingV1? spendLimit = default, - global::Baseten.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - var __request = new global::Baseten.UpdateRouteUserSettingsRequestV1 - { - SpendLimit = spendLimit, - }; - - return await EditRoutesSettingsUsersByUserIdAsync( - userId: userId, - request: __request, - requestOptions: requestOptions, - cancellationToken: cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.BasetenClient.GetRoutesSettingsTeamsByTeamIdUsers.g.cs b/src/libs/Baseten/Generated/Baseten.BasetenClient.GetRoutesSettingsTeamsByTeamIdUsers.g.cs index cf3d771f..4632c557 100644 --- a/src/libs/Baseten/Generated/Baseten.BasetenClient.GetRoutesSettingsTeamsByTeamIdUsers.g.cs +++ b/src/libs/Baseten/Generated/Baseten.BasetenClient.GetRoutesSettingsTeamsByTeamIdUsers.g.cs @@ -43,7 +43,7 @@ partial void ProcessGetRoutesSettingsTeamsByTeamIdUsersResponseContent( /// /// Lists users' route settings in a team
- /// Returns the settings in the team of each user with a role in the team and of anyone with Code spend in the team this month. Requires team admin for the specified team or organization admin. + /// Returns the settings in the team of each member of the team, including organization admins and Code service accounts. Requires team admin for the specified team or organization admin. ///
/// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. @@ -69,7 +69,7 @@ partial void ProcessGetRoutesSettingsTeamsByTeamIdUsersResponseContent( } /// /// Lists users' route settings in a team
- /// Returns the settings in the team of each user with a role in the team and of anyone with Code spend in the team this month. Requires team admin for the specified team or organization admin. + /// Returns the settings in the team of each member of the team, including organization admins and Code service accounts. Requires team admin for the specified team or organization admin. ///
/// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Baseten/Generated/Baseten.BasetenClient.GetRoutesSettingsUsersByUserId.g.cs b/src/libs/Baseten/Generated/Baseten.BasetenClient.GetRoutesSettingsUsersByUserId.g.cs deleted file mode 100644 index 711a1aa1..00000000 --- a/src/libs/Baseten/Generated/Baseten.BasetenClient.GetRoutesSettingsUsersByUserId.g.cs +++ /dev/null @@ -1,452 +0,0 @@ - -#nullable enable - -namespace Baseten -{ - public partial class BasetenClient - { - - - private static readonly global::Baseten.EndPointSecurityRequirement s_GetRoutesSettingsUsersByUserIdSecurityRequirement0 = - 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_GetRoutesSettingsUsersByUserIdSecurityRequirements = - new global::Baseten.EndPointSecurityRequirement[] - { s_GetRoutesSettingsUsersByUserIdSecurityRequirement0, - }; - partial void PrepareGetRoutesSettingsUsersByUserIdArguments( - global::System.Net.Http.HttpClient httpClient, - ref string? teamId, - ref string userId); - partial void PrepareGetRoutesSettingsUsersByUserIdRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string? teamId, - string userId); - partial void ProcessGetRoutesSettingsUsersByUserIdResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessGetRoutesSettingsUsersByUserIdResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// Gets a user's route settings
- /// Returns the settings that apply to the user, including the spend limit that caps what they can spend on Baseten Code each month: the limit set on the user, their team's per-member limit, and the effective limit for this user. The user limit always overrides the team's per-member limit. The limits are read in `team_id` when given, else in the only team the user has a role in; the request fails when they belong to none or several. - ///
- /// - /// 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 - /// - /// - /// curl --request GET \
- /// --url https://api.baseten.co/v1/routes/settings/users/{user_id} \
- /// --header "Authorization: Bearer $BASETEN_API_KEY" - ///
- public async global::System.Threading.Tasks.Task GetRoutesSettingsUsersByUserIdAsync( - string userId, - string? teamId = default, - global::Baseten.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - var __response = await GetRoutesSettingsUsersByUserIdAsResponseAsync( - userId: userId, - teamId: teamId, - requestOptions: requestOptions, - cancellationToken: cancellationToken - ).ConfigureAwait(false); - - return __response.Body; - } - /// - /// Gets a user's route settings
- /// Returns the settings that apply to the user, including the spend limit that caps what they can spend on Baseten Code each month: the limit set on the user, their team's per-member limit, and the effective limit for this user. The user limit always overrides the team's per-member limit. The limits are read in `team_id` when given, else in the only team the user has a role in; the request fails when they belong to none or several. - ///
- /// - /// 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 - /// - /// - /// curl --request GET \
- /// --url https://api.baseten.co/v1/routes/settings/users/{user_id} \
- /// --header "Authorization: Bearer $BASETEN_API_KEY" - ///
- public async global::System.Threading.Tasks.Task> GetRoutesSettingsUsersByUserIdAsResponseAsync( - string userId, - string? teamId = default, - global::Baseten.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - PrepareArguments( - client: HttpClient); - PrepareGetRoutesSettingsUsersByUserIdArguments( - httpClient: HttpClient, - teamId: ref teamId, - userId: ref userId); - - - var __authorizations = global::Baseten.EndPointSecurityResolver.ResolveAuthorizations( - availableAuthorizations: Authorizations, - securityRequirements: s_GetRoutesSettingsUsersByUserIdSecurityRequirements, - operationName: "GetRoutesSettingsUsersByUserIdAsync"); - - 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/routes/settings/users/{userId}", - baseUri: HttpClient.BaseAddress); - __pathBuilder - .AddOptionalParameter("team_id", teamId) - ; - 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); - PrepareGetRoutesSettingsUsersByUserIdRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - teamId: teamId, - userId: userId); - - 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: "getRoutesSettingsUsersByUserId", - methodName: "GetRoutesSettingsUsersByUserIdAsync", - pathTemplate: "$\"/v1/routes/settings/users/{userId}\"", - 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: "getRoutesSettingsUsersByUserId", - methodName: "GetRoutesSettingsUsersByUserIdAsync", - pathTemplate: "$\"/v1/routes/settings/users/{userId}\"", - 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: "getRoutesSettingsUsersByUserId", - methodName: "GetRoutesSettingsUsersByUserIdAsync", - pathTemplate: "$\"/v1/routes/settings/users/{userId}\"", - 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); - ProcessGetRoutesSettingsUsersByUserIdResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - if (__response.IsSuccessStatusCode) - { - await global::Baseten.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( - clientOptions: Options, - context: global::Baseten.AutoSDKRequestOptionsSupport.CreateHookContext( - operationId: "getRoutesSettingsUsersByUserId", - methodName: "GetRoutesSettingsUsersByUserIdAsync", - pathTemplate: "$\"/v1/routes/settings/users/{userId}\"", - 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: "getRoutesSettingsUsersByUserId", - methodName: "GetRoutesSettingsUsersByUserIdAsync", - pathTemplate: "$\"/v1/routes/settings/users/{userId}\"", - 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 (__effectiveReadResponseAsString) - { - var __content = await __response.Content.ReadAsStringAsync( - #if NET5_0_OR_GREATER - __effectiveCancellationToken - #endif - ).ConfigureAwait(false); - - ProcessResponseContent( - client: HttpClient, - response: __response, - content: ref __content); - ProcessGetRoutesSettingsUsersByUserIdResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - var __value = global::Baseten.RouteUserSettingsV1.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.RouteUserSettingsV1.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.BasetenClient.GetRoutesSettingsUsersByUserIdTeams.g.cs b/src/libs/Baseten/Generated/Baseten.BasetenClient.GetRoutesSettingsUsersByUserIdTeams.g.cs index bb24b00b..ccd8aa21 100644 --- a/src/libs/Baseten/Generated/Baseten.BasetenClient.GetRoutesSettingsUsersByUserIdTeams.g.cs +++ b/src/libs/Baseten/Generated/Baseten.BasetenClient.GetRoutesSettingsUsersByUserIdTeams.g.cs @@ -43,7 +43,7 @@ partial void ProcessGetRoutesSettingsUsersByUserIdTeamsResponseContent( /// /// Lists a user's route settings in each of their teams
- /// Returns the user's settings in each team they have a role in and in any team they have Code spend in this month, alphabetical by team name: their spend limit for Baseten Code in the team, their spend in the team this month, and whether that spend reached the limit. Members can read their own settings; organization admins can read anyone's. + /// Returns the user's settings in each team they belong to (every team, for organization admins), alphabetical by team name: their spend limit for Baseten Code in the team, their spend in the team this month, and whether that spend reached the limit. Members can read their own settings; organization admins can read anyone's. ///
/// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. @@ -69,7 +69,7 @@ partial void ProcessGetRoutesSettingsUsersByUserIdTeamsResponseContent( } /// /// Lists a user's route settings in each of their teams
- /// Returns the user's settings in each team they have a role in and in any team they have Code spend in this month, alphabetical by team name: their spend limit for Baseten Code in the team, their spend in the team this month, and whether that spend reached the limit. Members can read their own settings; organization admins can read anyone's. + /// Returns the user's settings in each team they belong to (every team, for organization admins), alphabetical by team name: their spend limit for Baseten Code in the team, their spend in the team this month, and whether that spend reached the limit. Members can read their own settings; organization admins can read anyone's. ///
/// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Baseten/Generated/Baseten.IBasetenClient.EditRoutesSettingsUsersByUserId.g.cs b/src/libs/Baseten/Generated/Baseten.IBasetenClient.EditRoutesSettingsUsersByUserId.g.cs deleted file mode 100644 index 30a10bca..00000000 --- a/src/libs/Baseten/Generated/Baseten.IBasetenClient.EditRoutesSettingsUsersByUserId.g.cs +++ /dev/null @@ -1,71 +0,0 @@ -#nullable enable - -namespace Baseten -{ - public partial interface IBasetenClient - { - /// - /// Updates a user's route settings
- /// Changes only the fields in the request. Once the user's metered spend in a team in a month reaches the spend limit, requests with Routes keys they created in that team are rejected until the limit is raised or the next month starts. Spend is metered every 15 minutes and can lag, so a user can go over the limit. The user's own limit supersedes their team's per-member limit. The limit is set in the only team the user has a role in; when they belong to none or several, use `PATCH /v1/routes/settings/teams/{team_id}/users/{user_id}` instead. - ///
- /// - /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - /// - /// curl --request PATCH \
- /// --url https://api.baseten.co/v1/routes/settings/users/{user_id} \
- /// --header "Authorization: Bearer $BASETEN_API_KEY" \
- /// --data '{
- /// "spend_limit": null
- /// }' - ///
- global::System.Threading.Tasks.Task EditRoutesSettingsUsersByUserIdAsync( - string userId, - - global::Baseten.UpdateRouteUserSettingsRequestV1 request, - global::Baseten.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - /// - /// Updates a user's route settings
- /// Changes only the fields in the request. Once the user's metered spend in a team in a month reaches the spend limit, requests with Routes keys they created in that team are rejected until the limit is raised or the next month starts. Spend is metered every 15 minutes and can lag, so a user can go over the limit. The user's own limit supersedes their team's per-member limit. The limit is set in the only team the user has a role in; when they belong to none or several, use `PATCH /v1/routes/settings/teams/{team_id}/users/{user_id}` instead. - ///
- /// - /// - /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. - /// The token to cancel the operation with - /// - /// - /// curl --request PATCH \
- /// --url https://api.baseten.co/v1/routes/settings/users/{user_id} \
- /// --header "Authorization: Bearer $BASETEN_API_KEY" \
- /// --data '{
- /// "spend_limit": null
- /// }' - ///
- global::System.Threading.Tasks.Task> EditRoutesSettingsUsersByUserIdAsResponseAsync( - string userId, - - global::Baseten.UpdateRouteUserSettingsRequestV1 request, - global::Baseten.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - /// - /// Updates a user's route settings
- /// Changes only the fields in the request. Once the user's metered spend in a team in a month reaches the spend limit, requests with Routes keys they created in that team are rejected until the limit is raised or the next month starts. Spend is metered every 15 minutes and can lag, so a user can go over the limit. The user's own limit supersedes their team's per-member limit. The limit is set in the only team the user has a role in; when they belong to none or several, use `PATCH /v1/routes/settings/teams/{team_id}/users/{user_id}` instead. - ///
- /// - /// - /// Spend limit fields to change. Pass null to remove the user's limit; omit to leave it unchanged.
- /// 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 - /// - global::System.Threading.Tasks.Task EditRoutesSettingsUsersByUserIdAsync( - string userId, - global::Baseten.UpdateRouteSpendLimitSettingV1? spendLimit = default, - global::Baseten.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.IBasetenClient.GetRoutesSettingsTeamsByTeamIdUsers.g.cs b/src/libs/Baseten/Generated/Baseten.IBasetenClient.GetRoutesSettingsTeamsByTeamIdUsers.g.cs index 27e8f886..3c600bee 100644 --- a/src/libs/Baseten/Generated/Baseten.IBasetenClient.GetRoutesSettingsTeamsByTeamIdUsers.g.cs +++ b/src/libs/Baseten/Generated/Baseten.IBasetenClient.GetRoutesSettingsTeamsByTeamIdUsers.g.cs @@ -6,7 +6,7 @@ public partial interface IBasetenClient { /// /// Lists users' route settings in a team
- /// Returns the settings in the team of each user with a role in the team and of anyone with Code spend in the team this month. Requires team admin for the specified team or organization admin. + /// Returns the settings in the team of each member of the team, including organization admins and Code service accounts. Requires team admin for the specified team or organization admin. ///
/// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. @@ -23,7 +23,7 @@ public partial interface IBasetenClient global::System.Threading.CancellationToken cancellationToken = default); /// /// Lists users' route settings in a team
- /// Returns the settings in the team of each user with a role in the team and of anyone with Code spend in the team this month. Requires team admin for the specified team or organization admin. + /// Returns the settings in the team of each member of the team, including organization admins and Code service accounts. Requires team admin for the specified team or organization admin. ///
/// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Baseten/Generated/Baseten.IBasetenClient.GetRoutesSettingsUsersByUserId.g.cs b/src/libs/Baseten/Generated/Baseten.IBasetenClient.GetRoutesSettingsUsersByUserId.g.cs deleted file mode 100644 index 3bb7dd2d..00000000 --- a/src/libs/Baseten/Generated/Baseten.IBasetenClient.GetRoutesSettingsUsersByUserId.g.cs +++ /dev/null @@ -1,50 +0,0 @@ -#nullable enable - -namespace Baseten -{ - public partial interface IBasetenClient - { - /// - /// Gets a user's route settings
- /// Returns the settings that apply to the user, including the spend limit that caps what they can spend on Baseten Code each month: the limit set on the user, their team's per-member limit, and the effective limit for this user. The user limit always overrides the team's per-member limit. The limits are read in `team_id` when given, else in the only team the user has a role in; the request fails when they belong to none or several. - ///
- /// - /// 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 - /// - /// - /// curl --request GET \
- /// --url https://api.baseten.co/v1/routes/settings/users/{user_id} \
- /// --header "Authorization: Bearer $BASETEN_API_KEY" - ///
- global::System.Threading.Tasks.Task GetRoutesSettingsUsersByUserIdAsync( - string userId, - string? teamId = default, - global::Baseten.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - /// - /// Gets a user's route settings
- /// Returns the settings that apply to the user, including the spend limit that caps what they can spend on Baseten Code each month: the limit set on the user, their team's per-member limit, and the effective limit for this user. The user limit always overrides the team's per-member limit. The limits are read in `team_id` when given, else in the only team the user has a role in; the request fails when they belong to none or several. - ///
- /// - /// 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 - /// - /// - /// curl --request GET \
- /// --url https://api.baseten.co/v1/routes/settings/users/{user_id} \
- /// --header "Authorization: Bearer $BASETEN_API_KEY" - ///
- global::System.Threading.Tasks.Task> GetRoutesSettingsUsersByUserIdAsResponseAsync( - string userId, - string? teamId = default, - global::Baseten.AutoSDKRequestOptions? requestOptions = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.IBasetenClient.GetRoutesSettingsUsersByUserIdTeams.g.cs b/src/libs/Baseten/Generated/Baseten.IBasetenClient.GetRoutesSettingsUsersByUserIdTeams.g.cs index 4ee37586..794bcf41 100644 --- a/src/libs/Baseten/Generated/Baseten.IBasetenClient.GetRoutesSettingsUsersByUserIdTeams.g.cs +++ b/src/libs/Baseten/Generated/Baseten.IBasetenClient.GetRoutesSettingsUsersByUserIdTeams.g.cs @@ -6,7 +6,7 @@ public partial interface IBasetenClient { /// /// Lists a user's route settings in each of their teams
- /// Returns the user's settings in each team they have a role in and in any team they have Code spend in this month, alphabetical by team name: their spend limit for Baseten Code in the team, their spend in the team this month, and whether that spend reached the limit. Members can read their own settings; organization admins can read anyone's. + /// Returns the user's settings in each team they belong to (every team, for organization admins), alphabetical by team name: their spend limit for Baseten Code in the team, their spend in the team this month, and whether that spend reached the limit. Members can read their own settings; organization admins can read anyone's. ///
/// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. @@ -23,7 +23,7 @@ public partial interface IBasetenClient global::System.Threading.CancellationToken cancellationToken = default); /// /// Lists a user's route settings in each of their teams
- /// Returns the user's settings in each team they have a role in and in any team they have Code spend in this month, alphabetical by team name: their spend limit for Baseten Code in the team, their spend in the team this month, and whether that spend reached the limit. Members can read their own settings; organization admins can read anyone's. + /// Returns the user's settings in each team they belong to (every team, for organization admins), alphabetical by team name: their spend limit for Baseten Code in the team, their spend in the team this month, and whether that spend reached the limit. Members can read their own settings; organization admins can read anyone's. ///
/// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Baseten/Generated/Baseten.IImagesClient.DeleteImageTag.g.cs b/src/libs/Baseten/Generated/Baseten.IImagesClient.DeleteImageTag.g.cs index 80b32e8b..ed56deea 100644 --- a/src/libs/Baseten/Generated/Baseten.IImagesClient.DeleteImageTag.g.cs +++ b/src/libs/Baseten/Generated/Baseten.IImagesClient.DeleteImageTag.g.cs @@ -6,7 +6,7 @@ public partial interface IImagesClient { /// /// Delete an image tag
- /// Delete a specific image version. Reject deletion if the version is referenced by an active deployment. Return the updated image with its remaining tags, possibly empty. + /// Delete a specific image version. Reject deletion if the version is referenced by an active deployment. Return the updated repository summary. Use the tag listing endpoint for remaining image versions. ///
/// /// @@ -24,7 +24,7 @@ public partial interface IImagesClient global::System.Threading.CancellationToken cancellationToken = default); /// /// Delete an image tag
- /// Delete a specific image version. Reject deletion if the version is referenced by an active deployment. Return the updated image with its remaining tags, possibly empty. + /// Delete a specific image version. Reject deletion if the version is referenced by an active deployment. Return the updated repository summary. Use the tag listing endpoint for remaining image versions. ///
/// /// diff --git a/src/libs/Baseten/Generated/Baseten.IImagesClient.PushImage.g.cs b/src/libs/Baseten/Generated/Baseten.IImagesClient.PushImage.g.cs index f19f6bff..fe7119c7 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. The uploaded ZIP archive must not exceed 5 GB. 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. Set memory and volume to size the temporary environment that builds or imports the image; for a source archive, upload with the returned upload_headers. ///
/// /// @@ -23,7 +23,7 @@ public partial interface IImagesClient 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. The uploaded ZIP archive must not exceed 5 GB. 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. Set memory and volume to size the temporary environment that builds or imports the image; for a source archive, upload with the returned upload_headers. ///
/// /// @@ -40,7 +40,7 @@ public partial interface IImagesClient 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. The uploaded ZIP archive must not exceed 5 GB. 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. Set memory and volume to size the temporary environment that builds or imports the image; for a source archive, upload with the returned upload_headers. ///
/// /// @@ -57,6 +57,14 @@ public partial interface IImagesClient /// Included only in requests
/// Example: {"auths":{"https://index.docker.io/v1/":{"auth":"YjEwLXJldmlldzpkZW1vLW5vdC1hLXZhbGlkLXJlZ2lzdHJ5LXRva2Vu"}}} /// + /// + /// Memory in megabytes of the temporary environment that builds the source archive or imports the registry image. Omit it to use the default size. Does not change the memory of sandboxes created from the image.
+ /// Example: 16384 + /// + /// + /// Scratch disk in megabytes attached to the temporary build environment for intermediate layers. Set it for large images that run out of space while building or importing. 0 builds in memory, which is the default. Teams with HIPAA compliance enabled accept only 0.
+ /// Example: 32768 + /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// @@ -66,6 +74,8 @@ public partial interface IImagesClient string? xTeamId = default, string? image = default, string? dockerConfig = default, + long? memory = default, + long? volume = default, global::Baseten.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); } diff --git a/src/libs/Baseten/Generated/Baseten.ISandboxesClient.CreateSandbox.g.cs b/src/libs/Baseten/Generated/Baseten.ISandboxesClient.CreateSandbox.g.cs index 7be3ebc1..2dc3f7fa 100644 --- a/src/libs/Baseten/Generated/Baseten.ISandboxesClient.CreateSandbox.g.cs +++ b/src/libs/Baseten/Generated/Baseten.ISandboxesClient.CreateSandbox.g.cs @@ -73,7 +73,7 @@ public partial interface ISandboxesClient /// Example: baseten/base-image:latest /// /// - /// Memory allocation in megabytes. Also determines CPU allocation (CPU cores = memory in MB / 2048, e.g., 4096MB = 2 CPUs). Defaults to 4096.
+ /// Memory allocation in megabytes. Also determines CPU allocation (CPU cores = memory in MB / 2048, e.g., 4096MB = 2 CPUs). Defaults to 4096. Must be between 1024 and 262144.
/// Default Value: 4096
/// Example: 4096 /// diff --git a/src/libs/Baseten/Generated/Baseten.ISandboxesClient.GetSandboxMetrics.g.cs b/src/libs/Baseten/Generated/Baseten.ISandboxesClient.GetSandboxMetrics.g.cs index 0f1f3d4e..ac88341d 100644 --- a/src/libs/Baseten/Generated/Baseten.ISandboxesClient.GetSandboxMetrics.g.cs +++ b/src/libs/Baseten/Generated/Baseten.ISandboxesClient.GetSandboxMetrics.g.cs @@ -6,62 +6,72 @@ 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. + /// Returns every interval with labeled request counts, CPU cores, and RSS memory bytes. CURRENT returns one snapshot at now, with
+ /// request counts over the preceding minute and latest gauges.
+ /// SUMMARY returns one value set over the window. SERIES snaps the window outward
+ /// to UTC step boundaries and echoes those boundaries; each value covers
+ /// [start_epoch_millis, start_epoch_millis + step_seconds).
+ /// Missing gauge samples remain null. Request counts are zero after
+ /// creation without traffic, and null before creation. CPU averages are averages
+ /// of valid sampled CPU rates; memory averages are averages of sampled RSS.
+ /// Windows default to one hour, are limited to 7 days after alignment, and at most
+ /// 10000 intervals. 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.SandboxMetricModeV1? mode = default, + long? startEpochMillis = default, + long? endEpochMillis = default, + global::System.Collections.Generic.IList? metrics = 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. + /// Returns every interval with labeled request counts, CPU cores, and RSS memory bytes. CURRENT returns one snapshot at now, with
+ /// request counts over the preceding minute and latest gauges.
+ /// SUMMARY returns one value set over the window. SERIES snaps the window outward
+ /// to UTC step boundaries and echoes those boundaries; each value covers
+ /// [start_epoch_millis, start_epoch_millis + step_seconds).
+ /// Missing gauge samples remain null. Request counts are zero after
+ /// creation without traffic, and null before creation. CPU averages are averages
+ /// of valid sampled CPU rates; memory averages are averages of sampled RSS.
+ /// Windows default to one hour, are limited to 7 days after alignment, and at most
+ /// 10000 intervals. 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.SandboxMetricModeV1? mode = default, + long? startEpochMillis = default, + long? endEpochMillis = default, + global::System.Collections.Generic.IList? metrics = default, global::Baseten.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); } diff --git a/src/libs/Baseten/Generated/Baseten.Images.JsonSerializerContext.g.cs b/src/libs/Baseten/Generated/Baseten.Images.JsonSerializerContext.g.cs index 0e0466ac..4542f998 100644 --- a/src/libs/Baseten/Generated/Baseten.Images.JsonSerializerContext.g.cs +++ b/src/libs/Baseten/Generated/Baseten.Images.JsonSerializerContext.g.cs @@ -27,14 +27,12 @@ namespace Baseten [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.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::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxImageV1))] [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))] @@ -49,11 +47,10 @@ namespace Baseten [global::System.Text.Json.Serialization.JsonSerializable(typeof(long?))] [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))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] @@ -104,7 +101,6 @@ 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()); diff --git a/src/libs/Baseten/Generated/Baseten.ImagesClient.DeleteImageTag.g.cs b/src/libs/Baseten/Generated/Baseten.ImagesClient.DeleteImageTag.g.cs index cdf75d09..02e6d113 100644 --- a/src/libs/Baseten/Generated/Baseten.ImagesClient.DeleteImageTag.g.cs +++ b/src/libs/Baseten/Generated/Baseten.ImagesClient.DeleteImageTag.g.cs @@ -49,7 +49,7 @@ partial void ProcessDeleteImageTagResponseContent( /// /// Delete an image tag
- /// Delete a specific image version. Reject deletion if the version is referenced by an active deployment. Return the updated image with its remaining tags, possibly empty. + /// Delete a specific image version. Reject deletion if the version is referenced by an active deployment. Return the updated repository summary. Use the tag listing endpoint for remaining image versions. ///
/// /// @@ -79,7 +79,7 @@ partial void ProcessDeleteImageTagResponseContent( } /// /// Delete an image tag
- /// Delete a specific image version. Reject deletion if the version is referenced by an active deployment. Return the updated image with its remaining tags, possibly empty. + /// Delete a specific image version. Reject deletion if the version is referenced by an active deployment. Return the updated repository summary. Use the tag listing endpoint for remaining image versions. ///
/// /// diff --git a/src/libs/Baseten/Generated/Baseten.ImagesClient.PushImage.g.cs b/src/libs/Baseten/Generated/Baseten.ImagesClient.PushImage.g.cs index d03395e4..5a7821b7 100644 --- a/src/libs/Baseten/Generated/Baseten.ImagesClient.PushImage.g.cs +++ b/src/libs/Baseten/Generated/Baseten.ImagesClient.PushImage.g.cs @@ -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. The uploaded ZIP archive must not exceed 5 GB. 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. Set memory and volume to size the temporary environment that builds or imports the image; for a source archive, upload with the returned upload_headers. ///
/// /// @@ -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. The uploaded ZIP archive must not exceed 5 GB. 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. Set memory and volume to size the temporary environment that builds or imports the image; for a source archive, upload with the returned upload_headers. ///
/// /// @@ -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. The uploaded ZIP archive must not exceed 5 GB. 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. Set memory and volume to size the temporary environment that builds or imports the image; for a source archive, upload with the returned upload_headers. ///
/// /// @@ -639,6 +639,14 @@ partial void ProcessPushImageResponseContent( /// Included only in requests
/// Example: {"auths":{"https://index.docker.io/v1/":{"auth":"YjEwLXJldmlldzpkZW1vLW5vdC1hLXZhbGlkLXJlZ2lzdHJ5LXRva2Vu"}}} /// + /// + /// Memory in megabytes of the temporary environment that builds the source archive or imports the registry image. Omit it to use the default size. Does not change the memory of sandboxes created from the image.
+ /// Example: 16384 + /// + /// + /// Scratch disk in megabytes attached to the temporary build environment for intermediate layers. Set it for large images that run out of space while building or importing. 0 builds in memory, which is the default. Teams with HIPAA compliance enabled accept only 0.
+ /// Example: 32768 + /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// @@ -648,6 +656,8 @@ partial void ProcessPushImageResponseContent( string? xTeamId = default, string? image = default, string? dockerConfig = default, + long? memory = default, + long? volume = default, global::Baseten.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) { @@ -656,6 +666,8 @@ partial void ProcessPushImageResponseContent( Name = name, Image = image, DockerConfig = dockerConfig, + Memory = memory, + Volume = volume, }; return await PushImageAsync( diff --git a/src/libs/Baseten/Generated/Baseten.JsonConverters.SandboxImageV1.g.cs b/src/libs/Baseten/Generated/Baseten.JsonConverters.SandboxImageV1.g.cs deleted file mode 100644 index 1087bbe7..00000000 --- a/src/libs/Baseten/Generated/Baseten.JsonConverters.SandboxImageV1.g.cs +++ /dev/null @@ -1,108 +0,0 @@ -#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.SandboxMetricDescriptorV1Kind.g.cs b/src/libs/Baseten/Generated/Baseten.JsonConverters.SandboxMetricDescriptorV1Kind.g.cs new file mode 100644 index 00000000..b8045b4e --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.JsonConverters.SandboxMetricDescriptorV1Kind.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Baseten.JsonConverters +{ + /// + public sealed class SandboxMetricDescriptorV1KindJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Baseten.SandboxMetricDescriptorV1Kind Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::Baseten.SandboxMetricDescriptorV1KindExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Baseten.SandboxMetricDescriptorV1Kind)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Baseten.SandboxMetricDescriptorV1Kind); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Baseten.SandboxMetricDescriptorV1Kind value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Baseten.SandboxMetricDescriptorV1KindExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.JsonConverters.SandboxMetricDescriptorV1KindNullable.g.cs b/src/libs/Baseten/Generated/Baseten.JsonConverters.SandboxMetricDescriptorV1KindNullable.g.cs new file mode 100644 index 00000000..43bbe884 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.JsonConverters.SandboxMetricDescriptorV1KindNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Baseten.JsonConverters +{ + /// + public sealed class SandboxMetricDescriptorV1KindNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Baseten.SandboxMetricDescriptorV1Kind? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::Baseten.SandboxMetricDescriptorV1KindExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Baseten.SandboxMetricDescriptorV1Kind)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Baseten.SandboxMetricDescriptorV1Kind?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Baseten.SandboxMetricDescriptorV1Kind? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::Baseten.SandboxMetricDescriptorV1KindExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.JsonConverters.SandboxMetricDescriptorV1UnitHint.g.cs b/src/libs/Baseten/Generated/Baseten.JsonConverters.SandboxMetricDescriptorV1UnitHint.g.cs new file mode 100644 index 00000000..9eef91a3 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.JsonConverters.SandboxMetricDescriptorV1UnitHint.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Baseten.JsonConverters +{ + /// + public sealed class SandboxMetricDescriptorV1UnitHintJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Baseten.SandboxMetricDescriptorV1UnitHint Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::Baseten.SandboxMetricDescriptorV1UnitHintExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Baseten.SandboxMetricDescriptorV1UnitHint)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Baseten.SandboxMetricDescriptorV1UnitHint); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Baseten.SandboxMetricDescriptorV1UnitHint value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Baseten.SandboxMetricDescriptorV1UnitHintExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.JsonConverters.SandboxMetricDescriptorV1UnitHintNullable.g.cs b/src/libs/Baseten/Generated/Baseten.JsonConverters.SandboxMetricDescriptorV1UnitHintNullable.g.cs new file mode 100644 index 00000000..6cf4d45d --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.JsonConverters.SandboxMetricDescriptorV1UnitHintNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Baseten.JsonConverters +{ + /// + public sealed class SandboxMetricDescriptorV1UnitHintNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Baseten.SandboxMetricDescriptorV1UnitHint? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::Baseten.SandboxMetricDescriptorV1UnitHintExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Baseten.SandboxMetricDescriptorV1UnitHint)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Baseten.SandboxMetricDescriptorV1UnitHint?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Baseten.SandboxMetricDescriptorV1UnitHint? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::Baseten.SandboxMetricDescriptorV1UnitHintExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.JsonConverters.SandboxMetricModeV1.g.cs b/src/libs/Baseten/Generated/Baseten.JsonConverters.SandboxMetricModeV1.g.cs new file mode 100644 index 00000000..20596cda --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.JsonConverters.SandboxMetricModeV1.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Baseten.JsonConverters +{ + /// + public sealed class SandboxMetricModeV1JsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Baseten.SandboxMetricModeV1 Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::Baseten.SandboxMetricModeV1Extensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Baseten.SandboxMetricModeV1)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Baseten.SandboxMetricModeV1); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Baseten.SandboxMetricModeV1 value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Baseten.SandboxMetricModeV1Extensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.JsonConverters.SandboxMetricModeV1Nullable.g.cs b/src/libs/Baseten/Generated/Baseten.JsonConverters.SandboxMetricModeV1Nullable.g.cs new file mode 100644 index 00000000..d3a1aa32 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.JsonConverters.SandboxMetricModeV1Nullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Baseten.JsonConverters +{ + /// + public sealed class SandboxMetricModeV1NullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Baseten.SandboxMetricModeV1? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::Baseten.SandboxMetricModeV1Extensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Baseten.SandboxMetricModeV1)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Baseten.SandboxMetricModeV1?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Baseten.SandboxMetricModeV1? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::Baseten.SandboxMetricModeV1Extensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.JsonConverters.SandboxMetricNameV1.g.cs b/src/libs/Baseten/Generated/Baseten.JsonConverters.SandboxMetricNameV1.g.cs new file mode 100644 index 00000000..ba5479c6 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.JsonConverters.SandboxMetricNameV1.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Baseten.JsonConverters +{ + /// + public sealed class SandboxMetricNameV1JsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Baseten.SandboxMetricNameV1 Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::Baseten.SandboxMetricNameV1Extensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Baseten.SandboxMetricNameV1)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Baseten.SandboxMetricNameV1); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Baseten.SandboxMetricNameV1 value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Baseten.SandboxMetricNameV1Extensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.JsonConverters.SandboxMetricNameV1Nullable.g.cs b/src/libs/Baseten/Generated/Baseten.JsonConverters.SandboxMetricNameV1Nullable.g.cs new file mode 100644 index 00000000..96636b49 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.JsonConverters.SandboxMetricNameV1Nullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Baseten.JsonConverters +{ + /// + public sealed class SandboxMetricNameV1NullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Baseten.SandboxMetricNameV1? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::Baseten.SandboxMetricNameV1Extensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Baseten.SandboxMetricNameV1)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Baseten.SandboxMetricNameV1?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Baseten.SandboxMetricNameV1? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::Baseten.SandboxMetricNameV1Extensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.JsonSerializerContext.g.cs b/src/libs/Baseten/Generated/Baseten.JsonSerializerContext.g.cs index c7935cc4..f1f21634 100644 --- a/src/libs/Baseten/Generated/Baseten.JsonSerializerContext.g.cs +++ b/src/libs/Baseten/Generated/Baseten.JsonSerializerContext.g.cs @@ -672,13 +672,9 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.RouteEffectiveSpendLimitV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.RouteSettingSourceV1), TypeInfoPropertyName = "RouteSettingSourceV12")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.RouteSpendBlockedByV1), TypeInfoPropertyName = "RouteSpendBlockedByV12")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.RouteSpendLimitSettingV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.RouteSpendLimitTeamDefaultV1))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.RouteUserSettingsV1))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.RouteUserSettingsRequestV1))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.UpdateRouteSpendLimitSettingV1))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.UpdateRouteUserSettingsRequestV1))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.RouteSpendBlockedByV1), TypeInfoPropertyName = "RouteSpendBlockedByV12")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.RouteTeamUserSettingsV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.RouteUserTeamSettingsListV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] @@ -694,6 +690,8 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.UpdateRouteTeamSpendLimitSettingV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.UpdateRouteTeamSettingsRequestV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.RouteTeamUserSettingsListV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.UpdateRouteSpendLimitSettingV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.UpdateRouteUserSettingsRequestV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.RouteConnectionConfigAnthropicV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.RouteConnectionConfigOpenAIV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.RouteConnectionConfigXAIV1))] @@ -762,16 +760,22 @@ 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.SandboxMetricModeV1), TypeInfoPropertyName = "SandboxMetricModeV12")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxMetricNameV1), TypeInfoPropertyName = "SandboxMetricNameV12")] [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::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxMetricDescriptorV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxMetricValueSetV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxMetricDescriptorV1UnitHint), TypeInfoPropertyName = "SandboxMetricDescriptorV1UnitHint2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxMetricDescriptorV1Kind), TypeInfoPropertyName = "SandboxMetricDescriptorV1Kind2")] + [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.SandboxImageBuildLogV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxImageBuildLogsResponseV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] @@ -808,14 +812,12 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex [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.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::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxImageV1))] [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))] @@ -825,6 +827,7 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex [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(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?))] @@ -921,6 +924,10 @@ 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.SandboxMetricModeV1?), TypeInfoPropertyName = "NullableSandboxMetricModeV12")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxMetricNameV1?), TypeInfoPropertyName = "NullableSandboxMetricNameV12")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxMetricDescriptorV1UnitHint?), TypeInfoPropertyName = "NullableSandboxMetricDescriptorV1UnitHint2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxMetricDescriptorV1Kind?), TypeInfoPropertyName = "NullableSandboxMetricDescriptorV1Kind2")] [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")] @@ -934,7 +941,6 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex [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.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))] @@ -1013,12 +1019,6 @@ 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))] internal sealed partial class SourceGenerationContextChunk1 : global::System.Text.Json.Serialization.JsonSerializerContext { } @@ -1029,6 +1029,12 @@ internal sealed partial class SourceGenerationContextChunk1 : 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::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))] @@ -1053,19 +1059,21 @@ internal sealed partial class SourceGenerationContextChunk1 : 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))] [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 SourceGenerationContextChunk2 : global::System.Text.Json.Serialization.JsonSerializerContext { } @@ -1120,7 +1128,6 @@ 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()); @@ -1473,6 +1480,22 @@ public override bool CanConvert(global::System.Type typeToConvert) || typeToConvert == typeof(global::Baseten.UsageLimitUnitV1?) + || typeToConvert == typeof(global::Baseten.SandboxMetricModeV1) + + || typeToConvert == typeof(global::Baseten.SandboxMetricModeV1?) + + || typeToConvert == typeof(global::Baseten.SandboxMetricNameV1) + + || typeToConvert == typeof(global::Baseten.SandboxMetricNameV1?) + + || typeToConvert == typeof(global::Baseten.SandboxMetricDescriptorV1UnitHint) + + || typeToConvert == typeof(global::Baseten.SandboxMetricDescriptorV1UnitHint?) + + || typeToConvert == typeof(global::Baseten.SandboxMetricDescriptorV1Kind) + + || typeToConvert == typeof(global::Baseten.SandboxMetricDescriptorV1Kind?) + || typeToConvert == typeof(global::Baseten.SandboxRegionV1InfoGeneration) || typeToConvert == typeof(global::Baseten.SandboxRegionV1InfoGeneration?) @@ -2292,6 +2315,46 @@ public override bool CanConvert(global::System.Type typeToConvert) return new global::Baseten.JsonConverters.UsageLimitUnitV1NullableJsonConverter(); } + if (typeToConvert == typeof(global::Baseten.SandboxMetricModeV1)) + { + return new global::Baseten.JsonConverters.SandboxMetricModeV1JsonConverter(); + } + + if (typeToConvert == typeof(global::Baseten.SandboxMetricModeV1?)) + { + return new global::Baseten.JsonConverters.SandboxMetricModeV1NullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Baseten.SandboxMetricNameV1)) + { + return new global::Baseten.JsonConverters.SandboxMetricNameV1JsonConverter(); + } + + if (typeToConvert == typeof(global::Baseten.SandboxMetricNameV1?)) + { + return new global::Baseten.JsonConverters.SandboxMetricNameV1NullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Baseten.SandboxMetricDescriptorV1UnitHint)) + { + return new global::Baseten.JsonConverters.SandboxMetricDescriptorV1UnitHintJsonConverter(); + } + + if (typeToConvert == typeof(global::Baseten.SandboxMetricDescriptorV1UnitHint?)) + { + return new global::Baseten.JsonConverters.SandboxMetricDescriptorV1UnitHintNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Baseten.SandboxMetricDescriptorV1Kind)) + { + return new global::Baseten.JsonConverters.SandboxMetricDescriptorV1KindJsonConverter(); + } + + if (typeToConvert == typeof(global::Baseten.SandboxMetricDescriptorV1Kind?)) + { + return new global::Baseten.JsonConverters.SandboxMetricDescriptorV1KindNullableJsonConverter(); + } + if (typeToConvert == typeof(global::Baseten.SandboxRegionV1InfoGeneration)) { return new global::Baseten.JsonConverters.SandboxRegionV1InfoGenerationJsonConverter(); diff --git a/src/libs/Baseten/Generated/Baseten.JsonSerializerContextTypes.g.cs b/src/libs/Baseten/Generated/Baseten.JsonSerializerContextTypes.g.cs index a48caa5e..51fb87b3 100644 --- a/src/libs/Baseten/Generated/Baseten.JsonSerializerContextTypes.g.cs +++ b/src/libs/Baseten/Generated/Baseten.JsonSerializerContextTypes.g.cs @@ -2633,615 +2633,627 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::Baseten.RouteSpendLimitSettingV1? Type650 { get; set; } + public global::Baseten.RouteSpendBlockedByV1? Type650 { get; set; } /// /// /// - public global::Baseten.RouteSpendLimitTeamDefaultV1? Type651 { get; set; } + public global::Baseten.RouteSpendLimitSettingV1? Type651 { get; set; } /// /// /// - public global::Baseten.RouteUserSettingsV1? Type652 { get; set; } + public global::Baseten.RouteSpendLimitTeamDefaultV1? Type652 { get; set; } /// /// /// - public global::Baseten.RouteUserSettingsRequestV1? Type653 { get; set; } + public global::Baseten.RouteTeamUserSettingsV1? Type653 { get; set; } /// /// /// - public global::Baseten.UpdateRouteSpendLimitSettingV1? Type654 { get; set; } + public global::Baseten.RouteUserTeamSettingsListV1? Type654 { get; set; } /// /// /// - public global::Baseten.UpdateRouteUserSettingsRequestV1? Type655 { get; set; } + public global::System.Collections.Generic.IList? Type655 { get; set; } /// /// /// - public global::Baseten.RouteSpendBlockedByV1? Type656 { get; set; } + public global::Baseten.BackgroundHarnessDefaultsV1? Type656 { get; set; } /// /// /// - public global::Baseten.RouteTeamUserSettingsV1? Type657 { get; set; } + public global::Baseten.RouteHarnessModelV1? Type657 { get; set; } /// /// /// - public global::Baseten.RouteUserTeamSettingsListV1? Type658 { get; set; } + public global::Baseten.PrimaryHarnessDefaultsV1? Type658 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type659 { get; set; } + public global::Baseten.RouteHarnessDefaultsV1? Type659 { get; set; } /// /// /// - public global::Baseten.BackgroundHarnessDefaultsV1? Type660 { get; set; } + public global::Baseten.RouteTeamSpendLimitSettingV1? Type660 { get; set; } /// /// /// - public global::Baseten.RouteHarnessModelV1? Type661 { get; set; } + public global::Baseten.RouteTeamSettingsV1? Type661 { get; set; } /// /// /// - public global::Baseten.PrimaryHarnessDefaultsV1? Type662 { get; set; } + public global::Baseten.UpdateBackgroundHarnessModelsV1? Type662 { get; set; } /// /// /// - public global::Baseten.RouteHarnessDefaultsV1? Type663 { get; set; } + public global::Baseten.UpdatePrimaryHarnessModelsV1? Type663 { get; set; } /// /// /// - public global::Baseten.RouteTeamSpendLimitSettingV1? Type664 { get; set; } + public global::Baseten.UpdateRouteHarnessDefaultsV1? Type664 { get; set; } /// /// /// - public global::Baseten.RouteTeamSettingsV1? Type665 { get; set; } + public global::Baseten.UpdateRouteTeamSpendLimitSettingV1? Type665 { get; set; } /// /// /// - public global::Baseten.UpdateBackgroundHarnessModelsV1? Type666 { get; set; } + public global::Baseten.UpdateRouteTeamSettingsRequestV1? Type666 { get; set; } /// /// /// - public global::Baseten.UpdatePrimaryHarnessModelsV1? Type667 { get; set; } + public global::Baseten.RouteTeamUserSettingsListV1? Type667 { get; set; } /// /// /// - public global::Baseten.UpdateRouteHarnessDefaultsV1? Type668 { get; set; } + public global::Baseten.UpdateRouteSpendLimitSettingV1? Type668 { get; set; } /// /// /// - public global::Baseten.UpdateRouteTeamSpendLimitSettingV1? Type669 { get; set; } + public global::Baseten.UpdateRouteUserSettingsRequestV1? Type669 { get; set; } /// /// /// - public global::Baseten.UpdateRouteTeamSettingsRequestV1? Type670 { get; set; } + public global::Baseten.RouteConnectionConfigAnthropicV1? Type670 { get; set; } /// /// /// - public global::Baseten.RouteTeamUserSettingsListV1? Type671 { get; set; } + public global::Baseten.RouteConnectionConfigOpenAIV1? Type671 { get; set; } /// /// /// - public global::Baseten.RouteConnectionConfigAnthropicV1? Type672 { get; set; } + public global::Baseten.RouteConnectionConfigXAIV1? Type672 { get; set; } /// /// /// - public global::Baseten.RouteConnectionConfigOpenAIV1? Type673 { get; set; } + public global::Baseten.RouteConnectionV1? Type673 { get; set; } /// /// /// - public global::Baseten.RouteConnectionConfigXAIV1? Type674 { get; set; } + public global::Baseten.Config? Type674 { get; set; } /// /// /// - public global::Baseten.RouteConnectionV1? Type675 { get; set; } + public global::Baseten.RouteConnectionV1ConfigDiscriminator? Type675 { get; set; } /// /// /// - public global::Baseten.Config? Type676 { get; set; } + public global::Baseten.RouteConnectionV1ConfigDiscriminatorProvider? Type676 { get; set; } /// /// /// - public global::Baseten.RouteConnectionV1ConfigDiscriminator? Type677 { get; set; } + public global::Baseten.RouteConnectionsResponseV1? Type677 { get; set; } /// /// /// - public global::Baseten.RouteConnectionV1ConfigDiscriminatorProvider? Type678 { get; set; } + public global::System.Collections.Generic.IList? Type678 { get; set; } /// /// /// - public global::Baseten.RouteConnectionsResponseV1? Type679 { get; set; } + public global::Baseten.RouteConnectionsRequestV1? Type679 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type680 { get; set; } + public global::Baseten.UpsertRouteConnectionConfigAnthropicV1? Type680 { get; set; } /// /// /// - public global::Baseten.RouteConnectionsRequestV1? Type681 { get; set; } + public global::Baseten.UpsertRouteConnectionConfigOpenAIV1? Type681 { get; set; } /// /// /// - public global::Baseten.UpsertRouteConnectionConfigAnthropicV1? Type682 { get; set; } + public global::Baseten.UpsertRouteConnectionConfigXAIV1? Type682 { get; set; } /// /// /// - public global::Baseten.UpsertRouteConnectionConfigOpenAIV1? Type683 { get; set; } + public global::Baseten.CreateRouteConnectionRequestV1? Type683 { get; set; } /// /// /// - public global::Baseten.UpsertRouteConnectionConfigXAIV1? Type684 { get; set; } + public global::Baseten.Config2? Type684 { get; set; } /// /// /// - public global::Baseten.CreateRouteConnectionRequestV1? Type685 { get; set; } + public global::Baseten.CreateRouteConnectionRequestV1ConfigDiscriminator? Type685 { get; set; } /// /// /// - public global::Baseten.Config2? Type686 { get; set; } + public global::Baseten.CreateRouteConnectionRequestV1ConfigDiscriminatorProvider? Type686 { get; set; } /// /// /// - public global::Baseten.CreateRouteConnectionRequestV1ConfigDiscriminator? Type687 { get; set; } + public global::Baseten.RouteConnectionTombstoneV1? Type687 { get; set; } /// /// /// - public global::Baseten.CreateRouteConnectionRequestV1ConfigDiscriminatorProvider? Type688 { get; set; } + public global::Baseten.UpdateRouteConnectionRequestV1? Type688 { get; set; } /// /// /// - public global::Baseten.RouteConnectionTombstoneV1? Type689 { get; set; } + public global::Baseten.Config3? Type689 { get; set; } /// /// /// - public global::Baseten.UpdateRouteConnectionRequestV1? Type690 { get; set; } + public global::Baseten.UpdateRouteConnectionRequestV1ConfigDiscriminator? Type690 { get; set; } /// /// /// - public global::Baseten.Config3? Type691 { get; set; } + public global::Baseten.UpdateRouteConnectionRequestV1ConfigDiscriminatorProvider? Type691 { get; set; } /// /// /// - public global::Baseten.UpdateRouteConnectionRequestV1ConfigDiscriminator? Type692 { get; set; } + public global::Baseten.RouteTombstoneV1? Type692 { get; set; } /// /// /// - public global::Baseten.UpdateRouteConnectionRequestV1ConfigDiscriminatorProvider? Type693 { get; set; } + public global::Baseten.UpdateRouteRequestV1? Type693 { get; set; } /// /// /// - public global::Baseten.RouteTombstoneV1? Type694 { get; set; } + public global::Baseten.TargetVariant1? Type694 { get; set; } /// /// /// - public global::Baseten.UpdateRouteRequestV1? Type695 { get; set; } + public global::Baseten.UpdateRouteRequestV1TargetVariant1Discriminator? Type695 { get; set; } /// /// /// - public global::Baseten.TargetVariant1? Type696 { get; set; } + public global::Baseten.UpdateRouteRequestV1TargetVariant1DiscriminatorType? Type696 { get; set; } /// /// /// - public global::Baseten.UpdateRouteRequestV1TargetVariant1Discriminator? Type697 { get; set; } + public global::Baseten.EndpointTargetV1? Type697 { get; set; } /// /// /// - public global::Baseten.UpdateRouteRequestV1TargetVariant1DiscriminatorType? Type698 { get; set; } + public global::Baseten.GatewayProvider? Type698 { get; set; } /// /// /// - public global::Baseten.EndpointTargetV1? Type699 { get; set; } + public global::Baseten.VertexTargetConfigV1? Type699 { get; set; } /// /// /// - public global::Baseten.GatewayProvider? Type700 { get; set; } + public global::Baseten.EndpointV1? Type700 { get; set; } /// /// /// - public global::Baseten.VertexTargetConfigV1? Type701 { get; set; } + public global::Baseten.SharedEndpointRegionV1? Type701 { get; set; } /// /// /// - public global::Baseten.EndpointV1? Type702 { get; set; } + public global::System.Collections.Generic.IList? Type702 { get; set; } /// /// /// - public global::Baseten.SharedEndpointRegionV1? Type703 { get; set; } + public global::Baseten.EndpointsResponseV1? Type703 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type704 { get; set; } + public global::System.Collections.Generic.IList? Type704 { get; set; } /// /// /// - public global::Baseten.EndpointsResponseV1? Type705 { get; set; } + public global::Baseten.EndpointTargetRequestV1? Type705 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type706 { get; set; } + public global::Baseten.CreateEndpointRequestV1? Type706 { get; set; } /// /// /// - public global::Baseten.EndpointTargetRequestV1? Type707 { get; set; } + public global::System.Collections.Generic.IList? Type707 { get; set; } /// /// /// - public global::Baseten.CreateEndpointRequestV1? Type708 { get; set; } + public global::Baseten.EndpointTombstoneV1? Type708 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type709 { get; set; } + public global::Baseten.UpdateEndpointRequestV1? Type709 { get; set; } /// /// /// - public global::Baseten.EndpointTombstoneV1? Type710 { get; set; } + public global::Baseten.EffectiveModelConfigV1? Type710 { get; set; } /// /// /// - public global::Baseten.UpdateEndpointRequestV1? Type711 { get; set; } + public global::System.Collections.Generic.IList? Type711 { get; set; } /// /// /// - public global::Baseten.EffectiveModelConfigV1? Type712 { get; set; } + public global::Baseten.EffectiveRateLimitV1? Type712 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type713 { get; set; } + public global::System.Collections.Generic.IList? Type713 { get; set; } /// /// /// - public global::Baseten.EffectiveRateLimitV1? Type714 { get; set; } + public global::Baseten.EffectiveUsageLimitV1? Type714 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type715 { get; set; } + public global::Baseten.UsageLimitUnitV1? Type715 { get; set; } /// /// /// - public global::Baseten.EffectiveUsageLimitV1? Type716 { get; set; } + public global::Baseten.GroupHierarchyV1? Type716 { get; set; } /// /// /// - public global::Baseten.UsageLimitUnitV1? Type717 { get; set; } + public global::Baseten.LimitEnforcementV1? Type717 { get; set; } /// /// /// - public global::Baseten.GroupHierarchyV1? Type718 { get; set; } + public global::Baseten.GroupMetadataV1? Type718 { get; set; } /// /// /// - public global::Baseten.LimitEnforcementV1? Type719 { get; set; } + public global::Baseten.GroupV1? Type719 { get; set; } /// /// /// - public global::Baseten.GroupMetadataV1? Type720 { get; set; } + public global::System.Collections.Generic.IList? Type720 { get; set; } /// /// /// - public global::Baseten.GroupV1? Type721 { get; set; } + public global::Baseten.ModelConfigV1? Type721 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type722 { get; set; } + public global::System.Collections.Generic.IList? Type722 { get; set; } /// /// /// - public global::Baseten.ModelConfigV1? Type723 { get; set; } + public global::System.Collections.Generic.IList? Type723 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type724 { get; set; } + public global::Baseten.UsageLimitV1? Type724 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type725 { get; set; } + public global::Baseten.GroupsResponseV1? Type725 { get; set; } /// /// /// - public global::Baseten.UsageLimitV1? Type726 { get; set; } + public global::System.Collections.Generic.IList? Type726 { get; set; } /// /// /// - public global::Baseten.GroupsResponseV1? Type727 { get; set; } + public global::Baseten.CreateGroupHierarchyV1? Type727 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type728 { get; set; } + public global::Baseten.CreateGroupRequestV1? Type728 { get; set; } /// /// /// - public global::Baseten.CreateGroupHierarchyV1? Type729 { get; set; } + public global::Baseten.UpdateGroupMetadataV1? Type729 { get; set; } /// /// /// - public global::Baseten.CreateGroupRequestV1? Type730 { get; set; } + public global::Baseten.UpdateGroupRequestV1? Type730 { get; set; } /// /// /// - public global::Baseten.UpdateGroupMetadataV1? Type731 { get; set; } + public global::Baseten.GatewayKeyInfoV1? Type731 { get; set; } /// /// /// - public global::Baseten.UpdateGroupRequestV1? Type732 { get; set; } + public global::Baseten.KeysForGroupResponseV1? Type732 { get; set; } /// /// /// - public global::Baseten.GatewayKeyInfoV1? Type733 { get; set; } + public global::System.Collections.Generic.IList? Type733 { get; set; } /// /// /// - public global::Baseten.KeysForGroupResponseV1? Type734 { get; set; } + public global::Baseten.CreateApiKeyForGroupRequestV1? Type734 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type735 { get; set; } + public global::Baseten.CreateApiKeyForGroupResponseV1? Type735 { get; set; } /// /// /// - public global::Baseten.CreateApiKeyForGroupRequestV1? Type736 { get; set; } + public global::Baseten.RegisterAPIKeyRequestV1? Type736 { get; set; } /// /// /// - public global::Baseten.CreateApiKeyForGroupResponseV1? Type737 { get; set; } + public global::Baseten.RegisterAPIKeyResponseV1? Type737 { get; set; } /// /// /// - public global::Baseten.RegisterAPIKeyRequestV1? Type738 { get; set; } + public global::Baseten.SandboxLogsV1? Type738 { get; set; } /// /// /// - public global::Baseten.RegisterAPIKeyResponseV1? Type739 { get; set; } + public global::System.Collections.Generic.IList? Type739 { get; set; } /// /// /// - public global::Baseten.GetSandboxConfigurationResponseV1? Type740 { get; set; } + public global::Baseten.SandboxLogEntryV1? Type740 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type741 { get; set; } + public global::Baseten.SandboxMetricModeV1? Type741 { get; set; } /// /// /// - public global::Baseten.SandboxRegionV1? Type742 { get; set; } + public global::Baseten.SandboxMetricNameV1? Type742 { get; set; } /// /// /// - public global::Baseten.SandboxRegionV1InfoGeneration? Type743 { get; set; } + public global::Baseten.SandboxMetricsV1? Type743 { get; set; } /// /// /// - public global::Baseten.SandboxLogsV1? Type744 { get; set; } + public global::System.Collections.Generic.IList? Type744 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type745 { get; set; } + public global::Baseten.SandboxMetricDescriptorV1? Type745 { get; set; } /// /// /// - public global::Baseten.SandboxLogEntryV1? Type746 { get; set; } + public global::System.Collections.Generic.IList? Type746 { get; set; } /// /// /// - public global::Baseten.SandboxMetricsV1? Type747 { get; set; } + public global::Baseten.SandboxMetricValueSetV1? Type747 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type748 { get; set; } + public global::Baseten.SandboxMetricDescriptorV1UnitHint? Type748 { get; set; } /// /// /// - public global::Baseten.SandboxMetricsPointV1? Type749 { get; set; } + public global::Baseten.SandboxMetricDescriptorV1Kind? Type749 { get; set; } /// /// /// - public global::Baseten.SandboxImageBuildLogV1? Type750 { get; set; } + public global::Baseten.GetSandboxConfigurationResponseV1? Type750 { get; set; } /// /// /// - public global::Baseten.SandboxImageBuildLogsResponseV1? Type751 { get; set; } + public global::System.Collections.Generic.IList? Type751 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type752 { get; set; } + public global::Baseten.SandboxRegionV1? Type752 { get; set; } /// /// /// - public global::Baseten.SandboxLifecycleV1? Type753 { get; set; } + public global::Baseten.SandboxRegionV1InfoGeneration? Type753 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type754 { get; set; } + public global::Baseten.SandboxImageBuildLogV1? Type754 { get; set; } /// /// /// - public global::Baseten.SandboxExpirationPolicyV1? Type755 { get; set; } + public global::Baseten.SandboxImageBuildLogsResponseV1? Type755 { get; set; } /// /// /// - public global::Baseten.SandboxTTLIdleExpirationPolicyV1? Type756 { get; set; } + public global::System.Collections.Generic.IList? Type756 { get; set; } /// /// /// - public global::Baseten.SandboxTTLMaxAgeExpirationPolicyV1? Type757 { get; set; } + public global::Baseten.SandboxLifecycleV1? Type757 { get; set; } /// /// /// - public global::Baseten.SandboxDateExpirationPolicyV1? Type758 { get; set; } + public global::System.Collections.Generic.IList? Type758 { get; set; } /// /// /// - public global::Baseten.SandboxExpirationPolicyV1Discriminator? Type759 { get; set; } + public global::Baseten.SandboxExpirationPolicyV1? Type759 { get; set; } /// /// /// - public global::Baseten.SandboxExpirationPolicyV1DiscriminatorType? Type760 { get; set; } + public global::Baseten.SandboxTTLIdleExpirationPolicyV1? Type760 { get; set; } /// /// /// - public global::Baseten.SandboxTTLIdleExpirationPolicyV1Action? Type761 { get; set; } + public global::Baseten.SandboxTTLMaxAgeExpirationPolicyV1? Type761 { get; set; } /// /// /// - public global::Baseten.SandboxTTLIdleExpirationPolicyV1Type? Type762 { get; set; } + public global::Baseten.SandboxDateExpirationPolicyV1? Type762 { get; set; } /// /// /// - public global::Baseten.SandboxTTLMaxAgeExpirationPolicyV1Action? Type763 { get; set; } + public global::Baseten.SandboxExpirationPolicyV1Discriminator? Type763 { get; set; } /// /// /// - public global::Baseten.SandboxTTLMaxAgeExpirationPolicyV1Type? Type764 { get; set; } + public global::Baseten.SandboxExpirationPolicyV1DiscriminatorType? Type764 { get; set; } /// /// /// - public global::Baseten.SandboxDateExpirationPolicyV1Action? Type765 { get; set; } + public global::Baseten.SandboxTTLIdleExpirationPolicyV1Action? Type765 { get; set; } /// /// /// - public global::Baseten.SandboxDateExpirationPolicyV1Type? Type766 { get; set; } + public global::Baseten.SandboxTTLIdleExpirationPolicyV1Type? Type766 { get; set; } /// /// /// - public global::Baseten.SandboxNetworkV1? Type767 { get; set; } + public global::Baseten.SandboxTTLMaxAgeExpirationPolicyV1Action? Type767 { get; set; } /// /// /// - public global::Baseten.SandboxProxyConfigV1? Type768 { get; set; } + public global::Baseten.SandboxTTLMaxAgeExpirationPolicyV1Type? Type768 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type769 { get; set; } + public global::Baseten.SandboxDateExpirationPolicyV1Action? Type769 { get; set; } /// /// /// - public global::Baseten.SandboxProxyTargetV1? Type770 { get; set; } + public global::Baseten.SandboxDateExpirationPolicyV1Type? Type770 { get; set; } /// /// /// - public global::Baseten.SandboxEnvV1? Type771 { get; set; } + public global::Baseten.SandboxNetworkV1? Type771 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type772 { get; set; } + public global::Baseten.SandboxProxyConfigV1? Type772 { get; set; } /// /// /// - public global::Baseten.SandboxPortV1? Type773 { get; set; } + public global::System.Collections.Generic.IList? Type773 { get; set; } /// /// /// - public global::Baseten.SandboxPortV1Protocol? Type774 { get; set; } + public global::Baseten.SandboxProxyTargetV1? Type774 { get; set; } /// /// /// - public global::Baseten.SandboxConfigurationV1? Type775 { get; set; } + public global::Baseten.SandboxEnvV1? Type775 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type776 { get; set; } + public global::System.Collections.Generic.IList? Type776 { get; set; } /// /// /// - public global::Baseten.CreateSandboxRequestV1? Type777 { get; set; } + public global::Baseten.SandboxPortV1? Type777 { get; set; } /// /// /// - public global::Baseten.UpdateSandboxRequestV1? Type778 { get; set; } + public global::Baseten.SandboxPortV1Protocol? Type778 { get; set; } /// /// /// - public global::Baseten.SandboxV1? Type779 { get; set; } + public global::Baseten.SandboxConfigurationV1? Type779 { get; set; } /// /// /// - public global::Baseten.SandboxV1Variant2? Type780 { get; set; } + public global::System.Collections.Generic.IList? Type780 { get; set; } /// /// /// - public global::Baseten.SandboxStatusV1? Type781 { get; set; } + public global::Baseten.CreateSandboxRequestV1? Type781 { get; set; } /// /// /// - public global::Baseten.SandboxApiPaginationV1? Type782 { get; set; } + public global::Baseten.UpdateSandboxRequestV1? Type782 { get; set; } /// /// /// - public global::Baseten.ListSandboxesResponseV1? Type783 { get; set; } + public global::Baseten.SandboxV1? Type783 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type784 { get; set; } + public global::Baseten.SandboxV1Variant2? Type784 { get; set; } /// /// /// - public global::Baseten.ListSandboxImagesResponseV1? Type785 { get; set; } + public global::Baseten.SandboxStatusV1? Type785 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type786 { get; set; } + public global::Baseten.SandboxApiPaginationV1? Type786 { get; set; } /// /// /// - public global::Baseten.SandboxImageSummaryV1? Type787 { get; set; } + public global::Baseten.ListSandboxesResponseV1? Type787 { get; set; } /// /// /// - public global::Baseten.ListSandboxImageTagsResponseV1? Type788 { get; set; } + public global::System.Collections.Generic.IList? Type788 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type789 { get; set; } + public global::Baseten.ListSandboxImagesResponseV1? Type789 { get; set; } /// /// /// - public global::Baseten.SandboxImageTagV1? Type790 { get; set; } + public global::System.Collections.Generic.IList? Type790 { get; set; } /// /// /// - public global::Baseten.SandboxImageStatusV1? Type791 { get; set; } + public global::Baseten.SandboxImageV1? Type791 { get; set; } /// /// /// - public global::Baseten.SandboxImageV1? Type792 { get; set; } + public global::Baseten.ListSandboxImageTagsResponseV1? Type792 { get; set; } /// /// /// - public global::Baseten.SandboxImageV1Variant2? Type793 { get; set; } + public global::System.Collections.Generic.IList? Type793 { get; set; } /// /// /// - public global::Baseten.PushSandboxImageRequestV1? Type794 { get; set; } + public global::Baseten.SandboxImageTagV1? Type794 { get; set; } /// /// /// - public global::Baseten.PushSandboxImageResponseV1? Type795 { get; set; } + public global::Baseten.SandboxImageStatusV1? Type795 { get; set; } /// /// /// - public global::Baseten.SandboxLibraryImageVolumeV1? Type796 { get; set; } + public global::Baseten.PushSandboxImageRequestV1? Type796 { get; set; } /// /// /// - public global::Baseten.SandboxLibraryImageCreationOptionsV1? Type797 { get; set; } + public global::Baseten.PushSandboxImageResponseV1? Type797 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type798 { get; set; } + public global::Baseten.SandboxLibraryImageVolumeV1? Type798 { get; set; } /// /// /// - public global::Baseten.SandboxLibraryImageV1? Type799 { get; set; } + public global::Baseten.SandboxLibraryImageCreationOptionsV1? Type799 { get; set; } /// /// /// - public global::Baseten.ListSandboxLibraryImagesResponseV1? Type800 { get; set; } + public global::System.Collections.Generic.IList? Type800 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type801 { get; set; } + public global::Baseten.SandboxLibraryImageV1? Type801 { get; set; } /// /// /// - public global::Baseten.CleanupSandboxImagesResponseV1? Type802 { get; set; } + public global::Baseten.ListSandboxLibraryImagesResponseV1? Type802 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type803 { get; set; } + /// + /// + /// + public global::Baseten.CleanupSandboxImagesResponseV1? Type804 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type805 { get; set; } /// /// @@ -3682,54 +3694,62 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::System.Collections.Generic.List? ListType109 { 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? ListType111 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType110 { get; set; } + public global::System.Collections.Generic.List? ListType112 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType111 { get; set; } + public global::System.Collections.Generic.List? ListType113 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType112 { get; set; } + public global::System.Collections.Generic.List? ListType114 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType113 { get; set; } + public global::System.Collections.Generic.List? ListType115 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType114 { get; set; } + public global::System.Collections.Generic.List? ListType116 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType115 { get; set; } + public global::System.Collections.Generic.List? ListType117 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType116 { get; set; } + public global::System.Collections.Generic.List? ListType118 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType117 { get; set; } + public global::System.Collections.Generic.List? ListType119 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType118 { get; set; } + public global::System.Collections.Generic.List? ListType120 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType119 { get; set; } + public global::System.Collections.Generic.List? ListType121 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType120 { get; set; } + public global::System.Collections.Generic.List? ListType122 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType121 { get; set; } + public global::System.Collections.Generic.List? ListType123 { get; set; } } } \ 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 12d9cb73..b0ca7db2 100644 --- a/src/libs/Baseten/Generated/Baseten.Models.CreateSandboxRequestV1.g.cs +++ b/src/libs/Baseten/Generated/Baseten.Models.CreateSandboxRequestV1.g.cs @@ -65,7 +65,7 @@ public sealed partial class CreateSandboxRequestV1 public string? Image { get; set; } /// - /// Memory allocation in megabytes. Also determines CPU allocation (CPU cores = memory in MB / 2048, e.g., 4096MB = 2 CPUs). Defaults to 4096.
+ /// Memory allocation in megabytes. Also determines CPU allocation (CPU cores = memory in MB / 2048, e.g., 4096MB = 2 CPUs). Defaults to 4096. Must be between 1024 and 262144.
/// Default Value: 4096
/// Example: 4096 ///
@@ -135,7 +135,7 @@ public sealed partial class CreateSandboxRequestV1 /// Example: baseten/base-image:latest /// /// - /// Memory allocation in megabytes. Also determines CPU allocation (CPU cores = memory in MB / 2048, e.g., 4096MB = 2 CPUs). Defaults to 4096.
+ /// Memory allocation in megabytes. Also determines CPU allocation (CPU cores = memory in MB / 2048, e.g., 4096MB = 2 CPUs). Defaults to 4096. Must be between 1024 and 262144.
/// Default Value: 4096
/// Example: 4096 /// diff --git a/src/libs/Baseten/Generated/Baseten.Models.ListSandboxImagesResponseV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.ListSandboxImagesResponseV1.g.cs index 30831ba7..ef676b3a 100644 --- a/src/libs/Baseten/Generated/Baseten.Models.ListSandboxImagesResponseV1.g.cs +++ b/src/libs/Baseten/Generated/Baseten.Models.ListSandboxImagesResponseV1.g.cs @@ -13,7 +13,7 @@ public sealed partial class ListSandboxImagesResponseV1 ///
[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.
@@ -44,7 +44,7 @@ public sealed partial class ListSandboxImagesResponseV1 [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ListSandboxImagesResponseV1( - global::System.Collections.Generic.IList items, + global::System.Collections.Generic.IList items, global::Baseten.SandboxApiPaginationV1 pagination) { this.Items = items ?? throw new global::System.ArgumentNullException(nameof(items)); diff --git a/src/libs/Baseten/Generated/Baseten.Models.LoopsSamplerV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.LoopsSamplerV1.g.cs index 5f9fc409..38823c6e 100644 --- a/src/libs/Baseten/Generated/Baseten.Models.LoopsSamplerV1.g.cs +++ b/src/libs/Baseten/Generated/Baseten.Models.LoopsSamplerV1.g.cs @@ -37,18 +37,18 @@ public sealed partial class LoopsSamplerV1 public required global::System.DateTime CreatedAt { get; set; } /// - /// Hashid of the underlying Baseten model. + /// Hashid of the underlying Baseten model. Null for a serverless sampler.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 ///
[global::System.Text.Json.Serialization.JsonPropertyName("model_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string ModelId { get; set; } + public string? ModelId { get; set; } /// - /// Hashid of the specific model deployment (version). + /// Hashid of the specific model deployment (version). Null for a serverless sampler.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 ///
[global::System.Text.Json.Serialization.JsonPropertyName("deployment_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string DeploymentId { get; set; } + public string? DeploymentId { get; set; } /// /// The sampler's current status. @@ -95,18 +95,20 @@ public sealed partial class LoopsSamplerV1 /// /// Time the sampler was created in ISO 8601 format /// - /// - /// Hashid of the underlying Baseten model. - /// - /// - /// Hashid of the specific model deployment (version). - /// /// /// The sampler's current status. /// /// /// The user who owns the sampler. /// + /// + /// Hashid of the underlying Baseten model. Null for a serverless sampler.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// + /// + /// Hashid of the specific model deployment (version). Null for a serverless sampler.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// /// /// Instance type serving the sampler.
/// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 @@ -123,10 +125,10 @@ public LoopsSamplerV1( string baseUrl, string baseModel, global::System.DateTime createdAt, - string modelId, - string deploymentId, global::Baseten.LoopsSamplerStatusV1 status, global::Baseten.UserV1 user, + string? modelId, + string? deploymentId, global::Baseten.InstanceTypeV1? instanceType, int? nodeCount) { @@ -134,8 +136,8 @@ public LoopsSamplerV1( this.BaseUrl = baseUrl ?? throw new global::System.ArgumentNullException(nameof(baseUrl)); this.BaseModel = baseModel ?? throw new global::System.ArgumentNullException(nameof(baseModel)); this.CreatedAt = createdAt; - this.ModelId = modelId ?? throw new global::System.ArgumentNullException(nameof(modelId)); - this.DeploymentId = deploymentId ?? throw new global::System.ArgumentNullException(nameof(deploymentId)); + this.ModelId = modelId; + this.DeploymentId = deploymentId; this.Status = status ?? throw new global::System.ArgumentNullException(nameof(status)); this.User = user ?? throw new global::System.ArgumentNullException(nameof(user)); this.InstanceType = instanceType; diff --git a/src/libs/Baseten/Generated/Baseten.Models.PushSandboxImageRequestV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.PushSandboxImageRequestV1.g.cs index 5ce1c45a..c7f1e37e 100644 --- a/src/libs/Baseten/Generated/Baseten.Models.PushSandboxImageRequestV1.g.cs +++ b/src/libs/Baseten/Generated/Baseten.Models.PushSandboxImageRequestV1.g.cs @@ -5,7 +5,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}}}"} + /// 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}}}","memory":16384,"volume":32768} ///
public sealed partial class PushSandboxImageRequestV1 { @@ -35,6 +35,22 @@ public sealed partial class PushSandboxImageRequestV1 [global::System.Text.Json.Serialization.JsonPropertyName("docker_config")] public string? DockerConfig { get; set; } + /// + /// Memory in megabytes of the temporary environment that builds the source archive or imports the registry image. Omit it to use the default size. Does not change the memory of sandboxes created from the image.
+ /// Example: 16384 + ///
+ /// 16384 + [global::System.Text.Json.Serialization.JsonPropertyName("memory")] + public long? Memory { get; set; } + + /// + /// Scratch disk in megabytes attached to the temporary build environment for intermediate layers. Set it for large images that run out of space while building or importing. 0 builds in memory, which is the default. Teams with HIPAA compliance enabled accept only 0.
+ /// Example: 32768 + ///
+ /// 32768 + [global::System.Text.Json.Serialization.JsonPropertyName("volume")] + public long? Volume { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -57,17 +73,29 @@ public sealed partial class PushSandboxImageRequestV1 /// Included only in requests
/// Example: {"auths":{"https://index.docker.io/v1/":{"auth":"YjEwLXJldmlldzpkZW1vLW5vdC1hLXZhbGlkLXJlZ2lzdHJ5LXRva2Vu"}}} /// + /// + /// Memory in megabytes of the temporary environment that builds the source archive or imports the registry image. Omit it to use the default size. Does not change the memory of sandboxes created from the image.
+ /// Example: 16384 + /// + /// + /// Scratch disk in megabytes attached to the temporary build environment for intermediate layers. Set it for large images that run out of space while building or importing. 0 builds in memory, which is the default. Teams with HIPAA compliance enabled accept only 0.
+ /// Example: 32768 + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public PushSandboxImageRequestV1( string name, string? image, - string? dockerConfig) + string? dockerConfig, + long? memory, + long? volume) { this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); this.Image = image; this.DockerConfig = dockerConfig; + this.Memory = memory; + this.Volume = volume; } /// diff --git a/src/libs/Baseten/Generated/Baseten.Models.PushSandboxImageResponseV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.PushSandboxImageResponseV1.g.cs index 6efe7338..24b29b13 100644 --- a/src/libs/Baseten/Generated/Baseten.Models.PushSandboxImageResponseV1.g.cs +++ b/src/libs/Baseten/Generated/Baseten.Models.PushSandboxImageResponseV1.g.cs @@ -37,7 +37,13 @@ public sealed partial class PushSandboxImageResponseV1 public string? UploadUrl { get; set; } /// - /// Registered image reference including its tag, when available. Tags are assigned by the service; GET /sandboxes/images/{image_name} returns the available tags once processing completes.
+ /// Headers the source archive upload must send, in addition to Content-Type, with exactly these names and values. Present only with upload_url, when memory or volume was set. upload_url is signed for these headers, so storage rejects an upload that omits or changes them. Treat names and values as opaque. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("upload_headers")] + public global::System.Collections.Generic.Dictionary? UploadHeaders { get; set; } + + /// + /// Registered image reference including its tag, when available. Tags are assigned by the service; GET /sandboxes/images/{image_name}/tags returns the available tags once processing completes.
/// Example: b10/base-image:latest ///
/// b10/base-image:latest @@ -65,8 +71,11 @@ public sealed partial class PushSandboxImageResponseV1 /// 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 /// + /// + /// Headers the source archive upload must send, in addition to Content-Type, with exactly these names and values. Present only with upload_url, when memory or volume was set. upload_url is signed for these headers, so storage rejects an upload that omits or changes them. Treat names and values as opaque. + /// /// - /// Registered image reference including its tag, when available. Tags are assigned by the service; GET /sandboxes/images/{image_name} returns the available tags once processing completes.
+ /// Registered image reference including its tag, when available. Tags are assigned by the service; GET /sandboxes/images/{image_name}/tags returns the available tags once processing completes.
/// Example: b10/base-image:latest /// #if NET7_0_OR_GREATER @@ -76,11 +85,13 @@ public PushSandboxImageResponseV1( string name, global::Baseten.SandboxImageStatusV1 status, string? uploadUrl, + global::System.Collections.Generic.Dictionary? uploadHeaders, string? image) { this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); this.Status = status; this.UploadUrl = uploadUrl; + this.UploadHeaders = uploadHeaders; this.Image = image; } diff --git a/src/libs/Baseten/Generated/Baseten.Models.RouteUserSettingsRequestV1.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.PushSandboxImageResponseV1UploadHeaders.Json.g.cs similarity index 85% rename from src/libs/Baseten/Generated/Baseten.Models.RouteUserSettingsRequestV1.Json.g.cs rename to src/libs/Baseten/Generated/Baseten.Models.PushSandboxImageResponseV1UploadHeaders.Json.g.cs index d1ae6ad4..14a9a18f 100644 --- a/src/libs/Baseten/Generated/Baseten.Models.RouteUserSettingsRequestV1.Json.g.cs +++ b/src/libs/Baseten/Generated/Baseten.Models.PushSandboxImageResponseV1UploadHeaders.Json.g.cs @@ -2,7 +2,7 @@ namespace Baseten { - public sealed partial class RouteUserSettingsRequestV1 + public sealed partial class PushSandboxImageResponseV1UploadHeaders { /// /// 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.RouteUserSettingsRequestV1? FromJson( + public static global::Baseten.PushSandboxImageResponseV1UploadHeaders? FromJson( string json, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return global::System.Text.Json.JsonSerializer.Deserialize( json, - typeof(global::Baseten.RouteUserSettingsRequestV1), - jsonSerializerContext) as global::Baseten.RouteUserSettingsRequestV1; + typeof(global::Baseten.PushSandboxImageResponseV1UploadHeaders), + jsonSerializerContext) as global::Baseten.PushSandboxImageResponseV1UploadHeaders; } /// /// Deserializes a JSON string using the generated default JsonSerializerContext. /// - public static global::Baseten.RouteUserSettingsRequestV1? FromJson( + public static global::Baseten.PushSandboxImageResponseV1UploadHeaders? 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.RouteUserSettingsRequestV1? FromJson( + public static global::Baseten.PushSandboxImageResponseV1UploadHeaders? 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.RouteUserSettingsRequestV1), - jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.RouteUserSettingsRequestV1; + typeof(global::Baseten.PushSandboxImageResponseV1UploadHeaders), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.PushSandboxImageResponseV1UploadHeaders; } /// /// 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.PushSandboxImageResponseV1UploadHeaders.g.cs b/src/libs/Baseten/Generated/Baseten.Models.PushSandboxImageResponseV1UploadHeaders.g.cs new file mode 100644 index 00000000..4f06a8a8 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.PushSandboxImageResponseV1UploadHeaders.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// Headers the source archive upload must send, in addition to Content-Type, with exactly these names and values. Present only with upload_url, when memory or volume was set. upload_url is signed for these headers, so storage rejects an upload that omits or changes them. Treat names and values as opaque. + /// + public sealed partial class PushSandboxImageResponseV1UploadHeaders + { + + /// + /// 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.RouteUserSettingsRequestV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.RouteUserSettingsRequestV1.g.cs deleted file mode 100644 index ad923908..00000000 --- a/src/libs/Baseten/Generated/Baseten.Models.RouteUserSettingsRequestV1.g.cs +++ /dev/null @@ -1,48 +0,0 @@ - -#nullable enable - -namespace Baseten -{ - /// - /// - /// - public sealed partial class RouteUserSettingsRequestV1 - { - /// - /// ID of the team to read the user's spend limit in. Defaults to the only team the user has a role in.
- /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("team_id")] - public string? TeamId { get; set; } - - /// - /// 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 team to read the user's spend limit in. Defaults to the only team the user has a role in.
- /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public RouteUserSettingsRequestV1( - string? teamId) - { - this.TeamId = teamId; - } - - /// - /// Initializes a new instance of the class. - /// - public RouteUserSettingsRequestV1() - { - } - - } -} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.RouteUserSettingsV1.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.RouteUserSettingsV1.Json.g.cs deleted file mode 100644 index d6f499cc..00000000 --- a/src/libs/Baseten/Generated/Baseten.Models.RouteUserSettingsV1.Json.g.cs +++ /dev/null @@ -1,141 +0,0 @@ -#nullable enable - -namespace Baseten -{ - public sealed partial class RouteUserSettingsV1 - { - /// - /// 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.RouteUserSettingsV1? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Baseten.RouteUserSettingsV1), - jsonSerializerContext) as global::Baseten.RouteUserSettingsV1; - } - - /// - /// Deserializes a JSON string using the generated default JsonSerializerContext. - /// - public static global::Baseten.RouteUserSettingsV1? 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.RouteUserSettingsV1? 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.RouteUserSettingsV1), - jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.RouteUserSettingsV1; - } - - /// - /// 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.RouteUserSettingsV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.RouteUserSettingsV1.g.cs deleted file mode 100644 index aff4d0c2..00000000 --- a/src/libs/Baseten/Generated/Baseten.Models.RouteUserSettingsV1.g.cs +++ /dev/null @@ -1,70 +0,0 @@ - -#nullable enable - -namespace Baseten -{ - /// - /// - /// - public sealed partial class RouteUserSettingsV1 - { - /// - /// ID of the user. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("user_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string UserId { get; set; } - - /// - /// Email address of the user. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("email")] - public string? Email { get; set; } - - /// - /// Spend limit for Baseten Code. Applies to requests with Routes keys the user created; personal API keys are not limited. - /// - [global::System.Text.Json.Serialization.JsonPropertyName("spend_limit")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::Baseten.RouteSpendLimitSettingV1 SpendLimit { 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 user. - /// - /// - /// Spend limit for Baseten Code. Applies to requests with Routes keys the user created; personal API keys are not limited. - /// - /// - /// Email address of the user. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public RouteUserSettingsV1( - string userId, - global::Baseten.RouteSpendLimitSettingV1 spendLimit, - string? email) - { - this.UserId = userId ?? throw new global::System.ArgumentNullException(nameof(userId)); - this.Email = email; - this.SpendLimit = spendLimit ?? throw new global::System.ArgumentNullException(nameof(spendLimit)); - } - - /// - /// Initializes a new instance of the class. - /// - public RouteUserSettingsV1() - { - } - - } -} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.SandboxConfigurationV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.SandboxConfigurationV1.g.cs index 09383996..eae5a436 100644 --- a/src/libs/Baseten/Generated/Baseten.Models.SandboxConfigurationV1.g.cs +++ b/src/libs/Baseten/Generated/Baseten.Models.SandboxConfigurationV1.g.cs @@ -50,7 +50,7 @@ public sealed partial class SandboxConfigurationV1 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). Must be between 1024 and 262144.
/// Example: 4096 ///
/// 4096 @@ -111,7 +111,7 @@ public sealed partial class SandboxConfigurationV1 /// 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). Must be between 1024 and 262144.
/// Example: 4096 /// /// diff --git a/src/libs/Baseten/Generated/Baseten.Models.SandboxEnvV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.SandboxEnvV1.g.cs index c2c1e8e9..82201cfd 100644 --- a/src/libs/Baseten/Generated/Baseten.Models.SandboxEnvV1.g.cs +++ b/src/libs/Baseten/Generated/Baseten.Models.SandboxEnvV1.g.cs @@ -10,7 +10,7 @@ namespace Baseten public sealed partial class SandboxEnvV1 { /// - /// Name of the environment variable
+ /// Name of the environment variable. Must start with a letter or underscore and contain only letters, digits and underscores (^[A-Za-z_][A-Za-z0-9_]*$); create and update reject other names.
/// Example: NODE_ENV ///
/// NODE_ENV @@ -44,7 +44,7 @@ public sealed partial class SandboxEnvV1 /// Initializes a new instance of the class. ///
/// - /// Name of the environment variable
+ /// Name of the environment variable. Must start with a letter or underscore and contain only letters, digits and underscores (^[A-Za-z_][A-Za-z0-9_]*$); create and update reject other names.
/// Example: NODE_ENV /// /// diff --git a/src/libs/Baseten/Generated/Baseten.Models.SandboxImageSummaryV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.SandboxImageSummaryV1.g.cs deleted file mode 100644 index 3e68c75f..00000000 --- a/src/libs/Baseten/Generated/Baseten.Models.SandboxImageSummaryV1.g.cs +++ /dev/null @@ -1,147 +0,0 @@ - -#nullable enable - -namespace Baseten -{ - /// - /// 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 SandboxImageSummaryV1 - { - /// - /// Stable repository name supplied when pushing the 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; } - - /// - /// 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.SandboxImageStatusV1JsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::Baseten.SandboxImageStatusV1 Status { get; set; } - - /// - /// Time the image was created.
- /// Included only in responses
- /// Example: 2026-09-15T21:20:00Z - ///
- /// 2026-09-15T21:20:00Z - [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] - public global::System.DateTime? CreatedAt { get; set; } - - /// - /// Time the image was last updated.
- /// Included only in responses
- /// Example: 2026-09-16T21:25:00Z - ///
- /// 2026-09-16T21:25:00Z - [global::System.Text.Json.Serialization.JsonPropertyName("updated_at")] - public global::System.DateTime? UpdatedAt { get; set; } - - /// - /// Most recent deployment time across all tags, if deployed.
- /// Included only in responses
- /// Example: 2026-09-16T21:26:58.545765901Z - ///
- /// 2026-09-16T21:26:58.545765901Z - [global::System.Text.Json.Serialization.JsonPropertyName("last_deployed_at")] - public global::System.DateTime? LastDeployedAt { get; set; } - - /// - /// Total repository size in bytes.
- /// Included only in responses
- /// Example: 260046848 - ///
- /// 260046848 - [global::System.Text.Json.Serialization.JsonPropertyName("size")] - public long? Size { get; set; } - - /// - /// Number of image versions in the repository.
- /// Included only in responses
- /// Example: 2 - ///
- /// 2 - [global::System.Text.Json.Serialization.JsonPropertyName("tag_count")] - public long? TagCount { 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 repository name supplied when pushing the image.
- /// Example: base-image - /// - /// - /// Image processing status. Only BUILT images are ready to use.
- /// Example: BUILT - /// - /// - /// Time the image was created.
- /// Included only in responses
- /// Example: 2026-09-15T21:20:00Z - /// - /// - /// Time the image was last updated.
- /// Included only in responses
- /// Example: 2026-09-16T21:25:00Z - /// - /// - /// Most recent deployment time across all tags, if deployed.
- /// Included only in responses
- /// Example: 2026-09-16T21:26:58.545765901Z - /// - /// - /// Total repository size in bytes.
- /// Included only in responses
- /// Example: 260046848 - /// - /// - /// Number of image versions in the repository.
- /// Included only in responses
- /// Example: 2 - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public SandboxImageSummaryV1( - string name, - global::Baseten.SandboxImageStatusV1 status, - global::System.DateTime? createdAt, - global::System.DateTime? updatedAt, - global::System.DateTime? lastDeployedAt, - long? size, - long? tagCount) - { - this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); - this.Status = status; - this.CreatedAt = createdAt; - this.UpdatedAt = updatedAt; - this.LastDeployedAt = lastDeployedAt; - this.Size = size; - this.TagCount = tagCount; - } - - /// - /// Initializes a new instance of the class. - /// - public SandboxImageSummaryV1() - { - } - - } -} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.SandboxImageV1.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.SandboxImageV1.Json.g.cs index a0a1b61b..38869f70 100644 --- a/src/libs/Baseten/Generated/Baseten.Models.SandboxImageV1.Json.g.cs +++ b/src/libs/Baseten/Generated/Baseten.Models.SandboxImageV1.Json.g.cs @@ -2,7 +2,7 @@ namespace Baseten { - public readonly partial struct SandboxImageV1 + public sealed partial class SandboxImageV1 { /// /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. @@ -54,7 +54,7 @@ public string ToJson( return global::System.Text.Json.JsonSerializer.Deserialize( json, typeof(global::Baseten.SandboxImageV1), - jsonSerializerContext) as global::Baseten.SandboxImageV1?; + jsonSerializerContext) as global::Baseten.SandboxImageV1; } /// @@ -101,7 +101,7 @@ public string ToJson( return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, typeof(global::Baseten.SandboxImageV1), - jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.SandboxImageV1?; + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.SandboxImageV1; } /// diff --git a/src/libs/Baseten/Generated/Baseten.Models.SandboxImageV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.SandboxImageV1.g.cs index e766c85b..33610930 100644 --- a/src/libs/Baseten/Generated/Baseten.Models.SandboxImageV1.g.cs +++ b/src/libs/Baseten/Generated/Baseten.Models.SandboxImageV1.g.cs @@ -1,297 +1,147 @@ -#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":[]} + /// 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 readonly partial struct SandboxImageV1 : global::System.IEquatable + public sealed partial class SandboxImageV1 { /// - /// 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} + /// Stable repository name supplied when pushing the image.
+ /// Example: base-image ///
-#if NET6_0_OR_GREATER - public global::Baseten.SandboxImageSummaryV1? Summary { get; init; } -#else - public global::Baseten.SandboxImageSummaryV1? Summary { get; } + /// base-image + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Name { 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.SandboxImageStatusV1JsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Baseten.SandboxImageStatusV1 Status { get; set; } + + /// + /// Time the image was created.
+ /// Included only in responses
+ /// Example: 2026-09-15T21:20:00Z + ///
+ /// 2026-09-15T21:20:00Z + [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] + public global::System.DateTime? CreatedAt { get; set; } + + /// + /// Time the image was last updated.
+ /// Included only in responses
+ /// Example: 2026-09-16T21:25:00Z + ///
+ /// 2026-09-16T21:25:00Z + [global::System.Text.Json.Serialization.JsonPropertyName("updated_at")] + public global::System.DateTime? UpdatedAt { get; set; } + + /// + /// Most recent deployment time across all tags, if deployed.
+ /// Included only in responses
+ /// Example: 2026-09-16T21:26:58.545765901Z + ///
+ /// 2026-09-16T21:26:58.545765901Z + [global::System.Text.Json.Serialization.JsonPropertyName("last_deployed_at")] + public global::System.DateTime? LastDeployedAt { get; set; } + + /// + /// Total repository size in bytes.
+ /// Included only in responses
+ /// Example: 260046848 + ///
+ /// 260046848 + [global::System.Text.Json.Serialization.JsonPropertyName("size")] + public long? Size { get; set; } + + /// + /// Number of image versions in the repository.
+ /// Included only in responses
+ /// Example: 2 + ///
+ /// 2 + [global::System.Text.Json.Serialization.JsonPropertyName("tag_count")] + public long? TagCount { 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 repository name supplied when pushing the image.
+ /// Example: base-image + /// + /// + /// Image processing status. Only BUILT images are ready to use.
+ /// Example: BUILT + /// + /// + /// Time the image was created.
+ /// Included only in responses
+ /// Example: 2026-09-15T21:20:00Z + /// + /// + /// Time the image was last updated.
+ /// Included only in responses
+ /// Example: 2026-09-16T21:25:00Z + /// + /// + /// Most recent deployment time across all tags, if deployed.
+ /// Included only in responses
+ /// Example: 2026-09-16T21:26:58.545765901Z + /// + /// + /// Total repository size in bytes.
+ /// Included only in responses
+ /// Example: 260046848 + /// + /// + /// Number of image versions in the repository.
+ /// Included only in responses
+ /// Example: 2 + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #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() + string name, + global::Baseten.SandboxImageStatusV1 status, + global::System.DateTime? createdAt, + global::System.DateTime? updatedAt, + global::System.DateTime? lastDeployedAt, + long? size, + long? tagCount) { - 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); + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.Status = status; + this.CreatedAt = createdAt; + this.UpdatedAt = updatedAt; + this.LastDeployedAt = lastDeployedAt; + this.Size = size; + this.TagCount = tagCount; } /// - /// + /// Initializes a new instance of the class. /// - public void Match( - global::System.Action? summary = null, - - global::System.Action? sandboxImageV1Variant2 = null, - bool validate = true) + public SandboxImageV1() { - 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); - } } -} +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.SandboxImageV1Variant2.g.cs b/src/libs/Baseten/Generated/Baseten.Models.SandboxImageV1Variant2.g.cs deleted file mode 100644 index 7e0a921c..00000000 --- a/src/libs/Baseten/Generated/Baseten.Models.SandboxImageV1Variant2.g.cs +++ /dev/null @@ -1,50 +0,0 @@ - -#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.SandboxImageV1Variant2.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.SandboxMetricDescriptorV1.Json.g.cs similarity index 88% rename from src/libs/Baseten/Generated/Baseten.Models.SandboxImageV1Variant2.Json.g.cs rename to src/libs/Baseten/Generated/Baseten.Models.SandboxMetricDescriptorV1.Json.g.cs index a266f976..01afde5a 100644 --- a/src/libs/Baseten/Generated/Baseten.Models.SandboxImageV1Variant2.Json.g.cs +++ b/src/libs/Baseten/Generated/Baseten.Models.SandboxMetricDescriptorV1.Json.g.cs @@ -2,7 +2,7 @@ namespace Baseten { - public sealed partial class SandboxImageV1Variant2 + public sealed partial class SandboxMetricDescriptorV1 { /// /// 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.SandboxImageV1Variant2? FromJson( + public static global::Baseten.SandboxMetricDescriptorV1? 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; + typeof(global::Baseten.SandboxMetricDescriptorV1), + jsonSerializerContext) as global::Baseten.SandboxMetricDescriptorV1; } /// /// Deserializes a JSON string using the generated default JsonSerializerContext. /// - public static global::Baseten.SandboxImageV1Variant2? FromJson( + public static global::Baseten.SandboxMetricDescriptorV1? 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.SandboxImageV1Variant2? FromJson( + public static global::Baseten.SandboxMetricDescriptorV1? 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.SandboxImageV1Variant2), - jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.SandboxImageV1Variant2; + typeof(global::Baseten.SandboxMetricDescriptorV1), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.SandboxMetricDescriptorV1; } /// /// 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.SandboxMetricDescriptorV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.SandboxMetricDescriptorV1.g.cs new file mode 100644 index 00000000..6ae1a278 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.SandboxMetricDescriptorV1.g.cs @@ -0,0 +1,82 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// + /// + public sealed partial class SandboxMetricDescriptorV1 + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Baseten.JsonConverters.SandboxMetricNameV1JsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Baseten.SandboxMetricNameV1 Name { get; set; } + + /// + /// Requests use COUNT, CPU uses CORES (1 means one fully used core), and memory uses BYTES. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("unit_hint")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Baseten.JsonConverters.SandboxMetricDescriptorV1UnitHintJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Baseten.SandboxMetricDescriptorV1UnitHint UnitHint { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("kind")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Baseten.JsonConverters.SandboxMetricDescriptorV1KindJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Baseten.SandboxMetricDescriptorV1Kind Kind { get; set; } + + /// + /// Requests use status=2xx,4xx,5xx; CPU and memory use stat=avg,max. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("label_sets")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList> LabelSets { 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. + /// + /// + /// + /// Requests use COUNT, CPU uses CORES (1 means one fully used core), and memory uses BYTES. + /// + /// + /// + /// Requests use status=2xx,4xx,5xx; CPU and memory use stat=avg,max. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public SandboxMetricDescriptorV1( + global::Baseten.SandboxMetricNameV1 name, + global::Baseten.SandboxMetricDescriptorV1UnitHint unitHint, + global::Baseten.SandboxMetricDescriptorV1Kind kind, + global::System.Collections.Generic.IList> labelSets) + { + this.Name = name; + this.UnitHint = unitHint; + this.Kind = kind; + this.LabelSets = labelSets ?? throw new global::System.ArgumentNullException(nameof(labelSets)); + } + + /// + /// Initializes a new instance of the class. + /// + public SandboxMetricDescriptorV1() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.SandboxMetricDescriptorV1Kind.g.cs b/src/libs/Baseten/Generated/Baseten.Models.SandboxMetricDescriptorV1Kind.g.cs new file mode 100644 index 00000000..f10fecb2 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.SandboxMetricDescriptorV1Kind.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// + /// + public enum SandboxMetricDescriptorV1Kind + { + /// + /// + /// + Counter, + /// + /// + /// + Gauge, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class SandboxMetricDescriptorV1KindExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this SandboxMetricDescriptorV1Kind value) + { + return value switch + { + SandboxMetricDescriptorV1Kind.Counter => "COUNTER", + SandboxMetricDescriptorV1Kind.Gauge => "GAUGE", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static SandboxMetricDescriptorV1Kind? ToEnum(string value) + { + return value switch + { + "COUNTER" => SandboxMetricDescriptorV1Kind.Counter, + "GAUGE" => SandboxMetricDescriptorV1Kind.Gauge, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.SandboxImageSummaryV1.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.SandboxMetricDescriptorV1LabelSet.Json.g.cs similarity index 87% rename from src/libs/Baseten/Generated/Baseten.Models.SandboxImageSummaryV1.Json.g.cs rename to src/libs/Baseten/Generated/Baseten.Models.SandboxMetricDescriptorV1LabelSet.Json.g.cs index bc00a07e..7223969d 100644 --- a/src/libs/Baseten/Generated/Baseten.Models.SandboxImageSummaryV1.Json.g.cs +++ b/src/libs/Baseten/Generated/Baseten.Models.SandboxMetricDescriptorV1LabelSet.Json.g.cs @@ -2,7 +2,7 @@ namespace Baseten { - public sealed partial class SandboxImageSummaryV1 + public sealed partial class SandboxMetricDescriptorV1LabelSet { /// /// 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.SandboxImageSummaryV1? FromJson( + public static global::Baseten.SandboxMetricDescriptorV1LabelSet? 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; + typeof(global::Baseten.SandboxMetricDescriptorV1LabelSet), + jsonSerializerContext) as global::Baseten.SandboxMetricDescriptorV1LabelSet; } /// /// Deserializes a JSON string using the generated default JsonSerializerContext. /// - public static global::Baseten.SandboxImageSummaryV1? FromJson( + public static global::Baseten.SandboxMetricDescriptorV1LabelSet? 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.SandboxImageSummaryV1? FromJson( + public static global::Baseten.SandboxMetricDescriptorV1LabelSet? 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.SandboxImageSummaryV1), - jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.SandboxImageSummaryV1; + typeof(global::Baseten.SandboxMetricDescriptorV1LabelSet), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.SandboxMetricDescriptorV1LabelSet; } /// /// 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.SandboxMetricDescriptorV1LabelSet.g.cs b/src/libs/Baseten/Generated/Baseten.Models.SandboxMetricDescriptorV1LabelSet.g.cs new file mode 100644 index 00000000..0ccc8150 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.SandboxMetricDescriptorV1LabelSet.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// + /// + public sealed partial class SandboxMetricDescriptorV1LabelSet + { + + /// + /// 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.SandboxMetricDescriptorV1UnitHint.g.cs b/src/libs/Baseten/Generated/Baseten.Models.SandboxMetricDescriptorV1UnitHint.g.cs new file mode 100644 index 00000000..0b8a1faf --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.SandboxMetricDescriptorV1UnitHint.g.cs @@ -0,0 +1,57 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// Requests use COUNT, CPU uses CORES (1 means one fully used core), and memory uses BYTES. + /// + public enum SandboxMetricDescriptorV1UnitHint + { + /// + /// + /// + Bytes, + /// + /// + /// + Cores, + /// + /// + /// + Count, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class SandboxMetricDescriptorV1UnitHintExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this SandboxMetricDescriptorV1UnitHint value) + { + return value switch + { + SandboxMetricDescriptorV1UnitHint.Bytes => "BYTES", + SandboxMetricDescriptorV1UnitHint.Cores => "CORES", + SandboxMetricDescriptorV1UnitHint.Count => "COUNT", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static SandboxMetricDescriptorV1UnitHint? ToEnum(string value) + { + return value switch + { + "BYTES" => SandboxMetricDescriptorV1UnitHint.Bytes, + "CORES" => SandboxMetricDescriptorV1UnitHint.Cores, + "COUNT" => SandboxMetricDescriptorV1UnitHint.Count, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.SandboxMetricModeV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.SandboxMetricModeV1.g.cs new file mode 100644 index 00000000..07b70bbb --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.SandboxMetricModeV1.g.cs @@ -0,0 +1,57 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// + /// + public enum SandboxMetricModeV1 + { + /// + /// + /// + Current, + /// + /// + /// + Series, + /// + /// + /// + Summary, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class SandboxMetricModeV1Extensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this SandboxMetricModeV1 value) + { + return value switch + { + SandboxMetricModeV1.Current => "CURRENT", + SandboxMetricModeV1.Series => "SERIES", + SandboxMetricModeV1.Summary => "SUMMARY", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static SandboxMetricModeV1? ToEnum(string value) + { + return value switch + { + "CURRENT" => SandboxMetricModeV1.Current, + "SERIES" => SandboxMetricModeV1.Series, + "SUMMARY" => SandboxMetricModeV1.Summary, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.SandboxMetricNameV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.SandboxMetricNameV1.g.cs new file mode 100644 index 00000000..4dc4631c --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.SandboxMetricNameV1.g.cs @@ -0,0 +1,57 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// + /// + public enum SandboxMetricNameV1 + { + /// + /// + /// + BasetenSandboxCpuUsageCores, + /// + /// + /// + BasetenSandboxMemoryBytes, + /// + /// + /// + BasetenSandboxRequestsTotal, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class SandboxMetricNameV1Extensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this SandboxMetricNameV1 value) + { + return value switch + { + SandboxMetricNameV1.BasetenSandboxCpuUsageCores => "baseten_sandbox_cpu_usage_cores", + SandboxMetricNameV1.BasetenSandboxMemoryBytes => "baseten_sandbox_memory_bytes", + SandboxMetricNameV1.BasetenSandboxRequestsTotal => "baseten_sandbox_requests_total", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static SandboxMetricNameV1? ToEnum(string value) + { + return value switch + { + "baseten_sandbox_cpu_usage_cores" => SandboxMetricNameV1.BasetenSandboxCpuUsageCores, + "baseten_sandbox_memory_bytes" => SandboxMetricNameV1.BasetenSandboxMemoryBytes, + "baseten_sandbox_requests_total" => SandboxMetricNameV1.BasetenSandboxRequestsTotal, + _ => null, + }; + } + } +} \ 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.SandboxMetricValueSetV1.Json.g.cs similarity index 88% rename from src/libs/Baseten/Generated/Baseten.Models.SandboxMetricsPointV1.Json.g.cs rename to src/libs/Baseten/Generated/Baseten.Models.SandboxMetricValueSetV1.Json.g.cs index c2b83b0f..e46813e7 100644 --- a/src/libs/Baseten/Generated/Baseten.Models.SandboxMetricsPointV1.Json.g.cs +++ b/src/libs/Baseten/Generated/Baseten.Models.SandboxMetricValueSetV1.Json.g.cs @@ -2,7 +2,7 @@ namespace Baseten { - public sealed partial class SandboxMetricsPointV1 + public sealed partial class SandboxMetricValueSetV1 { /// /// 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.SandboxMetricsPointV1? FromJson( + public static global::Baseten.SandboxMetricValueSetV1? 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; + typeof(global::Baseten.SandboxMetricValueSetV1), + jsonSerializerContext) as global::Baseten.SandboxMetricValueSetV1; } /// /// Deserializes a JSON string using the generated default JsonSerializerContext. /// - public static global::Baseten.SandboxMetricsPointV1? FromJson( + public static global::Baseten.SandboxMetricValueSetV1? 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.SandboxMetricsPointV1? FromJson( + public static global::Baseten.SandboxMetricValueSetV1? 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.SandboxMetricsPointV1), - jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.SandboxMetricsPointV1; + typeof(global::Baseten.SandboxMetricValueSetV1), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.SandboxMetricValueSetV1; } /// /// 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.SandboxMetricValueSetV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.SandboxMetricValueSetV1.g.cs new file mode 100644 index 00000000..291a092f --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.SandboxMetricValueSetV1.g.cs @@ -0,0 +1,59 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// + /// + public sealed partial class SandboxMetricValueSetV1 + { + /// + /// Start of the SERIES interval or SUMMARY window; snapshot timestamp in CURRENT. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("start_epoch_millis")] + [global::System.Text.Json.Serialization.JsonRequired] + public required long StartEpochMillis { get; set; } + + /// + /// Values indexed first by metric_descriptors, then by that descriptor's label_sets. Null means no sample. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("values")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList> Values { 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 the SERIES interval or SUMMARY window; snapshot timestamp in CURRENT. + /// + /// + /// Values indexed first by metric_descriptors, then by that descriptor's label_sets. Null means no sample. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public SandboxMetricValueSetV1( + long startEpochMillis, + global::System.Collections.Generic.IList> values) + { + this.StartEpochMillis = startEpochMillis; + this.Values = values ?? throw new global::System.ArgumentNullException(nameof(values)); + } + + /// + /// Initializes a new instance of the class. + /// + public SandboxMetricValueSetV1() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.SandboxMetricsPointV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.SandboxMetricsPointV1.g.cs deleted file mode 100644 index d21fdfa6..00000000 --- a/src/libs/Baseten/Generated/Baseten.Models.SandboxMetricsPointV1.g.cs +++ /dev/null @@ -1,91 +0,0 @@ - -#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.g.cs b/src/libs/Baseten/Generated/Baseten.Models.SandboxMetricsV1.g.cs index 9d9596a9..dd1b6920 100644 --- a/src/libs/Baseten/Generated/Baseten.Models.SandboxMetricsV1.g.cs +++ b/src/libs/Baseten/Generated/Baseten.Models.SandboxMetricsV1.g.cs @@ -9,39 +9,46 @@ namespace Baseten public sealed partial class SandboxMetricsV1 { /// - /// + /// Returned window start, snapped outward in SERIES. Equal to end for CURRENT. /// - [global::System.Text.Json.Serialization.JsonPropertyName("sandbox_name")] + [global::System.Text.Json.Serialization.JsonPropertyName("start_epoch_millis")] [global::System.Text.Json.Serialization.JsonRequired] - public required string SandboxName { get; set; } + public required long StartEpochMillis { get; set; } /// - /// + /// Returned exclusive window end, snapped outward in SERIES. Snapshot timestamp for CURRENT. /// - [global::System.Text.Json.Serialization.JsonPropertyName("start_time")] + [global::System.Text.Json.Serialization.JsonPropertyName("end_epoch_millis")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.DateTime StartTime { get; set; } + public required long EndEpochMillis { get; set; } /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("end_time")] + [global::System.Text.Json.Serialization.JsonPropertyName("mode")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Baseten.JsonConverters.SandboxMetricModeV1JsonConverter))] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.DateTime EndTime { get; set; } + public required global::Baseten.SandboxMetricModeV1 Mode { get; set; } + + /// + /// Seconds per SERIES interval; null in CURRENT and SUMMARY. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("step_seconds")] + public int? StepSeconds { get; set; } /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("interval_seconds")] + [global::System.Text.Json.Serialization.JsonPropertyName("metric_descriptors")] [global::System.Text.Json.Serialization.JsonRequired] - public required int IntervalSeconds { get; set; } + public required global::System.Collections.Generic.IList MetricDescriptors { get; set; } /// /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("data")] + [global::System.Text.Json.Serialization.JsonPropertyName("metric_values")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::System.Collections.Generic.IList Data { get; set; } + public required global::System.Collections.Generic.IList MetricValues { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -52,26 +59,35 @@ public sealed partial class SandboxMetricsV1 /// /// Initializes a new instance of the class. /// - /// - /// - /// - /// - /// + /// + /// Returned window start, snapped outward in SERIES. Equal to end for CURRENT. + /// + /// + /// Returned exclusive window end, snapped outward in SERIES. Snapshot timestamp for CURRENT. + /// + /// + /// + /// + /// + /// Seconds per SERIES interval; null in CURRENT and SUMMARY. + /// #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) + long startEpochMillis, + long endEpochMillis, + global::Baseten.SandboxMetricModeV1 mode, + global::System.Collections.Generic.IList metricDescriptors, + global::System.Collections.Generic.IList metricValues, + int? stepSeconds) { - 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)); + this.StartEpochMillis = startEpochMillis; + this.EndEpochMillis = endEpochMillis; + this.Mode = mode; + this.StepSeconds = stepSeconds; + this.MetricDescriptors = metricDescriptors ?? throw new global::System.ArgumentNullException(nameof(metricDescriptors)); + this.MetricValues = metricValues ?? throw new global::System.ArgumentNullException(nameof(metricValues)); } /// diff --git a/src/libs/Baseten/Generated/Baseten.Sandboxes.JsonSerializerContext.g.cs b/src/libs/Baseten/Generated/Baseten.Sandboxes.JsonSerializerContext.g.cs index db702826..ab6821e2 100644 --- a/src/libs/Baseten/Generated/Baseten.Sandboxes.JsonSerializerContext.g.cs +++ b/src/libs/Baseten/Generated/Baseten.Sandboxes.JsonSerializerContext.g.cs @@ -21,16 +21,25 @@ namespace Baseten [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::System.Collections.Generic.IList>))] + [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.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.SandboxMetricModeV1), TypeInfoPropertyName = "SandboxMetricModeV12")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxMetricNameV1), TypeInfoPropertyName = "SandboxMetricNameV12")] [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::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxMetricDescriptorV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxMetricValueSetV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxMetricDescriptorV1UnitHint), TypeInfoPropertyName = "SandboxMetricDescriptorV1UnitHint2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxMetricDescriptorV1Kind), TypeInfoPropertyName = "SandboxMetricDescriptorV1Kind2")] + [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.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")] @@ -63,10 +72,14 @@ namespace Baseten [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::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.SandboxMetricModeV1?), TypeInfoPropertyName = "NullableSandboxMetricModeV12")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxMetricNameV1?), TypeInfoPropertyName = "NullableSandboxMetricNameV12")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxMetricDescriptorV1UnitHint?), TypeInfoPropertyName = "NullableSandboxMetricDescriptorV1UnitHint2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SandboxMetricDescriptorV1Kind?), TypeInfoPropertyName = "NullableSandboxMetricDescriptorV1Kind2")] [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")] @@ -80,14 +93,19 @@ namespace Baseten [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::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 SandboxesSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext { } @@ -180,7 +198,23 @@ private sealed class LazyEnumJsonConverterFactory : global::System.Text.Json.Ser public override bool CanConvert(global::System.Type typeToConvert) { return - typeToConvert == typeof(global::Baseten.SandboxRegionV1InfoGeneration) + typeToConvert == typeof(global::Baseten.SandboxMetricModeV1) + + || typeToConvert == typeof(global::Baseten.SandboxMetricModeV1?) + + || typeToConvert == typeof(global::Baseten.SandboxMetricNameV1) + + || typeToConvert == typeof(global::Baseten.SandboxMetricNameV1?) + + || typeToConvert == typeof(global::Baseten.SandboxMetricDescriptorV1UnitHint) + + || typeToConvert == typeof(global::Baseten.SandboxMetricDescriptorV1UnitHint?) + + || typeToConvert == typeof(global::Baseten.SandboxMetricDescriptorV1Kind) + + || typeToConvert == typeof(global::Baseten.SandboxMetricDescriptorV1Kind?) + + || typeToConvert == typeof(global::Baseten.SandboxRegionV1InfoGeneration) || typeToConvert == typeof(global::Baseten.SandboxRegionV1InfoGeneration?) @@ -225,6 +259,46 @@ public override bool CanConvert(global::System.Type typeToConvert) global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) { + if (typeToConvert == typeof(global::Baseten.SandboxMetricModeV1)) + { + return new global::Baseten.JsonConverters.SandboxMetricModeV1JsonConverter(); + } + + if (typeToConvert == typeof(global::Baseten.SandboxMetricModeV1?)) + { + return new global::Baseten.JsonConverters.SandboxMetricModeV1NullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Baseten.SandboxMetricNameV1)) + { + return new global::Baseten.JsonConverters.SandboxMetricNameV1JsonConverter(); + } + + if (typeToConvert == typeof(global::Baseten.SandboxMetricNameV1?)) + { + return new global::Baseten.JsonConverters.SandboxMetricNameV1NullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Baseten.SandboxMetricDescriptorV1UnitHint)) + { + return new global::Baseten.JsonConverters.SandboxMetricDescriptorV1UnitHintJsonConverter(); + } + + if (typeToConvert == typeof(global::Baseten.SandboxMetricDescriptorV1UnitHint?)) + { + return new global::Baseten.JsonConverters.SandboxMetricDescriptorV1UnitHintNullableJsonConverter(); + } + + if (typeToConvert == typeof(global::Baseten.SandboxMetricDescriptorV1Kind)) + { + return new global::Baseten.JsonConverters.SandboxMetricDescriptorV1KindJsonConverter(); + } + + if (typeToConvert == typeof(global::Baseten.SandboxMetricDescriptorV1Kind?)) + { + return new global::Baseten.JsonConverters.SandboxMetricDescriptorV1KindNullableJsonConverter(); + } + if (typeToConvert == typeof(global::Baseten.SandboxRegionV1InfoGeneration)) { return new global::Baseten.JsonConverters.SandboxRegionV1InfoGenerationJsonConverter(); diff --git a/src/libs/Baseten/Generated/Baseten.SandboxesClient.CreateSandbox.g.cs b/src/libs/Baseten/Generated/Baseten.SandboxesClient.CreateSandbox.g.cs index 93e3fe16..d933d8d3 100644 --- a/src/libs/Baseten/Generated/Baseten.SandboxesClient.CreateSandbox.g.cs +++ b/src/libs/Baseten/Generated/Baseten.SandboxesClient.CreateSandbox.g.cs @@ -687,7 +687,7 @@ partial void ProcessCreateSandboxResponseContent( /// Example: baseten/base-image:latest /// /// - /// Memory allocation in megabytes. Also determines CPU allocation (CPU cores = memory in MB / 2048, e.g., 4096MB = 2 CPUs). Defaults to 4096.
+ /// Memory allocation in megabytes. Also determines CPU allocation (CPU cores = memory in MB / 2048, e.g., 4096MB = 2 CPUs). Defaults to 4096. Must be between 1024 and 262144.
/// Default Value: 4096
/// Example: 4096 /// diff --git a/src/libs/Baseten/Generated/Baseten.SandboxesClient.GetSandboxMetrics.g.cs b/src/libs/Baseten/Generated/Baseten.SandboxesClient.GetSandboxMetrics.g.cs index 4eeb3742..85a52407 100644 --- a/src/libs/Baseten/Generated/Baseten.SandboxesClient.GetSandboxMetrics.g.cs +++ b/src/libs/Baseten/Generated/Baseten.SandboxesClient.GetSandboxMetrics.g.cs @@ -27,21 +27,23 @@ public partial class SandboxesClient }; partial void PrepareGetSandboxMetricsArguments( global::System.Net.Http.HttpClient httpClient, + ref string sandboxName, ref string? teamId, ref string? xTeamId, - ref string sandboxName, - ref global::System.DateTime startTime, - ref global::System.DateTime endTime, - ref int intervalSeconds); + ref global::Baseten.SandboxMetricModeV1? mode, + ref long? startEpochMillis, + ref long? endEpochMillis, + global::System.Collections.Generic.IList? metrics); partial void PrepareGetSandboxMetricsRequest( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string sandboxName, string? teamId, string? xTeamId, - string sandboxName, - global::System.DateTime startTime, - global::System.DateTime endTime, - int intervalSeconds); + global::Baseten.SandboxMetricModeV1? mode, + long? startEpochMillis, + long? endEpochMillis, + global::System.Collections.Generic.IList? metrics); partial void ProcessGetSandboxMetricsResponse( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpResponseMessage httpResponseMessage); @@ -53,42 +55,48 @@ partial void ProcessGetSandboxMetricsResponseContent( /// /// 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. + /// Returns every interval with labeled request counts, CPU cores, and RSS memory bytes. CURRENT returns one snapshot at now, with
+ /// request counts over the preceding minute and latest gauges.
+ /// SUMMARY returns one value set over the window. SERIES snaps the window outward
+ /// to UTC step boundaries and echoes those boundaries; each value covers
+ /// [start_epoch_millis, start_epoch_millis + step_seconds).
+ /// Missing gauge samples remain null. Request counts are zero after
+ /// creation without traffic, and null before creation. CPU averages are averages
+ /// of valid sampled CPU rates; memory averages are averages of sampled RSS.
+ /// Windows default to one hour, are limited to 7 days after alignment, and at most
+ /// 10000 intervals. 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.SandboxMetricModeV1? mode = default, + long? startEpochMillis = default, + long? endEpochMillis = default, + global::System.Collections.Generic.IList? metrics = 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, + mode: mode, + startEpochMillis: startEpochMillis, + endEpochMillis: endEpochMillis, + metrics: metrics, requestOptions: requestOptions, cancellationToken: cancellationToken ).ConfigureAwait(false); @@ -97,32 +105,37 @@ partial void ProcessGetSandboxMetricsResponseContent( } /// /// 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. + /// Returns every interval with labeled request counts, CPU cores, and RSS memory bytes. CURRENT returns one snapshot at now, with
+ /// request counts over the preceding minute and latest gauges.
+ /// SUMMARY returns one value set over the window. SERIES snaps the window outward
+ /// to UTC step boundaries and echoes those boundaries; each value covers
+ /// [start_epoch_millis, start_epoch_millis + step_seconds).
+ /// Missing gauge samples remain null. Request counts are zero after
+ /// creation without traffic, and null before creation. CPU averages are averages
+ /// of valid sampled CPU rates; memory averages are averages of sampled RSS.
+ /// Windows default to one hour, are limited to 7 days after alignment, and at most
+ /// 10000 intervals. 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.SandboxMetricModeV1? mode = default, + long? startEpochMillis = default, + long? endEpochMillis = default, + global::System.Collections.Generic.IList? metrics = default, global::Baseten.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) { @@ -130,12 +143,13 @@ partial void ProcessGetSandboxMetricsResponseContent( client: HttpClient); PrepareGetSandboxMetricsArguments( httpClient: HttpClient, + sandboxName: ref sandboxName, teamId: ref teamId, xTeamId: ref xTeamId, - sandboxName: ref sandboxName, - startTime: ref startTime, - endTime: ref endTime, - intervalSeconds: ref intervalSeconds); + mode: ref mode, + startEpochMillis: ref startEpochMillis, + endEpochMillis: ref endEpochMillis, + metrics: metrics); var __authorizations = global::Baseten.EndPointSecurityResolver.ResolveAuthorizations( @@ -165,9 +179,10 @@ partial void ProcessGetSandboxMetricsResponseContent( 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().")) + .AddOptionalParameter("mode", mode?.ToValueString()) + .AddOptionalParameter("start_epoch_millis", startEpochMillis?.ToString()) + .AddOptionalParameter("end_epoch_millis", endEpochMillis?.ToString()) + .AddOptionalParameter("metrics", metrics, selector: static x => x.ToValueString(), delimiter: ",", explode: true) ; var __path = __pathBuilder.ToString(); __path = global::Baseten.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -215,12 +230,13 @@ partial void ProcessGetSandboxMetricsResponseContent( PrepareGetSandboxMetricsRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, + sandboxName: sandboxName, teamId: teamId, xTeamId: xTeamId, - sandboxName: sandboxName, - startTime: startTime, - endTime: endTime, - intervalSeconds: intervalSeconds); + mode: mode, + startEpochMillis: startEpochMillis, + endEpochMillis: endEpochMillis, + metrics: metrics); return __httpRequest; } diff --git a/src/libs/Baseten/Generated/autosdk.generated-examples.json b/src/libs/Baseten/Generated/autosdk.generated-examples.json index e5fd8a09..32697e0e 100644 --- a/src/libs/Baseten/Generated/autosdk.generated-examples.json +++ b/src/libs/Baseten/Generated/autosdk.generated-examples.json @@ -26,7 +26,7 @@ "Order": 3, "Title": "Delete an image tag", "Slug": "deleteimagetag", - "Description": "Delete a specific image version. Reject deletion if the version is referenced by an active deployment. Return the updated image with its remaining tags, possibly empty.", + "Description": "Delete a specific image version. Reject deletion if the version is referenced by an active deployment. Return the updated repository summary. Use the tag listing endpoint for remaining image versions.", "Language": "http", "Code": "### Delete an image tag\n# @name DeleteImageTag\nDELETE {{host}}/v1/sandboxes/images/{{image_name}}/tags/{{tag_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# 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", @@ -92,7 +92,7 @@ "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. The uploaded ZIP archive must not exceed 5 GB. 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. Set memory and volume to size the temporary environment that builds or imports the image; for a source archive, upload with the returned upload_headers.", "Language": "csharp", "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", diff --git a/src/libs/Baseten/openapi.yaml b/src/libs/Baseten/openapi.yaml index de6b7820..044dc35a 100644 --- a/src/libs/Baseten/openapi.yaml +++ b/src/libs/Baseten/openapi.yaml @@ -10459,100 +10459,6 @@ "x-stability": "unstable" } }, - "/v1/routes/settings/users/{user_id}": { - "get": { - "summary": "Gets a user's route settings", - "x-codeSamples": [ - { - "lang": "bash", - "source": "curl --request GET \\\n--url https://api.baseten.co/v1/routes/settings/users/{user_id} \\\n--header \"Authorization: Bearer $BASETEN_API_KEY\"\n" - }, - { - "lang": "python", - "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"\")\nurl = \"https://api.baseten.co/v1/routes/settings/users/{user_id}\"\n\nheaders = {\"Authorization\": f\"Bearer {API_KEY}\"}\n\nresponse = requests.request(\n \"GET\",\n url,\n headers=headers,\n params={'team_id': 'abc1234'}\n)\n\nprint(response.text)" - } - ], - "description": "Returns the settings that apply to the user, including the spend limit that caps what they can spend on Baseten Code each month: the limit set on the user, their team's per-member limit, and the effective limit for this user. The user limit always overrides the team's per-member limit. The limits are read in `team_id` when given, else in the only team the user has a role in; the request fails when they belong to none or several.", - "parameters": [ - { - "name": "team_id", - "in": "query", - "required": false, - "description": "ID of the team to read the user's spend limit in. Defaults to the only team the user has a role in.", - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "examples": [ - "abc1234" - ], - "title": "Team Id" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RouteUserSettingsV1" - } - } - } - } - }, - "x-stability": "unstable" - }, - "parameters": [ - { - "$ref": "#/components/parameters/user_id" - } - ], - "patch": { - "summary": "Updates a user's route settings", - "x-codeSamples": [ - { - "lang": "bash", - "source": "curl --request PATCH \\\n--url https://api.baseten.co/v1/routes/settings/users/{user_id} \\\n--header \"Authorization: Bearer $BASETEN_API_KEY\" \\\n--data '{\n \"spend_limit\": null\n}'" - }, - { - "lang": "python", - "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"\")\nurl = \"https://api.baseten.co/v1/routes/settings/users/{user_id}\"\n\nheaders = {\"Authorization\": f\"Bearer {API_KEY}\"}\n\nresponse = requests.request(\n \"PATCH\",\n url,\n headers=headers,\n json={'spend_limit': None}\n)\n\nprint(response.text)" - } - ], - "description": "Changes only the fields in the request. Once the user's metered spend in a team in a month reaches the spend limit, requests with Routes keys they created in that team are rejected until the limit is raised or the next month starts. Spend is metered every 15 minutes and can lag, so a user can go over the limit. The user's own limit supersedes their team's per-member limit. The limit is set in the only team the user has a role in; when they belong to none or several, use `PATCH /v1/routes/settings/teams/{team_id}/users/{user_id}` instead.", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateRouteUserSettingsRequestV1" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RouteUserSettingsV1" - } - } - } - } - }, - "x-stability": "unstable" - } - }, "/v1/routes/settings/users/{user_id}/teams": { "get": { "summary": "Lists a user's route settings in each of their teams", @@ -10566,7 +10472,7 @@ "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"\")\nurl = \"https://api.baseten.co/v1/routes/settings/users/{user_id}/teams\"\n\nheaders = {\"Authorization\": f\"Bearer {API_KEY}\"}\n\nresponse = requests.request(\n \"GET\",\n url,\n headers=headers,\n json={}\n)\n\nprint(response.text)" } ], - "description": "Returns the user's settings in each team they have a role in and in any team they have Code spend in this month, alphabetical by team name: their spend limit for Baseten Code in the team, their spend in the team this month, and whether that spend reached the limit. Members can read their own settings; organization admins can read anyone's.", + "description": "Returns the user's settings in each team they belong to (every team, for organization admins), alphabetical by team name: their spend limit for Baseten Code in the team, their spend in the team this month, and whether that spend reached the limit. Members can read their own settings; organization admins can read anyone's.", "responses": { "200": { "description": "", @@ -10671,7 +10577,7 @@ "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"\")\nurl = \"https://api.baseten.co/v1/routes/settings/teams/{team_id}/users\"\n\nheaders = {\"Authorization\": f\"Bearer {API_KEY}\"}\n\nresponse = requests.request(\n \"GET\",\n url,\n headers=headers,\n json={}\n)\n\nprint(response.text)" } ], - "description": "Returns the settings in the team of each user with a role in the team and of anyone with Code spend in the team this month. Requires team admin for the specified team or organization admin.", + "description": "Returns the settings in the team of each member of the team, including organization admins and Code service accounts. Requires team admin for the specified team or organization admin.", "responses": { "200": { "description": "", @@ -11483,64 +11389,18 @@ } ] }, - "/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", + "description": "Returns every interval with labeled request counts, CPU cores, and RSS memory bytes. CURRENT returns one snapshot at now, with\nrequest counts over the preceding minute and latest gauges.\nSUMMARY returns one value set over the window. SERIES snaps the window outward\nto UTC step boundaries and echoes those boundaries; each value covers\n[start_epoch_millis, start_epoch_millis + step_seconds).\nMissing gauge samples remain null. Request counts are zero after\ncreation without traffic, and null before creation. CPU averages are averages\nof valid sampled CPU rates; memory averages are averages of sampled RSS.\nWindows default to one hour, are limited to 7 days after alignment, and at most\n10000 intervals. Telemetry failures return an error.\n", "tags": [ "Sandboxes" ], "parameters": [ + { + "$ref": "#/components/parameters/SandboxName" + }, { "$ref": "#/components/parameters/TeamId" }, @@ -11548,46 +11408,21 @@ "$ref": "#/components/parameters/TeamIdHeader" }, { - "$ref": "#/components/parameters/SandboxName" + "$ref": "#/components/parameters/SandboxMetricMode" }, { - "name": "start_time", - "in": "query", - "required": true, - "schema": { - "type": "string", - "format": "date-time" - } + "$ref": "#/components/parameters/SandboxMetricStart" }, { - "name": "end_time", - "in": "query", - "required": true, - "schema": { - "type": "string", - "format": "date-time" - } + "$ref": "#/components/parameters/SandboxMetricEnd" }, { - "name": "interval_seconds", - "in": "query", - "required": true, - "schema": { - "type": "integer", - "enum": [ - 10, - 30, - 60, - 300, - 900, - 3600 - ] - } + "$ref": "#/components/parameters/SandboxMetricNames" } ], "responses": { "200": { - "description": "Complete sandbox metrics time series.", + "description": "Index-aligned sandbox metrics.", "content": { "application/json": { "schema": { @@ -11597,7 +11432,7 @@ } }, "400": { - "description": "Invalid range, interval, or query parameter." + "description": "Invalid range, mode, step, metric selection, or response size." }, "401": { "description": "Authentication required." @@ -11710,6 +11545,55 @@ "x-stability": "unstable" } }, + "/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": { "get": { "operationId": "ListSandboxes", @@ -12210,7 +12094,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. The uploaded ZIP archive must not exceed 5 GB. 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. Set memory and volume to size the temporary environment that builds or imports the image; for a source archive, upload with the returned upload_headers.", "tags": [ "Images" ], @@ -12641,7 +12525,7 @@ ], "operationId": "DeleteImageTag", "summary": "Delete an image tag", - "description": "Delete a specific image version. Reject deletion if the version is referenced by an active deployment. Return the updated image with its remaining tags, possibly empty.", + "description": "Delete a specific image version. Reject deletion if the version is referenced by an active deployment. Return the updated repository summary. Use the tag listing endpoint for remaining image versions.", "tags": [ "Images" ], @@ -27665,14 +27549,30 @@ "type": "string" }, "model_id": { - "description": "Hashid of the underlying Baseten model.", - "title": "Model Id", - "type": "string" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Hashid of the underlying Baseten model. Null for a serverless sampler.", + "title": "Model Id" }, "deployment_id": { - "description": "Hashid of the specific model deployment (version).", - "title": "Deployment Id", - "type": "string" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Hashid of the specific model deployment (version). Null for a serverless sampler.", + "title": "Deployment Id" }, "status": { "$ref": "#/components/schemas/LoopsSamplerStatusV1", @@ -27706,8 +27606,6 @@ "base_url", "base_model", "created_at", - "model_id", - "deployment_id", "status", "user" ], @@ -34776,6 +34674,14 @@ "title": "RouteSettingSourceV1", "type": "string" }, + "RouteSpendBlockedByV1": { + "enum": [ + "member", + "team" + ], + "title": "RouteSpendBlockedByV1", + "type": "string" + }, "RouteSpendLimitSettingV1": { "properties": { "user_monthly_limit_usd": { @@ -34875,155 +34781,24 @@ "title": "RouteSpendLimitTeamDefaultV1", "type": "object" }, - "RouteUserSettingsV1": { + "RouteTeamUserSettingsV1": { "properties": { - "user_id": { - "description": "ID of the user.", - "examples": [ - "abc1234" - ], - "title": "User Id", - "type": "string" - }, - "email": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "Email address of the user.", - "examples": [ - "dev@example.com" - ], - "title": "Email" - }, - "spend_limit": { - "$ref": "#/components/schemas/RouteSpendLimitSettingV1", - "description": "Spend limit for Baseten Code. Applies to requests with Routes keys the user created; personal API keys are not limited." - } - }, - "required": [ - "user_id", - "email", - "spend_limit" - ], - "title": "RouteUserSettingsV1", - "type": "object" - }, - "RouteUserSettingsRequestV1": { - "properties": { - "team_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "description": "ID of the team to read the user's spend limit in. Defaults to the only team the user has a role in.", - "examples": [ - "abc1234" - ], - "title": "Team Id" - } - }, - "title": "RouteUserSettingsRequestV1", - "type": "object" - }, - "UpdateRouteSpendLimitSettingV1": { - "additionalProperties": false, - "minProperties": 1, - "properties": { - "user_monthly_limit_usd": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Standing spend limit in USD for each UTC calendar month. Send null to remove the limit; omit to leave it unchanged.", - "examples": [ - "200" - ], - "title": "User Monthly Limit Usd", - "x-null-distinct": true - }, - "month_override_usd": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Spend limit in USD for the current UTC calendar month, which supersedes the standing limit. Send null to remove it; omit to leave it unchanged.", - "examples": [ - "300" - ], - "title": "Month Override Usd", - "x-null-distinct": true - } - }, - "title": "UpdateRouteSpendLimitSettingV1", - "type": "object" - }, - "UpdateRouteUserSettingsRequestV1": { - "additionalProperties": false, - "minProperties": 1, - "properties": { - "spend_limit": { - "anyOf": [ - { - "$ref": "#/components/schemas/UpdateRouteSpendLimitSettingV1" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Spend limit fields to change. Pass null to remove the user's limit; omit to leave it unchanged.", - "x-null-distinct": true - } - }, - "title": "UpdateRouteUserSettingsRequestV1", - "type": "object" - }, - "RouteSpendBlockedByV1": { - "enum": [ - "member", - "team" - ], - "title": "RouteSpendBlockedByV1", - "type": "string" - }, - "RouteTeamUserSettingsV1": { - "properties": { - "team_id": { - "description": "ID of the team.", - "examples": [ - "abc1234" - ], - "title": "Team Id", - "type": "string" - }, - "team_name": { - "description": "Name of the team.", - "examples": [ - "Engineering" - ], - "title": "Team Name", - "type": "string" - }, + "team_id": { + "description": "ID of the team.", + "examples": [ + "abc1234" + ], + "title": "Team Id", + "type": "string" + }, + "team_name": { + "description": "Name of the team.", + "examples": [ + "Engineering" + ], + "title": "Team Name", + "type": "string" + }, "user_id": { "description": "ID of the user.", "examples": [ @@ -35494,6 +35269,69 @@ "title": "RouteTeamUserSettingsListV1", "type": "object" }, + "UpdateRouteSpendLimitSettingV1": { + "additionalProperties": false, + "minProperties": 1, + "properties": { + "user_monthly_limit_usd": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Standing spend limit in USD for each UTC calendar month. Send null to remove the limit; omit to leave it unchanged.", + "examples": [ + "200" + ], + "title": "User Monthly Limit Usd", + "x-null-distinct": true + }, + "month_override_usd": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Spend limit in USD for the current UTC calendar month, which supersedes the standing limit. Send null to remove it; omit to leave it unchanged.", + "examples": [ + "300" + ], + "title": "Month Override Usd", + "x-null-distinct": true + } + }, + "title": "UpdateRouteSpendLimitSettingV1", + "type": "object" + }, + "UpdateRouteUserSettingsRequestV1": { + "additionalProperties": false, + "minProperties": 1, + "properties": { + "spend_limit": { + "anyOf": [ + { + "$ref": "#/components/schemas/UpdateRouteSpendLimitSettingV1" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Spend limit fields to change. Pass null to remove the user's limit; omit to leave it unchanged.", + "x-null-distinct": true + } + }, + "title": "UpdateRouteUserSettingsRequestV1", + "type": "object" + }, "RouteConnectionConfigAnthropicV1": { "properties": { "provider": { @@ -37035,60 +36873,6 @@ "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": [ @@ -37160,98 +36944,200 @@ } } }, + "SandboxMetricModeV1": { + "type": "string", + "enum": [ + "CURRENT", + "SUMMARY", + "SERIES" + ] + }, + "SandboxMetricNameV1": { + "type": "string", + "enum": [ + "baseten_sandbox_requests_total", + "baseten_sandbox_cpu_usage_cores", + "baseten_sandbox_memory_bytes" + ] + }, "SandboxMetricsV1": { "type": "object", "required": [ - "sandbox_name", - "start_time", - "end_time", - "interval_seconds", - "data" + "start_epoch_millis", + "end_epoch_millis", + "mode", + "step_seconds", + "metric_descriptors", + "metric_values" ], "properties": { - "sandbox_name": { - "type": "string" + "start_epoch_millis": { + "type": "integer", + "format": "int64", + "description": "Returned window start, snapped outward in SERIES. Equal to end for CURRENT." }, - "start_time": { - "type": "string", - "format": "date-time" + "end_epoch_millis": { + "type": "integer", + "format": "int64", + "description": "Returned exclusive window end, snapped outward in SERIES. Snapshot timestamp for CURRENT." }, - "end_time": { - "type": "string", - "format": "date-time" + "mode": { + "$ref": "#/components/schemas/SandboxMetricModeV1" }, - "interval_seconds": { - "type": "integer" + "step_seconds": { + "description": "Seconds per SERIES interval; null in CURRENT and SUMMARY.", + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ] + }, + "metric_descriptors": { + "type": "array", + "minItems": 1, + "maxItems": 3, + "items": { + "$ref": "#/components/schemas/SandboxMetricDescriptorV1" + } }, - "data": { + "metric_values": { "type": "array", "maxItems": 10000, "items": { - "$ref": "#/components/schemas/SandboxMetricsPointV1" + "$ref": "#/components/schemas/SandboxMetricValueSetV1" } } } }, - "SandboxMetricsPointV1": { + "SandboxMetricDescriptorV1": { "type": "object", "required": [ - "timestamp", - "requests", - "cpu_percent", - "memory_bytes", - "error_rate" + "name", + "unit_hint", + "kind", + "label_sets" ], "properties": { - "timestamp": { + "name": { + "$ref": "#/components/schemas/SandboxMetricNameV1" + }, + "unit_hint": { "type": "string", - "format": "date-time", - "description": "Start of this interval." + "enum": [ + "COUNT", + "CORES", + "BYTES" + ], + "description": "Requests use COUNT, CPU uses CORES (1 means one fully used core), and memory uses BYTES." }, - "requests": { - "description": "Request count. Zero without traffic; null for intervals entirely before creation.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } + "kind": { + "type": "string", + "enum": [ + "GAUGE", + "COUNTER" ] }, - "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" + "label_sets": { + "type": "array", + "maxItems": 3, + "description": "Requests use status=2xx,4xx,5xx; CPU and memory use stat=avg,max.\n", + "items": { + "type": "object", + "additionalProperties": { + "type": "string" } - ] + } + } + } + }, + "SandboxMetricValueSetV1": { + "type": "object", + "required": [ + "start_epoch_millis", + "values" + ], + "properties": { + "start_epoch_millis": { + "type": "integer", + "format": "int64", + "description": "Start of the SERIES interval or SUMMARY window; snapshot timestamp in CURRENT." }, - "memory_bytes": { - "description": "Memory usage in bytes, averaged per series then maximum across series. Null without a sample.", - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" + "values": { + "type": "array", + "minItems": 1, + "maxItems": 3, + "description": "Values indexed first by metric_descriptors, then by that descriptor's label_sets. Null means no sample.", + "items": { + "type": "array", + "maxItems": 3, + "items": { + "anyOf": [ + { + "type": "number", + "format": "double" + }, + { + "type": "null" + } + ] } - ] + } + } + } + }, + "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" }, - "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" - } + "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" ] } } @@ -37713,7 +37599,7 @@ "properties": { "name": { "type": "string", - "description": "Name of the environment variable", + "description": "Name of the environment variable. Must start with a letter or underscore and contain only letters, digits and underscores (^[A-Za-z_][A-Za-z0-9_]*$); create and update reject other names.", "example": "NODE_ENV" }, "secret": { @@ -37902,9 +37788,10 @@ }, "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). Must be between 1024 and 262144.", "example": 4096, - "minimum": 1 + "minimum": 512, + "maximum": 262144 }, "ports": { "description": "Set of ports for a resource", @@ -38143,10 +38030,11 @@ }, "memory": { "type": "integer", - "description": "Memory allocation in megabytes. Also determines CPU allocation (CPU cores = memory in MB / 2048, e.g., 4096MB = 2 CPUs). Defaults to 4096.", + "description": "Memory allocation in megabytes. Also determines CPU allocation (CPU cores = memory in MB / 2048, e.g., 4096MB = 2 CPUs). Defaults to 4096. Must be between 1024 and 262144.", "default": 4096, "example": 4096, - "minimum": 1 + "minimum": 512, + "maximum": 262144 }, "ports": { "description": "Set of ports for a resource", @@ -38840,7 +38728,7 @@ "type": "array", "description": "Image repositories on this page.", "items": { - "$ref": "#/components/schemas/SandboxImageSummaryV1" + "$ref": "#/components/schemas/SandboxImageV1" } }, "pagination": { @@ -38925,7 +38813,7 @@ "size": 134217728 } }, - "SandboxImageSummaryV1": { + "SandboxImageV1": { "type": "object", "description": "Sandbox image repository summary. Fetch tags through GET /sandboxes/images/{image_name}/tags.", "properties": { @@ -38995,40 +38883,6 @@ "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": [] - } - }, - "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": [] - } - }, "PushSandboxImageRequestV1": { "type": "object", "description": "Push a sandbox image from a source archive or an existing registry image.", @@ -39049,6 +38903,20 @@ "description": "Optional serialized registry authentication configuration for importing a private image. Used only when image is supplied; never returned.", "writeOnly": true, "example": "{\"auths\":{\"https://index.docker.io/v1/\":{\"auth\":\"YjEwLXJldmlldzpkZW1vLW5vdC1hLXZhbGlkLXJlZ2lzdHJ5LXRva2Vu\"}}}" + }, + "memory": { + "type": "integer", + "description": "Memory in megabytes of the temporary environment that builds the source archive or imports the registry image. Omit it to use the default size. Does not change the memory of sandboxes created from the image.", + "minimum": 1, + "maximum": 32768, + "example": 16384 + }, + "volume": { + "type": "integer", + "description": "Scratch disk in megabytes attached to the temporary build environment for intermediate layers. Set it for large images that run out of space while building or importing. 0 builds in memory, which is the default. Teams with HIPAA compliance enabled accept only 0.", + "minimum": 0, + "maximum": 131072, + "example": 32768 } }, "required": [ @@ -39057,7 +38925,9 @@ "example": { "name": "base-image", "image": "docker.io/b10/base-image:latest", - "docker_config": "{\"auths\":{\"https://index.docker.io/v1/\":{\"auth\":\"YjEwLXJldmlldzpkZW1vLW5vdC1hLXZhbGlkLXJlZ2lzdHJ5LXRva2Vu\"}}}" + "docker_config": "{\"auths\":{\"https://index.docker.io/v1/\":{\"auth\":\"YjEwLXJldmlldzpkZW1vLW5vdC1hLXZhbGlkLXJlZ2lzdHJ5LXRva2Vu\"}}}", + "memory": 16384, + "volume": 32768 } }, "PushSandboxImageResponseV1": { @@ -39084,9 +38954,16 @@ "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" }, + "upload_headers": { + "type": "object", + "description": "Headers the source archive upload must send, in addition to Content-Type, with exactly these names and values. Present only with upload_url, when memory or volume was set. upload_url is signed for these headers, so storage rejects an upload that omits or changes them. Treat names and values as opaque.", + "additionalProperties": { + "type": "string" + } + }, "image": { "type": "string", - "description": "Registered image reference including its tag, when available. Tags are assigned by the service; GET /sandboxes/images/{image_name} returns the available tags once processing completes.", + "description": "Registered image reference including its tag, when available. Tags are assigned by the service; GET /sandboxes/images/{image_name}/tags returns the available tags once processing completes.", "example": "b10/base-image:latest" } }, @@ -39520,6 +39397,50 @@ "in": "path", "required": true }, + "SandboxMetricMode": { + "name": "mode", + "in": "query", + "schema": { + "$ref": "#/components/schemas/SandboxMetricModeV1" + }, + "description": "Defaults to CURRENT, which rejects start_epoch_millis and end_epoch_millis. SERIES uses a server-selected step of 30 seconds up to 2 hours, 60 seconds up to 1 day, 600 seconds up to 3 days, and 3600 seconds beyond 3 days." + }, + "SandboxMetricStart": { + "name": "start_epoch_millis", + "in": "query", + "schema": { + "type": "integer", + "format": "int64", + "minimum": 0 + }, + "description": "Unix milliseconds. Defaults to one hour before end; SERIES snaps outward." + }, + "SandboxMetricEnd": { + "name": "end_epoch_millis", + "in": "query", + "schema": { + "type": "integer", + "format": "int64", + "minimum": 0 + }, + "description": "Exclusive end in Unix milliseconds, default now. Maximum aligned window is 7 days." + }, + "SandboxMetricNames": { + "name": "metrics", + "in": "query", + "style": "form", + "explode": true, + "schema": { + "type": "array", + "minItems": 1, + "maxItems": 3, + "uniqueItems": true, + "items": { + "$ref": "#/components/schemas/SandboxMetricNameV1" + } + }, + "description": "Metric names in response order. Omit to request all three signals." + }, "TeamId": { "name": "team_id", "in": "query", @@ -40332,28 +40253,14 @@ } }, "ImageReady": { - "summary": "Built image with all metadata and tags", + "summary": "Built image repository summary", "value": { "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, - "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 - } - ] + "size": 260046848 }, "description": "Dates and byte sizes are representative example data. Image references use the b10 namespace." }, @@ -40365,15 +40272,7 @@ "created_at": "2026-09-15T21:20:00Z", "updated_at": "2026-09-16T21:41:13Z", "last_deployed_at": "2026-09-16T21:26:58.545765901Z", - "size": 134217728, - "tags": [ - { - "name": "latest", - "created_at": "2026-09-16T21:20:00Z", - "updated_at": "2026-09-16T21:25:00Z", - "size": 134217728 - } - ] + "size": 134217728 } }, "ImageSummary": { @@ -40383,8 +40282,7 @@ "status": "BUILT", "created_at": "2026-09-15T21:20:00Z", "size": 260046848, - "tag_count": 2, - "tags": [] + "tag_count": 2 } }, "ImagesList": { @@ -40418,7 +40316,9 @@ "value": { "name": "base-image", "image": "docker.io/b10/base-image:latest", - "docker_config": "{\"auths\":{\"https://index.docker.io/v1/\":{\"auth\":\"YjEwLXJldmlldzpkZW1vLW5vdC1hLXZhbGlkLXJlZ2lzdHJ5LXRva2Vu\"}}}" + "docker_config": "{\"auths\":{\"https://index.docker.io/v1/\":{\"auth\":\"YjEwLXJldmlldzpkZW1vLW5vdC1hLXZhbGlkLXJlZ2lzdHJ5LXRva2Vu\"}}}", + "memory": 16384, + "volume": 32768 }, "description": "Shows every request field. docker_config is serialized registry configuration with a deliberately invalid demonstration credential." },