From 0f865b59daed8c76ac45ea63aee83672673aeef8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 14 May 2026 19:54:31 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- ...ten.BasetenClient.CreateGatewayGroups.g.cs | 508 ++++++++ ...t.CreateGatewayGroupsByGroupIdApiKeys.g.cs | 495 ++++++++ ...GatewayGroupsByGroupIdApiKeysRegister.g.cs | 502 ++++++++ ...Baseten.BasetenClient.CreateLoopsRuns.g.cs | 4 +- ...ateTrainerSessionsBySessionIdTrainers.g.cs | 4 +- ...etenClient.EditGatewayGroupsByGroupId.g.cs | 507 ++++++++ ...aseten.BasetenClient.GetGatewayGroups.g.cs | 429 +++++++ ...setenClient.GetGatewayGroupsByGroupId.g.cs | 438 +++++++ ...ient.GetGatewayGroupsByGroupIdApiKeys.g.cs | 438 +++++++ ...yGroupsByGroupIdApiKeysByApiKeyPrefix.g.cs | 447 +++++++ ...en.BasetenClient.GetLoopsCapabilities.g.cs | 431 +++++++ ...en.IBasetenClient.CreateGatewayGroups.g.cs | 88 ++ ...t.CreateGatewayGroupsByGroupIdApiKeys.g.cs | 71 ++ ...GatewayGroupsByGroupIdApiKeysRegister.g.cs | 77 ++ ...aseten.IBasetenClient.CreateLoopsRuns.g.cs | 4 +- ...ateTrainerSessionsBySessionIdTrainers.g.cs | 4 +- ...etenClient.EditGatewayGroupsByGroupId.g.cs | 82 ++ ...seten.IBasetenClient.GetGatewayGroups.g.cs | 36 + ...setenClient.GetGatewayGroupsByGroupId.g.cs | 40 + ...ient.GetGatewayGroupsByGroupIdApiKeys.g.cs | 40 + ...yGroupsByGroupIdApiKeysByApiKeyPrefix.g.cs | 44 + ...n.IBasetenClient.GetLoopsCapabilities.g.cs | 38 + ...ten.JsonConverters.LimitEnforcementV1.g.cs | 53 + ...Converters.LimitEnforcementV1Nullable.g.cs | 60 + .../Baseten.JsonConverters.LimitTypeV1.g.cs | 53 + ...en.JsonConverters.LimitTypeV1Nullable.g.cs | 60 + ...aseten.JsonConverters.RateLimitUnitV1.g.cs | 53 + ...sonConverters.RateLimitUnitV1Nullable.g.cs | 60 + ...seten.JsonConverters.UsageLimitUnitV1.g.cs | 53 + ...onConverters.UsageLimitUnitV1Nullable.g.cs | 60 + .../Baseten.JsonSerializerContext.g.cs | 60 + .../Baseten.JsonSerializerContextTypes.g.cs | 362 ++++-- ...ls.CreateApiKeyForGroupRequestV1.Json.g.cs | 92 ++ ....Models.CreateApiKeyForGroupRequestV1.g.cs | 48 + ...reateApiKeyForGroupRequestV1Name.Json.g.cs | 92 ++ ...els.CreateApiKeyForGroupRequestV1Name.g.cs | 20 + ...s.CreateApiKeyForGroupResponseV1.Json.g.cs | 92 ++ ...Models.CreateApiKeyForGroupResponseV1.g.cs | 72 ++ ...eateApiKeyForGroupResponseV1Name.Json.g.cs | 92 ++ ...ls.CreateApiKeyForGroupResponseV1Name.g.cs | 20 + ...eten.Models.CreateGroupRequestV1.Json.g.cs | 92 ++ .../Baseten.Models.CreateGroupRequestV1.g.cs | 71 ++ ...aseten.Models.CreateLoopsRunRequestV1.g.cs | 8 +- ...CreateLoopsRunRequestV1MaxSeqLen.Json.g.cs | 92 ++ ...dels.CreateLoopsRunRequestV1MaxSeqLen.g.cs | 20 + ...n.Models.CreateTrainerServerRequestV1.g.cs | 8 +- ...eTrainerServerRequestV1MaxSeqLen.Json.g.cs | 92 ++ ...CreateTrainerServerRequestV1MaxSeqLen.g.cs | 20 + ...en.Models.EffectiveModelConfigV1.Json.g.cs | 92 ++ ...Baseten.Models.EffectiveModelConfigV1.g.cs | 65 + ...eten.Models.EffectiveRateLimitV1.Json.g.cs | 92 ++ .../Baseten.Models.EffectiveRateLimitV1.g.cs | 85 ++ ...ten.Models.EffectiveUsageLimitV1.Json.g.cs | 92 ++ .../Baseten.Models.EffectiveUsageLimitV1.g.cs | 84 ++ .../Baseten.Models.GatewayKeyInfoV1.Json.g.cs | 92 ++ .../Baseten.Models.GatewayKeyInfoV1.g.cs | 60 + ...eten.Models.GatewayKeyInfoV1Name.Json.g.cs | 92 ++ .../Baseten.Models.GatewayKeyInfoV1Name.g.cs | 20 + ...s.GetLoopsCapabilitiesResponseV1.Json.g.cs | 92 ++ ...Models.GetLoopsCapabilitiesResponseV1.g.cs | 47 + .../Baseten.Models.GroupHierarchyV1.Json.g.cs | 92 ++ .../Baseten.Models.GroupHierarchyV1.g.cs | 58 + ...ls.GroupHierarchyV1ParentGroupId.Json.g.cs | 92 ++ ....Models.GroupHierarchyV1ParentGroupId.g.cs | 19 + .../Baseten.Models.GroupMetadataV1.Json.g.cs | 92 ++ .../Baseten.Models.GroupMetadataV1.g.cs | 60 + ...seten.Models.GroupMetadataV1Name.Json.g.cs | 92 ++ .../Baseten.Models.GroupMetadataV1Name.g.cs | 20 + .../Baseten.Models.GroupV1.Json.g.cs | 92 ++ .../Generated/Baseten.Models.GroupV1.g.cs | 101 ++ .../Baseten.Models.GroupsResponseV1.Json.g.cs | 92 ++ .../Baseten.Models.GroupsResponseV1.g.cs | 59 + ...en.Models.KeysForGroupResponseV1.Json.g.cs | 92 ++ ...Baseten.Models.KeysForGroupResponseV1.g.cs | 59 + .../Baseten.Models.LimitEnforcementV1.g.cs | 51 + .../Generated/Baseten.Models.LimitTypeV1.g.cs | 51 + .../Baseten.Models.ModelConfigV1.Json.g.cs | 92 ++ .../Baseten.Models.ModelConfigV1.g.cs | 65 + ...eten.Models.PaginationResponseV1.Json.g.cs | 92 ++ .../Baseten.Models.PaginationResponseV1.g.cs | 60 + ...odels.PaginationResponseV1Cursor.Json.g.cs | 92 ++ ...ten.Models.PaginationResponseV1Cursor.g.cs | 20 + .../Baseten.Models.RateLimitUnitV1.g.cs | 51 + .../Baseten.Models.RateLimitV1.Json.g.cs | 92 ++ .../Generated/Baseten.Models.RateLimitV1.g.cs | 73 ++ ...n.Models.RegisterAPIKeyRequestV1.Json.g.cs | 92 ++ ...aseten.Models.RegisterAPIKeyRequestV1.g.cs | 60 + ...dels.RegisterAPIKeyRequestV1Name.Json.g.cs | 92 ++ ...en.Models.RegisterAPIKeyRequestV1Name.g.cs | 20 + ....Models.RegisterAPIKeyResponseV1.Json.g.cs | 92 ++ ...seten.Models.RegisterAPIKeyResponseV1.g.cs | 47 + .../Baseten.Models.SupportedModelV1.Json.g.cs | 92 ++ .../Baseten.Models.SupportedModelV1.g.cs | 59 + ...ten.Models.UpdateGroupMetadataV1.Json.g.cs | 92 ++ .../Baseten.Models.UpdateGroupMetadataV1.g.cs | 48 + ...Models.UpdateGroupMetadataV1Name.Json.g.cs | 92 ++ ...eten.Models.UpdateGroupMetadataV1Name.g.cs | 20 + ...eten.Models.UpdateGroupRequestV1.Json.g.cs | 92 ++ .../Baseten.Models.UpdateGroupRequestV1.g.cs | 61 + ...els.UpdateGroupRequestV1Metadata.Json.g.cs | 92 ++ ...n.Models.UpdateGroupRequestV1Metadata.g.cs | 20 + ...odels.UpdateGroupRequestV1Models.Json.g.cs | 92 ++ ...ten.Models.UpdateGroupRequestV1Models.g.cs | 20 + .../Baseten.Models.UsageLimitUnitV1.g.cs | 45 + .../Baseten.Models.UsageLimitV1.Json.g.cs | 92 ++ .../Baseten.Models.UsageLimitV1.g.cs | 72 ++ src/libs/Baseten/openapi.yaml | 1041 ++++++++++++++++- 107 files changed, 11515 insertions(+), 122 deletions(-) create mode 100644 src/libs/Baseten/Generated/Baseten.BasetenClient.CreateGatewayGroups.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.BasetenClient.CreateGatewayGroupsByGroupIdApiKeys.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.BasetenClient.CreateGatewayGroupsByGroupIdApiKeysRegister.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.BasetenClient.EditGatewayGroupsByGroupId.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.BasetenClient.GetGatewayGroups.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.BasetenClient.GetGatewayGroupsByGroupId.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.BasetenClient.GetGatewayGroupsByGroupIdApiKeys.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.BasetenClient.GetGatewayGroupsByGroupIdApiKeysByApiKeyPrefix.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.BasetenClient.GetLoopsCapabilities.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.IBasetenClient.CreateGatewayGroups.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.IBasetenClient.CreateGatewayGroupsByGroupIdApiKeys.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.IBasetenClient.CreateGatewayGroupsByGroupIdApiKeysRegister.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.IBasetenClient.EditGatewayGroupsByGroupId.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.IBasetenClient.GetGatewayGroups.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.IBasetenClient.GetGatewayGroupsByGroupId.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.IBasetenClient.GetGatewayGroupsByGroupIdApiKeys.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.IBasetenClient.GetGatewayGroupsByGroupIdApiKeysByApiKeyPrefix.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.IBasetenClient.GetLoopsCapabilities.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.JsonConverters.LimitEnforcementV1.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.JsonConverters.LimitEnforcementV1Nullable.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.JsonConverters.LimitTypeV1.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.JsonConverters.LimitTypeV1Nullable.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.JsonConverters.RateLimitUnitV1.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.JsonConverters.RateLimitUnitV1Nullable.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.JsonConverters.UsageLimitUnitV1.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.JsonConverters.UsageLimitUnitV1Nullable.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.CreateApiKeyForGroupRequestV1.Json.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.CreateApiKeyForGroupRequestV1.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.CreateApiKeyForGroupRequestV1Name.Json.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.CreateApiKeyForGroupRequestV1Name.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.CreateApiKeyForGroupResponseV1.Json.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.CreateApiKeyForGroupResponseV1.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.CreateApiKeyForGroupResponseV1Name.Json.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.CreateApiKeyForGroupResponseV1Name.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.CreateGroupRequestV1.Json.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.CreateGroupRequestV1.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.CreateLoopsRunRequestV1MaxSeqLen.Json.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.CreateLoopsRunRequestV1MaxSeqLen.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.CreateTrainerServerRequestV1MaxSeqLen.Json.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.CreateTrainerServerRequestV1MaxSeqLen.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.EffectiveModelConfigV1.Json.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.EffectiveModelConfigV1.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.EffectiveRateLimitV1.Json.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.EffectiveRateLimitV1.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.EffectiveUsageLimitV1.Json.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.EffectiveUsageLimitV1.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.GatewayKeyInfoV1.Json.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.GatewayKeyInfoV1.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.GatewayKeyInfoV1Name.Json.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.GatewayKeyInfoV1Name.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.GetLoopsCapabilitiesResponseV1.Json.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.GetLoopsCapabilitiesResponseV1.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.GroupHierarchyV1.Json.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.GroupHierarchyV1.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.GroupHierarchyV1ParentGroupId.Json.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.GroupHierarchyV1ParentGroupId.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.GroupMetadataV1.Json.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.GroupMetadataV1.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.GroupMetadataV1Name.Json.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.GroupMetadataV1Name.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.GroupV1.Json.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.GroupV1.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.GroupsResponseV1.Json.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.GroupsResponseV1.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.KeysForGroupResponseV1.Json.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.KeysForGroupResponseV1.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.LimitEnforcementV1.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.LimitTypeV1.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.ModelConfigV1.Json.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.ModelConfigV1.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.PaginationResponseV1.Json.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.PaginationResponseV1.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.PaginationResponseV1Cursor.Json.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.PaginationResponseV1Cursor.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.RateLimitUnitV1.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.RateLimitV1.Json.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.RateLimitV1.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.RegisterAPIKeyRequestV1.Json.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.RegisterAPIKeyRequestV1.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.RegisterAPIKeyRequestV1Name.Json.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.RegisterAPIKeyRequestV1Name.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.RegisterAPIKeyResponseV1.Json.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.RegisterAPIKeyResponseV1.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.SupportedModelV1.Json.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.SupportedModelV1.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.UpdateGroupMetadataV1.Json.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.UpdateGroupMetadataV1.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.UpdateGroupMetadataV1Name.Json.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.UpdateGroupMetadataV1Name.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.UpdateGroupRequestV1.Json.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.UpdateGroupRequestV1.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.UpdateGroupRequestV1Metadata.Json.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.UpdateGroupRequestV1Metadata.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.UpdateGroupRequestV1Models.Json.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.UpdateGroupRequestV1Models.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.UsageLimitUnitV1.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.UsageLimitV1.Json.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.UsageLimitV1.g.cs diff --git a/src/libs/Baseten/Generated/Baseten.BasetenClient.CreateGatewayGroups.g.cs b/src/libs/Baseten/Generated/Baseten.BasetenClient.CreateGatewayGroups.g.cs new file mode 100644 index 0000000..25d0cb0 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.BasetenClient.CreateGatewayGroups.g.cs @@ -0,0 +1,508 @@ + +#nullable enable + +namespace Baseten +{ + public partial class BasetenClient + { + + + private static readonly global::Baseten.EndPointSecurityRequirement s_CreateGatewayGroupsSecurityRequirement0 = + 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_CreateGatewayGroupsSecurityRequirements = + new global::Baseten.EndPointSecurityRequirement[] + { s_CreateGatewayGroupsSecurityRequirement0, + }; + partial void PrepareCreateGatewayGroupsArguments( + global::System.Net.Http.HttpClient httpClient, + global::Baseten.CreateGroupRequestV1 request); + partial void PrepareCreateGatewayGroupsRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::Baseten.CreateGroupRequestV1 request); + partial void ProcessCreateGatewayGroupsResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCreateGatewayGroupsResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Create a group
+ /// Creates a group and its endpoint configuration + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + /// + /// curl --request POST \
+ /// --url https://api.baseten.co/v1/gateway/groups \
+ /// --header "Authorization: Api-Key $BASETEN_API_KEY" \
+ /// --data '{
+ /// "metadata": {
+ /// "name": "Acme prod",
+ /// "external_entity_id": "cust_42"
+ /// },
+ /// "models": null,
+ /// "hierarchy": {
+ /// "limit_enforcement": "INDEPENDENT",
+ /// "parent_group_id": "abc123"
+ /// }
+ /// }' + ///
+ public async global::System.Threading.Tasks.Task CreateGatewayGroupsAsync( + + global::Baseten.CreateGroupRequestV1 request, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateGatewayGroupsAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Create a group
+ /// Creates a group and its endpoint configuration + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + /// + /// curl --request POST \
+ /// --url https://api.baseten.co/v1/gateway/groups \
+ /// --header "Authorization: Api-Key $BASETEN_API_KEY" \
+ /// --data '{
+ /// "metadata": {
+ /// "name": "Acme prod",
+ /// "external_entity_id": "cust_42"
+ /// },
+ /// "models": null,
+ /// "hierarchy": {
+ /// "limit_enforcement": "INDEPENDENT",
+ /// "parent_group_id": "abc123"
+ /// }
+ /// }' + ///
+ public async global::System.Threading.Tasks.Task> CreateGatewayGroupsAsResponseAsync( + + global::Baseten.CreateGroupRequestV1 request, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareCreateGatewayGroupsArguments( + httpClient: HttpClient, + request: request); + + + var __authorizations = global::Baseten.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_CreateGatewayGroupsSecurityRequirements, + operationName: "CreateGatewayGroupsAsync"); + + 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/gateway/groups", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Baseten.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + global::Baseten.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareCreateGatewayGroupsRequest( + 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: "createGatewayGroups", + methodName: "CreateGatewayGroupsAsync", + pathTemplate: "\"/v1/gateway/groups\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Baseten.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Baseten.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Baseten.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "createGatewayGroups", + methodName: "CreateGatewayGroupsAsync", + pathTemplate: "\"/v1/gateway/groups\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Baseten.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Baseten.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Baseten.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Baseten.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Baseten.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "createGatewayGroups", + methodName: "CreateGatewayGroupsAsync", + pathTemplate: "\"/v1/gateway/groups\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Baseten.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessCreateGatewayGroupsResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Baseten.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Baseten.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "createGatewayGroups", + methodName: "CreateGatewayGroupsAsync", + pathTemplate: "\"/v1/gateway/groups\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Baseten.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Baseten.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "createGatewayGroups", + methodName: "CreateGatewayGroupsAsync", + pathTemplate: "\"/v1/gateway/groups\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessCreateGatewayGroupsResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Baseten.GroupV1.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Baseten.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Baseten.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw new global::Baseten.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::Baseten.GroupV1.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Baseten.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Baseten.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw new global::Baseten.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + /// + /// Create a group
+ /// Creates a group and its endpoint configuration + ///
+ /// + /// Group identity + display metadata. + /// + /// + /// Per-model rate and usage limit configuration. Defines the group's complete model set. Must be non-empty. + /// + /// + /// Parent linkage and limit enforcement mode. Immutable after creation. + /// + /// 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 CreateGatewayGroupsAsync( + global::Baseten.GroupMetadataV1 metadata, + global::System.Collections.Generic.IList models, + global::Baseten.GroupHierarchyV1 hierarchy, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::Baseten.CreateGroupRequestV1 + { + Metadata = metadata, + Models = models, + Hierarchy = hierarchy, + }; + + return await CreateGatewayGroupsAsync( + request: __request, + requestOptions: requestOptions, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.BasetenClient.CreateGatewayGroupsByGroupIdApiKeys.g.cs b/src/libs/Baseten/Generated/Baseten.BasetenClient.CreateGatewayGroupsByGroupIdApiKeys.g.cs new file mode 100644 index 0000000..59f4390 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.BasetenClient.CreateGatewayGroupsByGroupIdApiKeys.g.cs @@ -0,0 +1,495 @@ + +#nullable enable + +namespace Baseten +{ + public partial class BasetenClient + { + + + private static readonly global::Baseten.EndPointSecurityRequirement s_CreateGatewayGroupsByGroupIdApiKeysSecurityRequirement0 = + 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_CreateGatewayGroupsByGroupIdApiKeysSecurityRequirements = + new global::Baseten.EndPointSecurityRequirement[] + { s_CreateGatewayGroupsByGroupIdApiKeysSecurityRequirement0, + }; + partial void PrepareCreateGatewayGroupsByGroupIdApiKeysArguments( + global::System.Net.Http.HttpClient httpClient, + ref string groupId, + global::Baseten.CreateApiKeyForGroupRequestV1 request); + partial void PrepareCreateGatewayGroupsByGroupIdApiKeysRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string groupId, + global::Baseten.CreateApiKeyForGroupRequestV1 request); + partial void ProcessCreateGatewayGroupsByGroupIdApiKeysResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCreateGatewayGroupsByGroupIdApiKeysResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Create an API key for a group
+ /// Creates a new API key for the given group + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + /// + /// curl --request POST \
+ /// --url https://api.baseten.co/v1/gateway/groups/{group_id}/api_keys \
+ /// --header "Authorization: Api-Key $BASETEN_API_KEY" \
+ /// --data '{
+ /// "name": "prod-key-1"
+ /// }' + ///
+ public async global::System.Threading.Tasks.Task CreateGatewayGroupsByGroupIdApiKeysAsync( + string groupId, + + global::Baseten.CreateApiKeyForGroupRequestV1 request, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateGatewayGroupsByGroupIdApiKeysAsResponseAsync( + groupId: groupId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Create an API key for a group
+ /// Creates a new API key for the given group + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + /// + /// curl --request POST \
+ /// --url https://api.baseten.co/v1/gateway/groups/{group_id}/api_keys \
+ /// --header "Authorization: Api-Key $BASETEN_API_KEY" \
+ /// --data '{
+ /// "name": "prod-key-1"
+ /// }' + ///
+ public async global::System.Threading.Tasks.Task> CreateGatewayGroupsByGroupIdApiKeysAsResponseAsync( + string groupId, + + global::Baseten.CreateApiKeyForGroupRequestV1 request, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareCreateGatewayGroupsByGroupIdApiKeysArguments( + httpClient: HttpClient, + groupId: ref groupId, + request: request); + + + var __authorizations = global::Baseten.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_CreateGatewayGroupsByGroupIdApiKeysSecurityRequirements, + operationName: "CreateGatewayGroupsByGroupIdApiKeysAsync"); + + 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/gateway/groups/{groupId}/api_keys", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Baseten.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + global::Baseten.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareCreateGatewayGroupsByGroupIdApiKeysRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + groupId: groupId!, + 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: "createGatewayGroupsByGroupIdApiKeys", + methodName: "CreateGatewayGroupsByGroupIdApiKeysAsync", + pathTemplate: "$\"/v1/gateway/groups/{groupId}/api_keys\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Baseten.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Baseten.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Baseten.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "createGatewayGroupsByGroupIdApiKeys", + methodName: "CreateGatewayGroupsByGroupIdApiKeysAsync", + pathTemplate: "$\"/v1/gateway/groups/{groupId}/api_keys\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Baseten.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Baseten.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Baseten.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Baseten.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Baseten.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "createGatewayGroupsByGroupIdApiKeys", + methodName: "CreateGatewayGroupsByGroupIdApiKeysAsync", + pathTemplate: "$\"/v1/gateway/groups/{groupId}/api_keys\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Baseten.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessCreateGatewayGroupsByGroupIdApiKeysResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Baseten.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Baseten.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "createGatewayGroupsByGroupIdApiKeys", + methodName: "CreateGatewayGroupsByGroupIdApiKeysAsync", + pathTemplate: "$\"/v1/gateway/groups/{groupId}/api_keys\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Baseten.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Baseten.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "createGatewayGroupsByGroupIdApiKeys", + methodName: "CreateGatewayGroupsByGroupIdApiKeysAsync", + pathTemplate: "$\"/v1/gateway/groups/{groupId}/api_keys\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessCreateGatewayGroupsByGroupIdApiKeysResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Baseten.CreateApiKeyForGroupResponseV1.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Baseten.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Baseten.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw new global::Baseten.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::Baseten.CreateApiKeyForGroupResponseV1.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Baseten.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Baseten.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw new global::Baseten.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + /// + /// Create an API key for a group
+ /// Creates a new API key for the given group + ///
+ /// + /// + /// Optional display name for the new key.
+ /// 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 CreateGatewayGroupsByGroupIdApiKeysAsync( + string groupId, + string? name = default, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::Baseten.CreateApiKeyForGroupRequestV1 + { + Name = name, + }; + + return await CreateGatewayGroupsByGroupIdApiKeysAsync( + groupId: groupId, + request: __request, + requestOptions: requestOptions, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.BasetenClient.CreateGatewayGroupsByGroupIdApiKeysRegister.g.cs b/src/libs/Baseten/Generated/Baseten.BasetenClient.CreateGatewayGroupsByGroupIdApiKeysRegister.g.cs new file mode 100644 index 0000000..03739f6 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.BasetenClient.CreateGatewayGroupsByGroupIdApiKeysRegister.g.cs @@ -0,0 +1,502 @@ + +#nullable enable + +namespace Baseten +{ + public partial class BasetenClient + { + + + private static readonly global::Baseten.EndPointSecurityRequirement s_CreateGatewayGroupsByGroupIdApiKeysRegisterSecurityRequirement0 = + 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_CreateGatewayGroupsByGroupIdApiKeysRegisterSecurityRequirements = + new global::Baseten.EndPointSecurityRequirement[] + { s_CreateGatewayGroupsByGroupIdApiKeysRegisterSecurityRequirement0, + }; + partial void PrepareCreateGatewayGroupsByGroupIdApiKeysRegisterArguments( + global::System.Net.Http.HttpClient httpClient, + ref string groupId, + global::Baseten.RegisterAPIKeyRequestV1 request); + partial void PrepareCreateGatewayGroupsByGroupIdApiKeysRegisterRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string groupId, + global::Baseten.RegisterAPIKeyRequestV1 request); + partial void ProcessCreateGatewayGroupsByGroupIdApiKeysRegisterResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCreateGatewayGroupsByGroupIdApiKeysRegisterResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Register an API key for a group
+ /// Registers a Gateway API key with provided value, name. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + /// + /// curl --request POST \
+ /// --url https://api.baseten.co/v1/gateway/groups/{group_id}/api_keys/register \
+ /// --header "Authorization: Api-Key $BASETEN_API_KEY" \
+ /// --data '{
+ /// "name": "my-model-api-key",
+ /// "key": "my-secure-api-key-value"
+ /// }' + ///
+ public async global::System.Threading.Tasks.Task CreateGatewayGroupsByGroupIdApiKeysRegisterAsync( + string groupId, + + global::Baseten.RegisterAPIKeyRequestV1 request, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateGatewayGroupsByGroupIdApiKeysRegisterAsResponseAsync( + groupId: groupId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Register an API key for a group
+ /// Registers a Gateway API key with provided value, name. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + /// + /// curl --request POST \
+ /// --url https://api.baseten.co/v1/gateway/groups/{group_id}/api_keys/register \
+ /// --header "Authorization: Api-Key $BASETEN_API_KEY" \
+ /// --data '{
+ /// "name": "my-model-api-key",
+ /// "key": "my-secure-api-key-value"
+ /// }' + ///
+ public async global::System.Threading.Tasks.Task> CreateGatewayGroupsByGroupIdApiKeysRegisterAsResponseAsync( + string groupId, + + global::Baseten.RegisterAPIKeyRequestV1 request, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareCreateGatewayGroupsByGroupIdApiKeysRegisterArguments( + httpClient: HttpClient, + groupId: ref groupId, + request: request); + + + var __authorizations = global::Baseten.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_CreateGatewayGroupsByGroupIdApiKeysRegisterSecurityRequirements, + operationName: "CreateGatewayGroupsByGroupIdApiKeysRegisterAsync"); + + 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/gateway/groups/{groupId}/api_keys/register", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Baseten.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + global::Baseten.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareCreateGatewayGroupsByGroupIdApiKeysRegisterRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + groupId: groupId!, + 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: "createGatewayGroupsByGroupIdApiKeysRegister", + methodName: "CreateGatewayGroupsByGroupIdApiKeysRegisterAsync", + pathTemplate: "$\"/v1/gateway/groups/{groupId}/api_keys/register\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Baseten.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Baseten.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Baseten.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "createGatewayGroupsByGroupIdApiKeysRegister", + methodName: "CreateGatewayGroupsByGroupIdApiKeysRegisterAsync", + pathTemplate: "$\"/v1/gateway/groups/{groupId}/api_keys/register\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Baseten.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Baseten.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Baseten.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Baseten.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Baseten.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "createGatewayGroupsByGroupIdApiKeysRegister", + methodName: "CreateGatewayGroupsByGroupIdApiKeysRegisterAsync", + pathTemplate: "$\"/v1/gateway/groups/{groupId}/api_keys/register\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Baseten.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessCreateGatewayGroupsByGroupIdApiKeysRegisterResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Baseten.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Baseten.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "createGatewayGroupsByGroupIdApiKeysRegister", + methodName: "CreateGatewayGroupsByGroupIdApiKeysRegisterAsync", + pathTemplate: "$\"/v1/gateway/groups/{groupId}/api_keys/register\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Baseten.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Baseten.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "createGatewayGroupsByGroupIdApiKeysRegister", + methodName: "CreateGatewayGroupsByGroupIdApiKeysRegisterAsync", + pathTemplate: "$\"/v1/gateway/groups/{groupId}/api_keys/register\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessCreateGatewayGroupsByGroupIdApiKeysRegisterResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Baseten.RegisterAPIKeyResponseV1.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Baseten.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Baseten.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw new global::Baseten.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::Baseten.RegisterAPIKeyResponseV1.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Baseten.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Baseten.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw new global::Baseten.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + /// + /// Register an API key for a group
+ /// Registers a Gateway API key with provided value, name. + ///
+ /// + /// + /// Optional name for the Model API key
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// + /// + /// Value of the API key to register + /// + /// 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 CreateGatewayGroupsByGroupIdApiKeysRegisterAsync( + string groupId, + string key, + string? name = default, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::Baseten.RegisterAPIKeyRequestV1 + { + Name = name, + Key = key, + }; + + return await CreateGatewayGroupsByGroupIdApiKeysRegisterAsync( + groupId: groupId, + request: __request, + requestOptions: requestOptions, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.BasetenClient.CreateLoopsRuns.g.cs b/src/libs/Baseten/Generated/Baseten.BasetenClient.CreateLoopsRuns.g.cs index 26f399a..e8a61e9 100644 --- a/src/libs/Baseten/Generated/Baseten.BasetenClient.CreateLoopsRuns.g.cs +++ b/src/libs/Baseten/Generated/Baseten.BasetenClient.CreateLoopsRuns.g.cs @@ -476,8 +476,8 @@ partial void ProcessCreateLoopsRunsResponseContent( /// Base model ID (e.g. 'Qwen/Qwen3-8B'). /// /// - /// Maximum prompt length (in tokens) the run must handle. Set this to the longest training example you plan to send.
- /// Default Value: 131072 + /// Maximum prompt length (in tokens) the run must handle. Set this to the longest training example you plan to send. Defaults to the maximum supported by the model configuration.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 /// /// /// LoRA rank.
diff --git a/src/libs/Baseten/Generated/Baseten.BasetenClient.CreateTrainerSessionsBySessionIdTrainers.g.cs b/src/libs/Baseten/Generated/Baseten.BasetenClient.CreateTrainerSessionsBySessionIdTrainers.g.cs index 91dd322..eb6d66d 100644 --- a/src/libs/Baseten/Generated/Baseten.BasetenClient.CreateTrainerSessionsBySessionIdTrainers.g.cs +++ b/src/libs/Baseten/Generated/Baseten.BasetenClient.CreateTrainerSessionsBySessionIdTrainers.g.cs @@ -481,8 +481,8 @@ partial void ProcessCreateTrainerSessionsBySessionIdTrainersResponseContent( /// Base model ID (e.g. 'Qwen/Qwen3-8B'). /// /// - /// Maximum sequence length for training.
- /// Default Value: 131072 + /// Maximum sequence length for training. Defaults to the maximum supported by the model configuration.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 /// /// /// LoRA rank.
diff --git a/src/libs/Baseten/Generated/Baseten.BasetenClient.EditGatewayGroupsByGroupId.g.cs b/src/libs/Baseten/Generated/Baseten.BasetenClient.EditGatewayGroupsByGroupId.g.cs new file mode 100644 index 0000000..80130ad --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.BasetenClient.EditGatewayGroupsByGroupId.g.cs @@ -0,0 +1,507 @@ + +#nullable enable + +namespace Baseten +{ + public partial class BasetenClient + { + + + private static readonly global::Baseten.EndPointSecurityRequirement s_EditGatewayGroupsByGroupIdSecurityRequirement0 = + 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_EditGatewayGroupsByGroupIdSecurityRequirements = + new global::Baseten.EndPointSecurityRequirement[] + { s_EditGatewayGroupsByGroupIdSecurityRequirement0, + }; + partial void PrepareEditGatewayGroupsByGroupIdArguments( + global::System.Net.Http.HttpClient httpClient, + ref string groupId, + global::Baseten.UpdateGroupRequestV1 request); + partial void PrepareEditGatewayGroupsByGroupIdRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string groupId, + global::Baseten.UpdateGroupRequestV1 request); + partial void ProcessEditGatewayGroupsByGroupIdResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessEditGatewayGroupsByGroupIdResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Update a group
+ /// Updates the group's mutable fields + ///
+ /// + /// + /// 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/gateway/groups/{group_id} \
+ /// --header "Authorization: Api-Key $BASETEN_API_KEY" \
+ /// --data '{
+ /// "metadata": {
+ /// "name": "Acme Prod"
+ /// },
+ /// "models": null
+ /// }' + ///
+ public async global::System.Threading.Tasks.Task EditGatewayGroupsByGroupIdAsync( + string groupId, + + global::Baseten.UpdateGroupRequestV1 request, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await EditGatewayGroupsByGroupIdAsResponseAsync( + groupId: groupId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Update a group
+ /// Updates the group's mutable fields + ///
+ /// + /// + /// 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/gateway/groups/{group_id} \
+ /// --header "Authorization: Api-Key $BASETEN_API_KEY" \
+ /// --data '{
+ /// "metadata": {
+ /// "name": "Acme Prod"
+ /// },
+ /// "models": null
+ /// }' + ///
+ public async global::System.Threading.Tasks.Task> EditGatewayGroupsByGroupIdAsResponseAsync( + string groupId, + + global::Baseten.UpdateGroupRequestV1 request, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareEditGatewayGroupsByGroupIdArguments( + httpClient: HttpClient, + groupId: ref groupId, + request: request); + + + var __authorizations = global::Baseten.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_EditGatewayGroupsByGroupIdSecurityRequirements, + operationName: "EditGatewayGroupsByGroupIdAsync"); + + 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/gateway/groups/{groupId}", + 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); + PrepareEditGatewayGroupsByGroupIdRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + groupId: groupId!, + 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: "editGatewayGroupsByGroupId", + methodName: "EditGatewayGroupsByGroupIdAsync", + pathTemplate: "$\"/v1/gateway/groups/{groupId}\"", + httpMethod: "PATCH", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Baseten.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Baseten.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Baseten.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "editGatewayGroupsByGroupId", + methodName: "EditGatewayGroupsByGroupIdAsync", + pathTemplate: "$\"/v1/gateway/groups/{groupId}\"", + httpMethod: "PATCH", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Baseten.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Baseten.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Baseten.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Baseten.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Baseten.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "editGatewayGroupsByGroupId", + methodName: "EditGatewayGroupsByGroupIdAsync", + pathTemplate: "$\"/v1/gateway/groups/{groupId}\"", + httpMethod: "PATCH", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Baseten.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessEditGatewayGroupsByGroupIdResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Baseten.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Baseten.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "editGatewayGroupsByGroupId", + methodName: "EditGatewayGroupsByGroupIdAsync", + pathTemplate: "$\"/v1/gateway/groups/{groupId}\"", + httpMethod: "PATCH", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Baseten.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Baseten.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "editGatewayGroupsByGroupId", + methodName: "EditGatewayGroupsByGroupIdAsync", + pathTemplate: "$\"/v1/gateway/groups/{groupId}\"", + httpMethod: "PATCH", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessEditGatewayGroupsByGroupIdResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Baseten.GroupV1.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Baseten.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Baseten.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw new global::Baseten.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::Baseten.GroupV1.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Baseten.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Baseten.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw new global::Baseten.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + /// + /// Update a group
+ /// Updates the group's mutable fields + ///
+ /// + /// + /// Mutable group metadata.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// + /// + /// Per-model rate and usage limit configuration.
+ /// 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 EditGatewayGroupsByGroupIdAsync( + string groupId, + global::Baseten.UpdateGroupMetadataV1? metadata = default, + global::System.Collections.Generic.IList? models = default, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::Baseten.UpdateGroupRequestV1 + { + Metadata = metadata, + Models = models, + }; + + return await EditGatewayGroupsByGroupIdAsync( + groupId: groupId, + request: __request, + requestOptions: requestOptions, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.BasetenClient.GetGatewayGroups.g.cs b/src/libs/Baseten/Generated/Baseten.BasetenClient.GetGatewayGroups.g.cs new file mode 100644 index 0000000..54ce013 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.BasetenClient.GetGatewayGroups.g.cs @@ -0,0 +1,429 @@ + +#nullable enable + +namespace Baseten +{ + public partial class BasetenClient + { + + + private static readonly global::Baseten.EndPointSecurityRequirement s_GetGatewayGroupsSecurityRequirement0 = + 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_GetGatewayGroupsSecurityRequirements = + new global::Baseten.EndPointSecurityRequirement[] + { s_GetGatewayGroupsSecurityRequirement0, + }; + partial void PrepareGetGatewayGroupsArguments( + global::System.Net.Http.HttpClient httpClient); + partial void PrepareGetGatewayGroupsRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage); + partial void ProcessGetGatewayGroupsResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessGetGatewayGroupsResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// List groups + /// + /// 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/gateway/groups \
+ /// --header "Authorization: Api-Key $BASETEN_API_KEY" + ///
+ public async global::System.Threading.Tasks.Task GetGatewayGroupsAsync( + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetGatewayGroupsAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List groups + /// + /// 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/gateway/groups \
+ /// --header "Authorization: Api-Key $BASETEN_API_KEY" + ///
+ public async global::System.Threading.Tasks.Task> GetGatewayGroupsAsResponseAsync( + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareGetGatewayGroupsArguments( + httpClient: HttpClient); + + + var __authorizations = global::Baseten.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_GetGatewayGroupsSecurityRequirements, + operationName: "GetGatewayGroupsAsync"); + + 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/gateway/groups", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Baseten.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + global::Baseten.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareGetGatewayGroupsRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Baseten.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Baseten.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "getGatewayGroups", + methodName: "GetGatewayGroupsAsync", + pathTemplate: "\"/v1/gateway/groups\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Baseten.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Baseten.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Baseten.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "getGatewayGroups", + methodName: "GetGatewayGroupsAsync", + pathTemplate: "\"/v1/gateway/groups\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Baseten.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Baseten.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Baseten.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Baseten.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Baseten.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "getGatewayGroups", + methodName: "GetGatewayGroupsAsync", + pathTemplate: "\"/v1/gateway/groups\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Baseten.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessGetGatewayGroupsResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Baseten.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Baseten.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "getGatewayGroups", + methodName: "GetGatewayGroupsAsync", + pathTemplate: "\"/v1/gateway/groups\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Baseten.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Baseten.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "getGatewayGroups", + methodName: "GetGatewayGroupsAsync", + pathTemplate: "\"/v1/gateway/groups\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessGetGatewayGroupsResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Baseten.GroupsResponseV1.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Baseten.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Baseten.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw new global::Baseten.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::Baseten.GroupsResponseV1.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Baseten.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Baseten.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw new global::Baseten.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.BasetenClient.GetGatewayGroupsByGroupId.g.cs b/src/libs/Baseten/Generated/Baseten.BasetenClient.GetGatewayGroupsByGroupId.g.cs new file mode 100644 index 0000000..621d021 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.BasetenClient.GetGatewayGroupsByGroupId.g.cs @@ -0,0 +1,438 @@ + +#nullable enable + +namespace Baseten +{ + public partial class BasetenClient + { + + + private static readonly global::Baseten.EndPointSecurityRequirement s_GetGatewayGroupsByGroupIdSecurityRequirement0 = + 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_GetGatewayGroupsByGroupIdSecurityRequirements = + new global::Baseten.EndPointSecurityRequirement[] + { s_GetGatewayGroupsByGroupIdSecurityRequirement0, + }; + partial void PrepareGetGatewayGroupsByGroupIdArguments( + global::System.Net.Http.HttpClient httpClient, + ref string groupId); + partial void PrepareGetGatewayGroupsByGroupIdRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string groupId); + partial void ProcessGetGatewayGroupsByGroupIdResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessGetGatewayGroupsByGroupIdResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Get a group + /// + /// + /// 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/gateway/groups/{group_id} \
+ /// --header "Authorization: Api-Key $BASETEN_API_KEY" + ///
+ public async global::System.Threading.Tasks.Task GetGatewayGroupsByGroupIdAsync( + string groupId, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetGatewayGroupsByGroupIdAsResponseAsync( + groupId: groupId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get a group + /// + /// + /// 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/gateway/groups/{group_id} \
+ /// --header "Authorization: Api-Key $BASETEN_API_KEY" + ///
+ public async global::System.Threading.Tasks.Task> GetGatewayGroupsByGroupIdAsResponseAsync( + string groupId, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareGetGatewayGroupsByGroupIdArguments( + httpClient: HttpClient, + groupId: ref groupId); + + + var __authorizations = global::Baseten.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_GetGatewayGroupsByGroupIdSecurityRequirements, + operationName: "GetGatewayGroupsByGroupIdAsync"); + + 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/gateway/groups/{groupId}", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Baseten.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + global::Baseten.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareGetGatewayGroupsByGroupIdRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + groupId: groupId!); + + 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: "getGatewayGroupsByGroupId", + methodName: "GetGatewayGroupsByGroupIdAsync", + pathTemplate: "$\"/v1/gateway/groups/{groupId}\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Baseten.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Baseten.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Baseten.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "getGatewayGroupsByGroupId", + methodName: "GetGatewayGroupsByGroupIdAsync", + pathTemplate: "$\"/v1/gateway/groups/{groupId}\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Baseten.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Baseten.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Baseten.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Baseten.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Baseten.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "getGatewayGroupsByGroupId", + methodName: "GetGatewayGroupsByGroupIdAsync", + pathTemplate: "$\"/v1/gateway/groups/{groupId}\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Baseten.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessGetGatewayGroupsByGroupIdResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Baseten.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Baseten.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "getGatewayGroupsByGroupId", + methodName: "GetGatewayGroupsByGroupIdAsync", + pathTemplate: "$\"/v1/gateway/groups/{groupId}\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Baseten.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Baseten.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "getGatewayGroupsByGroupId", + methodName: "GetGatewayGroupsByGroupIdAsync", + pathTemplate: "$\"/v1/gateway/groups/{groupId}\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessGetGatewayGroupsByGroupIdResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Baseten.GroupV1.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Baseten.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Baseten.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw new global::Baseten.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::Baseten.GroupV1.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Baseten.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Baseten.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw new global::Baseten.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.BasetenClient.GetGatewayGroupsByGroupIdApiKeys.g.cs b/src/libs/Baseten/Generated/Baseten.BasetenClient.GetGatewayGroupsByGroupIdApiKeys.g.cs new file mode 100644 index 0000000..b35d197 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.BasetenClient.GetGatewayGroupsByGroupIdApiKeys.g.cs @@ -0,0 +1,438 @@ + +#nullable enable + +namespace Baseten +{ + public partial class BasetenClient + { + + + private static readonly global::Baseten.EndPointSecurityRequirement s_GetGatewayGroupsByGroupIdApiKeysSecurityRequirement0 = + 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_GetGatewayGroupsByGroupIdApiKeysSecurityRequirements = + new global::Baseten.EndPointSecurityRequirement[] + { s_GetGatewayGroupsByGroupIdApiKeysSecurityRequirement0, + }; + partial void PrepareGetGatewayGroupsByGroupIdApiKeysArguments( + global::System.Net.Http.HttpClient httpClient, + ref string groupId); + partial void PrepareGetGatewayGroupsByGroupIdApiKeysRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string groupId); + partial void ProcessGetGatewayGroupsByGroupIdApiKeysResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessGetGatewayGroupsByGroupIdApiKeysResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// List API keys for a group + /// + /// + /// 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/gateway/groups/{group_id}/api_keys \
+ /// --header "Authorization: Api-Key $BASETEN_API_KEY" + ///
+ public async global::System.Threading.Tasks.Task GetGatewayGroupsByGroupIdApiKeysAsync( + string groupId, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetGatewayGroupsByGroupIdApiKeysAsResponseAsync( + groupId: groupId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List API keys for a group + /// + /// + /// 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/gateway/groups/{group_id}/api_keys \
+ /// --header "Authorization: Api-Key $BASETEN_API_KEY" + ///
+ public async global::System.Threading.Tasks.Task> GetGatewayGroupsByGroupIdApiKeysAsResponseAsync( + string groupId, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareGetGatewayGroupsByGroupIdApiKeysArguments( + httpClient: HttpClient, + groupId: ref groupId); + + + var __authorizations = global::Baseten.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_GetGatewayGroupsByGroupIdApiKeysSecurityRequirements, + operationName: "GetGatewayGroupsByGroupIdApiKeysAsync"); + + 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/gateway/groups/{groupId}/api_keys", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Baseten.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + global::Baseten.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareGetGatewayGroupsByGroupIdApiKeysRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + groupId: groupId!); + + 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: "getGatewayGroupsByGroupIdApiKeys", + methodName: "GetGatewayGroupsByGroupIdApiKeysAsync", + pathTemplate: "$\"/v1/gateway/groups/{groupId}/api_keys\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Baseten.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Baseten.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Baseten.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "getGatewayGroupsByGroupIdApiKeys", + methodName: "GetGatewayGroupsByGroupIdApiKeysAsync", + pathTemplate: "$\"/v1/gateway/groups/{groupId}/api_keys\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Baseten.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Baseten.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Baseten.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Baseten.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Baseten.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "getGatewayGroupsByGroupIdApiKeys", + methodName: "GetGatewayGroupsByGroupIdApiKeysAsync", + pathTemplate: "$\"/v1/gateway/groups/{groupId}/api_keys\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Baseten.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessGetGatewayGroupsByGroupIdApiKeysResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Baseten.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Baseten.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "getGatewayGroupsByGroupIdApiKeys", + methodName: "GetGatewayGroupsByGroupIdApiKeysAsync", + pathTemplate: "$\"/v1/gateway/groups/{groupId}/api_keys\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Baseten.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Baseten.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "getGatewayGroupsByGroupIdApiKeys", + methodName: "GetGatewayGroupsByGroupIdApiKeysAsync", + pathTemplate: "$\"/v1/gateway/groups/{groupId}/api_keys\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessGetGatewayGroupsByGroupIdApiKeysResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Baseten.KeysForGroupResponseV1.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Baseten.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Baseten.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw new global::Baseten.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::Baseten.KeysForGroupResponseV1.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Baseten.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Baseten.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw new global::Baseten.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.BasetenClient.GetGatewayGroupsByGroupIdApiKeysByApiKeyPrefix.g.cs b/src/libs/Baseten/Generated/Baseten.BasetenClient.GetGatewayGroupsByGroupIdApiKeysByApiKeyPrefix.g.cs new file mode 100644 index 0000000..a9caccf --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.BasetenClient.GetGatewayGroupsByGroupIdApiKeysByApiKeyPrefix.g.cs @@ -0,0 +1,447 @@ + +#nullable enable + +namespace Baseten +{ + public partial class BasetenClient + { + + + private static readonly global::Baseten.EndPointSecurityRequirement s_GetGatewayGroupsByGroupIdApiKeysByApiKeyPrefixSecurityRequirement0 = + 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_GetGatewayGroupsByGroupIdApiKeysByApiKeyPrefixSecurityRequirements = + new global::Baseten.EndPointSecurityRequirement[] + { s_GetGatewayGroupsByGroupIdApiKeysByApiKeyPrefixSecurityRequirement0, + }; + partial void PrepareGetGatewayGroupsByGroupIdApiKeysByApiKeyPrefixArguments( + global::System.Net.Http.HttpClient httpClient, + ref string groupId, + ref string apiKeyPrefix); + partial void PrepareGetGatewayGroupsByGroupIdApiKeysByApiKeyPrefixRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string groupId, + string apiKeyPrefix); + partial void ProcessGetGatewayGroupsByGroupIdApiKeysByApiKeyPrefixResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessGetGatewayGroupsByGroupIdApiKeysByApiKeyPrefixResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Get an API key for a group + /// + /// + /// + /// 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/gateway/groups/{group_id}/api_keys/{api_key_prefix} \
+ /// --header "Authorization: Api-Key $BASETEN_API_KEY" + ///
+ public async global::System.Threading.Tasks.Task GetGatewayGroupsByGroupIdApiKeysByApiKeyPrefixAsync( + string groupId, + string apiKeyPrefix, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetGatewayGroupsByGroupIdApiKeysByApiKeyPrefixAsResponseAsync( + groupId: groupId, + apiKeyPrefix: apiKeyPrefix, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get an API key for a group + /// + /// + /// + /// 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/gateway/groups/{group_id}/api_keys/{api_key_prefix} \
+ /// --header "Authorization: Api-Key $BASETEN_API_KEY" + ///
+ public async global::System.Threading.Tasks.Task> GetGatewayGroupsByGroupIdApiKeysByApiKeyPrefixAsResponseAsync( + string groupId, + string apiKeyPrefix, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareGetGatewayGroupsByGroupIdApiKeysByApiKeyPrefixArguments( + httpClient: HttpClient, + groupId: ref groupId, + apiKeyPrefix: ref apiKeyPrefix); + + + var __authorizations = global::Baseten.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_GetGatewayGroupsByGroupIdApiKeysByApiKeyPrefixSecurityRequirements, + operationName: "GetGatewayGroupsByGroupIdApiKeysByApiKeyPrefixAsync"); + + 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/gateway/groups/{groupId}/api_keys/{apiKeyPrefix}", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Baseten.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + global::Baseten.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareGetGatewayGroupsByGroupIdApiKeysByApiKeyPrefixRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + groupId: groupId!, + apiKeyPrefix: apiKeyPrefix!); + + 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: "getGatewayGroupsByGroupIdApiKeysByApiKeyPrefix", + methodName: "GetGatewayGroupsByGroupIdApiKeysByApiKeyPrefixAsync", + pathTemplate: "$\"/v1/gateway/groups/{groupId}/api_keys/{apiKeyPrefix}\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Baseten.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Baseten.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Baseten.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "getGatewayGroupsByGroupIdApiKeysByApiKeyPrefix", + methodName: "GetGatewayGroupsByGroupIdApiKeysByApiKeyPrefixAsync", + pathTemplate: "$\"/v1/gateway/groups/{groupId}/api_keys/{apiKeyPrefix}\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Baseten.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Baseten.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Baseten.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Baseten.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Baseten.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "getGatewayGroupsByGroupIdApiKeysByApiKeyPrefix", + methodName: "GetGatewayGroupsByGroupIdApiKeysByApiKeyPrefixAsync", + pathTemplate: "$\"/v1/gateway/groups/{groupId}/api_keys/{apiKeyPrefix}\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Baseten.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessGetGatewayGroupsByGroupIdApiKeysByApiKeyPrefixResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Baseten.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Baseten.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "getGatewayGroupsByGroupIdApiKeysByApiKeyPrefix", + methodName: "GetGatewayGroupsByGroupIdApiKeysByApiKeyPrefixAsync", + pathTemplate: "$\"/v1/gateway/groups/{groupId}/api_keys/{apiKeyPrefix}\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Baseten.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Baseten.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "getGatewayGroupsByGroupIdApiKeysByApiKeyPrefix", + methodName: "GetGatewayGroupsByGroupIdApiKeysByApiKeyPrefixAsync", + pathTemplate: "$\"/v1/gateway/groups/{groupId}/api_keys/{apiKeyPrefix}\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessGetGatewayGroupsByGroupIdApiKeysByApiKeyPrefixResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Baseten.GatewayKeyInfoV1.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Baseten.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Baseten.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw new global::Baseten.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::Baseten.GatewayKeyInfoV1.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Baseten.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Baseten.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw new global::Baseten.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.BasetenClient.GetLoopsCapabilities.g.cs b/src/libs/Baseten/Generated/Baseten.BasetenClient.GetLoopsCapabilities.g.cs new file mode 100644 index 0000000..54f6120 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.BasetenClient.GetLoopsCapabilities.g.cs @@ -0,0 +1,431 @@ + +#nullable enable + +namespace Baseten +{ + public partial class BasetenClient + { + + + private static readonly global::Baseten.EndPointSecurityRequirement s_GetLoopsCapabilitiesSecurityRequirement0 = + 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_GetLoopsCapabilitiesSecurityRequirements = + new global::Baseten.EndPointSecurityRequirement[] + { s_GetLoopsCapabilitiesSecurityRequirement0, + }; + partial void PrepareGetLoopsCapabilitiesArguments( + global::System.Net.Http.HttpClient httpClient); + partial void PrepareGetLoopsCapabilitiesRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage); + partial void ProcessGetLoopsCapabilitiesResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessGetLoopsCapabilitiesResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Get Loops server capabilities.
+ /// Returns the list of models supported by the Loops server, including each model's maximum context length. + ///
+ /// 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/loops/capabilities \
+ /// --header "Authorization: Api-Key $BASETEN_API_KEY" + ///
+ public async global::System.Threading.Tasks.Task GetLoopsCapabilitiesAsync( + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetLoopsCapabilitiesAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Loops server capabilities.
+ /// Returns the list of models supported by the Loops server, including each model's maximum context length. + ///
+ /// 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/loops/capabilities \
+ /// --header "Authorization: Api-Key $BASETEN_API_KEY" + ///
+ public async global::System.Threading.Tasks.Task> GetLoopsCapabilitiesAsResponseAsync( + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareGetLoopsCapabilitiesArguments( + httpClient: HttpClient); + + + var __authorizations = global::Baseten.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_GetLoopsCapabilitiesSecurityRequirements, + operationName: "GetLoopsCapabilitiesAsync"); + + using var __timeoutCancellationTokenSource = global::Baseten.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Baseten.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Baseten.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Baseten.PathBuilder( + path: "/v1/loops/capabilities", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Baseten.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + global::Baseten.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareGetLoopsCapabilitiesRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Baseten.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Baseten.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "getLoopsCapabilities", + methodName: "GetLoopsCapabilitiesAsync", + pathTemplate: "\"/v1/loops/capabilities\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Baseten.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Baseten.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Baseten.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "getLoopsCapabilities", + methodName: "GetLoopsCapabilitiesAsync", + pathTemplate: "\"/v1/loops/capabilities\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Baseten.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Baseten.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Baseten.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Baseten.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Baseten.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "getLoopsCapabilities", + methodName: "GetLoopsCapabilitiesAsync", + pathTemplate: "\"/v1/loops/capabilities\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Baseten.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessGetLoopsCapabilitiesResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Baseten.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Baseten.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "getLoopsCapabilities", + methodName: "GetLoopsCapabilitiesAsync", + pathTemplate: "\"/v1/loops/capabilities\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Baseten.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Baseten.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "getLoopsCapabilities", + methodName: "GetLoopsCapabilitiesAsync", + pathTemplate: "\"/v1/loops/capabilities\"", + httpMethod: "GET", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessGetLoopsCapabilitiesResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Baseten.GetLoopsCapabilitiesResponseV1.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Baseten.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Baseten.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw new global::Baseten.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::Baseten.GetLoopsCapabilitiesResponseV1.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Baseten.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Baseten.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw new global::Baseten.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.IBasetenClient.CreateGatewayGroups.g.cs b/src/libs/Baseten/Generated/Baseten.IBasetenClient.CreateGatewayGroups.g.cs new file mode 100644 index 0000000..fa83fec --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.IBasetenClient.CreateGatewayGroups.g.cs @@ -0,0 +1,88 @@ +#nullable enable + +namespace Baseten +{ + public partial interface IBasetenClient + { + /// + /// Create a group
+ /// Creates a group and its endpoint configuration + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + /// + /// curl --request POST \
+ /// --url https://api.baseten.co/v1/gateway/groups \
+ /// --header "Authorization: Api-Key $BASETEN_API_KEY" \
+ /// --data '{
+ /// "metadata": {
+ /// "name": "Acme prod",
+ /// "external_entity_id": "cust_42"
+ /// },
+ /// "models": null,
+ /// "hierarchy": {
+ /// "limit_enforcement": "INDEPENDENT",
+ /// "parent_group_id": "abc123"
+ /// }
+ /// }' + ///
+ global::System.Threading.Tasks.Task CreateGatewayGroupsAsync( + + global::Baseten.CreateGroupRequestV1 request, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Create a group
+ /// Creates a group and its endpoint configuration + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + /// + /// curl --request POST \
+ /// --url https://api.baseten.co/v1/gateway/groups \
+ /// --header "Authorization: Api-Key $BASETEN_API_KEY" \
+ /// --data '{
+ /// "metadata": {
+ /// "name": "Acme prod",
+ /// "external_entity_id": "cust_42"
+ /// },
+ /// "models": null,
+ /// "hierarchy": {
+ /// "limit_enforcement": "INDEPENDENT",
+ /// "parent_group_id": "abc123"
+ /// }
+ /// }' + ///
+ global::System.Threading.Tasks.Task> CreateGatewayGroupsAsResponseAsync( + + global::Baseten.CreateGroupRequestV1 request, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Create a group
+ /// Creates a group and its endpoint configuration + ///
+ /// + /// Group identity + display metadata. + /// + /// + /// Per-model rate and usage limit configuration. Defines the group's complete model set. Must be non-empty. + /// + /// + /// Parent linkage and limit enforcement mode. Immutable after creation. + /// + /// 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 CreateGatewayGroupsAsync( + global::Baseten.GroupMetadataV1 metadata, + global::System.Collections.Generic.IList models, + global::Baseten.GroupHierarchyV1 hierarchy, + 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.CreateGatewayGroupsByGroupIdApiKeys.g.cs b/src/libs/Baseten/Generated/Baseten.IBasetenClient.CreateGatewayGroupsByGroupIdApiKeys.g.cs new file mode 100644 index 0000000..d916d27 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.IBasetenClient.CreateGatewayGroupsByGroupIdApiKeys.g.cs @@ -0,0 +1,71 @@ +#nullable enable + +namespace Baseten +{ + public partial interface IBasetenClient + { + /// + /// Create an API key for a group
+ /// Creates a new API key for the given group + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + /// + /// curl --request POST \
+ /// --url https://api.baseten.co/v1/gateway/groups/{group_id}/api_keys \
+ /// --header "Authorization: Api-Key $BASETEN_API_KEY" \
+ /// --data '{
+ /// "name": "prod-key-1"
+ /// }' + ///
+ global::System.Threading.Tasks.Task CreateGatewayGroupsByGroupIdApiKeysAsync( + string groupId, + + global::Baseten.CreateApiKeyForGroupRequestV1 request, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Create an API key for a group
+ /// Creates a new API key for the given group + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + /// + /// curl --request POST \
+ /// --url https://api.baseten.co/v1/gateway/groups/{group_id}/api_keys \
+ /// --header "Authorization: Api-Key $BASETEN_API_KEY" \
+ /// --data '{
+ /// "name": "prod-key-1"
+ /// }' + ///
+ global::System.Threading.Tasks.Task> CreateGatewayGroupsByGroupIdApiKeysAsResponseAsync( + string groupId, + + global::Baseten.CreateApiKeyForGroupRequestV1 request, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Create an API key for a group
+ /// Creates a new API key for the given group + ///
+ /// + /// + /// Optional display name for the new key.
+ /// 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 CreateGatewayGroupsByGroupIdApiKeysAsync( + string groupId, + string? name = 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.CreateGatewayGroupsByGroupIdApiKeysRegister.g.cs b/src/libs/Baseten/Generated/Baseten.IBasetenClient.CreateGatewayGroupsByGroupIdApiKeysRegister.g.cs new file mode 100644 index 0000000..7c8a18d --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.IBasetenClient.CreateGatewayGroupsByGroupIdApiKeysRegister.g.cs @@ -0,0 +1,77 @@ +#nullable enable + +namespace Baseten +{ + public partial interface IBasetenClient + { + /// + /// Register an API key for a group
+ /// Registers a Gateway API key with provided value, name. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + /// + /// curl --request POST \
+ /// --url https://api.baseten.co/v1/gateway/groups/{group_id}/api_keys/register \
+ /// --header "Authorization: Api-Key $BASETEN_API_KEY" \
+ /// --data '{
+ /// "name": "my-model-api-key",
+ /// "key": "my-secure-api-key-value"
+ /// }' + ///
+ global::System.Threading.Tasks.Task CreateGatewayGroupsByGroupIdApiKeysRegisterAsync( + string groupId, + + global::Baseten.RegisterAPIKeyRequestV1 request, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Register an API key for a group
+ /// Registers a Gateway API key with provided value, name. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + /// + /// curl --request POST \
+ /// --url https://api.baseten.co/v1/gateway/groups/{group_id}/api_keys/register \
+ /// --header "Authorization: Api-Key $BASETEN_API_KEY" \
+ /// --data '{
+ /// "name": "my-model-api-key",
+ /// "key": "my-secure-api-key-value"
+ /// }' + ///
+ global::System.Threading.Tasks.Task> CreateGatewayGroupsByGroupIdApiKeysRegisterAsResponseAsync( + string groupId, + + global::Baseten.RegisterAPIKeyRequestV1 request, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Register an API key for a group
+ /// Registers a Gateway API key with provided value, name. + ///
+ /// + /// + /// Optional name for the Model API key
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// + /// + /// Value of the API key to register + /// + /// 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 CreateGatewayGroupsByGroupIdApiKeysRegisterAsync( + string groupId, + string key, + string? name = 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.CreateLoopsRuns.g.cs b/src/libs/Baseten/Generated/Baseten.IBasetenClient.CreateLoopsRuns.g.cs index 15b8110..692d5dd 100644 --- a/src/libs/Baseten/Generated/Baseten.IBasetenClient.CreateLoopsRuns.g.cs +++ b/src/libs/Baseten/Generated/Baseten.IBasetenClient.CreateLoopsRuns.g.cs @@ -69,8 +69,8 @@ public partial interface IBasetenClient /// Base model ID (e.g. 'Qwen/Qwen3-8B'). /// /// - /// Maximum prompt length (in tokens) the run must handle. Set this to the longest training example you plan to send.
- /// Default Value: 131072 + /// Maximum prompt length (in tokens) the run must handle. Set this to the longest training example you plan to send. Defaults to the maximum supported by the model configuration.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 /// /// /// LoRA rank.
diff --git a/src/libs/Baseten/Generated/Baseten.IBasetenClient.CreateTrainerSessionsBySessionIdTrainers.g.cs b/src/libs/Baseten/Generated/Baseten.IBasetenClient.CreateTrainerSessionsBySessionIdTrainers.g.cs index 307f02d..4094571 100644 --- a/src/libs/Baseten/Generated/Baseten.IBasetenClient.CreateTrainerSessionsBySessionIdTrainers.g.cs +++ b/src/libs/Baseten/Generated/Baseten.IBasetenClient.CreateTrainerSessionsBySessionIdTrainers.g.cs @@ -69,8 +69,8 @@ public partial interface IBasetenClient /// Base model ID (e.g. 'Qwen/Qwen3-8B'). /// /// - /// Maximum sequence length for training.
- /// Default Value: 131072 + /// Maximum sequence length for training. Defaults to the maximum supported by the model configuration.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 /// /// /// LoRA rank.
diff --git a/src/libs/Baseten/Generated/Baseten.IBasetenClient.EditGatewayGroupsByGroupId.g.cs b/src/libs/Baseten/Generated/Baseten.IBasetenClient.EditGatewayGroupsByGroupId.g.cs new file mode 100644 index 0000000..640a0a7 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.IBasetenClient.EditGatewayGroupsByGroupId.g.cs @@ -0,0 +1,82 @@ +#nullable enable + +namespace Baseten +{ + public partial interface IBasetenClient + { + /// + /// Update a group
+ /// Updates the group's mutable fields + ///
+ /// + /// + /// 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/gateway/groups/{group_id} \
+ /// --header "Authorization: Api-Key $BASETEN_API_KEY" \
+ /// --data '{
+ /// "metadata": {
+ /// "name": "Acme Prod"
+ /// },
+ /// "models": null
+ /// }' + ///
+ global::System.Threading.Tasks.Task EditGatewayGroupsByGroupIdAsync( + string groupId, + + global::Baseten.UpdateGroupRequestV1 request, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Update a group
+ /// Updates the group's mutable fields + ///
+ /// + /// + /// 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/gateway/groups/{group_id} \
+ /// --header "Authorization: Api-Key $BASETEN_API_KEY" \
+ /// --data '{
+ /// "metadata": {
+ /// "name": "Acme Prod"
+ /// },
+ /// "models": null
+ /// }' + ///
+ global::System.Threading.Tasks.Task> EditGatewayGroupsByGroupIdAsResponseAsync( + string groupId, + + global::Baseten.UpdateGroupRequestV1 request, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Update a group
+ /// Updates the group's mutable fields + ///
+ /// + /// + /// Mutable group metadata.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// + /// + /// Per-model rate and usage limit configuration.
+ /// 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 EditGatewayGroupsByGroupIdAsync( + string groupId, + global::Baseten.UpdateGroupMetadataV1? metadata = default, + global::System.Collections.Generic.IList? models = 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.GetGatewayGroups.g.cs b/src/libs/Baseten/Generated/Baseten.IBasetenClient.GetGatewayGroups.g.cs new file mode 100644 index 0000000..cbac204 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.IBasetenClient.GetGatewayGroups.g.cs @@ -0,0 +1,36 @@ +#nullable enable + +namespace Baseten +{ + public partial interface IBasetenClient + { + /// + /// List groups + /// + /// 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/gateway/groups \
+ /// --header "Authorization: Api-Key $BASETEN_API_KEY" + ///
+ global::System.Threading.Tasks.Task GetGatewayGroupsAsync( + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List groups + /// + /// 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/gateway/groups \
+ /// --header "Authorization: Api-Key $BASETEN_API_KEY" + ///
+ global::System.Threading.Tasks.Task> GetGatewayGroupsAsResponseAsync( + 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.GetGatewayGroupsByGroupId.g.cs b/src/libs/Baseten/Generated/Baseten.IBasetenClient.GetGatewayGroupsByGroupId.g.cs new file mode 100644 index 0000000..8e714bf --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.IBasetenClient.GetGatewayGroupsByGroupId.g.cs @@ -0,0 +1,40 @@ +#nullable enable + +namespace Baseten +{ + public partial interface IBasetenClient + { + /// + /// Get a group + /// + /// + /// 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/gateway/groups/{group_id} \
+ /// --header "Authorization: Api-Key $BASETEN_API_KEY" + ///
+ global::System.Threading.Tasks.Task GetGatewayGroupsByGroupIdAsync( + string groupId, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get a group + /// + /// + /// 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/gateway/groups/{group_id} \
+ /// --header "Authorization: Api-Key $BASETEN_API_KEY" + ///
+ global::System.Threading.Tasks.Task> GetGatewayGroupsByGroupIdAsResponseAsync( + string groupId, + 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.GetGatewayGroupsByGroupIdApiKeys.g.cs b/src/libs/Baseten/Generated/Baseten.IBasetenClient.GetGatewayGroupsByGroupIdApiKeys.g.cs new file mode 100644 index 0000000..3aa9ffc --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.IBasetenClient.GetGatewayGroupsByGroupIdApiKeys.g.cs @@ -0,0 +1,40 @@ +#nullable enable + +namespace Baseten +{ + public partial interface IBasetenClient + { + /// + /// List API keys for a group + /// + /// + /// 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/gateway/groups/{group_id}/api_keys \
+ /// --header "Authorization: Api-Key $BASETEN_API_KEY" + ///
+ global::System.Threading.Tasks.Task GetGatewayGroupsByGroupIdApiKeysAsync( + string groupId, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List API keys for a group + /// + /// + /// 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/gateway/groups/{group_id}/api_keys \
+ /// --header "Authorization: Api-Key $BASETEN_API_KEY" + ///
+ global::System.Threading.Tasks.Task> GetGatewayGroupsByGroupIdApiKeysAsResponseAsync( + string groupId, + 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.GetGatewayGroupsByGroupIdApiKeysByApiKeyPrefix.g.cs b/src/libs/Baseten/Generated/Baseten.IBasetenClient.GetGatewayGroupsByGroupIdApiKeysByApiKeyPrefix.g.cs new file mode 100644 index 0000000..bf332a9 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.IBasetenClient.GetGatewayGroupsByGroupIdApiKeysByApiKeyPrefix.g.cs @@ -0,0 +1,44 @@ +#nullable enable + +namespace Baseten +{ + public partial interface IBasetenClient + { + /// + /// Get an API key for a group + /// + /// + /// + /// 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/gateway/groups/{group_id}/api_keys/{api_key_prefix} \
+ /// --header "Authorization: Api-Key $BASETEN_API_KEY" + ///
+ global::System.Threading.Tasks.Task GetGatewayGroupsByGroupIdApiKeysByApiKeyPrefixAsync( + string groupId, + string apiKeyPrefix, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get an API key for a group + /// + /// + /// + /// 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/gateway/groups/{group_id}/api_keys/{api_key_prefix} \
+ /// --header "Authorization: Api-Key $BASETEN_API_KEY" + ///
+ global::System.Threading.Tasks.Task> GetGatewayGroupsByGroupIdApiKeysByApiKeyPrefixAsResponseAsync( + string groupId, + string apiKeyPrefix, + 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.GetLoopsCapabilities.g.cs b/src/libs/Baseten/Generated/Baseten.IBasetenClient.GetLoopsCapabilities.g.cs new file mode 100644 index 0000000..25f190b --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.IBasetenClient.GetLoopsCapabilities.g.cs @@ -0,0 +1,38 @@ +#nullable enable + +namespace Baseten +{ + public partial interface IBasetenClient + { + /// + /// Get Loops server capabilities.
+ /// Returns the list of models supported by the Loops server, including each model's maximum context length. + ///
+ /// 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/loops/capabilities \
+ /// --header "Authorization: Api-Key $BASETEN_API_KEY" + ///
+ global::System.Threading.Tasks.Task GetLoopsCapabilitiesAsync( + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Loops server capabilities.
+ /// Returns the list of models supported by the Loops server, including each model's maximum context length. + ///
+ /// 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/loops/capabilities \
+ /// --header "Authorization: Api-Key $BASETEN_API_KEY" + ///
+ global::System.Threading.Tasks.Task> GetLoopsCapabilitiesAsResponseAsync( + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.JsonConverters.LimitEnforcementV1.g.cs b/src/libs/Baseten/Generated/Baseten.JsonConverters.LimitEnforcementV1.g.cs new file mode 100644 index 0000000..dc85502 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.JsonConverters.LimitEnforcementV1.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Baseten.JsonConverters +{ + /// + public sealed class LimitEnforcementV1JsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Baseten.LimitEnforcementV1 Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::Baseten.LimitEnforcementV1Extensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Baseten.LimitEnforcementV1)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Baseten.LimitEnforcementV1); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Baseten.LimitEnforcementV1 value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Baseten.LimitEnforcementV1Extensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.JsonConverters.LimitEnforcementV1Nullable.g.cs b/src/libs/Baseten/Generated/Baseten.JsonConverters.LimitEnforcementV1Nullable.g.cs new file mode 100644 index 0000000..d3b0a37 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.JsonConverters.LimitEnforcementV1Nullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Baseten.JsonConverters +{ + /// + public sealed class LimitEnforcementV1NullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Baseten.LimitEnforcementV1? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::Baseten.LimitEnforcementV1Extensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Baseten.LimitEnforcementV1)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Baseten.LimitEnforcementV1?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Baseten.LimitEnforcementV1? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::Baseten.LimitEnforcementV1Extensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.JsonConverters.LimitTypeV1.g.cs b/src/libs/Baseten/Generated/Baseten.JsonConverters.LimitTypeV1.g.cs new file mode 100644 index 0000000..32ad06a --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.JsonConverters.LimitTypeV1.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Baseten.JsonConverters +{ + /// + public sealed class LimitTypeV1JsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Baseten.LimitTypeV1 Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::Baseten.LimitTypeV1Extensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Baseten.LimitTypeV1)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Baseten.LimitTypeV1); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Baseten.LimitTypeV1 value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Baseten.LimitTypeV1Extensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.JsonConverters.LimitTypeV1Nullable.g.cs b/src/libs/Baseten/Generated/Baseten.JsonConverters.LimitTypeV1Nullable.g.cs new file mode 100644 index 0000000..55568e1 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.JsonConverters.LimitTypeV1Nullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Baseten.JsonConverters +{ + /// + public sealed class LimitTypeV1NullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Baseten.LimitTypeV1? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::Baseten.LimitTypeV1Extensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Baseten.LimitTypeV1)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Baseten.LimitTypeV1?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Baseten.LimitTypeV1? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::Baseten.LimitTypeV1Extensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.JsonConverters.RateLimitUnitV1.g.cs b/src/libs/Baseten/Generated/Baseten.JsonConverters.RateLimitUnitV1.g.cs new file mode 100644 index 0000000..aa9e6ec --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.JsonConverters.RateLimitUnitV1.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Baseten.JsonConverters +{ + /// + public sealed class RateLimitUnitV1JsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Baseten.RateLimitUnitV1 Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::Baseten.RateLimitUnitV1Extensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Baseten.RateLimitUnitV1)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Baseten.RateLimitUnitV1); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Baseten.RateLimitUnitV1 value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Baseten.RateLimitUnitV1Extensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.JsonConverters.RateLimitUnitV1Nullable.g.cs b/src/libs/Baseten/Generated/Baseten.JsonConverters.RateLimitUnitV1Nullable.g.cs new file mode 100644 index 0000000..4c4ffba --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.JsonConverters.RateLimitUnitV1Nullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Baseten.JsonConverters +{ + /// + public sealed class RateLimitUnitV1NullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Baseten.RateLimitUnitV1? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::Baseten.RateLimitUnitV1Extensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Baseten.RateLimitUnitV1)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Baseten.RateLimitUnitV1?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Baseten.RateLimitUnitV1? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::Baseten.RateLimitUnitV1Extensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.JsonConverters.UsageLimitUnitV1.g.cs b/src/libs/Baseten/Generated/Baseten.JsonConverters.UsageLimitUnitV1.g.cs new file mode 100644 index 0000000..0fc4caf --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.JsonConverters.UsageLimitUnitV1.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Baseten.JsonConverters +{ + /// + public sealed class UsageLimitUnitV1JsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Baseten.UsageLimitUnitV1 Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::Baseten.UsageLimitUnitV1Extensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Baseten.UsageLimitUnitV1)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Baseten.UsageLimitUnitV1); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Baseten.UsageLimitUnitV1 value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Baseten.UsageLimitUnitV1Extensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.JsonConverters.UsageLimitUnitV1Nullable.g.cs b/src/libs/Baseten/Generated/Baseten.JsonConverters.UsageLimitUnitV1Nullable.g.cs new file mode 100644 index 0000000..03fdc3f --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.JsonConverters.UsageLimitUnitV1Nullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Baseten.JsonConverters +{ + /// + public sealed class UsageLimitUnitV1NullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Baseten.UsageLimitUnitV1? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::Baseten.UsageLimitUnitV1Extensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Baseten.UsageLimitUnitV1)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Baseten.UsageLimitUnitV1?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Baseten.UsageLimitUnitV1? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::Baseten.UsageLimitUnitV1Extensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.JsonSerializerContext.g.cs b/src/libs/Baseten/Generated/Baseten.JsonSerializerContext.g.cs index 2b13376..618daa7 100644 --- a/src/libs/Baseten/Generated/Baseten.JsonSerializerContext.g.cs +++ b/src/libs/Baseten/Generated/Baseten.JsonSerializerContext.g.cs @@ -81,6 +81,22 @@ namespace Baseten typeof(global::Baseten.JsonConverters.ResourceKindNullableJsonConverter), + typeof(global::Baseten.JsonConverters.LimitEnforcementV1JsonConverter), + + typeof(global::Baseten.JsonConverters.LimitEnforcementV1NullableJsonConverter), + + typeof(global::Baseten.JsonConverters.LimitTypeV1JsonConverter), + + typeof(global::Baseten.JsonConverters.LimitTypeV1NullableJsonConverter), + + typeof(global::Baseten.JsonConverters.RateLimitUnitV1JsonConverter), + + typeof(global::Baseten.JsonConverters.RateLimitUnitV1NullableJsonConverter), + + typeof(global::Baseten.JsonConverters.UsageLimitUnitV1JsonConverter), + + typeof(global::Baseten.JsonConverters.UsageLimitUnitV1NullableJsonConverter), + typeof(global::Baseten.JsonConverters.CheckpointsItemJsonConverter), typeof(global::Baseten.JsonConverters.AnyOfJsonConverter), @@ -313,6 +329,9 @@ namespace Baseten [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.GetTrainerServerCheckpointsResponseV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.GetTrainerServerCheckpointFilesResponseV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.SupportedModelV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.GetLoopsCapabilitiesResponseV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.CreateLoopsSessionRequestV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.LoopsSessionV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.CreateLoopsSessionResponseV1))] @@ -391,6 +410,38 @@ namespace Baseten [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.UsageSummaryV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.UserInfoV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.EffectiveModelConfigV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.EffectiveRateLimitV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.EffectiveUsageLimitV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.LimitTypeV1), TypeInfoPropertyName = "LimitTypeV12")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.RateLimitUnitV1), TypeInfoPropertyName = "RateLimitUnitV12")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.UsageLimitUnitV1), TypeInfoPropertyName = "UsageLimitUnitV12")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.GroupHierarchyV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.LimitEnforcementV1), TypeInfoPropertyName = "LimitEnforcementV12")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.GroupMetadataV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.GroupV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.ModelConfigV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.RateLimitV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.UsageLimitV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.PaginationResponseV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.GroupsResponseV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.CreateGroupRequestV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.UpdateGroupMetadataV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.UpdateGroupRequestV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.GatewayKeyInfoV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.KeysForGroupResponseV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.CreateApiKeyForGroupRequestV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.CreateApiKeyForGroupResponseV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.RegisterAPIKeyRequestV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.RegisterAPIKeyResponseV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::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))] @@ -422,6 +473,7 @@ namespace Baseten [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] @@ -437,6 +489,14 @@ namespace Baseten [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] public sealed partial class SourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext { } diff --git a/src/libs/Baseten/Generated/Baseten.JsonSerializerContextTypes.g.cs b/src/libs/Baseten/Generated/Baseten.JsonSerializerContextTypes.g.cs index 0b0084f..16eb77c 100644 --- a/src/libs/Baseten/Generated/Baseten.JsonSerializerContextTypes.g.cs +++ b/src/libs/Baseten/Generated/Baseten.JsonSerializerContextTypes.g.cs @@ -808,315 +808,455 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::Baseten.CreateLoopsSessionRequestV1? Type195 { get; set; } + public global::Baseten.SupportedModelV1? Type195 { get; set; } /// /// /// - public global::Baseten.LoopsSessionV1? Type196 { get; set; } + public global::Baseten.GetLoopsCapabilitiesResponseV1? Type196 { get; set; } /// /// /// - public global::Baseten.CreateLoopsSessionResponseV1? Type197 { get; set; } + public global::System.Collections.Generic.IList? Type197 { get; set; } /// /// /// - public global::Baseten.GetLoopsSessionResponseV1? Type198 { get; set; } + public global::Baseten.CreateLoopsSessionRequestV1? Type198 { get; set; } /// /// /// - public global::Baseten.LoopsRunV1? Type199 { get; set; } + public global::Baseten.LoopsSessionV1? Type199 { get; set; } /// /// /// - public global::Baseten.LoopsSamplerV1? Type200 { get; set; } + public global::Baseten.CreateLoopsSessionResponseV1? Type200 { get; set; } /// /// /// - public global::Baseten.ListLoopsRunsResponseV1? Type201 { get; set; } + public global::Baseten.GetLoopsSessionResponseV1? Type201 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type202 { get; set; } + public global::Baseten.LoopsRunV1? Type202 { get; set; } /// /// /// - public global::Baseten.CreateLoopsRunRequestV1? Type203 { get; set; } + public global::Baseten.LoopsSamplerV1? Type203 { get; set; } /// /// /// - public global::Baseten.CreateLoopsRunResponseV1? Type204 { get; set; } + public global::Baseten.ListLoopsRunsResponseV1? Type204 { get; set; } /// /// /// - public global::Baseten.GetLoopsRunResponseV1? Type205 { get; set; } + public global::System.Collections.Generic.IList? Type205 { get; set; } /// /// /// - public global::Baseten.ListLoopsSamplersResponseV1? Type206 { get; set; } + public global::Baseten.CreateLoopsRunRequestV1? Type206 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type207 { get; set; } + public global::Baseten.CreateLoopsRunResponseV1? Type207 { get; set; } /// /// /// - public global::Baseten.CreateLoopsSamplerRequestV1? Type208 { get; set; } + public global::Baseten.GetLoopsRunResponseV1? Type208 { get; set; } /// /// /// - public global::Baseten.CreateLoopsSamplerResponseV1? Type209 { get; set; } + public global::Baseten.ListLoopsSamplersResponseV1? Type209 { get; set; } /// /// /// - public global::Baseten.GetLoopsSamplerResponseV1? Type210 { get; set; } + public global::System.Collections.Generic.IList? Type210 { get; set; } /// /// /// - public global::Baseten.LoopsCheckpointV1? Type211 { get; set; } + public global::Baseten.CreateLoopsSamplerRequestV1? Type211 { get; set; } /// /// /// - public global::Baseten.ListLoopsCheckpointsResponseV1? Type212 { get; set; } + public global::Baseten.CreateLoopsSamplerResponseV1? Type212 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type213 { get; set; } + public global::Baseten.GetLoopsSamplerResponseV1? Type213 { get; set; } /// /// /// - public global::Baseten.LoopsCheckpointFilesResponseV1? Type214 { get; set; } + public global::Baseten.LoopsCheckpointV1? Type214 { get; set; } /// /// /// - public global::Baseten.LoopsDeploymentStatusV1? Type215 { get; set; } + public global::Baseten.ListLoopsCheckpointsResponseV1? Type215 { get; set; } /// /// /// - public global::Baseten.Name? Type216 { get; set; } + public global::System.Collections.Generic.IList? Type216 { get; set; } /// /// /// - public global::Baseten.LoopsDeploymentV1? Type217 { get; set; } + public global::Baseten.LoopsCheckpointFilesResponseV1? Type217 { get; set; } /// /// /// - public global::Baseten.ListLoopsDeploymentsResponseV1? Type218 { get; set; } + public global::Baseten.LoopsDeploymentStatusV1? Type218 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type219 { get; set; } + public global::Baseten.Name? Type219 { get; set; } /// /// /// - public global::Baseten.DeactivateLoopsDeploymentResponseV1? Type220 { get; set; } + public global::Baseten.LoopsDeploymentV1? Type220 { get; set; } /// /// /// - public global::Baseten.GetLoopsDeploymentResponseV1? Type221 { get; set; } + public global::Baseten.ListLoopsDeploymentsResponseV1? Type221 { get; set; } /// /// /// - public global::Baseten.TrainingGpuCapacityItemV1? Type222 { get; set; } + public global::System.Collections.Generic.IList? Type222 { get; set; } /// /// /// - public global::Baseten.GetTrainingGpuCapacityResponseV1? Type223 { get; set; } + public global::Baseten.DeactivateLoopsDeploymentResponseV1? Type223 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type224 { get; set; } + public global::Baseten.GetLoopsDeploymentResponseV1? Type224 { get; set; } /// /// /// - public global::Baseten.AWSCredentialsV1? Type225 { get; set; } + public global::Baseten.TrainingGpuCapacityItemV1? Type225 { get; set; } /// /// /// - public global::Baseten.GetBlobCredentialsResponseV1? Type226 { get; set; } + public global::Baseten.GetTrainingGpuCapacityResponseV1? Type226 { get; set; } /// /// /// - public global::Baseten.APIKeyCategory? Type227 { get; set; } + public global::System.Collections.Generic.IList? Type227 { get; set; } /// /// /// - public global::Baseten.CreateAPIKeyRequestV1? Type228 { get; set; } + public global::Baseten.AWSCredentialsV1? Type228 { get; set; } /// /// /// - public global::Baseten.APIKeyV1? Type229 { get; set; } + public global::Baseten.GetBlobCredentialsResponseV1? Type229 { get; set; } /// /// /// - public global::Baseten.APIKeyInfoV1? Type230 { get; set; } + public global::Baseten.APIKeyCategory? Type230 { get; set; } /// /// /// - public global::Baseten.APIKeysV1? Type231 { get; set; } + public global::Baseten.CreateAPIKeyRequestV1? Type231 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type232 { get; set; } + public global::Baseten.APIKeyV1? Type232 { get; set; } /// /// /// - public global::Baseten.APIKeyTombstoneV1? Type233 { get; set; } + public global::Baseten.APIKeyInfoV1? Type233 { get; set; } /// /// /// - public global::Baseten.ModelWeightSnapshotV1? Type234 { get; set; } + public global::Baseten.APIKeysV1? Type234 { get; set; } /// /// /// - public global::Baseten.CreateModelWeightSnapshotRequestV1? Type235 { get; set; } + public global::System.Collections.Generic.IList? Type235 { get; set; } /// /// /// - public global::Baseten.CreateLLMModelRequestV1? Type236 { get; set; } + public global::Baseten.APIKeyTombstoneV1? Type236 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type237 { get; set; } + public global::Baseten.ModelWeightSnapshotV1? Type237 { get; set; } /// /// /// - public global::Baseten.LLMModelHandleV1? Type238 { get; set; } + public global::Baseten.CreateModelWeightSnapshotRequestV1? Type238 { get; set; } /// /// /// - public global::Baseten.CreateLLMModelVersionRequestV1? Type239 { get; set; } + public global::Baseten.CreateLLMModelRequestV1? Type239 { get; set; } /// /// /// - public global::Baseten.LibraryListingV1? Type240 { get; set; } + public global::System.Collections.Generic.IList? Type240 { get; set; } /// /// /// - public global::Baseten.LibraryListingsV1? Type241 { get; set; } + public global::Baseten.LLMModelHandleV1? Type241 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type242 { get; set; } + public global::Baseten.CreateLLMModelVersionRequestV1? Type242 { get; set; } /// /// /// - public global::Baseten.CreateLibraryListingRequestV1? Type243 { get; set; } + public global::Baseten.LibraryListingV1? Type243 { get; set; } /// /// /// - public global::Baseten.LibraryListingTombstoneV1? Type244 { get; set; } + public global::Baseten.LibraryListingsV1? Type244 { get; set; } /// /// /// - public global::Baseten.UpdateLibraryListingRequestV1? Type245 { get; set; } + public global::System.Collections.Generic.IList? Type245 { get; set; } /// /// /// - public global::Baseten.LibraryListingVersionV1? Type246 { get; set; } + public global::Baseten.CreateLibraryListingRequestV1? Type246 { get; set; } /// /// /// - public global::Baseten.LibraryListingVersionsV1? Type247 { get; set; } + public global::Baseten.LibraryListingTombstoneV1? Type247 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type248 { get; set; } + public global::Baseten.UpdateLibraryListingRequestV1? Type248 { get; set; } /// /// /// - public global::Baseten.CreateLibraryListingVersionRequestV1? Type249 { get; set; } + public global::Baseten.LibraryListingVersionV1? Type249 { get; set; } /// /// /// - public global::Baseten.LibraryListingVersionTombstoneV1? Type250 { get; set; } + public global::Baseten.LibraryListingVersionsV1? Type250 { get; set; } /// /// /// - public global::Baseten.UpdateLibraryListingVersionRequestV1? Type251 { get; set; } + public global::System.Collections.Generic.IList? Type251 { get; set; } /// /// /// - public global::Baseten.BillableResourceV1? Type252 { get; set; } + public global::Baseten.CreateLibraryListingVersionRequestV1? Type252 { get; set; } /// /// /// - public global::Baseten.ResourceKind? Type253 { get; set; } + public global::Baseten.LibraryListingVersionTombstoneV1? Type253 { get; set; } /// /// /// - public global::Baseten.ChainMetadataV1? Type254 { get; set; } + public global::Baseten.UpdateLibraryListingVersionRequestV1? Type254 { get; set; } /// /// /// - public global::Baseten.DailyDedicatedUsageV1? Type255 { get; set; } + public global::Baseten.BillableResourceV1? Type255 { get; set; } /// /// /// - public global::Baseten.AnyOf? Type256 { get; set; } + public global::Baseten.ResourceKind? Type256 { get; set; } /// /// /// - public global::Baseten.DailyModelApiUsageV1? Type257 { get; set; } + public global::Baseten.ChainMetadataV1? Type257 { get; set; } /// /// /// - public global::Baseten.DailyTrainingUsageV1? Type258 { get; set; } + public global::Baseten.DailyDedicatedUsageV1? Type258 { get; set; } /// /// /// - public global::Baseten.DedicatedItemV1? Type259 { get; set; } + public global::Baseten.AnyOf? Type259 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type260 { get; set; } + public global::Baseten.DailyModelApiUsageV1? Type260 { get; set; } /// /// /// - public global::Baseten.DedicatedUsageV1? Type261 { get; set; } + public global::Baseten.DailyTrainingUsageV1? Type261 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type262 { get; set; } + public global::Baseten.DedicatedItemV1? Type262 { get; set; } /// /// /// - public global::Baseten.ModelApiItemV1? Type263 { get; set; } + public global::System.Collections.Generic.IList? Type263 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type264 { get; set; } + public global::Baseten.DedicatedUsageV1? Type264 { get; set; } /// /// /// - public global::Baseten.ModelApisUsageV1? Type265 { get; set; } + public global::System.Collections.Generic.IList? Type265 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type266 { get; set; } + public global::Baseten.ModelApiItemV1? Type266 { get; set; } /// /// /// - public global::Baseten.TrainingItemV1? Type267 { get; set; } + public global::System.Collections.Generic.IList? Type267 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type268 { get; set; } + public global::Baseten.ModelApisUsageV1? Type268 { get; set; } /// /// /// - public global::Baseten.TrainingUsageV1? Type269 { get; set; } + public global::System.Collections.Generic.IList? Type269 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type270 { get; set; } + public global::Baseten.TrainingItemV1? Type270 { get; set; } /// /// /// - public global::Baseten.UsageSummaryV1? Type271 { get; set; } + public global::System.Collections.Generic.IList? Type271 { get; set; } /// /// /// - public global::Baseten.UserInfoV1? Type272 { get; set; } + public global::Baseten.TrainingUsageV1? Type272 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type273 { get; set; } + /// + /// + /// + public global::Baseten.UsageSummaryV1? Type274 { get; set; } + /// + /// + /// + public global::Baseten.UserInfoV1? Type275 { get; set; } + /// + /// + /// + public global::Baseten.EffectiveModelConfigV1? Type276 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type277 { get; set; } + /// + /// + /// + public global::Baseten.EffectiveRateLimitV1? Type278 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type279 { get; set; } + /// + /// + /// + public global::Baseten.EffectiveUsageLimitV1? Type280 { get; set; } + /// + /// + /// + public global::Baseten.LimitTypeV1? Type281 { get; set; } + /// + /// + /// + public global::Baseten.RateLimitUnitV1? Type282 { get; set; } + /// + /// + /// + public global::Baseten.UsageLimitUnitV1? Type283 { get; set; } + /// + /// + /// + public global::Baseten.GroupHierarchyV1? Type284 { get; set; } + /// + /// + /// + public global::Baseten.LimitEnforcementV1? Type285 { get; set; } + /// + /// + /// + public global::Baseten.GroupMetadataV1? Type286 { get; set; } + /// + /// + /// + public global::Baseten.GroupV1? Type287 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type288 { get; set; } + /// + /// + /// + public global::Baseten.ModelConfigV1? Type289 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type290 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type291 { get; set; } + /// + /// + /// + public global::Baseten.RateLimitV1? Type292 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type293 { get; set; } + /// + /// + /// + public global::Baseten.UsageLimitV1? Type294 { get; set; } + /// + /// + /// + public global::Baseten.PaginationResponseV1? Type295 { get; set; } + /// + /// + /// + public global::Baseten.GroupsResponseV1? Type296 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type297 { get; set; } + /// + /// + /// + public global::Baseten.CreateGroupRequestV1? Type298 { get; set; } + /// + /// + /// + public global::Baseten.UpdateGroupMetadataV1? Type299 { get; set; } + /// + /// + /// + public global::Baseten.UpdateGroupRequestV1? Type300 { get; set; } + /// + /// + /// + public global::Baseten.GatewayKeyInfoV1? Type301 { get; set; } + /// + /// + /// + public global::Baseten.KeysForGroupResponseV1? Type302 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type303 { get; set; } + /// + /// + /// + public global::Baseten.CreateApiKeyForGroupRequestV1? Type304 { get; set; } + /// + /// + /// + public global::Baseten.CreateApiKeyForGroupResponseV1? Type305 { get; set; } + /// + /// + /// + public global::Baseten.RegisterAPIKeyRequestV1? Type306 { get; set; } + /// + /// + /// + public global::Baseten.RegisterAPIKeyResponseV1? Type307 { get; set; } /// /// @@ -1245,62 +1385,98 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::System.Collections.Generic.List? ListType31 { get; set; } + public global::System.Collections.Generic.List? ListType31 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType32 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType33 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType34 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType35 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType36 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType37 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType38 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType39 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType40 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType32 { get; set; } + public global::System.Collections.Generic.List? ListType41 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType33 { get; set; } + public global::System.Collections.Generic.List? ListType42 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType34 { get; set; } + public global::System.Collections.Generic.List? ListType43 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType35 { get; set; } + public global::System.Collections.Generic.List? ListType44 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType36 { get; set; } + public global::System.Collections.Generic.List? ListType45 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType37 { get; set; } + public global::System.Collections.Generic.List? ListType46 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType38 { get; set; } + public global::System.Collections.Generic.List? ListType47 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType39 { get; set; } + public global::System.Collections.Generic.List? ListType48 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType40 { get; set; } + public global::System.Collections.Generic.List? ListType49 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType41 { get; set; } + public global::System.Collections.Generic.List? ListType50 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType42 { get; set; } + public global::System.Collections.Generic.List? ListType51 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType43 { get; set; } + public global::System.Collections.Generic.List? ListType52 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType44 { get; set; } + public global::System.Collections.Generic.List? ListType53 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType45 { get; set; } + public global::System.Collections.Generic.List? ListType54 { get; set; } } } \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.CreateApiKeyForGroupRequestV1.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.CreateApiKeyForGroupRequestV1.Json.g.cs new file mode 100644 index 0000000..0e61344 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.CreateApiKeyForGroupRequestV1.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class CreateApiKeyForGroupRequestV1 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Baseten.CreateApiKeyForGroupRequestV1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.CreateApiKeyForGroupRequestV1), + jsonSerializerContext) as global::Baseten.CreateApiKeyForGroupRequestV1; + } + + /// + /// 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.CreateApiKeyForGroupRequestV1? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Baseten.CreateApiKeyForGroupRequestV1), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.CreateApiKeyForGroupRequestV1; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.Models.CreateApiKeyForGroupRequestV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.CreateApiKeyForGroupRequestV1.g.cs new file mode 100644 index 0000000..d1df2da --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.CreateApiKeyForGroupRequestV1.g.cs @@ -0,0 +1,48 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// + /// + public sealed partial class CreateApiKeyForGroupRequestV1 + { + /// + /// Optional display name for the new key.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("name")] + public string? Name { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Optional display name for the new key.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreateApiKeyForGroupRequestV1( + string? name) + { + this.Name = name; + } + + /// + /// Initializes a new instance of the class. + /// + public CreateApiKeyForGroupRequestV1() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.CreateApiKeyForGroupRequestV1Name.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.CreateApiKeyForGroupRequestV1Name.Json.g.cs new file mode 100644 index 0000000..1220142 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.CreateApiKeyForGroupRequestV1Name.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class CreateApiKeyForGroupRequestV1Name + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Baseten.CreateApiKeyForGroupRequestV1Name? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.CreateApiKeyForGroupRequestV1Name), + jsonSerializerContext) as global::Baseten.CreateApiKeyForGroupRequestV1Name; + } + + /// + /// 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.CreateApiKeyForGroupRequestV1Name? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Baseten.CreateApiKeyForGroupRequestV1Name), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.CreateApiKeyForGroupRequestV1Name; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.Models.CreateApiKeyForGroupRequestV1Name.g.cs b/src/libs/Baseten/Generated/Baseten.Models.CreateApiKeyForGroupRequestV1Name.g.cs new file mode 100644 index 0000000..0505c0c --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.CreateApiKeyForGroupRequestV1Name.g.cs @@ -0,0 +1,20 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// Optional display name for the new key.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ public sealed partial class CreateApiKeyForGroupRequestV1Name + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.CreateApiKeyForGroupResponseV1.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.CreateApiKeyForGroupResponseV1.Json.g.cs new file mode 100644 index 0000000..2172396 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.CreateApiKeyForGroupResponseV1.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class CreateApiKeyForGroupResponseV1 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Baseten.CreateApiKeyForGroupResponseV1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.CreateApiKeyForGroupResponseV1), + jsonSerializerContext) as global::Baseten.CreateApiKeyForGroupResponseV1; + } + + /// + /// 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.CreateApiKeyForGroupResponseV1? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Baseten.CreateApiKeyForGroupResponseV1), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.CreateApiKeyForGroupResponseV1; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.Models.CreateApiKeyForGroupResponseV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.CreateApiKeyForGroupResponseV1.g.cs new file mode 100644 index 0000000..95217b2 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.CreateApiKeyForGroupResponseV1.g.cs @@ -0,0 +1,72 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// + /// + public sealed partial class CreateApiKeyForGroupResponseV1 + { + /// + /// Plaintext key string, returned exactly once. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("api_key")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ApiKey { get; set; } + + /// + /// Key prefix (the part before the dot). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("prefix")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Prefix { get; set; } + + /// + /// Display name of the key.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("name")] + public string? Name { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Plaintext key string, returned exactly once. + /// + /// + /// Key prefix (the part before the dot). + /// + /// + /// Display name of the key.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreateApiKeyForGroupResponseV1( + string apiKey, + string prefix, + string? name) + { + this.ApiKey = apiKey ?? throw new global::System.ArgumentNullException(nameof(apiKey)); + this.Prefix = prefix ?? throw new global::System.ArgumentNullException(nameof(prefix)); + this.Name = name; + } + + /// + /// Initializes a new instance of the class. + /// + public CreateApiKeyForGroupResponseV1() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.CreateApiKeyForGroupResponseV1Name.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.CreateApiKeyForGroupResponseV1Name.Json.g.cs new file mode 100644 index 0000000..53562f0 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.CreateApiKeyForGroupResponseV1Name.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class CreateApiKeyForGroupResponseV1Name + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Baseten.CreateApiKeyForGroupResponseV1Name? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.CreateApiKeyForGroupResponseV1Name), + jsonSerializerContext) as global::Baseten.CreateApiKeyForGroupResponseV1Name; + } + + /// + /// 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.CreateApiKeyForGroupResponseV1Name? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Baseten.CreateApiKeyForGroupResponseV1Name), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.CreateApiKeyForGroupResponseV1Name; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.Models.CreateApiKeyForGroupResponseV1Name.g.cs b/src/libs/Baseten/Generated/Baseten.Models.CreateApiKeyForGroupResponseV1Name.g.cs new file mode 100644 index 0000000..8dfaf08 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.CreateApiKeyForGroupResponseV1Name.g.cs @@ -0,0 +1,20 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// Display name of the key.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ public sealed partial class CreateApiKeyForGroupResponseV1Name + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.CreateGroupRequestV1.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.CreateGroupRequestV1.Json.g.cs new file mode 100644 index 0000000..80a4ca4 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.CreateGroupRequestV1.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class CreateGroupRequestV1 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Baseten.CreateGroupRequestV1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.CreateGroupRequestV1), + jsonSerializerContext) as global::Baseten.CreateGroupRequestV1; + } + + /// + /// 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.CreateGroupRequestV1? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Baseten.CreateGroupRequestV1), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.CreateGroupRequestV1; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.Models.CreateGroupRequestV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.CreateGroupRequestV1.g.cs new file mode 100644 index 0000000..34f4515 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.CreateGroupRequestV1.g.cs @@ -0,0 +1,71 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// + /// + public sealed partial class CreateGroupRequestV1 + { + /// + /// Group identity + display metadata. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Baseten.GroupMetadataV1 Metadata { get; set; } + + /// + /// Per-model rate and usage limit configuration. Defines the group's complete model set. Must be non-empty. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("models")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Models { get; set; } + + /// + /// Parent linkage and limit enforcement mode. Immutable after creation. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("hierarchy")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Baseten.GroupHierarchyV1 Hierarchy { 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. + /// + /// + /// Group identity + display metadata. + /// + /// + /// Per-model rate and usage limit configuration. Defines the group's complete model set. Must be non-empty. + /// + /// + /// Parent linkage and limit enforcement mode. Immutable after creation. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreateGroupRequestV1( + global::Baseten.GroupMetadataV1 metadata, + global::System.Collections.Generic.IList models, + global::Baseten.GroupHierarchyV1 hierarchy) + { + this.Metadata = metadata ?? throw new global::System.ArgumentNullException(nameof(metadata)); + this.Models = models ?? throw new global::System.ArgumentNullException(nameof(models)); + this.Hierarchy = hierarchy ?? throw new global::System.ArgumentNullException(nameof(hierarchy)); + } + + /// + /// Initializes a new instance of the class. + /// + public CreateGroupRequestV1() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.CreateLoopsRunRequestV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.CreateLoopsRunRequestV1.g.cs index 42cc737..d8190b1 100644 --- a/src/libs/Baseten/Generated/Baseten.Models.CreateLoopsRunRequestV1.g.cs +++ b/src/libs/Baseten/Generated/Baseten.Models.CreateLoopsRunRequestV1.g.cs @@ -23,8 +23,8 @@ public sealed partial class CreateLoopsRunRequestV1 public required string BaseModel { get; set; } /// - /// Maximum prompt length (in tokens) the run must handle. Set this to the longest training example you plan to send.
- /// Default Value: 131072 + /// Maximum prompt length (in tokens) the run must handle. Set this to the longest training example you plan to send. Defaults to the maximum supported by the model configuration.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 ///
[global::System.Text.Json.Serialization.JsonPropertyName("max_seq_len")] public int? MaxSeqLen { get; set; } @@ -73,8 +73,8 @@ public sealed partial class CreateLoopsRunRequestV1 /// Base model ID (e.g. 'Qwen/Qwen3-8B'). /// /// - /// Maximum prompt length (in tokens) the run must handle. Set this to the longest training example you plan to send.
- /// Default Value: 131072 + /// Maximum prompt length (in tokens) the run must handle. Set this to the longest training example you plan to send. Defaults to the maximum supported by the model configuration.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 /// /// /// LoRA rank.
diff --git a/src/libs/Baseten/Generated/Baseten.Models.CreateLoopsRunRequestV1MaxSeqLen.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.CreateLoopsRunRequestV1MaxSeqLen.Json.g.cs new file mode 100644 index 0000000..aa8baa6 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.CreateLoopsRunRequestV1MaxSeqLen.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class CreateLoopsRunRequestV1MaxSeqLen + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Baseten.CreateLoopsRunRequestV1MaxSeqLen? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.CreateLoopsRunRequestV1MaxSeqLen), + jsonSerializerContext) as global::Baseten.CreateLoopsRunRequestV1MaxSeqLen; + } + + /// + /// 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.CreateLoopsRunRequestV1MaxSeqLen? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Baseten.CreateLoopsRunRequestV1MaxSeqLen), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.CreateLoopsRunRequestV1MaxSeqLen; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.Models.CreateLoopsRunRequestV1MaxSeqLen.g.cs b/src/libs/Baseten/Generated/Baseten.Models.CreateLoopsRunRequestV1MaxSeqLen.g.cs new file mode 100644 index 0000000..3e893f1 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.CreateLoopsRunRequestV1MaxSeqLen.g.cs @@ -0,0 +1,20 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// Maximum prompt length (in tokens) the run must handle. Set this to the longest training example you plan to send. Defaults to the maximum supported by the model configuration.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ public sealed partial class CreateLoopsRunRequestV1MaxSeqLen + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.CreateTrainerServerRequestV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.CreateTrainerServerRequestV1.g.cs index bebea31..7feff76 100644 --- a/src/libs/Baseten/Generated/Baseten.Models.CreateTrainerServerRequestV1.g.cs +++ b/src/libs/Baseten/Generated/Baseten.Models.CreateTrainerServerRequestV1.g.cs @@ -16,8 +16,8 @@ public sealed partial class CreateTrainerServerRequestV1 public required string Model { get; set; } /// - /// Maximum sequence length for training.
- /// Default Value: 131072 + /// Maximum sequence length for training. Defaults to the maximum supported by the model configuration.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 ///
[global::System.Text.Json.Serialization.JsonPropertyName("max_seq_len")] public int? MaxSeqLen { get; set; } @@ -63,8 +63,8 @@ public sealed partial class CreateTrainerServerRequestV1 /// Base model ID (e.g. 'Qwen/Qwen3-8B'). /// /// - /// Maximum sequence length for training.
- /// Default Value: 131072 + /// Maximum sequence length for training. Defaults to the maximum supported by the model configuration.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 /// /// /// LoRA rank.
diff --git a/src/libs/Baseten/Generated/Baseten.Models.CreateTrainerServerRequestV1MaxSeqLen.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.CreateTrainerServerRequestV1MaxSeqLen.Json.g.cs new file mode 100644 index 0000000..b660205 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.CreateTrainerServerRequestV1MaxSeqLen.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class CreateTrainerServerRequestV1MaxSeqLen + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Baseten.CreateTrainerServerRequestV1MaxSeqLen? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.CreateTrainerServerRequestV1MaxSeqLen), + jsonSerializerContext) as global::Baseten.CreateTrainerServerRequestV1MaxSeqLen; + } + + /// + /// 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.CreateTrainerServerRequestV1MaxSeqLen? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Baseten.CreateTrainerServerRequestV1MaxSeqLen), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.CreateTrainerServerRequestV1MaxSeqLen; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.Models.CreateTrainerServerRequestV1MaxSeqLen.g.cs b/src/libs/Baseten/Generated/Baseten.Models.CreateTrainerServerRequestV1MaxSeqLen.g.cs new file mode 100644 index 0000000..e5b757c --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.CreateTrainerServerRequestV1MaxSeqLen.g.cs @@ -0,0 +1,20 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// Maximum sequence length for training. Defaults to the maximum supported by the model configuration.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ public sealed partial class CreateTrainerServerRequestV1MaxSeqLen + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.EffectiveModelConfigV1.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.EffectiveModelConfigV1.Json.g.cs new file mode 100644 index 0000000..2f628f5 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.EffectiveModelConfigV1.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class EffectiveModelConfigV1 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Baseten.EffectiveModelConfigV1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.EffectiveModelConfigV1), + jsonSerializerContext) as global::Baseten.EffectiveModelConfigV1; + } + + /// + /// 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.EffectiveModelConfigV1? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Baseten.EffectiveModelConfigV1), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.EffectiveModelConfigV1; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.Models.EffectiveModelConfigV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.EffectiveModelConfigV1.g.cs new file mode 100644 index 0000000..9e3c976 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.EffectiveModelConfigV1.g.cs @@ -0,0 +1,65 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// + /// + public sealed partial class EffectiveModelConfigV1 + { + /// + /// Shared endpoint slug. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("slug")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Slug { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("rate_limits")] + public global::System.Collections.Generic.IList? RateLimits { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("usage_limits")] + public global::System.Collections.Generic.IList? UsageLimits { 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. + /// + /// + /// Shared endpoint slug. + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public EffectiveModelConfigV1( + string slug, + global::System.Collections.Generic.IList? rateLimits, + global::System.Collections.Generic.IList? usageLimits) + { + this.Slug = slug ?? throw new global::System.ArgumentNullException(nameof(slug)); + this.RateLimits = rateLimits; + this.UsageLimits = usageLimits; + } + + /// + /// Initializes a new instance of the class. + /// + public EffectiveModelConfigV1() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.EffectiveRateLimitV1.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.EffectiveRateLimitV1.Json.g.cs new file mode 100644 index 0000000..fa5df1e --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.EffectiveRateLimitV1.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class EffectiveRateLimitV1 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Baseten.EffectiveRateLimitV1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.EffectiveRateLimitV1), + jsonSerializerContext) as global::Baseten.EffectiveRateLimitV1; + } + + /// + /// 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.EffectiveRateLimitV1? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Baseten.EffectiveRateLimitV1), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.EffectiveRateLimitV1; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.Models.EffectiveRateLimitV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.EffectiveRateLimitV1.g.cs new file mode 100644 index 0000000..c679b11 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.EffectiveRateLimitV1.g.cs @@ -0,0 +1,85 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// + /// + public sealed partial class EffectiveRateLimitV1 + { + /// + /// The type of the rate limit + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Baseten.JsonConverters.LimitTypeV1JsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Baseten.LimitTypeV1 Type { get; set; } + + /// + /// The unit of the rate limit + /// + [global::System.Text.Json.Serialization.JsonPropertyName("unit")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Baseten.JsonConverters.RateLimitUnitV1JsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Baseten.RateLimitUnitV1 Unit { get; set; } + + /// + /// The threshold for the rate limit + /// + [global::System.Text.Json.Serialization.JsonPropertyName("threshold")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int Threshold { get; set; } + + /// + /// ID of the group in the hierarchy this limit is anchored to. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("source_group")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string SourceGroup { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The type of the rate limit + /// + /// + /// The unit of the rate limit + /// + /// + /// The threshold for the rate limit + /// + /// + /// ID of the group in the hierarchy this limit is anchored to. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public EffectiveRateLimitV1( + global::Baseten.LimitTypeV1 type, + global::Baseten.RateLimitUnitV1 unit, + int threshold, + string sourceGroup) + { + this.Type = type; + this.Unit = unit; + this.Threshold = threshold; + this.SourceGroup = sourceGroup ?? throw new global::System.ArgumentNullException(nameof(sourceGroup)); + } + + /// + /// Initializes a new instance of the class. + /// + public EffectiveRateLimitV1() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.EffectiveUsageLimitV1.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.EffectiveUsageLimitV1.Json.g.cs new file mode 100644 index 0000000..84581e7 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.EffectiveUsageLimitV1.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class EffectiveUsageLimitV1 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Baseten.EffectiveUsageLimitV1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.EffectiveUsageLimitV1), + jsonSerializerContext) as global::Baseten.EffectiveUsageLimitV1; + } + + /// + /// 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.EffectiveUsageLimitV1? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Baseten.EffectiveUsageLimitV1), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.EffectiveUsageLimitV1; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.Models.EffectiveUsageLimitV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.EffectiveUsageLimitV1.g.cs new file mode 100644 index 0000000..75a53f0 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.EffectiveUsageLimitV1.g.cs @@ -0,0 +1,84 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// + /// + public sealed partial class EffectiveUsageLimitV1 + { + /// + /// The type of the usage limit + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Baseten.JsonConverters.LimitTypeV1JsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Baseten.LimitTypeV1 Type { get; set; } + + /// + /// The unit of the usage limit + /// + [global::System.Text.Json.Serialization.JsonPropertyName("unit")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Baseten.JsonConverters.UsageLimitUnitV1JsonConverter))] + public global::Baseten.UsageLimitUnitV1 Unit { get; set; } + + /// + /// The threshold for the usage limit + /// + [global::System.Text.Json.Serialization.JsonPropertyName("threshold")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int Threshold { get; set; } + + /// + /// ID of the group in the hierarchy this limit is anchored to. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("source_group")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string SourceGroup { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The type of the usage limit + /// + /// + /// The threshold for the usage limit + /// + /// + /// ID of the group in the hierarchy this limit is anchored to. + /// + /// + /// The unit of the usage limit + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public EffectiveUsageLimitV1( + global::Baseten.LimitTypeV1 type, + int threshold, + string sourceGroup, + global::Baseten.UsageLimitUnitV1 unit) + { + this.Type = type; + this.Unit = unit; + this.Threshold = threshold; + this.SourceGroup = sourceGroup ?? throw new global::System.ArgumentNullException(nameof(sourceGroup)); + } + + /// + /// Initializes a new instance of the class. + /// + public EffectiveUsageLimitV1() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.GatewayKeyInfoV1.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.GatewayKeyInfoV1.Json.g.cs new file mode 100644 index 0000000..cf60b59 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.GatewayKeyInfoV1.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class GatewayKeyInfoV1 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Baseten.GatewayKeyInfoV1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.GatewayKeyInfoV1), + jsonSerializerContext) as global::Baseten.GatewayKeyInfoV1; + } + + /// + /// 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.GatewayKeyInfoV1? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Baseten.GatewayKeyInfoV1), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.GatewayKeyInfoV1; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.Models.GatewayKeyInfoV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.GatewayKeyInfoV1.g.cs new file mode 100644 index 0000000..e89fe52 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.GatewayKeyInfoV1.g.cs @@ -0,0 +1,60 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// + /// + public sealed partial class GatewayKeyInfoV1 + { + /// + /// The prefix of the Model API key. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("prefix")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Prefix { get; set; } + + /// + /// Optional display name.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("name")] + public string? Name { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The prefix of the Model API key. + /// + /// + /// Optional display name.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public GatewayKeyInfoV1( + string prefix, + string? name) + { + this.Prefix = prefix ?? throw new global::System.ArgumentNullException(nameof(prefix)); + this.Name = name; + } + + /// + /// Initializes a new instance of the class. + /// + public GatewayKeyInfoV1() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.GatewayKeyInfoV1Name.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.GatewayKeyInfoV1Name.Json.g.cs new file mode 100644 index 0000000..f6c0c9a --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.GatewayKeyInfoV1Name.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class GatewayKeyInfoV1Name + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Baseten.GatewayKeyInfoV1Name? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.GatewayKeyInfoV1Name), + jsonSerializerContext) as global::Baseten.GatewayKeyInfoV1Name; + } + + /// + /// 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.GatewayKeyInfoV1Name? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Baseten.GatewayKeyInfoV1Name), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.GatewayKeyInfoV1Name; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.Models.GatewayKeyInfoV1Name.g.cs b/src/libs/Baseten/Generated/Baseten.Models.GatewayKeyInfoV1Name.g.cs new file mode 100644 index 0000000..c1256e5 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.GatewayKeyInfoV1Name.g.cs @@ -0,0 +1,20 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// Optional display name.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ public sealed partial class GatewayKeyInfoV1Name + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.GetLoopsCapabilitiesResponseV1.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.GetLoopsCapabilitiesResponseV1.Json.g.cs new file mode 100644 index 0000000..58f4b51 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.GetLoopsCapabilitiesResponseV1.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class GetLoopsCapabilitiesResponseV1 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Baseten.GetLoopsCapabilitiesResponseV1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.GetLoopsCapabilitiesResponseV1), + jsonSerializerContext) as global::Baseten.GetLoopsCapabilitiesResponseV1; + } + + /// + /// 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.GetLoopsCapabilitiesResponseV1? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Baseten.GetLoopsCapabilitiesResponseV1), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.GetLoopsCapabilitiesResponseV1; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.Models.GetLoopsCapabilitiesResponseV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.GetLoopsCapabilitiesResponseV1.g.cs new file mode 100644 index 0000000..e709465 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.GetLoopsCapabilitiesResponseV1.g.cs @@ -0,0 +1,47 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// Response for ``GET /v1/loops/capabilities``. + /// + public sealed partial class GetLoopsCapabilitiesResponseV1 + { + /// + /// List of models available on the server. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("supported_models")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList SupportedModels { 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. + /// + /// + /// List of models available on the server. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public GetLoopsCapabilitiesResponseV1( + global::System.Collections.Generic.IList supportedModels) + { + this.SupportedModels = supportedModels ?? throw new global::System.ArgumentNullException(nameof(supportedModels)); + } + + /// + /// Initializes a new instance of the class. + /// + public GetLoopsCapabilitiesResponseV1() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.GroupHierarchyV1.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.GroupHierarchyV1.Json.g.cs new file mode 100644 index 0000000..6eef80b --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.GroupHierarchyV1.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class GroupHierarchyV1 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Baseten.GroupHierarchyV1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.GroupHierarchyV1), + jsonSerializerContext) as global::Baseten.GroupHierarchyV1; + } + + /// + /// 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.GroupHierarchyV1? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Baseten.GroupHierarchyV1), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.GroupHierarchyV1; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.Models.GroupHierarchyV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.GroupHierarchyV1.g.cs new file mode 100644 index 0000000..1ae16a7 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.GroupHierarchyV1.g.cs @@ -0,0 +1,58 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// + /// + public sealed partial class GroupHierarchyV1 + { + /// + /// Default Value: INDEPENDENT + /// + [global::System.Text.Json.Serialization.JsonPropertyName("limit_enforcement")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Baseten.JsonConverters.LimitEnforcementV1JsonConverter))] + public global::Baseten.LimitEnforcementV1? LimitEnforcement { get; set; } + + /// + /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// + [global::System.Text.Json.Serialization.JsonPropertyName("parent_group_id")] + public string? ParentGroupId { 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. + /// + /// + /// Default Value: INDEPENDENT + /// + /// + /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public GroupHierarchyV1( + global::Baseten.LimitEnforcementV1? limitEnforcement, + string? parentGroupId) + { + this.LimitEnforcement = limitEnforcement; + this.ParentGroupId = parentGroupId; + } + + /// + /// Initializes a new instance of the class. + /// + public GroupHierarchyV1() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.GroupHierarchyV1ParentGroupId.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.GroupHierarchyV1ParentGroupId.Json.g.cs new file mode 100644 index 0000000..b214b97 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.GroupHierarchyV1ParentGroupId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class GroupHierarchyV1ParentGroupId + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Baseten.GroupHierarchyV1ParentGroupId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.GroupHierarchyV1ParentGroupId), + jsonSerializerContext) as global::Baseten.GroupHierarchyV1ParentGroupId; + } + + /// + /// 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.GroupHierarchyV1ParentGroupId? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Baseten.GroupHierarchyV1ParentGroupId), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.GroupHierarchyV1ParentGroupId; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.Models.GroupHierarchyV1ParentGroupId.g.cs b/src/libs/Baseten/Generated/Baseten.Models.GroupHierarchyV1ParentGroupId.g.cs new file mode 100644 index 0000000..1535df9 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.GroupHierarchyV1ParentGroupId.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// + public sealed partial class GroupHierarchyV1ParentGroupId + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.GroupMetadataV1.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.GroupMetadataV1.Json.g.cs new file mode 100644 index 0000000..1310dce --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.GroupMetadataV1.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class GroupMetadataV1 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Baseten.GroupMetadataV1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.GroupMetadataV1), + jsonSerializerContext) as global::Baseten.GroupMetadataV1; + } + + /// + /// 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.GroupMetadataV1? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Baseten.GroupMetadataV1), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.GroupMetadataV1; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.Models.GroupMetadataV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.GroupMetadataV1.g.cs new file mode 100644 index 0000000..bfef751 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.GroupMetadataV1.g.cs @@ -0,0 +1,60 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// + /// + public sealed partial class GroupMetadataV1 + { + /// + /// Optional display name for the group.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("name")] + public string? Name { get; set; } + + /// + /// External-system identifier for this group. Unique within the caller's org. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("external_entity_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ExternalEntityId { 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. + /// + /// + /// External-system identifier for this group. Unique within the caller's org. + /// + /// + /// Optional display name for the group.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public GroupMetadataV1( + string externalEntityId, + string? name) + { + this.Name = name; + this.ExternalEntityId = externalEntityId ?? throw new global::System.ArgumentNullException(nameof(externalEntityId)); + } + + /// + /// Initializes a new instance of the class. + /// + public GroupMetadataV1() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.GroupMetadataV1Name.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.GroupMetadataV1Name.Json.g.cs new file mode 100644 index 0000000..b2f4345 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.GroupMetadataV1Name.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class GroupMetadataV1Name + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Baseten.GroupMetadataV1Name? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.GroupMetadataV1Name), + jsonSerializerContext) as global::Baseten.GroupMetadataV1Name; + } + + /// + /// 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.GroupMetadataV1Name? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Baseten.GroupMetadataV1Name), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.GroupMetadataV1Name; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.Models.GroupMetadataV1Name.g.cs b/src/libs/Baseten/Generated/Baseten.Models.GroupMetadataV1Name.g.cs new file mode 100644 index 0000000..7503589 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.GroupMetadataV1Name.g.cs @@ -0,0 +1,20 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// Optional display name for the group.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ public sealed partial class GroupMetadataV1Name + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.GroupV1.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.GroupV1.Json.g.cs new file mode 100644 index 0000000..1badc0f --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.GroupV1.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class GroupV1 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Baseten.GroupV1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.GroupV1), + jsonSerializerContext) as global::Baseten.GroupV1; + } + + /// + /// 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.GroupV1? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Baseten.GroupV1), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.GroupV1; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.Models.GroupV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.GroupV1.g.cs new file mode 100644 index 0000000..69bace5 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.GroupV1.g.cs @@ -0,0 +1,101 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// + /// + public sealed partial class GroupV1 + { + /// + /// Internal Baseten ID for the group. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// Group identity + display metadata. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Baseten.GroupMetadataV1 Metadata { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("models")] + public global::System.Collections.Generic.IList? Models { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("effective_models")] + public global::System.Collections.Generic.IList? EffectiveModels { get; set; } + + /// + /// Parent linkage and limit enforcement mode. Parent is null for root groups. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("hierarchy")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Baseten.GroupHierarchyV1 Hierarchy { get; set; } + + /// + /// When this group was created. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("created_at")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTime CreatedAt { 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. + /// + /// + /// Internal Baseten ID for the group. + /// + /// + /// Group identity + display metadata. + /// + /// + /// Parent linkage and limit enforcement mode. Parent is null for root groups. + /// + /// + /// When this group was created. + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public GroupV1( + string id, + global::Baseten.GroupMetadataV1 metadata, + global::Baseten.GroupHierarchyV1 hierarchy, + global::System.DateTime createdAt, + global::System.Collections.Generic.IList? models, + global::System.Collections.Generic.IList? effectiveModels) + { + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.Metadata = metadata ?? throw new global::System.ArgumentNullException(nameof(metadata)); + this.Models = models; + this.EffectiveModels = effectiveModels; + this.Hierarchy = hierarchy ?? throw new global::System.ArgumentNullException(nameof(hierarchy)); + this.CreatedAt = createdAt; + } + + /// + /// Initializes a new instance of the class. + /// + public GroupV1() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.GroupsResponseV1.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.GroupsResponseV1.Json.g.cs new file mode 100644 index 0000000..7f7fe15 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.GroupsResponseV1.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class GroupsResponseV1 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Baseten.GroupsResponseV1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.GroupsResponseV1), + jsonSerializerContext) as global::Baseten.GroupsResponseV1; + } + + /// + /// 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.GroupsResponseV1? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Baseten.GroupsResponseV1), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.GroupsResponseV1; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.Models.GroupsResponseV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.GroupsResponseV1.g.cs new file mode 100644 index 0000000..78d601b --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.GroupsResponseV1.g.cs @@ -0,0 +1,59 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// + /// + public sealed partial class GroupsResponseV1 + { + /// + /// Items in this page. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("items")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Items { get; set; } + + /// + /// Pagination metadata for the page. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("pagination")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Baseten.PaginationResponseV1 Pagination { 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. + /// + /// + /// Items in this page. + /// + /// + /// Pagination metadata for the page. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public GroupsResponseV1( + global::System.Collections.Generic.IList items, + global::Baseten.PaginationResponseV1 pagination) + { + this.Items = items ?? throw new global::System.ArgumentNullException(nameof(items)); + this.Pagination = pagination ?? throw new global::System.ArgumentNullException(nameof(pagination)); + } + + /// + /// Initializes a new instance of the class. + /// + public GroupsResponseV1() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.KeysForGroupResponseV1.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.KeysForGroupResponseV1.Json.g.cs new file mode 100644 index 0000000..03d49d5 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.KeysForGroupResponseV1.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class KeysForGroupResponseV1 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Baseten.KeysForGroupResponseV1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.KeysForGroupResponseV1), + jsonSerializerContext) as global::Baseten.KeysForGroupResponseV1; + } + + /// + /// 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.KeysForGroupResponseV1? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Baseten.KeysForGroupResponseV1), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.KeysForGroupResponseV1; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.Models.KeysForGroupResponseV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.KeysForGroupResponseV1.g.cs new file mode 100644 index 0000000..b45df2b --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.KeysForGroupResponseV1.g.cs @@ -0,0 +1,59 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// + /// + public sealed partial class KeysForGroupResponseV1 + { + /// + /// Items in this page. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("items")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Items { get; set; } + + /// + /// Pagination metadata for the page. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("pagination")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Baseten.PaginationResponseV1 Pagination { 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. + /// + /// + /// Items in this page. + /// + /// + /// Pagination metadata for the page. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public KeysForGroupResponseV1( + global::System.Collections.Generic.IList items, + global::Baseten.PaginationResponseV1 pagination) + { + this.Items = items ?? throw new global::System.ArgumentNullException(nameof(items)); + this.Pagination = pagination ?? throw new global::System.ArgumentNullException(nameof(pagination)); + } + + /// + /// Initializes a new instance of the class. + /// + public KeysForGroupResponseV1() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.LimitEnforcementV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.LimitEnforcementV1.g.cs new file mode 100644 index 0000000..4b8090c --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.LimitEnforcementV1.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// + /// + public enum LimitEnforcementV1 + { + /// + /// + /// + Cascading, + /// + /// + /// + Independent, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class LimitEnforcementV1Extensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this LimitEnforcementV1 value) + { + return value switch + { + LimitEnforcementV1.Cascading => "CASCADING", + LimitEnforcementV1.Independent => "INDEPENDENT", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static LimitEnforcementV1? ToEnum(string value) + { + return value switch + { + "CASCADING" => LimitEnforcementV1.Cascading, + "INDEPENDENT" => LimitEnforcementV1.Independent, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.LimitTypeV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.LimitTypeV1.g.cs new file mode 100644 index 0000000..5c10112 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.LimitTypeV1.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// + /// + public enum LimitTypeV1 + { + /// + /// + /// + Request, + /// + /// + /// + Token, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class LimitTypeV1Extensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this LimitTypeV1 value) + { + return value switch + { + LimitTypeV1.Request => "REQUEST", + LimitTypeV1.Token => "TOKEN", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static LimitTypeV1? ToEnum(string value) + { + return value switch + { + "REQUEST" => LimitTypeV1.Request, + "TOKEN" => LimitTypeV1.Token, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.ModelConfigV1.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.ModelConfigV1.Json.g.cs new file mode 100644 index 0000000..8a3c457 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.ModelConfigV1.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class ModelConfigV1 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Baseten.ModelConfigV1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.ModelConfigV1), + jsonSerializerContext) as global::Baseten.ModelConfigV1; + } + + /// + /// 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.ModelConfigV1? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Baseten.ModelConfigV1), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.ModelConfigV1; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.Models.ModelConfigV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.ModelConfigV1.g.cs new file mode 100644 index 0000000..5297da3 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.ModelConfigV1.g.cs @@ -0,0 +1,65 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// + /// + public sealed partial class ModelConfigV1 + { + /// + /// Shared endpoint slug. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("slug")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Slug { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("rate_limits")] + public global::System.Collections.Generic.IList? RateLimits { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("usage_limits")] + public global::System.Collections.Generic.IList? UsageLimits { 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. + /// + /// + /// Shared endpoint slug. + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ModelConfigV1( + string slug, + global::System.Collections.Generic.IList? rateLimits, + global::System.Collections.Generic.IList? usageLimits) + { + this.Slug = slug ?? throw new global::System.ArgumentNullException(nameof(slug)); + this.RateLimits = rateLimits; + this.UsageLimits = usageLimits; + } + + /// + /// Initializes a new instance of the class. + /// + public ModelConfigV1() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.PaginationResponseV1.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.PaginationResponseV1.Json.g.cs new file mode 100644 index 0000000..4b59888 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.PaginationResponseV1.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class PaginationResponseV1 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Baseten.PaginationResponseV1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.PaginationResponseV1), + jsonSerializerContext) as global::Baseten.PaginationResponseV1; + } + + /// + /// 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.PaginationResponseV1? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Baseten.PaginationResponseV1), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.PaginationResponseV1; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.Models.PaginationResponseV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.PaginationResponseV1.g.cs new file mode 100644 index 0000000..a0f0a3c --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.PaginationResponseV1.g.cs @@ -0,0 +1,60 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// + /// + public sealed partial class PaginationResponseV1 + { + /// + /// Whether more items exist after this page. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool HasMore { get; set; } + + /// + /// Opaque cursor to pass into the next request. Null when there is no next page.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("cursor")] + public string? Cursor { 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. + /// + /// + /// Whether more items exist after this page. + /// + /// + /// Opaque cursor to pass into the next request. Null when there is no next page.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public PaginationResponseV1( + bool hasMore, + string? cursor) + { + this.HasMore = hasMore; + this.Cursor = cursor; + } + + /// + /// Initializes a new instance of the class. + /// + public PaginationResponseV1() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.PaginationResponseV1Cursor.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.PaginationResponseV1Cursor.Json.g.cs new file mode 100644 index 0000000..3823430 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.PaginationResponseV1Cursor.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class PaginationResponseV1Cursor + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Baseten.PaginationResponseV1Cursor? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.PaginationResponseV1Cursor), + jsonSerializerContext) as global::Baseten.PaginationResponseV1Cursor; + } + + /// + /// 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.PaginationResponseV1Cursor? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Baseten.PaginationResponseV1Cursor), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.PaginationResponseV1Cursor; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.Models.PaginationResponseV1Cursor.g.cs b/src/libs/Baseten/Generated/Baseten.Models.PaginationResponseV1Cursor.g.cs new file mode 100644 index 0000000..98e7341 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.PaginationResponseV1Cursor.g.cs @@ -0,0 +1,20 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// Opaque cursor to pass into the next request. Null when there is no next page.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ public sealed partial class PaginationResponseV1Cursor + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.RateLimitUnitV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.RateLimitUnitV1.g.cs new file mode 100644 index 0000000..68d38c1 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.RateLimitUnitV1.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// + /// + public enum RateLimitUnitV1 + { + /// + /// + /// + Minute, + /// + /// + /// + Second, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class RateLimitUnitV1Extensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this RateLimitUnitV1 value) + { + return value switch + { + RateLimitUnitV1.Minute => "MINUTE", + RateLimitUnitV1.Second => "SECOND", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static RateLimitUnitV1? ToEnum(string value) + { + return value switch + { + "MINUTE" => RateLimitUnitV1.Minute, + "SECOND" => RateLimitUnitV1.Second, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.RateLimitV1.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.RateLimitV1.Json.g.cs new file mode 100644 index 0000000..262e8b4 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.RateLimitV1.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class RateLimitV1 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Baseten.RateLimitV1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.RateLimitV1), + jsonSerializerContext) as global::Baseten.RateLimitV1; + } + + /// + /// 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.RateLimitV1? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Baseten.RateLimitV1), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.RateLimitV1; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.Models.RateLimitV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.RateLimitV1.g.cs new file mode 100644 index 0000000..a33180d --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.RateLimitV1.g.cs @@ -0,0 +1,73 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// + /// + public sealed partial class RateLimitV1 + { + /// + /// The type of the rate limit + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Baseten.JsonConverters.LimitTypeV1JsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Baseten.LimitTypeV1 Type { get; set; } + + /// + /// The unit of the rate limit + /// + [global::System.Text.Json.Serialization.JsonPropertyName("unit")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Baseten.JsonConverters.RateLimitUnitV1JsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Baseten.RateLimitUnitV1 Unit { get; set; } + + /// + /// The threshold for the rate limit + /// + [global::System.Text.Json.Serialization.JsonPropertyName("threshold")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int Threshold { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The type of the rate limit + /// + /// + /// The unit of the rate limit + /// + /// + /// The threshold for the rate limit + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public RateLimitV1( + global::Baseten.LimitTypeV1 type, + global::Baseten.RateLimitUnitV1 unit, + int threshold) + { + this.Type = type; + this.Unit = unit; + this.Threshold = threshold; + } + + /// + /// Initializes a new instance of the class. + /// + public RateLimitV1() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.RegisterAPIKeyRequestV1.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.RegisterAPIKeyRequestV1.Json.g.cs new file mode 100644 index 0000000..9e9918e --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.RegisterAPIKeyRequestV1.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class RegisterAPIKeyRequestV1 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Baseten.RegisterAPIKeyRequestV1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.RegisterAPIKeyRequestV1), + jsonSerializerContext) as global::Baseten.RegisterAPIKeyRequestV1; + } + + /// + /// 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.RegisterAPIKeyRequestV1? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Baseten.RegisterAPIKeyRequestV1), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.RegisterAPIKeyRequestV1; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.Models.RegisterAPIKeyRequestV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.RegisterAPIKeyRequestV1.g.cs new file mode 100644 index 0000000..2e89ea8 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.RegisterAPIKeyRequestV1.g.cs @@ -0,0 +1,60 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// Request to register a caller-supplied API key against an existing FederatedGroup. + /// + public sealed partial class RegisterAPIKeyRequestV1 + { + /// + /// Optional name for the Model API key
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("name")] + public string? Name { get; set; } + + /// + /// Value of the API key to register + /// + [global::System.Text.Json.Serialization.JsonPropertyName("key")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Key { 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. + /// + /// + /// Value of the API key to register + /// + /// + /// Optional name for the Model API key
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public RegisterAPIKeyRequestV1( + string key, + string? name) + { + this.Name = name; + this.Key = key ?? throw new global::System.ArgumentNullException(nameof(key)); + } + + /// + /// Initializes a new instance of the class. + /// + public RegisterAPIKeyRequestV1() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.RegisterAPIKeyRequestV1Name.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.RegisterAPIKeyRequestV1Name.Json.g.cs new file mode 100644 index 0000000..18a5834 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.RegisterAPIKeyRequestV1Name.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class RegisterAPIKeyRequestV1Name + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Baseten.RegisterAPIKeyRequestV1Name? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.RegisterAPIKeyRequestV1Name), + jsonSerializerContext) as global::Baseten.RegisterAPIKeyRequestV1Name; + } + + /// + /// 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.RegisterAPIKeyRequestV1Name? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Baseten.RegisterAPIKeyRequestV1Name), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.RegisterAPIKeyRequestV1Name; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.Models.RegisterAPIKeyRequestV1Name.g.cs b/src/libs/Baseten/Generated/Baseten.Models.RegisterAPIKeyRequestV1Name.g.cs new file mode 100644 index 0000000..b28b840 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.RegisterAPIKeyRequestV1Name.g.cs @@ -0,0 +1,20 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// Optional name for the Model API key
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ public sealed partial class RegisterAPIKeyRequestV1Name + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.RegisterAPIKeyResponseV1.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.RegisterAPIKeyResponseV1.Json.g.cs new file mode 100644 index 0000000..cd57fa2 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.RegisterAPIKeyResponseV1.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class RegisterAPIKeyResponseV1 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Baseten.RegisterAPIKeyResponseV1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.RegisterAPIKeyResponseV1), + jsonSerializerContext) as global::Baseten.RegisterAPIKeyResponseV1; + } + + /// + /// 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.RegisterAPIKeyResponseV1? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Baseten.RegisterAPIKeyResponseV1), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.RegisterAPIKeyResponseV1; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.Models.RegisterAPIKeyResponseV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.RegisterAPIKeyResponseV1.g.cs new file mode 100644 index 0000000..c88284d --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.RegisterAPIKeyResponseV1.g.cs @@ -0,0 +1,47 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// + /// + public sealed partial class RegisterAPIKeyResponseV1 + { + /// + /// Whether the registration was successful + /// + [global::System.Text.Json.Serialization.JsonPropertyName("ok")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool Ok { 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. + /// + /// + /// Whether the registration was successful + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public RegisterAPIKeyResponseV1( + bool ok) + { + this.Ok = ok; + } + + /// + /// Initializes a new instance of the class. + /// + public RegisterAPIKeyResponseV1() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.SupportedModelV1.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.SupportedModelV1.Json.g.cs new file mode 100644 index 0000000..92dd197 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.SupportedModelV1.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class SupportedModelV1 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Baseten.SupportedModelV1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.SupportedModelV1), + jsonSerializerContext) as global::Baseten.SupportedModelV1; + } + + /// + /// 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.SupportedModelV1? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Baseten.SupportedModelV1), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.SupportedModelV1; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.Models.SupportedModelV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.SupportedModelV1.g.cs new file mode 100644 index 0000000..704552c --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.SupportedModelV1.g.cs @@ -0,0 +1,59 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// A model supported by the Loops server. + /// + public sealed partial class SupportedModelV1 + { + /// + /// The name of the supported model. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("model_name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ModelName { get; set; } + + /// + /// The maximum context length (in tokens) supported by this model. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("max_context_length")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int MaxContextLength { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The name of the supported model. + /// + /// + /// The maximum context length (in tokens) supported by this model. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public SupportedModelV1( + string modelName, + int maxContextLength) + { + this.ModelName = modelName ?? throw new global::System.ArgumentNullException(nameof(modelName)); + this.MaxContextLength = maxContextLength; + } + + /// + /// Initializes a new instance of the class. + /// + public SupportedModelV1() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.UpdateGroupMetadataV1.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.UpdateGroupMetadataV1.Json.g.cs new file mode 100644 index 0000000..52f17c4 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.UpdateGroupMetadataV1.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class UpdateGroupMetadataV1 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Baseten.UpdateGroupMetadataV1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.UpdateGroupMetadataV1), + jsonSerializerContext) as global::Baseten.UpdateGroupMetadataV1; + } + + /// + /// 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.UpdateGroupMetadataV1? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Baseten.UpdateGroupMetadataV1), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.UpdateGroupMetadataV1; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.Models.UpdateGroupMetadataV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.UpdateGroupMetadataV1.g.cs new file mode 100644 index 0000000..6d16adb --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.UpdateGroupMetadataV1.g.cs @@ -0,0 +1,48 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// + /// + public sealed partial class UpdateGroupMetadataV1 + { + /// + /// Optional display name for the group.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("name")] + public string? Name { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Optional display name for the group.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public UpdateGroupMetadataV1( + string? name) + { + this.Name = name; + } + + /// + /// Initializes a new instance of the class. + /// + public UpdateGroupMetadataV1() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.UpdateGroupMetadataV1Name.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.UpdateGroupMetadataV1Name.Json.g.cs new file mode 100644 index 0000000..fd62e69 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.UpdateGroupMetadataV1Name.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class UpdateGroupMetadataV1Name + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Baseten.UpdateGroupMetadataV1Name? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.UpdateGroupMetadataV1Name), + jsonSerializerContext) as global::Baseten.UpdateGroupMetadataV1Name; + } + + /// + /// 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.UpdateGroupMetadataV1Name? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Baseten.UpdateGroupMetadataV1Name), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.UpdateGroupMetadataV1Name; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.Models.UpdateGroupMetadataV1Name.g.cs b/src/libs/Baseten/Generated/Baseten.Models.UpdateGroupMetadataV1Name.g.cs new file mode 100644 index 0000000..3859f68 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.UpdateGroupMetadataV1Name.g.cs @@ -0,0 +1,20 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// Optional display name for the group.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ public sealed partial class UpdateGroupMetadataV1Name + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.UpdateGroupRequestV1.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.UpdateGroupRequestV1.Json.g.cs new file mode 100644 index 0000000..fc9edc8 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.UpdateGroupRequestV1.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class UpdateGroupRequestV1 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Baseten.UpdateGroupRequestV1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.UpdateGroupRequestV1), + jsonSerializerContext) as global::Baseten.UpdateGroupRequestV1; + } + + /// + /// 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.UpdateGroupRequestV1? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Baseten.UpdateGroupRequestV1), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.UpdateGroupRequestV1; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.Models.UpdateGroupRequestV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.UpdateGroupRequestV1.g.cs new file mode 100644 index 0000000..51d2dd9 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.UpdateGroupRequestV1.g.cs @@ -0,0 +1,61 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// + /// + public sealed partial class UpdateGroupRequestV1 + { + /// + /// Mutable group metadata.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("metadata")] + public global::Baseten.UpdateGroupMetadataV1? Metadata { get; set; } + + /// + /// Per-model rate and usage limit configuration.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("models")] + public global::System.Collections.Generic.IList? Models { 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. + /// + /// + /// Mutable group metadata.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// + /// + /// Per-model rate and usage limit configuration.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public UpdateGroupRequestV1( + global::Baseten.UpdateGroupMetadataV1? metadata, + global::System.Collections.Generic.IList? models) + { + this.Metadata = metadata; + this.Models = models; + } + + /// + /// Initializes a new instance of the class. + /// + public UpdateGroupRequestV1() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.UpdateGroupRequestV1Metadata.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.UpdateGroupRequestV1Metadata.Json.g.cs new file mode 100644 index 0000000..6d19e34 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.UpdateGroupRequestV1Metadata.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class UpdateGroupRequestV1Metadata + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Baseten.UpdateGroupRequestV1Metadata? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.UpdateGroupRequestV1Metadata), + jsonSerializerContext) as global::Baseten.UpdateGroupRequestV1Metadata; + } + + /// + /// 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.UpdateGroupRequestV1Metadata? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Baseten.UpdateGroupRequestV1Metadata), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.UpdateGroupRequestV1Metadata; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.Models.UpdateGroupRequestV1Metadata.g.cs b/src/libs/Baseten/Generated/Baseten.Models.UpdateGroupRequestV1Metadata.g.cs new file mode 100644 index 0000000..726ba15 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.UpdateGroupRequestV1Metadata.g.cs @@ -0,0 +1,20 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// Mutable group metadata.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ public sealed partial class UpdateGroupRequestV1Metadata + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.UpdateGroupRequestV1Models.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.UpdateGroupRequestV1Models.Json.g.cs new file mode 100644 index 0000000..ecffc8b --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.UpdateGroupRequestV1Models.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class UpdateGroupRequestV1Models + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Baseten.UpdateGroupRequestV1Models? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.UpdateGroupRequestV1Models), + jsonSerializerContext) as global::Baseten.UpdateGroupRequestV1Models; + } + + /// + /// 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.UpdateGroupRequestV1Models? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Baseten.UpdateGroupRequestV1Models), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.UpdateGroupRequestV1Models; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.Models.UpdateGroupRequestV1Models.g.cs b/src/libs/Baseten/Generated/Baseten.Models.UpdateGroupRequestV1Models.g.cs new file mode 100644 index 0000000..93e54db --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.UpdateGroupRequestV1Models.g.cs @@ -0,0 +1,20 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// Per-model rate and usage limit configuration.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ public sealed partial class UpdateGroupRequestV1Models + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.UsageLimitUnitV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.UsageLimitUnitV1.g.cs new file mode 100644 index 0000000..6cf8b29 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.UsageLimitUnitV1.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// + /// + public enum UsageLimitUnitV1 + { + /// + /// + /// + Day, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class UsageLimitUnitV1Extensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this UsageLimitUnitV1 value) + { + return value switch + { + UsageLimitUnitV1.Day => "DAY", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static UsageLimitUnitV1? ToEnum(string value) + { + return value switch + { + "DAY" => UsageLimitUnitV1.Day, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.UsageLimitV1.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.UsageLimitV1.Json.g.cs new file mode 100644 index 0000000..359b599 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.UsageLimitV1.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class UsageLimitV1 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Baseten.UsageLimitV1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.UsageLimitV1), + jsonSerializerContext) as global::Baseten.UsageLimitV1; + } + + /// + /// 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.UsageLimitV1? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Baseten.UsageLimitV1), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.UsageLimitV1; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.Models.UsageLimitV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.UsageLimitV1.g.cs new file mode 100644 index 0000000..2052cf7 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.UsageLimitV1.g.cs @@ -0,0 +1,72 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// + /// + public sealed partial class UsageLimitV1 + { + /// + /// The type of the usage limit + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Baseten.JsonConverters.LimitTypeV1JsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Baseten.LimitTypeV1 Type { get; set; } + + /// + /// The unit of the usage limit + /// + [global::System.Text.Json.Serialization.JsonPropertyName("unit")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Baseten.JsonConverters.UsageLimitUnitV1JsonConverter))] + public global::Baseten.UsageLimitUnitV1 Unit { get; set; } + + /// + /// The threshold for the usage limit + /// + [global::System.Text.Json.Serialization.JsonPropertyName("threshold")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int Threshold { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The type of the usage limit + /// + /// + /// The threshold for the usage limit + /// + /// + /// The unit of the usage limit + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public UsageLimitV1( + global::Baseten.LimitTypeV1 type, + int threshold, + global::Baseten.UsageLimitUnitV1 unit) + { + this.Type = type; + this.Unit = unit; + this.Threshold = threshold; + } + + /// + /// Initializes a new instance of the class. + /// + public UsageLimitV1() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/openapi.yaml b/src/libs/Baseten/openapi.yaml index edb1747..057f7fa 100644 --- a/src/libs/Baseten/openapi.yaml +++ b/src/libs/Baseten/openapi.yaml @@ -3269,6 +3269,34 @@ } ] }, + "/v1/loops/capabilities": { + "get": { + "summary": "Get Loops server capabilities.", + "x-codeSamples": [ + { + "lang": "bash", + "source": "curl --request GET \\\n--url https://api.baseten.co/v1/loops/capabilities \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n" + }, + { + "lang": "python", + "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"\")\nurl = \"https://api.baseten.co/v1/loops/capabilities\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n \"GET\",\n url,\n headers=headers,\n json={}\n)\n\nprint(response.text)" + } + ], + "description": "Returns the list of models supported by the Loops server, including each model's maximum context length.", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetLoopsCapabilitiesResponseV1" + } + } + } + } + } + } + }, "/v1/loops/sessions": { "post": { "summary": "Create a Loops session.", @@ -4683,6 +4711,283 @@ "$ref": "#/components/parameters/user_id" } ] + }, + "/v1/gateway/groups": { + "get": { + "summary": "List groups", + "x-codeSamples": [ + { + "lang": "bash", + "source": "curl --request GET \\\n--url https://api.baseten.co/v1/gateway/groups \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n" + }, + { + "lang": "python", + "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"\")\nurl = \"https://api.baseten.co/v1/gateway/groups\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n \"GET\",\n url,\n headers=headers,\n json={}\n)\n\nprint(response.text)" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GroupsResponseV1" + } + } + } + } + } + }, + "post": { + "summary": "Create a group", + "x-codeSamples": [ + { + "lang": "bash", + "source": "curl --request POST \\\n--url https://api.baseten.co/v1/gateway/groups \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\" \\\n--data '{\n \"metadata\": {\n \"name\": \"Acme prod\",\n \"external_entity_id\": \"cust_42\"\n },\n \"models\": null,\n \"hierarchy\": {\n \"limit_enforcement\": \"INDEPENDENT\",\n \"parent_group_id\": \"abc123\"\n }\n}'" + }, + { + "lang": "python", + "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"\")\nurl = \"https://api.baseten.co/v1/gateway/groups\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n \"POST\",\n url,\n headers=headers,\n json={'metadata': {'name': 'Acme prod', 'external_entity_id': 'cust_42'}, 'models': None, 'hierarchy': {'limit_enforcement': 'INDEPENDENT', 'parent_group_id': 'abc123'}}\n)\n\nprint(response.text)" + } + ], + "description": "Creates a group and its endpoint configuration", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateGroupRequestV1" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GroupV1" + } + } + } + } + } + } + }, + "/v1/gateway/groups/{group_id}": { + "get": { + "summary": "Get a group", + "x-codeSamples": [ + { + "lang": "bash", + "source": "curl --request GET \\\n--url https://api.baseten.co/v1/gateway/groups/{group_id} \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n" + }, + { + "lang": "python", + "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"\")\nurl = \"https://api.baseten.co/v1/gateway/groups/{group_id}\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n \"GET\",\n url,\n headers=headers,\n json={}\n)\n\nprint(response.text)" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GroupV1" + } + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/group_id" + } + ], + "patch": { + "summary": "Update a group", + "x-codeSamples": [ + { + "lang": "bash", + "source": "curl --request PATCH \\\n--url https://api.baseten.co/v1/gateway/groups/{group_id} \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\" \\\n--data '{\n \"metadata\": {\n \"name\": \"Acme Prod\"\n },\n \"models\": null\n}'" + }, + { + "lang": "python", + "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"\")\nurl = \"https://api.baseten.co/v1/gateway/groups/{group_id}\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n \"PATCH\",\n url,\n headers=headers,\n json={'metadata': {'name': 'Acme Prod'}, 'models': None}\n)\n\nprint(response.text)" + } + ], + "description": "Updates the group's mutable fields", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateGroupRequestV1" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GroupV1" + } + } + } + } + } + } + }, + "/v1/gateway/groups/{group_id}/api_keys": { + "get": { + "summary": "List API keys for a group", + "x-codeSamples": [ + { + "lang": "bash", + "source": "curl --request GET \\\n--url https://api.baseten.co/v1/gateway/groups/{group_id}/api_keys \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n" + }, + { + "lang": "python", + "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"\")\nurl = \"https://api.baseten.co/v1/gateway/groups/{group_id}/api_keys\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n \"GET\",\n url,\n headers=headers,\n json={}\n)\n\nprint(response.text)" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/KeysForGroupResponseV1" + } + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/group_id" + } + ], + "post": { + "summary": "Create an API key for a group", + "x-codeSamples": [ + { + "lang": "bash", + "source": "curl --request POST \\\n--url https://api.baseten.co/v1/gateway/groups/{group_id}/api_keys \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\" \\\n--data '{\n \"name\": \"prod-key-1\"\n}'" + }, + { + "lang": "python", + "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"\")\nurl = \"https://api.baseten.co/v1/gateway/groups/{group_id}/api_keys\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n \"POST\",\n url,\n headers=headers,\n json={'name': 'prod-key-1'}\n)\n\nprint(response.text)" + } + ], + "description": "Creates a new API key for the given group", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateApiKeyForGroupRequestV1" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateApiKeyForGroupResponseV1" + } + } + } + } + } + } + }, + "/v1/gateway/groups/{group_id}/api_keys/register": { + "post": { + "summary": "Register an API key for a group", + "x-codeSamples": [ + { + "lang": "bash", + "source": "curl --request POST \\\n--url https://api.baseten.co/v1/gateway/groups/{group_id}/api_keys/register \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\" \\\n--data '{\n \"name\": \"my-model-api-key\",\n \"key\": \"my-secure-api-key-value\"\n}'" + }, + { + "lang": "python", + "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"\")\nurl = \"https://api.baseten.co/v1/gateway/groups/{group_id}/api_keys/register\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n \"POST\",\n url,\n headers=headers,\n json={'name': 'my-model-api-key', 'key': 'my-secure-api-key-value'}\n)\n\nprint(response.text)" + } + ], + "description": "Registers a Gateway API key with provided value, name.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RegisterAPIKeyRequestV1" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RegisterAPIKeyResponseV1" + } + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/group_id" + } + ] + }, + "/v1/gateway/groups/{group_id}/api_keys/{api_key_prefix}": { + "get": { + "summary": "Get an API key for a group", + "x-codeSamples": [ + { + "lang": "bash", + "source": "curl --request GET \\\n--url https://api.baseten.co/v1/gateway/groups/{group_id}/api_keys/{api_key_prefix} \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\"\n" + }, + { + "lang": "python", + "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"\")\nurl = \"https://api.baseten.co/v1/gateway/groups/{group_id}/api_keys/{api_key_prefix}\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n \"GET\",\n url,\n headers=headers,\n json={}\n)\n\nprint(response.text)" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GatewayKeyInfoV1" + } + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/group_id" + }, + { + "$ref": "#/components/parameters/api_key_prefix" + } + ] } }, "openapi": "3.1.0", @@ -9976,15 +10281,22 @@ "type": "string" }, "max_seq_len": { - "default": 131072, - "description": "Maximum sequence length for training.", - "title": "Max Seq Len", - "type": "integer" - }, - "lora_rank": { - "default": 64, - "description": "LoRA rank.", - "title": "Lora Rank", + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Maximum sequence length for training. Defaults to the maximum supported by the model configuration.", + "title": "Max Seq Len" + }, + "lora_rank": { + "default": 64, + "description": "LoRA rank.", + "title": "Lora Rank", "type": "integer" }, "seed": { @@ -10198,6 +10510,45 @@ "title": "GetTrainerServerCheckpointFilesResponseV1", "type": "object" }, + "SupportedModelV1": { + "description": "A model supported by the Loops server.", + "properties": { + "model_name": { + "description": "The name of the supported model.", + "title": "Model Name", + "type": "string" + }, + "max_context_length": { + "description": "The maximum context length (in tokens) supported by this model.", + "title": "Max Context Length", + "type": "integer" + } + }, + "required": [ + "model_name", + "max_context_length" + ], + "title": "SupportedModelV1", + "type": "object" + }, + "GetLoopsCapabilitiesResponseV1": { + "description": "Response for ``GET /v1/loops/capabilities``.", + "properties": { + "supported_models": { + "description": "List of models available on the server.", + "items": { + "$ref": "#/components/schemas/SupportedModelV1" + }, + "title": "Supported Models", + "type": "array" + } + }, + "required": [ + "supported_models" + ], + "title": "GetLoopsCapabilitiesResponseV1", + "type": "object" + }, "CreateLoopsSessionRequestV1": { "properties": { "training_project_id": { @@ -10362,10 +10713,17 @@ "type": "string" }, "max_seq_len": { - "default": 131072, - "description": "Maximum prompt length (in tokens) the run must handle. Set this to the longest training example you plan to send.", - "title": "Max Seq Len", - "type": "integer" + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Maximum prompt length (in tokens) the run must handle. Set this to the longest training example you plan to send. Defaults to the maximum supported by the model configuration.", + "title": "Max Seq Len" }, "lora_rank": { "default": 64, @@ -12467,6 +12825,655 @@ ], "title": "UserInfoV1", "type": "object" + }, + "EffectiveModelConfigV1": { + "properties": { + "slug": { + "description": "Shared endpoint slug.", + "title": "Slug", + "type": "string" + }, + "rate_limits": { + "items": { + "$ref": "#/components/schemas/EffectiveRateLimitV1" + }, + "title": "Rate Limits", + "type": "array" + }, + "usage_limits": { + "items": { + "$ref": "#/components/schemas/EffectiveUsageLimitV1" + }, + "title": "Usage Limits", + "type": "array" + } + }, + "required": [ + "slug" + ], + "title": "EffectiveModelConfigV1", + "type": "object" + }, + "EffectiveRateLimitV1": { + "properties": { + "type": { + "$ref": "#/components/schemas/LimitTypeV1", + "description": "The type of the rate limit", + "examples": [ + "TOKEN", + "REQUEST" + ] + }, + "unit": { + "$ref": "#/components/schemas/RateLimitUnitV1", + "description": "The unit of the rate limit", + "examples": [ + "SECOND", + "MINUTE" + ] + }, + "threshold": { + "description": "The threshold for the rate limit", + "examples": [ + 1000, + 50000 + ], + "minimum": 1, + "title": "Threshold", + "type": "integer" + }, + "source_group": { + "description": "ID of the group in the hierarchy this limit is anchored to.", + "examples": [ + "abc123" + ], + "title": "Source Group", + "type": "string" + } + }, + "required": [ + "type", + "unit", + "threshold", + "source_group" + ], + "title": "EffectiveRateLimitV1", + "type": "object" + }, + "EffectiveUsageLimitV1": { + "properties": { + "type": { + "$ref": "#/components/schemas/LimitTypeV1", + "description": "The type of the usage limit", + "examples": [ + "REQUEST", + "TOKEN" + ] + }, + "unit": { + "$ref": "#/components/schemas/UsageLimitUnitV1", + "description": "The unit of the usage limit", + "examples": [ + "DAY" + ] + }, + "threshold": { + "description": "The threshold for the usage limit", + "examples": [ + 10000000 + ], + "minimum": 1, + "title": "Threshold", + "type": "integer" + }, + "source_group": { + "description": "ID of the group in the hierarchy this limit is anchored to.", + "examples": [ + "abc123" + ], + "title": "Source Group", + "type": "string" + } + }, + "required": [ + "type", + "unit", + "threshold", + "source_group" + ], + "title": "EffectiveUsageLimitV1", + "type": "object" + }, + "GroupHierarchyV1": { + "properties": { + "limit_enforcement": { + "$ref": "#/components/schemas/LimitEnforcementV1", + "default": "INDEPENDENT", + "examples": [ + "CASCADING", + "INDEPENDENT" + ] + }, + "parent_group_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "examples": [ + "abc123" + ], + "title": "Parent Group Id" + } + }, + "title": "GroupHierarchyV1", + "type": "object" + }, + "GroupMetadataV1": { + "properties": { + "name": { + "anyOf": [ + { + "maxLength": 255, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Optional display name for the group.", + "examples": [ + "Acme prod" + ], + "title": "Name" + }, + "external_entity_id": { + "description": "External-system identifier for this group. Unique within the caller's org.", + "examples": [ + "cust_42" + ], + "maxLength": 255, + "minLength": 1, + "title": "External Entity Id", + "type": "string" + } + }, + "required": [ + "external_entity_id" + ], + "title": "GroupMetadataV1", + "type": "object" + }, + "GroupV1": { + "properties": { + "id": { + "description": "Internal Baseten ID for the group.", + "title": "Id", + "type": "string" + }, + "metadata": { + "$ref": "#/components/schemas/GroupMetadataV1", + "description": "Group identity + display metadata." + }, + "models": { + "items": { + "$ref": "#/components/schemas/ModelConfigV1" + }, + "title": "Models", + "type": "array" + }, + "effective_models": { + "items": { + "$ref": "#/components/schemas/EffectiveModelConfigV1" + }, + "title": "Effective Models", + "type": "array" + }, + "hierarchy": { + "$ref": "#/components/schemas/GroupHierarchyV1", + "description": "Parent linkage and limit enforcement mode. Parent is null for root groups." + }, + "created_at": { + "description": "When this group was created.", + "format": "date-time", + "title": "Created At", + "type": "string" + } + }, + "required": [ + "id", + "metadata", + "hierarchy", + "created_at" + ], + "title": "GroupV1", + "type": "object" + }, + "LimitEnforcementV1": { + "enum": [ + "CASCADING", + "INDEPENDENT" + ], + "title": "LimitEnforcementV1", + "type": "string" + }, + "LimitTypeV1": { + "enum": [ + "REQUEST", + "TOKEN" + ], + "title": "LimitTypeV1", + "type": "string" + }, + "ModelConfigV1": { + "properties": { + "slug": { + "description": "Shared endpoint slug.", + "title": "Slug", + "type": "string" + }, + "rate_limits": { + "items": { + "$ref": "#/components/schemas/RateLimitV1" + }, + "title": "Rate Limits", + "type": "array" + }, + "usage_limits": { + "items": { + "$ref": "#/components/schemas/UsageLimitV1" + }, + "title": "Usage Limits", + "type": "array" + } + }, + "required": [ + "slug" + ], + "title": "ModelConfigV1", + "type": "object" + }, + "PaginationResponseV1": { + "properties": { + "has_more": { + "description": "Whether more items exist after this page.", + "title": "Has More", + "type": "boolean" + }, + "cursor": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Opaque cursor to pass into the next request. Null when there is no next page.", + "title": "Cursor" + } + }, + "required": [ + "has_more" + ], + "title": "PaginationResponseV1", + "type": "object" + }, + "RateLimitUnitV1": { + "enum": [ + "SECOND", + "MINUTE" + ], + "title": "RateLimitUnitV1", + "type": "string" + }, + "RateLimitV1": { + "properties": { + "type": { + "$ref": "#/components/schemas/LimitTypeV1", + "description": "The type of the rate limit", + "examples": [ + "TOKEN", + "REQUEST" + ] + }, + "unit": { + "$ref": "#/components/schemas/RateLimitUnitV1", + "description": "The unit of the rate limit", + "examples": [ + "SECOND", + "MINUTE" + ] + }, + "threshold": { + "description": "The threshold for the rate limit", + "examples": [ + 1000, + 50000 + ], + "minimum": 1, + "title": "Threshold", + "type": "integer" + } + }, + "required": [ + "type", + "unit", + "threshold" + ], + "title": "RateLimitV1", + "type": "object" + }, + "UsageLimitUnitV1": { + "enum": [ + "DAY" + ], + "title": "UsageLimitUnitV1", + "type": "string" + }, + "UsageLimitV1": { + "properties": { + "type": { + "$ref": "#/components/schemas/LimitTypeV1", + "description": "The type of the usage limit", + "examples": [ + "REQUEST", + "TOKEN" + ] + }, + "unit": { + "$ref": "#/components/schemas/UsageLimitUnitV1", + "description": "The unit of the usage limit", + "examples": [ + "DAY" + ] + }, + "threshold": { + "description": "The threshold for the usage limit", + "examples": [ + 10000000 + ], + "minimum": 1, + "title": "Threshold", + "type": "integer" + } + }, + "required": [ + "type", + "unit", + "threshold" + ], + "title": "UsageLimitV1", + "type": "object" + }, + "GroupsResponseV1": { + "properties": { + "items": { + "description": "Items in this page.", + "items": { + "$ref": "#/components/schemas/GroupV1" + }, + "title": "Items", + "type": "array" + }, + "pagination": { + "$ref": "#/components/schemas/PaginationResponseV1", + "description": "Pagination metadata for the page." + } + }, + "required": [ + "items", + "pagination" + ], + "title": "GroupsResponseV1", + "type": "object" + }, + "CreateGroupRequestV1": { + "properties": { + "metadata": { + "$ref": "#/components/schemas/GroupMetadataV1", + "description": "Group identity + display metadata." + }, + "models": { + "description": "Per-model rate and usage limit configuration. Defines the group's complete model set. Must be non-empty.", + "items": { + "$ref": "#/components/schemas/ModelConfigV1" + }, + "title": "Models", + "type": "array" + }, + "hierarchy": { + "$ref": "#/components/schemas/GroupHierarchyV1", + "description": "Parent linkage and limit enforcement mode. Immutable after creation." + } + }, + "required": [ + "metadata", + "models", + "hierarchy" + ], + "title": "CreateGroupRequestV1", + "type": "object" + }, + "UpdateGroupMetadataV1": { + "properties": { + "name": { + "anyOf": [ + { + "maxLength": 255, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Optional display name for the group.", + "examples": [ + "Acme prod" + ], + "title": "Name" + } + }, + "title": "UpdateGroupMetadataV1", + "type": "object" + }, + "UpdateGroupRequestV1": { + "properties": { + "metadata": { + "anyOf": [ + { + "$ref": "#/components/schemas/UpdateGroupMetadataV1" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Mutable group metadata.", + "examples": [ + { + "name": "Acme Prod" + } + ] + }, + "models": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/ModelConfigV1" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Per-model rate and usage limit configuration.", + "title": "Models" + } + }, + "title": "UpdateGroupRequestV1", + "type": "object" + }, + "GatewayKeyInfoV1": { + "properties": { + "prefix": { + "description": "The prefix of the Model API key.", + "title": "Prefix", + "type": "string" + }, + "name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Optional display name.", + "title": "Name" + } + }, + "required": [ + "prefix" + ], + "title": "GatewayKeyInfoV1", + "type": "object" + }, + "KeysForGroupResponseV1": { + "properties": { + "items": { + "description": "Items in this page.", + "items": { + "$ref": "#/components/schemas/GatewayKeyInfoV1" + }, + "title": "Items", + "type": "array" + }, + "pagination": { + "$ref": "#/components/schemas/PaginationResponseV1", + "description": "Pagination metadata for the page." + } + }, + "required": [ + "items", + "pagination" + ], + "title": "KeysForGroupResponseV1", + "type": "object" + }, + "CreateApiKeyForGroupRequestV1": { + "properties": { + "name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Optional display name for the new key.", + "examples": [ + "prod-key-1" + ], + "title": "Name" + } + }, + "title": "CreateApiKeyForGroupRequestV1", + "type": "object" + }, + "CreateApiKeyForGroupResponseV1": { + "properties": { + "api_key": { + "description": "Plaintext key string, returned exactly once.", + "title": "Api Key", + "type": "string" + }, + "prefix": { + "description": "Key prefix (the part before the dot).", + "title": "Prefix", + "type": "string" + }, + "name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Display name of the key.", + "title": "Name" + } + }, + "required": [ + "api_key", + "prefix" + ], + "title": "CreateApiKeyForGroupResponseV1", + "type": "object" + }, + "RegisterAPIKeyRequestV1": { + "description": "Request to register a caller-supplied API key against an existing FederatedGroup.", + "properties": { + "name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Optional name for the Model API key", + "examples": [ + "my-model-api-key" + ], + "title": "Name" + }, + "key": { + "description": "Value of the API key to register", + "examples": [ + "my-secure-api-key-value" + ], + "title": "Key", + "type": "string" + } + }, + "required": [ + "key" + ], + "title": "RegisterAPIKeyRequestV1", + "type": "object" + }, + "RegisterAPIKeyResponseV1": { + "properties": { + "ok": { + "description": "Whether the registration was successful", + "title": "Ok", + "type": "boolean" + } + }, + "required": [ + "ok" + ], + "title": "RegisterAPIKeyResponseV1", + "type": "object" } }, "parameters": { @@ -12621,6 +13628,14 @@ "name": "user_id", "in": "path", "required": true + }, + "group_id": { + "schema": { + "type": "string" + }, + "name": "group_id", + "in": "path", + "required": true } }, "securitySchemes": {