From 0224080ca1ef257d0df93b33c78b947696dcc7f4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 18 Oct 2026 20:25:05 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- .../Commands/DefaultApiGroupCommand.g.cs | 2 + ...ettingsTeamsByTeamIdCommandApiCommand.g.cs | 25 +- ...itRoutesTeamSettingsCommandApiCommand.g.cs | 128 +++++ ...etRoutesTeamSettingsCommandApiCommand.g.cs | 67 +++ ...RouteTeamSpendLimitSettingV1OptionSet.g.cs | 27 + ....BasetenClient.EditRoutesTeamSettings.g.cs | 495 ++++++++++++++++++ ...n.BasetenClient.GetRoutesTeamSettings.g.cs | 443 ++++++++++++++++ ...IBasetenClient.EditRoutesTeamSettings.g.cs | 79 +++ ....IBasetenClient.GetRoutesTeamSettings.g.cs | 46 ++ .../Baseten.JsonSerializerContext.g.cs | 6 +- .../Baseten.JsonSerializerContextTypes.g.cs | 306 +++++------ ...odels.RouteTeamSettingsRequestV1.Json.g.cs | 141 +++++ ...ten.Models.RouteTeamSettingsRequestV1.g.cs | 48 ++ ...solvedRouteTeamSettingsRequestV1.Json.g.cs | 141 +++++ ...ateResolvedRouteTeamSettingsRequestV1.g.cs | 74 +++ src/libs/Baseten/openapi.yaml | 163 ++++++ 16 files changed, 2031 insertions(+), 160 deletions(-) create mode 100644 src/cli/Baseten.CLI/Commands/EditRoutesTeamSettingsCommandApiCommand.g.cs create mode 100644 src/cli/Baseten.CLI/Commands/GetRoutesTeamSettingsCommandApiCommand.g.cs create mode 100644 src/cli/Baseten.CLI/Commands/UpdateRouteTeamSpendLimitSettingV1OptionSet.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.BasetenClient.EditRoutesTeamSettings.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.BasetenClient.GetRoutesTeamSettings.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.IBasetenClient.EditRoutesTeamSettings.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.IBasetenClient.GetRoutesTeamSettings.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.RouteTeamSettingsRequestV1.Json.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.RouteTeamSettingsRequestV1.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.UpdateResolvedRouteTeamSettingsRequestV1.Json.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.UpdateResolvedRouteTeamSettingsRequestV1.g.cs diff --git a/src/cli/Baseten.CLI/Commands/DefaultApiGroupCommand.g.cs b/src/cli/Baseten.CLI/Commands/DefaultApiGroupCommand.g.cs index bea658c..4a1f6f9 100644 --- a/src/cli/Baseten.CLI/Commands/DefaultApiGroupCommand.g.cs +++ b/src/cli/Baseten.CLI/Commands/DefaultApiGroupCommand.g.cs @@ -122,6 +122,7 @@ public static Command Create() command.Subcommands.Add(EditRoutesConnectionsByConnectionIdCommandApiCommand.Create()); command.Subcommands.Add(EditRoutesSettingsTeamsByTeamIdCommandApiCommand.Create()); command.Subcommands.Add(EditRoutesSettingsTeamsByTeamIdUsersByUserIdCommandApiCommand.Create()); + command.Subcommands.Add(EditRoutesTeamSettingsCommandApiCommand.Create()); command.Subcommands.Add(EditTeamsByTeamIdEnvironmentGroupsByEnvNameCommandApiCommand.Create()); command.Subcommands.Add(EditTrainingCapacityCommandApiCommand.Create()); command.Subcommands.Add(EditTrainingProjectsByTrainingProjectIdJobsByTrainingJobIdCommandApiCommand.Create()); @@ -204,6 +205,7 @@ public static Command Create() command.Subcommands.Add(GetRoutesSettingsTeamsByTeamIdUsersCommandApiCommand.Create()); command.Subcommands.Add(GetRoutesSettingsTeamsByTeamIdUsersByUserIdCommandApiCommand.Create()); command.Subcommands.Add(GetRoutesSettingsUsersByUserIdTeamsCommandApiCommand.Create()); + command.Subcommands.Add(GetRoutesTeamSettingsCommandApiCommand.Create()); command.Subcommands.Add(GetRoutesUsageCommandApiCommand.Create()); command.Subcommands.Add(GetSecretsCommandApiCommand.Create()); command.Subcommands.Add(GetTeamsCommandApiCommand.Create()); diff --git a/src/cli/Baseten.CLI/Commands/EditRoutesSettingsTeamsByTeamIdCommandApiCommand.g.cs b/src/cli/Baseten.CLI/Commands/EditRoutesSettingsTeamsByTeamIdCommandApiCommand.g.cs index 628451e..09661d6 100644 --- a/src/cli/Baseten.CLI/Commands/EditRoutesSettingsTeamsByTeamIdCommandApiCommand.g.cs +++ b/src/cli/Baseten.CLI/Commands/EditRoutesSettingsTeamsByTeamIdCommandApiCommand.g.cs @@ -18,12 +18,7 @@ internal static partial class EditRoutesSettingsTeamsByTeamIdCommandApiCommand { Description = @"Harnesses to change; harnesses left out are unchanged. Pass null to clear every harness, so each role uses the team's default.", }; - - private static Option SpendLimit { get; } = new( - name: @"--spend-limit") - { - Description = @"Spend limit fields to change. Pass null to remove the team's limits; omit to leave them unchanged.", - }; + private static readonly UpdateRouteTeamSpendLimitSettingV1OptionSet SpendLimitOptions = UpdateRouteTeamSpendLimitSettingV1OptionSet.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.", @@ -68,8 +63,8 @@ public static Command Create(string? commandName = null) var command = new Command(commandName ?? @"edit-routes-settings-teams-by-team-id", @"Updates a team's route settings Changes only the fields in the request, all or nothing. Requires team admin, and organization admin to change the team-wide spend limit."); command.Arguments.Add(TeamId); - command.Options.Add(HarnessDefaults); - command.Options.Add(SpendLimit); + command.Options.Add(HarnessDefaults); command.Options.Add(SpendLimitOptions.PerMemberMonthlyLimitUsd); + command.Options.Add(SpendLimitOptions.TeamWideMonthlyLimitUsd); command.Options.Add(Input); command.Options.Add(RequestJson); command.Options.Add(RequestFile); @@ -97,7 +92,19 @@ await CliRuntime.RunAsync(async () => cancellationToken).ConfigureAwait(false); var teamId = parseResult.GetRequiredValue(TeamId); var harnessDefaults = CliRuntime.WasSpecified(parseResult, HarnessDefaults) ? parseResult.GetValue(HarnessDefaults) : (__requestBase is { } __HarnessDefaultsBaseValue ? __HarnessDefaultsBaseValue.HarnessDefaults : default); - var spendLimit = CliRuntime.WasSpecified(parseResult, SpendLimit) ? parseResult.GetValue(SpendLimit) : (__requestBase is { } __SpendLimitBaseValue ? __SpendLimitBaseValue.SpendLimit : default); + + var __SpendLimitBase = __requestBase is { } __SpendLimitBaseValue ? __SpendLimitBaseValue.SpendLimit : default; var spendLimitPerMemberMonthlyLimitUsd = CliRuntime.WasSpecified(parseResult, SpendLimitOptions.PerMemberMonthlyLimitUsd) ? parseResult.GetValue(SpendLimitOptions.PerMemberMonthlyLimitUsd) : (__SpendLimitBase is { } __SpendLimitperMemberMonthlyLimitUsdBaseValue ? __SpendLimitperMemberMonthlyLimitUsdBaseValue.PerMemberMonthlyLimitUsd : default); + var spendLimitTeamWideMonthlyLimitUsd = CliRuntime.WasSpecified(parseResult, SpendLimitOptions.TeamWideMonthlyLimitUsd) ? parseResult.GetValue(SpendLimitOptions.TeamWideMonthlyLimitUsd) : (__SpendLimitBase is { } __SpendLimitteamWideMonthlyLimitUsdBaseValue ? __SpendLimitteamWideMonthlyLimitUsdBaseValue.TeamWideMonthlyLimitUsd : default); + var __SpendLimitSpecified = CliRuntime.WasSpecified(parseResult, SpendLimitOptions.PerMemberMonthlyLimitUsd) || CliRuntime.WasSpecified(parseResult, SpendLimitOptions.TeamWideMonthlyLimitUsd); + var spendLimit = + __SpendLimitSpecified || __SpendLimitBase is not null + ? new global::Baseten.UpdateRouteTeamSpendLimitSettingV1 + { + PerMemberMonthlyLimitUsd = spendLimitPerMemberMonthlyLimitUsd, + TeamWideMonthlyLimitUsd = spendLimitTeamWideMonthlyLimitUsd, + + } + : __SpendLimitBase; using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); diff --git a/src/cli/Baseten.CLI/Commands/EditRoutesTeamSettingsCommandApiCommand.g.cs b/src/cli/Baseten.CLI/Commands/EditRoutesTeamSettingsCommandApiCommand.g.cs new file mode 100644 index 0000000..f7634ef --- /dev/null +++ b/src/cli/Baseten.CLI/Commands/EditRoutesTeamSettingsCommandApiCommand.g.cs @@ -0,0 +1,128 @@ +#nullable enable +#pragma warning disable CS0618 + +using System.CommandLine; + +namespace Baseten.CLI.Commands; + +internal static partial class EditRoutesTeamSettingsCommandApiCommand +{ + private static Option HarnessDefaults { get; } = new( + name: @"--harness-defaults") + { + Description = @"Harnesses to change; harnesses left out are unchanged. Pass null to clear every harness, so each role uses the team's default.", + }; + + private static Option TeamId { get; } = new( + name: @"--team-id") + { + Description = @"ID of the team. When omitted, the team you belong to; required when you belong to several.", + }; + private static readonly UpdateRouteTeamSpendLimitSettingV1OptionSet SpendLimitOptions = UpdateRouteTeamSpendLimitSettingV1OptionSet.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.RouteTeamSettingsV1 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.RouteTeamSettingsV1 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-team-settings", @"Updates a team's route settings by team ID or your only team +Changes only the fields in the request, all or nothing. Requires team admin, and organization admin to change the team-wide spend limit. The team comes from `team_id` instead of the path. Omit it to use the team you belong to; when you belong to several, the request fails with a 400."); + command.Options.Add(HarnessDefaults); + command.Options.Add(TeamId); command.Options.Add(SpendLimitOptions.PerMemberMonthlyLimitUsd); + command.Options.Add(SpendLimitOptions.TeamWideMonthlyLimitUsd); + 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 harnessDefaults = CliRuntime.WasSpecified(parseResult, HarnessDefaults) ? parseResult.GetValue(HarnessDefaults) : (__requestBase is { } __HarnessDefaultsBaseValue ? __HarnessDefaultsBaseValue.HarnessDefaults : default); + var teamId = CliRuntime.WasSpecified(parseResult, TeamId) ? parseResult.GetValue(TeamId) : (__requestBase is { } __TeamIdBaseValue ? __TeamIdBaseValue.TeamId : default); + + var __SpendLimitBase = __requestBase is { } __SpendLimitBaseValue ? __SpendLimitBaseValue.SpendLimit : default; var spendLimitPerMemberMonthlyLimitUsd = CliRuntime.WasSpecified(parseResult, SpendLimitOptions.PerMemberMonthlyLimitUsd) ? parseResult.GetValue(SpendLimitOptions.PerMemberMonthlyLimitUsd) : (__SpendLimitBase is { } __SpendLimitperMemberMonthlyLimitUsdBaseValue ? __SpendLimitperMemberMonthlyLimitUsdBaseValue.PerMemberMonthlyLimitUsd : default); + var spendLimitTeamWideMonthlyLimitUsd = CliRuntime.WasSpecified(parseResult, SpendLimitOptions.TeamWideMonthlyLimitUsd) ? parseResult.GetValue(SpendLimitOptions.TeamWideMonthlyLimitUsd) : (__SpendLimitBase is { } __SpendLimitteamWideMonthlyLimitUsdBaseValue ? __SpendLimitteamWideMonthlyLimitUsdBaseValue.TeamWideMonthlyLimitUsd : default); + var __SpendLimitSpecified = CliRuntime.WasSpecified(parseResult, SpendLimitOptions.PerMemberMonthlyLimitUsd) || CliRuntime.WasSpecified(parseResult, SpendLimitOptions.TeamWideMonthlyLimitUsd); + var spendLimit = + __SpendLimitSpecified || __SpendLimitBase is not null + ? new global::Baseten.UpdateRouteTeamSpendLimitSettingV1 + { + PerMemberMonthlyLimitUsd = spendLimitPerMemberMonthlyLimitUsd, + TeamWideMonthlyLimitUsd = spendLimitTeamWideMonthlyLimitUsd, + + } + : __SpendLimitBase; + using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); + + + var response = await client.EditRoutesTeamSettingsAsync( + harnessDefaults: harnessDefaults, + teamId: teamId, + 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/GetRoutesTeamSettingsCommandApiCommand.g.cs b/src/cli/Baseten.CLI/Commands/GetRoutesTeamSettingsCommandApiCommand.g.cs new file mode 100644 index 0000000..a02ee93 --- /dev/null +++ b/src/cli/Baseten.CLI/Commands/GetRoutesTeamSettingsCommandApiCommand.g.cs @@ -0,0 +1,67 @@ +#nullable enable +#pragma warning disable CS0618 + +using System.CommandLine; + +namespace Baseten.CLI.Commands; + +internal static partial class GetRoutesTeamSettingsCommandApiCommand +{ + private static Option TeamId { get; } = new( + name: @"--team-id") + { + Description = @"ID of the team. When omitted, the team you belong to; required when you belong to several.", + }; + + private static string FormatResponse(ParseResult parseResult, global::Baseten.RouteTeamSettingsV1 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.RouteTeamSettingsV1 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-team-settings", @"Gets a team's route settings by team ID or your only team +Returns the settings that apply to the team, including the default models for each coding harness and the team's spend limits. Any member who can invoke the team's routes can read them. The team comes from `team_id` instead of the path. Omit it to use the team you belong to; when you belong to several, the request fails with a 400."); + command.Options.Add(TeamId); + + + command.SetAction(async (ParseResult parseResult, CancellationToken cancellationToken) => + await CliRuntime.RunAsync(async () => + { + var teamId = parseResult.GetValue(TeamId); + using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); + + + var response = await client.GetRoutesTeamSettingsAsync( + 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/UpdateRouteTeamSpendLimitSettingV1OptionSet.g.cs b/src/cli/Baseten.CLI/Commands/UpdateRouteTeamSpendLimitSettingV1OptionSet.g.cs new file mode 100644 index 0000000..b749d9c --- /dev/null +++ b/src/cli/Baseten.CLI/Commands/UpdateRouteTeamSpendLimitSettingV1OptionSet.g.cs @@ -0,0 +1,27 @@ +#nullable enable + +using System.CommandLine; + +namespace Baseten.CLI.Commands; + +internal sealed record UpdateRouteTeamSpendLimitSettingV1OptionSet( + Option PerMemberMonthlyLimitUsd, + Option TeamWideMonthlyLimitUsd) +{ + public static UpdateRouteTeamSpendLimitSettingV1OptionSet Create(string? prefix = null) + { + var normalizedPrefix = string.IsNullOrWhiteSpace(prefix) + ? string.Empty + : prefix.Trim().Trim('-') + "-"; + return new UpdateRouteTeamSpendLimitSettingV1OptionSet( + PerMemberMonthlyLimitUsd: new Option($"--{normalizedPrefix}per-member-monthly-limit-usd") + { + Description = @"Spend limit in USD for each UTC calendar month that applies to each member's Grid spend in this team, unless the member has a limit of their own. Send null to remove it; omit to leave it unchanged.", + }, + TeamWideMonthlyLimitUsd: new Option($"--{normalizedPrefix}team-wide-monthly-limit-usd") + { + Description = @"Spend limit in USD for each UTC calendar month on the Grid spend of all members in this team together. 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.EditRoutesTeamSettings.g.cs b/src/libs/Baseten/Generated/Baseten.BasetenClient.EditRoutesTeamSettings.g.cs new file mode 100644 index 0000000..e78c197 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.BasetenClient.EditRoutesTeamSettings.g.cs @@ -0,0 +1,495 @@ + +#nullable enable + +namespace Baseten +{ + public partial class BasetenClient + { + + + private static readonly global::Baseten.EndPointSecurityRequirement s_EditRoutesTeamSettingsSecurityRequirement0 = + 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_EditRoutesTeamSettingsSecurityRequirements = + new global::Baseten.EndPointSecurityRequirement[] + { s_EditRoutesTeamSettingsSecurityRequirement0, + }; + partial void PrepareEditRoutesTeamSettingsArguments( + global::System.Net.Http.HttpClient httpClient, + global::Baseten.UpdateResolvedRouteTeamSettingsRequestV1 request); + partial void PrepareEditRoutesTeamSettingsRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::Baseten.UpdateResolvedRouteTeamSettingsRequestV1 request); + partial void ProcessEditRoutesTeamSettingsResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessEditRoutesTeamSettingsResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Updates a team's route settings by team ID or your only team
+ /// Changes only the fields in the request, all or nothing. Requires team admin, and organization admin to change the team-wide spend limit. The team comes from `team_id` instead of the path. Omit it to use the team you belong to; when you belong to several, the request fails with a 400. + ///
+ /// + /// 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/team_settings \
+ /// --header "Authorization: Bearer $BASETEN_API_KEY" \
+ /// --data '{
+ /// "harness_defaults": null,
+ /// "spend_limit": null,
+ /// "team_id": "abc1234"
+ /// }' + ///
+ public async global::System.Threading.Tasks.Task EditRoutesTeamSettingsAsync( + + global::Baseten.UpdateResolvedRouteTeamSettingsRequestV1 request, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await EditRoutesTeamSettingsAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Updates a team's route settings by team ID or your only team
+ /// Changes only the fields in the request, all or nothing. Requires team admin, and organization admin to change the team-wide spend limit. The team comes from `team_id` instead of the path. Omit it to use the team you belong to; when you belong to several, the request fails with a 400. + ///
+ /// + /// 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/team_settings \
+ /// --header "Authorization: Bearer $BASETEN_API_KEY" \
+ /// --data '{
+ /// "harness_defaults": null,
+ /// "spend_limit": null,
+ /// "team_id": "abc1234"
+ /// }' + ///
+ public async global::System.Threading.Tasks.Task> EditRoutesTeamSettingsAsResponseAsync( + + global::Baseten.UpdateResolvedRouteTeamSettingsRequestV1 request, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareEditRoutesTeamSettingsArguments( + httpClient: HttpClient, + request: request); + + + var __authorizations = global::Baseten.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_EditRoutesTeamSettingsSecurityRequirements, + operationName: "EditRoutesTeamSettingsAsync"); + + 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/team_settings", + 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); + PrepareEditRoutesTeamSettingsRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Baseten.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Baseten.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "editRoutesTeamSettings", + methodName: "EditRoutesTeamSettingsAsync", + pathTemplate: "\"/v1/routes/team_settings\"", + 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: "editRoutesTeamSettings", + methodName: "EditRoutesTeamSettingsAsync", + pathTemplate: "\"/v1/routes/team_settings\"", + 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: "editRoutesTeamSettings", + methodName: "EditRoutesTeamSettingsAsync", + pathTemplate: "\"/v1/routes/team_settings\"", + 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); + ProcessEditRoutesTeamSettingsResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Baseten.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Baseten.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "editRoutesTeamSettings", + methodName: "EditRoutesTeamSettingsAsync", + pathTemplate: "\"/v1/routes/team_settings\"", + 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: "editRoutesTeamSettings", + methodName: "EditRoutesTeamSettingsAsync", + pathTemplate: "\"/v1/routes/team_settings\"", + 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); + ProcessEditRoutesTeamSettingsResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Baseten.RouteTeamSettingsV1.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.RouteTeamSettingsV1.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 team's route settings by team ID or your only team
+ /// Changes only the fields in the request, all or nothing. Requires team admin, and organization admin to change the team-wide spend limit. The team comes from `team_id` instead of the path. Omit it to use the team you belong to; when you belong to several, the request fails with a 400. + ///
+ /// + /// Harnesses to change; harnesses left out are unchanged. Pass null to clear every harness, so each role uses the team's default.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// + /// + /// Spend limit fields to change. Pass null to remove the team's limits; omit to leave them unchanged.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// + /// + /// ID of the team. When omitted, the team you belong to; required when you belong to 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 + /// + public async global::System.Threading.Tasks.Task EditRoutesTeamSettingsAsync( + global::Baseten.UpdateRouteHarnessDefaultsV1? harnessDefaults = default, + global::Baseten.UpdateRouteTeamSpendLimitSettingV1? spendLimit = default, + string? teamId = default, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::Baseten.UpdateResolvedRouteTeamSettingsRequestV1 + { + HarnessDefaults = harnessDefaults, + SpendLimit = spendLimit, + TeamId = teamId, + }; + + return await EditRoutesTeamSettingsAsync( + request: __request, + requestOptions: requestOptions, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.BasetenClient.GetRoutesTeamSettings.g.cs b/src/libs/Baseten/Generated/Baseten.BasetenClient.GetRoutesTeamSettings.g.cs new file mode 100644 index 0000000..fb50d38 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.BasetenClient.GetRoutesTeamSettings.g.cs @@ -0,0 +1,443 @@ + +#nullable enable + +namespace Baseten +{ + public partial class BasetenClient + { + + + private static readonly global::Baseten.EndPointSecurityRequirement s_GetRoutesTeamSettingsSecurityRequirement0 = + 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_GetRoutesTeamSettingsSecurityRequirements = + new global::Baseten.EndPointSecurityRequirement[] + { s_GetRoutesTeamSettingsSecurityRequirement0, + }; + partial void PrepareGetRoutesTeamSettingsArguments( + global::System.Net.Http.HttpClient httpClient, + ref string? teamId); + partial void PrepareGetRoutesTeamSettingsRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string? teamId); + partial void ProcessGetRoutesTeamSettingsResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessGetRoutesTeamSettingsResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Gets a team's route settings by team ID or your only team
+ /// Returns the settings that apply to the team, including the default models for each coding harness and the team's spend limits. Any member who can invoke the team's routes can read them. The team comes from `team_id` instead of the path. Omit it to use the team you belong to; when you belong to several, the request fails with a 400. + ///
+ /// + /// 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/team_settings \
+ /// --header "Authorization: Bearer $BASETEN_API_KEY" + ///
+ public async global::System.Threading.Tasks.Task GetRoutesTeamSettingsAsync( + string? teamId = default, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetRoutesTeamSettingsAsResponseAsync( + teamId: teamId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Gets a team's route settings by team ID or your only team
+ /// Returns the settings that apply to the team, including the default models for each coding harness and the team's spend limits. Any member who can invoke the team's routes can read them. The team comes from `team_id` instead of the path. Omit it to use the team you belong to; when you belong to several, the request fails with a 400. + ///
+ /// + /// 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/team_settings \
+ /// --header "Authorization: Bearer $BASETEN_API_KEY" + ///
+ public async global::System.Threading.Tasks.Task> GetRoutesTeamSettingsAsResponseAsync( + string? teamId = default, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareGetRoutesTeamSettingsArguments( + httpClient: HttpClient, + teamId: ref teamId); + + + var __authorizations = global::Baseten.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_GetRoutesTeamSettingsSecurityRequirements, + operationName: "GetRoutesTeamSettingsAsync"); + + 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/team_settings", + 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); + PrepareGetRoutesTeamSettingsRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + teamId: teamId); + + 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: "getRoutesTeamSettings", + methodName: "GetRoutesTeamSettingsAsync", + pathTemplate: "\"/v1/routes/team_settings\"", + 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: "getRoutesTeamSettings", + methodName: "GetRoutesTeamSettingsAsync", + pathTemplate: "\"/v1/routes/team_settings\"", + 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: "getRoutesTeamSettings", + methodName: "GetRoutesTeamSettingsAsync", + pathTemplate: "\"/v1/routes/team_settings\"", + 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); + ProcessGetRoutesTeamSettingsResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Baseten.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Baseten.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "getRoutesTeamSettings", + methodName: "GetRoutesTeamSettingsAsync", + pathTemplate: "\"/v1/routes/team_settings\"", + 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: "getRoutesTeamSettings", + methodName: "GetRoutesTeamSettingsAsync", + pathTemplate: "\"/v1/routes/team_settings\"", + 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); + ProcessGetRoutesTeamSettingsResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Baseten.RouteTeamSettingsV1.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.RouteTeamSettingsV1.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.IBasetenClient.EditRoutesTeamSettings.g.cs b/src/libs/Baseten/Generated/Baseten.IBasetenClient.EditRoutesTeamSettings.g.cs new file mode 100644 index 0000000..79cc884 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.IBasetenClient.EditRoutesTeamSettings.g.cs @@ -0,0 +1,79 @@ +#nullable enable + +namespace Baseten +{ + public partial interface IBasetenClient + { + /// + /// Updates a team's route settings by team ID or your only team
+ /// Changes only the fields in the request, all or nothing. Requires team admin, and organization admin to change the team-wide spend limit. The team comes from `team_id` instead of the path. Omit it to use the team you belong to; when you belong to several, the request fails with a 400. + ///
+ /// + /// 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/team_settings \
+ /// --header "Authorization: Bearer $BASETEN_API_KEY" \
+ /// --data '{
+ /// "harness_defaults": null,
+ /// "spend_limit": null,
+ /// "team_id": "abc1234"
+ /// }' + ///
+ global::System.Threading.Tasks.Task EditRoutesTeamSettingsAsync( + + global::Baseten.UpdateResolvedRouteTeamSettingsRequestV1 request, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Updates a team's route settings by team ID or your only team
+ /// Changes only the fields in the request, all or nothing. Requires team admin, and organization admin to change the team-wide spend limit. The team comes from `team_id` instead of the path. Omit it to use the team you belong to; when you belong to several, the request fails with a 400. + ///
+ /// + /// 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/team_settings \
+ /// --header "Authorization: Bearer $BASETEN_API_KEY" \
+ /// --data '{
+ /// "harness_defaults": null,
+ /// "spend_limit": null,
+ /// "team_id": "abc1234"
+ /// }' + ///
+ global::System.Threading.Tasks.Task> EditRoutesTeamSettingsAsResponseAsync( + + global::Baseten.UpdateResolvedRouteTeamSettingsRequestV1 request, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Updates a team's route settings by team ID or your only team
+ /// Changes only the fields in the request, all or nothing. Requires team admin, and organization admin to change the team-wide spend limit. The team comes from `team_id` instead of the path. Omit it to use the team you belong to; when you belong to several, the request fails with a 400. + ///
+ /// + /// Harnesses to change; harnesses left out are unchanged. Pass null to clear every harness, so each role uses the team's default.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// + /// + /// Spend limit fields to change. Pass null to remove the team's limits; omit to leave them unchanged.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// + /// + /// ID of the team. When omitted, the team you belong to; required when you belong to 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 + /// + global::System.Threading.Tasks.Task EditRoutesTeamSettingsAsync( + global::Baseten.UpdateRouteHarnessDefaultsV1? harnessDefaults = default, + global::Baseten.UpdateRouteTeamSpendLimitSettingV1? spendLimit = default, + 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.GetRoutesTeamSettings.g.cs b/src/libs/Baseten/Generated/Baseten.IBasetenClient.GetRoutesTeamSettings.g.cs new file mode 100644 index 0000000..efce2e3 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.IBasetenClient.GetRoutesTeamSettings.g.cs @@ -0,0 +1,46 @@ +#nullable enable + +namespace Baseten +{ + public partial interface IBasetenClient + { + /// + /// Gets a team's route settings by team ID or your only team
+ /// Returns the settings that apply to the team, including the default models for each coding harness and the team's spend limits. Any member who can invoke the team's routes can read them. The team comes from `team_id` instead of the path. Omit it to use the team you belong to; when you belong to several, the request fails with a 400. + ///
+ /// + /// 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/team_settings \
+ /// --header "Authorization: Bearer $BASETEN_API_KEY" + ///
+ global::System.Threading.Tasks.Task GetRoutesTeamSettingsAsync( + string? teamId = default, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Gets a team's route settings by team ID or your only team
+ /// Returns the settings that apply to the team, including the default models for each coding harness and the team's spend limits. Any member who can invoke the team's routes can read them. The team comes from `team_id` instead of the path. Omit it to use the team you belong to; when you belong to several, the request fails with a 400. + ///
+ /// + /// 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/team_settings \
+ /// --header "Authorization: Bearer $BASETEN_API_KEY" + ///
+ global::System.Threading.Tasks.Task> GetRoutesTeamSettingsAsResponseAsync( + 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.JsonSerializerContext.g.cs b/src/libs/Baseten/Generated/Baseten.JsonSerializerContext.g.cs index 22ece70..aaad9d0 100644 --- a/src/libs/Baseten/Generated/Baseten.JsonSerializerContext.g.cs +++ b/src/libs/Baseten/Generated/Baseten.JsonSerializerContext.g.cs @@ -693,6 +693,8 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex [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.RouteTeamSettingsRequestV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.UpdateResolvedRouteTeamSettingsRequestV1))] [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))] @@ -1017,8 +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))] internal sealed partial class SourceGenerationContextChunk1 : global::System.Text.Json.Serialization.JsonSerializerContext { } @@ -1029,6 +1029,8 @@ 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))] diff --git a/src/libs/Baseten/Generated/Baseten.JsonSerializerContextTypes.g.cs b/src/libs/Baseten/Generated/Baseten.JsonSerializerContextTypes.g.cs index c968e30..a612076 100644 --- a/src/libs/Baseten/Generated/Baseten.JsonSerializerContextTypes.g.cs +++ b/src/libs/Baseten/Generated/Baseten.JsonSerializerContextTypes.g.cs @@ -2717,599 +2717,607 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::Baseten.RouteConnectionConfigAnthropicV1? Type671 { get; set; } + public global::Baseten.RouteTeamSettingsRequestV1? Type671 { get; set; } /// /// /// - public global::Baseten.RouteConnectionConfigOpenAIV1? Type672 { get; set; } + public global::Baseten.UpdateResolvedRouteTeamSettingsRequestV1? Type672 { get; set; } /// /// /// - public global::Baseten.RouteConnectionConfigXAIV1? Type673 { get; set; } + public global::Baseten.RouteConnectionConfigAnthropicV1? Type673 { get; set; } /// /// /// - public global::Baseten.RouteConnectionV1? Type674 { get; set; } + public global::Baseten.RouteConnectionConfigOpenAIV1? Type674 { get; set; } /// /// /// - public global::Baseten.Config? Type675 { get; set; } + public global::Baseten.RouteConnectionConfigXAIV1? Type675 { get; set; } /// /// /// - public global::Baseten.RouteConnectionV1ConfigDiscriminator? Type676 { get; set; } + public global::Baseten.RouteConnectionV1? Type676 { get; set; } /// /// /// - public global::Baseten.RouteConnectionV1ConfigDiscriminatorProvider? Type677 { get; set; } + public global::Baseten.Config? Type677 { get; set; } /// /// /// - public global::Baseten.RouteConnectionsResponseV1? Type678 { get; set; } + public global::Baseten.RouteConnectionV1ConfigDiscriminator? Type678 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type679 { get; set; } + public global::Baseten.RouteConnectionV1ConfigDiscriminatorProvider? Type679 { get; set; } /// /// /// - public global::Baseten.RouteConnectionsRequestV1? Type680 { get; set; } + public global::Baseten.RouteConnectionsResponseV1? Type680 { get; set; } /// /// /// - public global::Baseten.UpsertRouteConnectionConfigAnthropicV1? Type681 { get; set; } + public global::System.Collections.Generic.IList? Type681 { get; set; } /// /// /// - public global::Baseten.UpsertRouteConnectionConfigOpenAIV1? Type682 { get; set; } + public global::Baseten.RouteConnectionsRequestV1? Type682 { get; set; } /// /// /// - public global::Baseten.UpsertRouteConnectionConfigXAIV1? Type683 { get; set; } + public global::Baseten.UpsertRouteConnectionConfigAnthropicV1? Type683 { get; set; } /// /// /// - public global::Baseten.CreateRouteConnectionRequestV1? Type684 { get; set; } + public global::Baseten.UpsertRouteConnectionConfigOpenAIV1? Type684 { get; set; } /// /// /// - public global::Baseten.Config2? Type685 { get; set; } + public global::Baseten.UpsertRouteConnectionConfigXAIV1? Type685 { get; set; } /// /// /// - public global::Baseten.CreateRouteConnectionRequestV1ConfigDiscriminator? Type686 { get; set; } + public global::Baseten.CreateRouteConnectionRequestV1? Type686 { get; set; } /// /// /// - public global::Baseten.CreateRouteConnectionRequestV1ConfigDiscriminatorProvider? Type687 { get; set; } + public global::Baseten.Config2? Type687 { get; set; } /// /// /// - public global::Baseten.RouteConnectionTombstoneV1? Type688 { get; set; } + public global::Baseten.CreateRouteConnectionRequestV1ConfigDiscriminator? Type688 { get; set; } /// /// /// - public global::Baseten.UpdateRouteConnectionRequestV1? Type689 { get; set; } + public global::Baseten.CreateRouteConnectionRequestV1ConfigDiscriminatorProvider? Type689 { get; set; } /// /// /// - public global::Baseten.Config3? Type690 { get; set; } + public global::Baseten.RouteConnectionTombstoneV1? Type690 { get; set; } /// /// /// - public global::Baseten.UpdateRouteConnectionRequestV1ConfigDiscriminator? Type691 { get; set; } + public global::Baseten.UpdateRouteConnectionRequestV1? Type691 { get; set; } /// /// /// - public global::Baseten.UpdateRouteConnectionRequestV1ConfigDiscriminatorProvider? Type692 { get; set; } + public global::Baseten.Config3? Type692 { get; set; } /// /// /// - public global::Baseten.RouteTombstoneV1? Type693 { get; set; } + public global::Baseten.UpdateRouteConnectionRequestV1ConfigDiscriminator? Type693 { get; set; } /// /// /// - public global::Baseten.UpdateRouteRequestV1? Type694 { get; set; } + public global::Baseten.UpdateRouteConnectionRequestV1ConfigDiscriminatorProvider? Type694 { get; set; } /// /// /// - public global::Baseten.TargetVariant1? Type695 { get; set; } + public global::Baseten.RouteTombstoneV1? Type695 { get; set; } /// /// /// - public global::Baseten.UpdateRouteRequestV1TargetVariant1Discriminator? Type696 { get; set; } + public global::Baseten.UpdateRouteRequestV1? Type696 { get; set; } /// /// /// - public global::Baseten.UpdateRouteRequestV1TargetVariant1DiscriminatorType? Type697 { get; set; } + public global::Baseten.TargetVariant1? Type697 { get; set; } /// /// /// - public global::Baseten.EndpointTargetV1? Type698 { get; set; } + public global::Baseten.UpdateRouteRequestV1TargetVariant1Discriminator? Type698 { get; set; } /// /// /// - public global::Baseten.GatewayProvider? Type699 { get; set; } + public global::Baseten.UpdateRouteRequestV1TargetVariant1DiscriminatorType? Type699 { get; set; } /// /// /// - public global::Baseten.VertexTargetConfigV1? Type700 { get; set; } + public global::Baseten.EndpointTargetV1? Type700 { get; set; } /// /// /// - public global::Baseten.EndpointV1? Type701 { get; set; } + public global::Baseten.GatewayProvider? Type701 { get; set; } /// /// /// - public global::Baseten.SharedEndpointRegionV1? Type702 { get; set; } + public global::Baseten.VertexTargetConfigV1? Type702 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type703 { get; set; } + public global::Baseten.EndpointV1? Type703 { get; set; } /// /// /// - public global::Baseten.EndpointsResponseV1? Type704 { get; set; } + public global::Baseten.SharedEndpointRegionV1? Type704 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type705 { get; set; } + public global::System.Collections.Generic.IList? Type705 { get; set; } /// /// /// - public global::Baseten.EndpointTargetRequestV1? Type706 { get; set; } + public global::Baseten.EndpointsResponseV1? Type706 { get; set; } /// /// /// - public global::Baseten.CreateEndpointRequestV1? Type707 { get; set; } + public global::System.Collections.Generic.IList? Type707 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type708 { get; set; } + public global::Baseten.EndpointTargetRequestV1? Type708 { get; set; } /// /// /// - public global::Baseten.EndpointTombstoneV1? Type709 { get; set; } + public global::Baseten.CreateEndpointRequestV1? Type709 { get; set; } /// /// /// - public global::Baseten.UpdateEndpointRequestV1? Type710 { get; set; } + public global::System.Collections.Generic.IList? Type710 { get; set; } /// /// /// - public global::Baseten.EffectiveModelConfigV1? Type711 { get; set; } + public global::Baseten.EndpointTombstoneV1? Type711 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type712 { get; set; } + public global::Baseten.UpdateEndpointRequestV1? Type712 { get; set; } /// /// /// - public global::Baseten.EffectiveRateLimitV1? Type713 { get; set; } + public global::Baseten.EffectiveModelConfigV1? Type713 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type714 { get; set; } + public global::System.Collections.Generic.IList? Type714 { get; set; } /// /// /// - public global::Baseten.EffectiveUsageLimitV1? Type715 { get; set; } + public global::Baseten.EffectiveRateLimitV1? Type715 { get; set; } /// /// /// - public global::Baseten.UsageLimitUnitV1? Type716 { get; set; } + public global::System.Collections.Generic.IList? Type716 { get; set; } /// /// /// - public global::Baseten.GroupHierarchyV1? Type717 { get; set; } + public global::Baseten.EffectiveUsageLimitV1? Type717 { get; set; } /// /// /// - public global::Baseten.LimitEnforcementV1? Type718 { get; set; } + public global::Baseten.UsageLimitUnitV1? Type718 { get; set; } /// /// /// - public global::Baseten.GroupMetadataV1? Type719 { get; set; } + public global::Baseten.GroupHierarchyV1? Type719 { get; set; } /// /// /// - public global::Baseten.GroupV1? Type720 { get; set; } + public global::Baseten.LimitEnforcementV1? Type720 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type721 { get; set; } + public global::Baseten.GroupMetadataV1? Type721 { get; set; } /// /// /// - public global::Baseten.ModelConfigV1? Type722 { get; set; } + public global::Baseten.GroupV1? Type722 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type723 { get; set; } + public global::System.Collections.Generic.IList? Type723 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type724 { get; set; } + public global::Baseten.ModelConfigV1? Type724 { get; set; } /// /// /// - public global::Baseten.UsageLimitV1? Type725 { get; set; } + public global::System.Collections.Generic.IList? Type725 { get; set; } /// /// /// - public global::Baseten.GroupsResponseV1? Type726 { get; set; } + public global::System.Collections.Generic.IList? Type726 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type727 { get; set; } + public global::Baseten.UsageLimitV1? Type727 { get; set; } /// /// /// - public global::Baseten.CreateGroupHierarchyV1? Type728 { get; set; } + public global::Baseten.GroupsResponseV1? Type728 { get; set; } /// /// /// - public global::Baseten.CreateGroupRequestV1? Type729 { get; set; } + public global::System.Collections.Generic.IList? Type729 { get; set; } /// /// /// - public global::Baseten.UpdateGroupMetadataV1? Type730 { get; set; } + public global::Baseten.CreateGroupHierarchyV1? Type730 { get; set; } /// /// /// - public global::Baseten.UpdateGroupRequestV1? Type731 { get; set; } + public global::Baseten.CreateGroupRequestV1? Type731 { get; set; } /// /// /// - public global::Baseten.GatewayKeyInfoV1? Type732 { get; set; } + public global::Baseten.UpdateGroupMetadataV1? Type732 { get; set; } /// /// /// - public global::Baseten.KeysForGroupResponseV1? Type733 { get; set; } + public global::Baseten.UpdateGroupRequestV1? Type733 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type734 { get; set; } + public global::Baseten.GatewayKeyInfoV1? Type734 { get; set; } /// /// /// - public global::Baseten.CreateApiKeyForGroupRequestV1? Type735 { get; set; } + public global::Baseten.KeysForGroupResponseV1? Type735 { get; set; } /// /// /// - public global::Baseten.CreateApiKeyForGroupResponseV1? Type736 { get; set; } + public global::System.Collections.Generic.IList? Type736 { get; set; } /// /// /// - public global::Baseten.RegisterAPIKeyRequestV1? Type737 { get; set; } + public global::Baseten.CreateApiKeyForGroupRequestV1? Type737 { get; set; } /// /// /// - public global::Baseten.RegisterAPIKeyResponseV1? Type738 { get; set; } + public global::Baseten.CreateApiKeyForGroupResponseV1? Type738 { get; set; } /// /// /// - public global::Baseten.SandboxLogsV1? Type739 { get; set; } + public global::Baseten.RegisterAPIKeyRequestV1? Type739 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type740 { get; set; } + public global::Baseten.RegisterAPIKeyResponseV1? Type740 { get; set; } /// /// /// - public global::Baseten.SandboxLogEntryV1? Type741 { get; set; } + public global::Baseten.SandboxLogsV1? Type741 { get; set; } /// /// /// - public global::Baseten.SandboxMetricModeV1? Type742 { get; set; } + public global::System.Collections.Generic.IList? Type742 { get; set; } /// /// /// - public global::Baseten.SandboxMetricNameV1? Type743 { get; set; } + public global::Baseten.SandboxLogEntryV1? Type743 { get; set; } /// /// /// - public global::Baseten.SandboxMetricsV1? Type744 { get; set; } + public global::Baseten.SandboxMetricModeV1? Type744 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type745 { get; set; } + public global::Baseten.SandboxMetricNameV1? Type745 { get; set; } /// /// /// - public global::Baseten.SandboxMetricDescriptorV1? Type746 { get; set; } + public global::Baseten.SandboxMetricsV1? Type746 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type747 { get; set; } + public global::System.Collections.Generic.IList? Type747 { get; set; } /// /// /// - public global::Baseten.SandboxMetricValueSetV1? Type748 { get; set; } + public global::Baseten.SandboxMetricDescriptorV1? Type748 { get; set; } /// /// /// - public global::Baseten.SandboxMetricDescriptorV1UnitHint? Type749 { get; set; } + public global::System.Collections.Generic.IList? Type749 { get; set; } /// /// /// - public global::Baseten.SandboxMetricDescriptorV1Kind? Type750 { get; set; } + public global::Baseten.SandboxMetricValueSetV1? Type750 { get; set; } /// /// /// - public global::Baseten.GetSandboxConfigurationResponseV1? Type751 { get; set; } + public global::Baseten.SandboxMetricDescriptorV1UnitHint? Type751 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type752 { get; set; } + public global::Baseten.SandboxMetricDescriptorV1Kind? Type752 { get; set; } /// /// /// - public global::Baseten.SandboxRegionV1? Type753 { get; set; } + public global::Baseten.GetSandboxConfigurationResponseV1? Type753 { get; set; } /// /// /// - public global::Baseten.SandboxRegionV1InfoGeneration? Type754 { get; set; } + public global::System.Collections.Generic.IList? Type754 { get; set; } /// /// /// - public global::Baseten.SandboxImageBuildLogV1? Type755 { get; set; } + public global::Baseten.SandboxRegionV1? Type755 { get; set; } /// /// /// - public global::Baseten.SandboxImageBuildLogsResponseV1? Type756 { get; set; } + public global::Baseten.SandboxRegionV1InfoGeneration? Type756 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type757 { get; set; } + public global::Baseten.SandboxImageBuildLogV1? Type757 { get; set; } /// /// /// - public global::Baseten.SandboxLifecycleV1? Type758 { get; set; } + public global::Baseten.SandboxImageBuildLogsResponseV1? Type758 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type759 { get; set; } + public global::System.Collections.Generic.IList? Type759 { get; set; } /// /// /// - public global::Baseten.SandboxExpirationPolicyV1? Type760 { get; set; } + public global::Baseten.SandboxLifecycleV1? Type760 { get; set; } /// /// /// - public global::Baseten.SandboxTTLIdleExpirationPolicyV1? Type761 { get; set; } + public global::System.Collections.Generic.IList? Type761 { get; set; } /// /// /// - public global::Baseten.SandboxTTLMaxAgeExpirationPolicyV1? Type762 { get; set; } + public global::Baseten.SandboxExpirationPolicyV1? Type762 { get; set; } /// /// /// - public global::Baseten.SandboxDateExpirationPolicyV1? Type763 { get; set; } + public global::Baseten.SandboxTTLIdleExpirationPolicyV1? Type763 { get; set; } /// /// /// - public global::Baseten.SandboxExpirationPolicyV1Discriminator? Type764 { get; set; } + public global::Baseten.SandboxTTLMaxAgeExpirationPolicyV1? Type764 { get; set; } /// /// /// - public global::Baseten.SandboxExpirationPolicyV1DiscriminatorType? Type765 { get; set; } + public global::Baseten.SandboxDateExpirationPolicyV1? Type765 { get; set; } /// /// /// - public global::Baseten.SandboxTTLIdleExpirationPolicyV1Action? Type766 { get; set; } + public global::Baseten.SandboxExpirationPolicyV1Discriminator? Type766 { get; set; } /// /// /// - public global::Baseten.SandboxTTLIdleExpirationPolicyV1Type? Type767 { get; set; } + public global::Baseten.SandboxExpirationPolicyV1DiscriminatorType? Type767 { get; set; } /// /// /// - public global::Baseten.SandboxTTLMaxAgeExpirationPolicyV1Action? Type768 { get; set; } + public global::Baseten.SandboxTTLIdleExpirationPolicyV1Action? Type768 { get; set; } /// /// /// - public global::Baseten.SandboxTTLMaxAgeExpirationPolicyV1Type? Type769 { get; set; } + public global::Baseten.SandboxTTLIdleExpirationPolicyV1Type? Type769 { get; set; } /// /// /// - public global::Baseten.SandboxDateExpirationPolicyV1Action? Type770 { get; set; } + public global::Baseten.SandboxTTLMaxAgeExpirationPolicyV1Action? Type770 { get; set; } /// /// /// - public global::Baseten.SandboxDateExpirationPolicyV1Type? Type771 { get; set; } + public global::Baseten.SandboxTTLMaxAgeExpirationPolicyV1Type? Type771 { get; set; } /// /// /// - public global::Baseten.SandboxNetworkV1? Type772 { get; set; } + public global::Baseten.SandboxDateExpirationPolicyV1Action? Type772 { get; set; } /// /// /// - public global::Baseten.SandboxProxyConfigV1? Type773 { get; set; } + public global::Baseten.SandboxDateExpirationPolicyV1Type? Type773 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type774 { get; set; } + public global::Baseten.SandboxNetworkV1? Type774 { get; set; } /// /// /// - public global::Baseten.SandboxProxyTargetV1? Type775 { get; set; } + public global::Baseten.SandboxProxyConfigV1? Type775 { get; set; } /// /// /// - public global::Baseten.SandboxEnvV1? Type776 { get; set; } + public global::System.Collections.Generic.IList? Type776 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type777 { get; set; } + public global::Baseten.SandboxProxyTargetV1? Type777 { get; set; } /// /// /// - public global::Baseten.SandboxPortV1? Type778 { get; set; } + public global::Baseten.SandboxEnvV1? Type778 { get; set; } /// /// /// - public global::Baseten.SandboxPortV1Protocol? Type779 { get; set; } + public global::System.Collections.Generic.IList? Type779 { get; set; } /// /// /// - public global::Baseten.SandboxConfigurationV1? Type780 { get; set; } + public global::Baseten.SandboxPortV1? Type780 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type781 { get; set; } + public global::Baseten.SandboxPortV1Protocol? Type781 { get; set; } /// /// /// - public global::Baseten.CreateSandboxRequestV1? Type782 { get; set; } + public global::Baseten.SandboxConfigurationV1? Type782 { get; set; } /// /// /// - public global::Baseten.UpdateSandboxRequestV1? Type783 { get; set; } + public global::System.Collections.Generic.IList? Type783 { get; set; } /// /// /// - public global::Baseten.SandboxV1? Type784 { get; set; } + public global::Baseten.CreateSandboxRequestV1? Type784 { get; set; } /// /// /// - public global::Baseten.SandboxV1Variant2? Type785 { get; set; } + public global::Baseten.UpdateSandboxRequestV1? Type785 { get; set; } /// /// /// - public global::Baseten.SandboxStatusV1? Type786 { get; set; } + public global::Baseten.SandboxV1? Type786 { get; set; } /// /// /// - public global::Baseten.SandboxApiPaginationV1? Type787 { get; set; } + public global::Baseten.SandboxV1Variant2? Type787 { get; set; } /// /// /// - public global::Baseten.ListSandboxesResponseV1? Type788 { get; set; } + public global::Baseten.SandboxStatusV1? Type788 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type789 { get; set; } + public global::Baseten.SandboxApiPaginationV1? Type789 { get; set; } /// /// /// - public global::Baseten.ListSandboxImagesResponseV1? Type790 { get; set; } + public global::Baseten.ListSandboxesResponseV1? Type790 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type791 { get; set; } + public global::System.Collections.Generic.IList? Type791 { get; set; } /// /// /// - public global::Baseten.SandboxImageV1? Type792 { get; set; } + public global::Baseten.ListSandboxImagesResponseV1? Type792 { get; set; } /// /// /// - public global::Baseten.ListSandboxImageTagsResponseV1? Type793 { get; set; } + public global::System.Collections.Generic.IList? Type793 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type794 { get; set; } + public global::Baseten.SandboxImageV1? Type794 { get; set; } /// /// /// - public global::Baseten.SandboxImageTagV1? Type795 { get; set; } + public global::Baseten.ListSandboxImageTagsResponseV1? Type795 { get; set; } /// /// /// - public global::Baseten.SandboxImageStatusV1? Type796 { get; set; } + public global::System.Collections.Generic.IList? Type796 { get; set; } /// /// /// - public global::Baseten.PushSandboxImageRequestV1? Type797 { get; set; } + public global::Baseten.SandboxImageTagV1? Type797 { get; set; } /// /// /// - public global::Baseten.PushSandboxImageResponseV1? Type798 { get; set; } + public global::Baseten.SandboxImageStatusV1? Type798 { get; set; } /// /// /// - public global::Baseten.SandboxLibraryImageVolumeV1? Type799 { get; set; } + public global::Baseten.PushSandboxImageRequestV1? Type799 { get; set; } /// /// /// - public global::Baseten.SandboxLibraryImageCreationOptionsV1? Type800 { get; set; } + public global::Baseten.PushSandboxImageResponseV1? Type800 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type801 { get; set; } + public global::Baseten.SandboxLibraryImageVolumeV1? Type801 { get; set; } /// /// /// - public global::Baseten.SandboxLibraryImageV1? Type802 { get; set; } + public global::Baseten.SandboxLibraryImageCreationOptionsV1? Type802 { get; set; } /// /// /// - public global::Baseten.ListSandboxLibraryImagesResponseV1? Type803 { get; set; } + public global::System.Collections.Generic.IList? Type803 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type804 { get; set; } + public global::Baseten.SandboxLibraryImageV1? Type804 { get; set; } /// /// /// - public global::Baseten.CleanupSandboxImagesResponseV1? Type805 { get; set; } + public global::Baseten.ListSandboxLibraryImagesResponseV1? Type805 { get; set; } /// /// /// - public global::Baseten.SandboxPreviewStatusV1? Type806 { get; set; } + public global::System.Collections.Generic.IList? Type806 { get; set; } /// /// /// - public global::Baseten.SandboxPreviewConfigurationV1? Type807 { get; set; } + public global::Baseten.CleanupSandboxImagesResponseV1? Type807 { get; set; } /// /// /// - public global::Baseten.CreateSandboxPreviewRequestV1? Type808 { get; set; } + public global::Baseten.SandboxPreviewStatusV1? Type808 { get; set; } /// /// /// - public global::Baseten.CreateSandboxPreviewRequestV1Variant2? Type809 { get; set; } + public global::Baseten.SandboxPreviewConfigurationV1? Type809 { get; set; } /// /// /// - public global::Baseten.UpdateSandboxPreviewRequestV1? Type810 { get; set; } + public global::Baseten.CreateSandboxPreviewRequestV1? Type810 { get; set; } /// /// /// - public global::Baseten.SandboxPreviewV1? Type811 { get; set; } + public global::Baseten.CreateSandboxPreviewRequestV1Variant2? Type811 { get; set; } /// /// /// - public global::Baseten.SandboxPreviewV1Variant2? Type812 { get; set; } + public global::Baseten.UpdateSandboxPreviewRequestV1? Type812 { get; set; } /// /// /// - public global::Baseten.ListSandboxPreviewsResponseV1? Type813 { get; set; } + public global::Baseten.SandboxPreviewV1? Type813 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type814 { get; set; } + public global::Baseten.SandboxPreviewV1Variant2? Type814 { get; set; } /// /// /// - public global::Baseten.CreateSandboxPreviewTokenRequestV1? Type815 { get; set; } + public global::Baseten.ListSandboxPreviewsResponseV1? Type815 { get; set; } /// /// /// - public global::Baseten.SandboxPreviewTokenV1? Type816 { get; set; } + public global::System.Collections.Generic.IList? Type816 { get; set; } /// /// /// - public global::Baseten.ListSandboxPreviewTokensResponseV1? Type817 { get; set; } + public global::Baseten.CreateSandboxPreviewTokenRequestV1? Type817 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type818 { get; set; } + public global::Baseten.SandboxPreviewTokenV1? Type818 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type819 { get; set; } + public global::Baseten.ListSandboxPreviewTokensResponseV1? Type819 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type820 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type821 { get; set; } /// /// diff --git a/src/libs/Baseten/Generated/Baseten.Models.RouteTeamSettingsRequestV1.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.RouteTeamSettingsRequestV1.Json.g.cs new file mode 100644 index 0000000..4834a6f --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.RouteTeamSettingsRequestV1.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class RouteTeamSettingsRequestV1 + { + /// + /// 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.RouteTeamSettingsRequestV1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.RouteTeamSettingsRequestV1), + jsonSerializerContext) as global::Baseten.RouteTeamSettingsRequestV1; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Baseten.RouteTeamSettingsRequestV1? 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.RouteTeamSettingsRequestV1? 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.RouteTeamSettingsRequestV1), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.RouteTeamSettingsRequestV1; + } + + /// + /// 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.RouteTeamSettingsRequestV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.RouteTeamSettingsRequestV1.g.cs new file mode 100644 index 0000000..8d1f82f --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.RouteTeamSettingsRequestV1.g.cs @@ -0,0 +1,48 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// + /// + public sealed partial class RouteTeamSettingsRequestV1 + { + /// + /// ID of the team. When omitted, the team you belong to; required when you belong to several.
+ /// 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. When omitted, the team you belong to; required when you belong to several.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public RouteTeamSettingsRequestV1( + string? teamId) + { + this.TeamId = teamId; + } + + /// + /// Initializes a new instance of the class. + /// + public RouteTeamSettingsRequestV1() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.UpdateResolvedRouteTeamSettingsRequestV1.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.UpdateResolvedRouteTeamSettingsRequestV1.Json.g.cs new file mode 100644 index 0000000..c143d30 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.UpdateResolvedRouteTeamSettingsRequestV1.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class UpdateResolvedRouteTeamSettingsRequestV1 + { + /// + /// 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.UpdateResolvedRouteTeamSettingsRequestV1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.UpdateResolvedRouteTeamSettingsRequestV1), + jsonSerializerContext) as global::Baseten.UpdateResolvedRouteTeamSettingsRequestV1; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Baseten.UpdateResolvedRouteTeamSettingsRequestV1? 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.UpdateResolvedRouteTeamSettingsRequestV1? 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.UpdateResolvedRouteTeamSettingsRequestV1), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.UpdateResolvedRouteTeamSettingsRequestV1; + } + + /// + /// 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.UpdateResolvedRouteTeamSettingsRequestV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.UpdateResolvedRouteTeamSettingsRequestV1.g.cs new file mode 100644 index 0000000..96cbeef --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.UpdateResolvedRouteTeamSettingsRequestV1.g.cs @@ -0,0 +1,74 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// + /// + public sealed partial class UpdateResolvedRouteTeamSettingsRequestV1 + { + /// + /// Harnesses to change; harnesses left out are unchanged. Pass null to clear every harness, so each role uses the team's default.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("harness_defaults")] + public global::Baseten.UpdateRouteHarnessDefaultsV1? HarnessDefaults { get; set; } + + /// + /// Spend limit fields to change. Pass null to remove the team's limits; omit to leave them unchanged.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("spend_limit")] + public global::Baseten.UpdateRouteTeamSpendLimitSettingV1? SpendLimit { get; set; } + + /// + /// ID of the team. When omitted, the team you belong to; required when you belong to several.
+ /// 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. + /// + /// + /// Harnesses to change; harnesses left out are unchanged. Pass null to clear every harness, so each role uses the team's default.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// + /// + /// Spend limit fields to change. Pass null to remove the team's limits; omit to leave them unchanged.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// + /// + /// ID of the team. When omitted, the team you belong to; required when you belong to several.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public UpdateResolvedRouteTeamSettingsRequestV1( + global::Baseten.UpdateRouteHarnessDefaultsV1? harnessDefaults, + global::Baseten.UpdateRouteTeamSpendLimitSettingV1? spendLimit, + string? teamId) + { + this.HarnessDefaults = harnessDefaults; + this.SpendLimit = spendLimit; + this.TeamId = teamId; + } + + /// + /// Initializes a new instance of the class. + /// + public UpdateResolvedRouteTeamSettingsRequestV1() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/openapi.yaml b/src/libs/Baseten/openapi.yaml index 3fe3285..9d86cfc 100644 --- a/src/libs/Baseten/openapi.yaml +++ b/src/libs/Baseten/openapi.yaml @@ -10656,6 +10656,96 @@ "x-stability": "unstable" } }, + "/v1/routes/team_settings": { + "get": { + "summary": "Gets a team's route settings by team ID or your only team", + "x-codeSamples": [ + { + "lang": "bash", + "source": "curl --request GET \\\n--url https://api.baseten.co/v1/routes/team_settings \\\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/team_settings\"\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 team, including the default models for each coding harness and the team's spend limits. Any member who can invoke the team's routes can read them. The team comes from `team_id` instead of the path. Omit it to use the team you belong to; when you belong to several, the request fails with a 400.", + "parameters": [ + { + "name": "team_id", + "in": "query", + "required": false, + "description": "ID of the team. When omitted, the team you belong to; required when you belong to several.", + "schema": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "examples": [ + "abc1234" + ], + "title": "Team Id" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RouteTeamSettingsV1" + } + } + } + } + }, + "x-stability": "unstable" + }, + "patch": { + "summary": "Updates a team's route settings by team ID or your only team", + "x-codeSamples": [ + { + "lang": "bash", + "source": "curl --request PATCH \\\n--url https://api.baseten.co/v1/routes/team_settings \\\n--header \"Authorization: Bearer $BASETEN_API_KEY\" \\\n--data '{\n \"harness_defaults\": null,\n \"spend_limit\": null,\n \"team_id\": \"abc1234\"\n}'" + }, + { + "lang": "python", + "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"\")\nurl = \"https://api.baseten.co/v1/routes/team_settings\"\n\nheaders = {\"Authorization\": f\"Bearer {API_KEY}\"}\n\nresponse = requests.request(\n \"PATCH\",\n url,\n headers=headers,\n json={'harness_defaults': None, 'spend_limit': None, 'team_id': 'abc1234'}\n)\n\nprint(response.text)" + } + ], + "description": "Changes only the fields in the request, all or nothing. Requires team admin, and organization admin to change the team-wide spend limit. The team comes from `team_id` instead of the path. Omit it to use the team you belong to; when you belong to several, the request fails with a 400.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateResolvedRouteTeamSettingsRequestV1" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RouteTeamSettingsV1" + } + } + } + } + }, + "x-stability": "unstable" + } + }, "/v1/routes/connections": { "get": { "summary": "Lists connections", @@ -35841,6 +35931,79 @@ "title": "UpdateRouteUserSettingsRequestV1", "type": "object" }, + "RouteTeamSettingsRequestV1": { + "properties": { + "team_id": { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "ID of the team. When omitted, the team you belong to; required when you belong to several.", + "examples": [ + "abc1234" + ], + "title": "Team Id" + } + }, + "title": "RouteTeamSettingsRequestV1", + "type": "object" + }, + "UpdateResolvedRouteTeamSettingsRequestV1": { + "additionalProperties": false, + "minProperties": 1, + "properties": { + "harness_defaults": { + "anyOf": [ + { + "$ref": "#/components/schemas/UpdateRouteHarnessDefaultsV1" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Harnesses to change; harnesses left out are unchanged. Pass null to clear every harness, so each role uses the team's default.", + "x-null-distinct": true + }, + "spend_limit": { + "anyOf": [ + { + "$ref": "#/components/schemas/UpdateRouteTeamSpendLimitSettingV1" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Spend limit fields to change. Pass null to remove the team's limits; omit to leave them unchanged.", + "x-null-distinct": true + }, + "team_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "ID of the team. When omitted, the team you belong to; required when you belong to several.", + "examples": [ + "abc1234" + ], + "title": "Team Id" + } + }, + "title": "UpdateResolvedRouteTeamSettingsRequestV1", + "type": "object" + }, "RouteConnectionConfigAnthropicV1": { "properties": { "provider": {